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