Skip to content

Commit 370000c

Browse files
committed
cleanup
1 parent 36b6834 commit 370000c

21 files changed

+102
-150
lines changed

Attribute.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

Data.cs

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,99 @@
33
using System;
44
using System.Runtime.InteropServices;
55

6+
[Flags]
7+
public enum Attribute : int
8+
{
9+
ATTRIBUTE_EARTH = 0x01,
10+
ATTRIBUTE_WATER = 0x02,
11+
ATTRIBUTE_FIRE = 0x04,
12+
ATTRIBUTE_WIND = 0x08,
13+
ATTRIBUTE_LIGHT = 0x10,
14+
ATTRIBUTE_DARK = 0x20,
15+
ATTRIBUTE_DEVINE = 0x40
16+
}
17+
18+
[Flags]
19+
public enum Race : int
20+
{
21+
RACE_WARRIOR = 0x1,
22+
RACE_SPELLCASTER = 0x2,
23+
RACE_FAIRY = 0x4,
24+
RACE_FIEND = 0x8,
25+
RACE_ZOMBIE = 0x10,
26+
RACE_MACHINE = 0x20,
27+
RACE_AQUA = 0x40,
28+
RACE_PYRO = 0x80,
29+
RACE_ROCK = 0x100,
30+
RACE_WINDBEAST = 0x200,
31+
RACE_PLANT = 0x400,
32+
RACE_INSECT = 0x800,
33+
RACE_THUNDER = 0x1000,
34+
RACE_DRAGON = 0x2000,
35+
RACE_BEAST = 0x4000,
36+
RACE_BEASTWARRIOR = 0x8000,
37+
RACE_DINOSAUR = 0x10000,
38+
RACE_FISH = 0x20000,
39+
RACE_SEASERPENT = 0x40000,
40+
RACE_REPTILE = 0x80000,
41+
RACE_PSYCHO = 0x100000,
42+
RACE_DEVINE = 0x200000,
43+
RACE_CREATORGOD = 0x400000,
44+
RACE_WYRM = 0x800000,
45+
RACE_CYBERS = 0x1000000
46+
}
47+
48+
[Flags]
49+
public enum Type : int
50+
{
51+
TYPE_MONSTER = 0x1,
52+
TYPE_SPELL = 0x2,
53+
TYPE_TRAP = 0x4,
54+
TYPE_NORMAL = 0x10,
55+
TYPE_EFFECT = 0x20,
56+
TYPE_FUSION = 0x40,
57+
TYPE_RITUAL = 0x80,
58+
TYPE_TRAPMONSTER = 0x100,
59+
TYPE_SPIRIT = 0x200,
60+
TYPE_UNION = 0x400,
61+
TYPE_DUAL = 0x800,
62+
TYPE_TUNER = 0x1000,
63+
TYPE_SYNCHRO = 0x2000,
64+
TYPE_TOKEN = 0x4000,
65+
TYPE_QUICKPLAY = 0x10000,
66+
TYPE_CONTINUOUS = 0x20000,
67+
TYPE_EQUIP = 0x40000,
68+
TYPE_FIELD = 0x80000,
69+
TYPE_COUNTER = 0x100000,
70+
TYPE_FLIP = 0x200000,
71+
TYPE_TOON = 0x400000,
72+
TYPE_XYZ = 0x800000,
73+
TYPE_PENDULUM = 0x1000000,
74+
TYPE_SPSUMMON = 0x2000000,
75+
TYPE_LINK = 0x4000000
76+
}
77+
78+
[Flags]
79+
public enum LinkMarker : int
80+
{
81+
LINK_MARKER_BOTTOM_LEFT = 0x1,
82+
LINK_MARKER_BOTTOM = 0x2,
83+
LINK_MARKER_BOTTOM_RIGHT = 0x4,
84+
LINK_MARKER_LEFT = 0x8,
85+
LINK_MARKER_RIGHT = 0x20,
86+
LINK_MARKER_TOP_LEFT = 0x40,
87+
LINK_MARKER_TOP = 0x80,
88+
LINK_MARKER_TOP_RIGHT = 0x100
89+
}
90+
91+
[StructLayout(LayoutKind.Sequential)]
92+
public struct Text
93+
{
94+
public string name;
95+
public string text;
96+
public string[] desc;
97+
}
98+
699
[StructLayout(LayoutKind.Sequential)]
7100
public struct Data
8101
{

DataManager.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -723,35 +723,36 @@ private static int LoadCard(int code)
723723
}
724724
if (data.isType(Type.TYPE_LINK))
725725
{
726-
if ((data.defence & 0x1) == 0)
726+
LinkMarker lm = (LinkMarker)data.defence;
727+
if ((lm & LinkMarker.LINK_MARKER_BOTTOM_LEFT) == 0)
727728
graphics.DrawImage(bLinkMarkers1[0], 14, 169, 18, 17);
728729
else
729730
graphics.DrawImage(bLinkMarkers2[0], 14, 169, 18, 17);
730-
if ((data.defence & 0x2) == 0)
731+
if ((lm & LinkMarker.LINK_MARKER_BOTTOM) == 0)
731732
graphics.DrawImage(bLinkMarkers1[1], 73, 178, 32, 12);
732733
else
733734
graphics.DrawImage(bLinkMarkers2[1], 73, 178, 32, 12);
734-
if ((data.defence & 0x4) == 0)
735+
if ((lm & LinkMarker.LINK_MARKER_BOTTOM_RIGHT) == 0)
735736
graphics.DrawImage(bLinkMarkers1[2], 145, 169, 18, 17);
736737
else
737738
graphics.DrawImage(bLinkMarkers2[2], 145, 169, 18, 17);
738-
if ((data.defence & 0x8) == 0)
739+
if ((lm & LinkMarker.LINK_MARKER_LEFT) == 0)
739740
graphics.DrawImage(bLinkMarkers1[3], 11, 97, 12, 32);
740741
else
741742
graphics.DrawImage(bLinkMarkers2[3], 11, 97, 12, 32);
742-
if ((data.defence & 0x20) == 0)
743+
if ((lm & LinkMarker.LINK_MARKER_RIGHT) == 0)
743744
graphics.DrawImage(bLinkMarkers1[5], 154, 97, 12, 32);
744745
else
745746
graphics.DrawImage(bLinkMarkers2[5], 154, 97, 12, 32);
746-
if ((data.defence & 0x40) == 0)
747+
if ((lm & LinkMarker.LINK_MARKER_TOP_LEFT) == 0)
747748
graphics.DrawImage(bLinkMarkers1[6], 14, 39, 18, 17);
748749
else
749750
graphics.DrawImage(bLinkMarkers2[6], 14, 39, 18, 17);
750-
if ((data.defence & 0x80) == 0)
751+
if ((lm & LinkMarker.LINK_MARKER_TOP) == 0)
751752
graphics.DrawImage(bLinkMarkers1[7], 73, 36, 32, 12);
752753
else
753754
graphics.DrawImage(bLinkMarkers2[7], 73, 36, 32, 12);
754-
if ((data.defence & 0x100) == 0)
755+
if ((lm & LinkMarker.LINK_MARKER_TOP_RIGHT) == 0)
755756
graphics.DrawImage(bLinkMarkers1[8], 146, 39, 18, 17);
756757
else
757758
graphics.DrawImage(bLinkMarkers2[8], 146, 39, 18, 17);

ImgGen.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,9 @@
4646
<Reference Include="System.Xml" />
4747
</ItemGroup>
4848
<ItemGroup>
49-
<Compile Include="Attribute.cs" />
5049
<Compile Include="Data.cs" />
5150
<Compile Include="DataManager.cs" />
52-
<Compile Include="Location.cs" />
53-
<Compile Include="Position.cs" />
5451
<Compile Include="Program.cs" />
55-
<Compile Include="Race.cs" />
56-
<Compile Include="Text.cs" />
57-
<Compile Include="Type.cs" />
5852
</ItemGroup>
5953
<ItemGroup>
6054
<None Include="app.config" />

Location.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

Position.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

Race.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

System.Data.SQLite.dll

1.02 MB
Binary file not shown.

Text.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

Type.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)