Mercurial > mm7
annotate Party.h @ 1127:1c65d99d224d
sub_451007_scale_image_bicubic cleanup - removing commented out sections for readability
author | Grumpy7 |
---|---|
date | Fri, 31 May 2013 05:39:43 +0200 |
parents | 39eaa6b00141 |
children | 0aeac0b9ca30 |
rev | line source |
---|---|
0 | 1 #pragma once |
2 #include "Player.h" | |
3 #include "NPC.h" | |
4 #include "Spells.h" | |
5 #include "VectorTypes.h" | |
6 | |
7 | |
8 | |
1053 | 9 #define PARTY_AUTONOTES_BIT__EMERALD_FIRE_FOUNTAIN 2 |
0 | 10 |
710 | 11 enum PARTY_QUEST_BITS: unsigned __int32 |
12 { | |
1035 | 13 PARTY_QUEST_EMERALD_RED_POTION_ACTIVE = 1, |
14 PARTY_QUEST_EMERALD_SEASHELL_ACTIVE = 2, | |
15 PARTY_QUEST_EMERALD_LONGBOW_ACTIVE = 3, | |
16 PARTY_QUEST_EMERALD_PLATE_ACTIVE = 4, | |
17 PARTY_QUEST_EMERALD_LUTE_ACTIVE = 5, | |
18 PARTY_QUEST_EMERALD_HAT_ACTIVE = 6, | |
19 | |
1052 | 20 PARTY_QUEST_EMERALD_MARGARETH_OFF = 17, |
21 | |
778 | 22 PARTY_QUEST_EVENMORN_MAP_FOUND = 64, |
981 | 23 PARTY_QUEST_FINISHED_EMERALD_ISLE = 136, |
710 | 24 PARTY_QUEST_FOUNTAIN_HARMONDALE = 206, |
25 PARTY_QUEST_FOUNTAIN_NIGHON = 207, | |
26 PARTY_QUEST_FOUNTAIN_PIERPONT = 208, | |
27 PARTY_QUEST_FOUNTAIN_CELESTIA = 209, | |
28 PARTY_QUEST_FOUNTAIN_THE_PIT = 210, | |
29 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE = 211 | |
30 }; | |
0 | 31 |
32 | |
33 | |
34 | |
35 /* 355 */ | |
141 | 36 enum PARTY_FLAGS_1: __int32 |
37 { | |
569 | 38 PARTY_FLAGS_1_FALLING = 0x0008, |
390 | 39 PARTY_FLAGS_1_ALERT_RED = 0x0010, |
40 PARTY_FLAGS_1_ALERT_YELLOW = 0x0020, | |
569 | 41 PARTY_FLAGS_1_STANDING_ON_WATER = 0x0080, |
390 | 42 PARTY_FLAGS_1_LANDING = 0x0100, |
816 | 43 PARTY_FLAGS_1_BURNING = 0x200 |
141 | 44 }; |
45 enum PARTY_FLAGS_2: __int32 | |
0 | 46 { |
47 PARTY_FLAGS_2_RUNNING = 0x2, | |
48 }; | |
49 | |
50 /* 347 */ | |
51 enum PARTY_BUFF_INDEX | |
52 { | |
488 | 53 PARTY_BUFF_RESIST_AIR = 0, |
54 PARTY_BUFF_RESIST_BODY = 1, | |
55 PARTY_BUFF_DAY_OF_GODS = 2, | |
56 PARTY_BUFF_DETECT_LIFE = 3, | |
57 PARTY_BUFF_RESIST_EARTH = 4, | |
58 PARTY_BUFF_FEATHER_FALL = 5, | |
59 PARTY_BUFF_RESIST_FIRE = 6, | |
60 PARTY_BUFF_FLY = 7, | |
61 PARTY_BUFF_HASTE = 8, | |
62 PARTY_BUFF_HEROISM = 9, | |
63 PARTY_BUFF_IMMOLATION = 10, | |
271 | 64 PARTY_BUFF_INVISIBILITY = 11, |
488 | 65 PARTY_BUFF_RESIST_MIND = 12, |
66 PARTY_BUFF_PROTECTION_FROM_MAGIC = 13, | |
67 PARTY_BUFF_SHIELD = 14, | |
68 PARTY_BUFF_STONE_SKIN = 15, | |
69 PARTY_BUFF_TORCHLIGHT = 16, | |
70 PARTY_BUFF_RESIST_WATER = 17, | |
71 PARTY_BUFF_WATER_WALK = 18, | |
72 PARTY_BUFF_WIZARD_EYE = 19, | |
0 | 73 }; |
74 | |
75 | |
76 | |
77 /* 300 */ | |
78 enum PartyAction: unsigned __int32 | |
79 { | |
80 PARTY_INVALID = 0, | |
81 PARTY_TurnLeft = 0x1, | |
82 PARTY_TurnRight = 0x2, | |
83 PARTY_StrafeLeft = 0x3, | |
84 PARTY_StrafeRight = 0x4, | |
85 PARTY_WalkForward = 0x5, | |
86 PARTY_WalkBackward = 0x6, | |
87 PARTY_LookUp = 0x7, | |
88 PARTY_LookDown = 0x8, | |
89 PARTY_CenterView = 0x9, | |
90 PARTY_unkA = 0xA, | |
91 PARTY_unkB = 0xB, | |
92 PARTY_Jump = 0xC, | |
93 PARTY_FlyUp = 0xD, | |
94 PARTY_FlyDown = 0xE, | |
95 PARTY_Land = 0xF, | |
96 PARTY_RunForward = 0x10, | |
97 PARTY_RunBackward = 0x11, | |
98 PARTY_FastTurnLeft = 0x12, | |
99 PARTY_FastTurnRight = 0x13, | |
100 | |
101 PARTY_dword = 0xFFFFFFFF | |
102 }; | |
103 | |
104 | |
105 | |
106 /* 135 */ | |
107 #pragma pack(push, 1) | |
108 struct ActionQueue | |
109 { | |
110 void Add(PartyAction action); | |
783 | 111 void Reset(); |
0 | 112 PartyAction Next(); |
113 | |
114 unsigned int uNumActions; | |
115 PartyAction pActions[30]; | |
116 }; | |
117 #pragma pack(pop) | |
118 | |
119 | |
120 | |
121 | |
122 | |
373 | 123 enum PartyAlignment: unsigned __int32 |
124 { | |
125 PartyAlignment_Good = 0, | |
126 PartyAlignment_Neutral = 1, | |
127 PartyAlignment_Evil = 2 | |
128 }; | |
0 | 129 |
130 | |
131 | |
132 | |
133 | |
134 /* 208 */ | |
135 #pragma pack(push, 1) | |
136 struct Party_stru0 | |
137 { | |
138 int field_0[20]; | |
471
c43f156a95c9
ArmorShopDialog crash fixed. All shops show its items
Gloval
parents:
470
diff
changeset
|
139 // int field_50[170]; |
c43f156a95c9
ArmorShopDialog crash fixed. All shops show its items
Gloval
parents:
470
diff
changeset
|
140 __int64 field_50[85]; |
484 | 141 __int64 _shop_ban_times[53]; |
142 int field_4A0[20]; | |
0 | 143 int field_4F0[38]; |
144 char field_588[2]; | |
484 | 145 __int64 _s_times[21]; //5d8 440h+8*51 |
527 | 146 __int64 field_632[8]; |
147 char field_672[6]; | |
484 | 148 // char pIsArtifactFound[8]; |
0 | 149 }; |
150 #pragma pack(pop) | |
151 | |
152 /* 207 */ | |
153 #pragma pack(push, 1) | |
154 struct Party | |
155 { | |
156 Party(): | |
157 uTimePlayed(0) | |
158 { | |
783 | 159 Zero(); |
0 | 160 } |
161 | |
783 | 162 void Zero(); |
130 | 163 void UpdatePlayersAndHirelingsEmotions(); |
0 | 164 void RestAndHeal(); |
165 unsigned int GetPartyFame(); | |
166 void CreateDefaultParty(char bGiveItems); | |
167 int Reset(); | |
168 void ResetPosMiscAndSpellBuffs(); | |
169 bool HasItem(unsigned int uItemID); | |
170 void SetHoldingItem(ItemGen *pItem); | |
171 int GetNextActiveCharacter(); | |
172 bool _497FC5_check_party_perception_against_level(); | |
173 bool AddItem(ItemGen *pItem); | |
174 void Yell(); | |
1035 | 175 void CountHirelings(); |
0 | 176 |
177 static void SetGold(unsigned int uNumGold); | |
178 static void TakeGold(unsigned int uNumGold); | |
593 | 179 static void SetFood(unsigned int uNumFood); |
0 | 180 static void TakeFood(unsigned int uNumFood); |
592 | 181 static void GiveFood(unsigned int _this); |
0 | 182 |
183 inline bool WizardEyeActive() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uExpireTime > 0;} | |
184 inline int WizardEyeSkillLevel() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uSkill;} | |
185 inline bool TorchlightActive() {return pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0;} | |
186 inline bool FlyActive() {return pPartyBuffs[PARTY_BUFF_FLY].uExpireTime > 0;} | |
187 inline bool WaterWalkActive() {return pPartyBuffs[PARTY_BUFF_WATER_WALK].uExpireTime > 0;} | |
188 inline bool ImmolationActive() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uExpireTime > 0;} | |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1053
diff
changeset
|
189 inline int ImmolationSkillLevel() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uSkill;} |
0 | 190 inline bool FeatherFallActive() {return pPartyBuffs[PARTY_BUFF_FEATHER_FALL].uExpireTime > 0;} |
141 | 191 inline bool Invisible() {return pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0;} |
0 | 192 |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1053
diff
changeset
|
193 inline bool GetRedAlert() {return (uFlags & PARTY_FLAGS_1_ALERT_RED) != 0;} |
390 | 194 inline void SetRedAlert() {uFlags |= PARTY_FLAGS_1_ALERT_RED;} |
1113
39eaa6b00141
something to bool cast (performance warning) mostly fixed
Grumpy7
parents:
1053
diff
changeset
|
195 inline bool GetYellowAlert() {return (uFlags & PARTY_FLAGS_1_ALERT_YELLOW) != 0;} |
390 | 196 inline void SetYellowAlert() {uFlags |= PARTY_FLAGS_1_ALERT_YELLOW;} |
197 | |
0 | 198 |
199 int field_0; | |
200 unsigned int uPartyHeight; | |
201 unsigned int uDefaultPartyHeight; | |
202 int sEyelevel; | |
203 unsigned int uDefaultEyelevel; | |
204 int field_14; | |
120 | 205 int y_rotation_granularity; |
0 | 206 unsigned int uWalkSpeed; |
122 | 207 int y_rotation_speed; // deg/s |
0 | 208 int field_24; |
209 int field_28; | |
210 unsigned __int64 uTimePlayed; | |
211 __int64 uLastRegenerationTime; | |
212 Party_stru0 field_3C; | |
213 Vec3_int_ vPosition; | |
214 int sRotationY; | |
215 int sRotationX; | |
216 Vec3_int_ vPrevPosition; | |
217 int sPrevRotationY; | |
218 int sPrevRotationX; | |
219 int sPrevEyelevel; | |
220 int field_6E0; | |
221 int field_6E4; | |
222 int uFallSpeed; | |
223 int field_6EC; | |
224 int field_6F0; | |
831 | 225 int floor_face_pid; // face we are standing at |
226 int walk_sound_timer; | |
0 | 227 int field_6FC; |
228 int uFallStartY; | |
229 unsigned int bFlying; | |
230 char field_708; | |
231 char field_709; | |
232 char field_70A; | |
233 char field_70B; | |
234 unsigned int uCurrentYear; | |
235 unsigned int uCurrentMonth; | |
236 unsigned int uCurrentMonthWeek; | |
237 unsigned int uDaysPlayed; | |
238 unsigned int uCurrentHour; | |
239 unsigned int uCurrentMinute; | |
240 unsigned int uCurrentTimeSecond; | |
241 unsigned int uNumFoodRations; | |
242 int field_72C; | |
243 int field_730; | |
244 unsigned int uNumGold; | |
245 unsigned int uNumGoldInBank; | |
246 unsigned int uNumDeaths; | |
247 int field_740; | |
248 int uNumPrisonTerms; | |
249 unsigned int uNumBountiesCollected; | |
250 int field_74C; | |
251 __int16 field_750[5]; | |
252 __int16 field_75A[5]; | |
766 | 253 unsigned char days_played_without_rest; |
484 | 254 unsigned __int8 _quest_bits[64]; |
0 | 255 unsigned __int8 pArcomageWins[16]; |
256 char field_7B5_in_arena_quest; | |
257 char uNumArenaPageWins; | |
258 char uNumArenaSquireWins; | |
259 char uNumArenaKnightWins; | |
260 char uNumArenaLordWins; | |
492 | 261 char pIsArtifactFound[29]; //7ba |
262 char field_7d7[39]; | |
0 | 263 unsigned char _autonote_bits[12]; |
264 char field_80A[74]; | |
265 char field_854[32]; | |
949 | 266 int uNumArcomageWins; |
267 int uNumArcomageLoses; | |
0 | 268 unsigned int bTurnBasedModeOn; |
269 int field_880; | |
270 int uFlags2; | |
373 | 271 PartyAlignment alignment; |
0 | 272 SpellBuff pPartyBuffs[20]; |
273 Player pPlayers[4]; | |
274 NPCData pHirelings[2]; | |
275 ItemGen pPickedItem; | |
276 unsigned int uFlags; | |
463 | 277 ItemGen StandartItemsInShops[53][12]; |
470 | 278 ItemGen SpecialItemsInShops[53][12]; //D0EC |
496 | 279 ItemGen SpellBooksInGuilds[32][12]; |
527 | 280 char field_1605C[24]; |
0 | 281 char pHireling1Name[100]; |
282 char pHireling2Name[100]; | |
349 | 283 int armageddon_timer; |
0 | 284 int field_16140; |
285 int pTurnBasedPlayerRecoveryTimes[4]; | |
463 | 286 int InTheShopFlags[53]; |
0 | 287 int uFine; |
288 float flt_TorchlightColorR; | |
289 float flt_TorchlightColorG; | |
290 float flt_TorchlightColorB; | |
291 }; | |
292 #pragma pack(pop) | |
293 | |
294 | |
295 | |
296 extern Party *pParty; // idb | |
297 | |
298 | |
66 | 299 extern struct ActionQueue *pPartyActionQueue; |
300 |