Mercurial > mm7
annotate Items.h @ 231:a69fc44061d5
remove padding PlayerSpells
author | zipi |
---|---|
date | Sun, 17 Feb 2013 14:47:34 +0100 |
parents | b9f4ff2f6c45 |
children | 1f0af5cac2dd |
rev | line source |
---|---|
0 | 1 #pragma once |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 /* 338 */ | |
9 enum ITEM_FLAGS | |
10 { | |
11 ITEM_IDENTIFIED = 0x1, | |
12 ITEM_BROKEN = 0x2, | |
13 ITEM_TEMP_BONUS = 0x8, | |
14 ITEM_STOLEN = 0x100, | |
15 ITEM_ENCHANTED = 0x200, | |
16 }; | |
17 | |
18 | |
19 /* 330 */ | |
20 enum ITEM_TYPE | |
21 { | |
22 ITEM_LONGSWORD_1 = 0x1, | |
23 ITEM_DAGGER_1 = 0xF, | |
24 ITEM_AXE_1 = 0x17, | |
25 ITEM_SPEAR_1 = 0x1F, | |
26 ITEM_CROSSBOW_1 = 0x2F, | |
27 ITEM_MACE_1 = 0x32, | |
28 ITEM_STAFF_1 = 0x3D, | |
29 ITEM_LEATHER_1 = 0x42, | |
30 ITEM_CHAINMAIL_1 = 0x47, | |
31 ITEM_PLATE_1 = 0x4C, | |
32 ITEM_BUCKLER_1 = 0x54, | |
33 ITEM_GAUNTLETS_1 = 0x6E, | |
34 ITEM_BOOTS_1 = 0x73, | |
35 ITEM_WAND_FIRE = 0x87, | |
36 ITEM_WAND_STUN = 0x8A, | |
37 ITEM_WAND_INCENERATION = 0x9F, | |
38 ITEM_TROLL_BLOOD = 0xCA, | |
39 ITEM_DRAGON_EYE = 0xCC, | |
40 ITEM_HARPY_FEATHER = 0xCF, | |
41 ITEM_DEVIL_ICHOR = 0xD6, | |
42 ITEM_OOZE_ECTOPLASM_BOTTLE = 0xD9, | |
43 ITEM_POTION_BOTTLE = 0xDC, | |
44 ITEM_SPELLBOOK_FIRE_STRIKE = 0x191, | |
45 ITEM_SPELLBOOK_AIR_FEATHER_FALL = 0x19C, | |
46 ITEM_SPELLBOOK_WATER_POISON_SPRAY = 0x1A7, | |
47 ITEM_SPELLBOOK_EARTH_SLOW = 0x1B2, | |
48 ITEM_SPELLBOOK_SPIRIT_BLESS = 0x1BD, | |
49 ITEM_SPELLBOOK_MIND_MIND_BLAST = 0x1C8, | |
50 ITEM_SPELLBOOK_BODY_FIRST_AID = 0x1D3, | |
51 ITEM_SPELLBOOK_BODY_HEAL = 0x1D6, | |
52 ITEM_SPELLBOOK_BODY_BREAK_POISON = 0x1D7, | |
53 ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 0x1DD, | |
54 ITEM_SPELLBOOK_LIGHT_SUN_BURST = 0x1E6, | |
55 ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 0x1E7, | |
56 ITEM_ARTIFACT_PUCK = 0x1F4, | |
57 ITEM_RELIC_MEKORIGS_HAMMER = 0x210, | |
58 }; | |
59 | |
60 /* 331 */ | |
61 enum ITEM_EQUIP_TYPE | |
62 { | |
63 EQUIP_ONE_OR_TWO_HANDS = 0x0, | |
64 EQUIP_TWO_HANDED = 0x1, | |
65 EQUIP_BOW = 0x2, | |
66 EQUIP_ARMOUR = 0x3, | |
67 EQUIP_SHIELD = 0x4, | |
68 EQUIP_HELMET = 0x5, | |
69 EQUIP_BELT = 0x6, | |
70 EQUIP_CLOAK = 0x7, | |
71 EQUIP_GAUNTLETS = 0x8, | |
72 EQUIP_BOOTS = 0x9, | |
73 EQUIP_RING = 0xA, | |
74 EQUIP_AMULET = 0xB, | |
75 EQUIP_C = 0xC, | |
76 EQUIP_REAGENT = 0xD, | |
77 EQUIP_POTION = 0xE, | |
78 EQUIP_F = 0xF, | |
79 EQUIP_BOOK = 0x10, | |
80 EQUIP_11 = 0x11, | |
81 EQUIP_GOLD = 0x12, | |
82 EQUIP_GEM = 0x13, | |
83 }; | |
84 | |
85 | |
86 | |
87 /* 64 */ | |
88 #pragma pack(push, 1) | |
89 struct ItemGen | |
90 { | |
91 //----- (0042EB25) -------------------------------------------------------- | |
92 inline ItemGen() | |
93 { | |
94 Reset(); | |
95 } | |
96 | |
97 bool GenerateArtifact(); | |
98 unsigned int GetValue(); | |
99 const char *GetDisplayName(); | |
100 const char *GetIdentifiedName(); | |
101 void UpdateTempBonus(__int64 uTimePlayed); | |
102 void Reset(); | |
103 int _439DF3_get_additional_damage(int *a2, int *a3); | |
104 | |
105 | |
106 | |
107 unsigned int uItemID; | |
108 int _bonus_type; | |
109 int _bonus_strength; | |
110 int uAdditionalValue; | |
111 int uNumCharges; | |
112 unsigned int uAttributes; | |
113 unsigned __int8 uBodyAnchor; | |
114 char uMaxCharges; | |
115 char field_1A; | |
116 char field_1B; | |
117 unsigned __int64 uExpireTime; | |
118 }; | |
119 #pragma pack(pop) | |
120 | |
121 | |
122 | |
123 /* 175 */ | |
124 #pragma pack(push, 1) | |
125 struct ItemDesc | |
229 | 126 { //Item # |Pic File|Name|Value|Equip Stat|Skill Group|Mod1|Mod2|material| |
127 ///ID/Rep/St|Not identified name|Sprite Index|VarA|VarB|Equip X|Equip Y|Notes | |
128 char *pIconName; //0 4 | |
129 char *pName; //4 8 | |
130 char *pUnidentifiedName; //8 c | |
131 char *pDescription; //0c 10 | |
132 unsigned int uValue; //10 14 | |
133 unsigned __int16 uSpriteID; //14 18 | |
134 __int16 field_1A; //16 | |
135 unsigned __int16 uEquipX; //18 1c | |
136 unsigned __int16 uEquipY; //1a 1e | |
137 unsigned __int8 uEquipType; //1c 20 | |
138 unsigned __int8 uSkillType; //1d 21 | |
139 unsigned __int8 uDamageDice; //1e 22 | |
140 unsigned __int8 uDamageRoll; //1f 23 | |
141 unsigned __int8 uDamageMod; //20 24 | |
142 unsigned __int8 uMaterial; //21 25 | |
143 char _additional_value; //22 26 | |
144 char _bonus_type; //23 27 | |
145 char _bonus_strength; //24 28 | |
146 char field_25; // 25 29 | |
147 char field_26; //26 2A | |
148 char field_27; // 27 2b | |
149 union | |
150 { | |
151 unsigned __int8 uChanceByTreasureLvl[6]; | |
152 struct { | |
153 unsigned __int8 uChanceByTreasureLvl1; // 28 2c | |
154 unsigned __int8 uChanceByTreasureLvl2; // 29 2d | |
155 unsigned __int8 uChanceByTreasureLvl3; // 2A 2e | |
156 unsigned __int8 uChanceByTreasureLvl4; // 2B 2f | |
157 unsigned __int8 uChanceByTreasureLvl5; // 2C 30 | |
158 unsigned __int8 uChanceByTreasureLvl6; // 2D 32 | |
159 }; | |
160 }; | |
161 unsigned char uItemID_Rep_St; //2e 32 | |
162 char field_2f; | |
163 }; | |
0 | 164 #pragma pack(pop) |
165 | |
166 | |
167 | |
168 /* 177 */ | |
169 #pragma pack(push, 1) | |
170 struct ItemEnchantment | |
222 | 171 { //Bonus|Sta|Of Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul |
172 char *pBonusStat; | |
173 char *pOfName; | |
174 /* union{ | |
175 struct { | |
176 unsigned char to_arm; | |
177 unsigned char to_shld; | |
178 unsigned char to_helm; | |
179 unsigned char to_belt; | |
180 unsigned char to_cape; | |
181 unsigned char to_gaunt; | |
182 unsigned char to_boot; | |
183 unsigned char to_ring; | |
184 unsigned char to_amul; | |
185 }; */ | |
186 unsigned char to_item[12]; | |
187 // }; | |
188 }; | |
0 | 189 #pragma pack(pop) |
190 | |
191 /* 178 */ | |
192 #pragma pack(push, 1) | |
193 struct ItemSpecialEnchantment | |
222 | 194 { //Bonus Stat|Name Add|W1|W2|Miss|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul|Value|Lvl|Description fo special Bonuses and values |
195 | |
196 char *pBonusStatement; | |
197 char *pNameAdd; | |
198 char to_item_apply[12]; | |
199 int iValue; | |
200 int iTreasureLevel; | |
0 | 201 }; |
202 #pragma pack(pop) | |
203 | |
222 | 204 #pragma pack(push, 1) |
205 struct BonusRange | |
206 { | |
207 unsigned int minR; | |
208 unsigned int maxR; | |
209 }; | |
210 #pragma pack(pop) | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
0
diff
changeset
|
211 |
0 | 212 /* 176 */ |
213 #pragma pack(push, 1) | |
214 struct ItemsTable | |
215 { | |
216 void Initialize(); | |
217 void LoadPotions(); | |
218 void LoadPotionNotes(); | |
228
46ae2602aceb
Item generation doesn't crash (thou still generates weird stuff)
Nomad
parents:
224
diff
changeset
|
219 void GenerateItem(int treasure_level, int a3, ItemGen *pItem); |
0 | 220 void SetSpecialBonus(ItemGen *pItem); |
221 bool _456D43_is_material_equals_3(ItemGen *pItem); | |
222 bool _456D5E_is_some_material(ItemGen *pItem); | |
223 char *Release(); | |
224 | |
222 | 225 int uAllItemsCount; |
226 ItemDesc pItems[800]; //4-9604h | |
227 ItemEnchantment pEnchantments[24]; //9604h | |
229 | 228 ItemSpecialEnchantment pSpecialEnchantments[72]; //97E4h -9FC4h |
224 | 229 char field_9FC4[5000]; |
0 | 230 char field_B348[5000]; |
231 char field_C6D0[5000]; | |
232 char field_DA58[5000]; | |
229 | 233 char field_EDE0[384]; |
222 | 234 unsigned __int16 potion_data[50][50]; // 77B2h*2=EF64h -102ECh |
235 unsigned __int16 potion_note[50][50]; // 8176h*2=102ECh -11674h | |
236 char *pItemsTXT_Raw; //11674h | |
0 | 237 char *pRndItemsTXT_Raw; |
222 | 238 char *pStdItemsTXT_Raw; //1167Ch |
239 char *pSpcItemsTXT_Raw; //11680h | |
224 | 240 unsigned int uChanceByTreasureLvlSumm[6]; //11684 |
241 unsigned int uBonusChanceStandart[6]; //1169c | |
242 unsigned int uBonusChanceSpecial[6]; //116B4 | |
243 unsigned int uBonusChanceWpSpecial[6]; //116cc -116e4 | |
222 | 244 unsigned int pEnchantmentsSumm[9]; //116E4h -11708h |
245 BonusRange bonus_ranges[6]; //45C2h*4 =11708h | |
224 | 246 unsigned int pSpecialEnchantmentsSumm[24]; //11738h |
247 unsigned int pSpecialEnchantments_count; //11798h | |
0 | 248 char field_1179C; |
249 }; | |
250 #pragma pack(pop) | |
251 | |
252 | |
253 | |
254 | |
255 extern ItemGen *ptr_50C9A4; | |
256 | |
257 extern struct ItemsTable *pItemsTable; |