Mercurial > mm7
comparison Actor.cpp @ 948:5a2dbb00c399
Code cleaning.
author | Nomad |
---|---|
date | Wed, 01 May 2013 17:31:10 +0200 |
parents | a78f08dbeb88 |
children | f8dd764fb7d7 |
comparison
equal
deleted
inserted
replaced
947:99aa9c8464cf | 948:5a2dbb00c399 |
---|---|
171 signed int v3; // ecx@1 | 171 signed int v3; // ecx@1 |
172 NPCData *v4; // eax@1 | 172 NPCData *v4; // eax@1 |
173 NPCData *v5; // ebp@1 | 173 NPCData *v5; // ebp@1 |
174 unsigned int v6; // eax@1 | 174 unsigned int v6; // eax@1 |
175 //signed int v7; // eax@3 | 175 //signed int v7; // eax@3 |
176 unsigned int v8; // eax@8 | 176 //unsigned int v8; // eax@8 |
177 int v9; // esi@8 | 177 int v9; // esi@8 |
178 int v10; // eax@11 | 178 int v10; // eax@11 |
179 GUIWindow *v11; // ecx@19 | 179 GUIWindow *v11; // ecx@19 |
180 signed int v12; // eax@21 | 180 signed int v12; // eax@21 |
181 //int v13; // [sp-8h] [bp-44h]@34 | 181 //int v13; // [sp-8h] [bp-44h]@34 |
200 v4 = GetNPCData(v3); | 200 v4 = GetNPCData(v3); |
201 v5 = v4; | 201 v5 = v4; |
202 v6 = v4->uFlags; | 202 v6 = v4->uFlags; |
203 if ( (v6 & 3) != 2 ) | 203 if ( (v6 & 3) != 2 ) |
204 v5->uFlags = v6 + 1; | 204 v5->uFlags = v6 + 1; |
205 /*v7 = const_2(); | |
206 sprintf(pContainer, "evt%02d", v7); | |
207 if (pParty->alignment == PartyAlignment_Good) | |
208 { | |
209 v14 = "-b"; | |
210 strcat(pContainer, v14); | |
211 } | |
212 else if ( pParty->uAlignment == 2 ) | |
213 { | |
214 v14 = "-c"; | |
215 strcat(pContainer, v14); | |
216 }*/ | |
217 | 205 |
218 switch (pParty->alignment) | 206 switch (pParty->alignment) |
219 { | 207 { |
220 case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); break; | 208 case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); break; |
221 case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break; | 209 case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break; |
222 case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; | 210 case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; |
223 } | 211 } |
224 | 212 |
225 v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
226 pDialogueNPCCount = 0; | 213 pDialogueNPCCount = 0; |
227 uNumDialogueNPCPortraits = 1; | 214 uNumDialogueNPCPortraits = 1; |
228 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v8]; | 215 pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); |
229 sprintf(pContainer, "npc%03u", v5->uPortraitID); | 216 sprintf(pContainer, "npc%03u", v5->uPortraitID); |
230 v9 = 0; | 217 v9 = 0; |
231 pDialogueNPCPortraits[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; | 218 pDialogueNPCPortraits[0] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); |
232 dword_591084 = areWeLoadingTexture; | 219 dword_591084 = areWeLoadingTexture; |
233 uTextureID_right_panel_loop = uTextureID_right_panel; | 220 uTextureID_right_panel_loop = uTextureID_right_panel; |
234 if ( !v5->Hired() && v5->Location2D >= 0 ) | 221 if ( !v5->Hired() && v5->Location2D >= 0 ) |
235 { | 222 { |
236 if ( (signed int)pParty->GetPartyFame() <= v5->fame | 223 if ( (signed int)pParty->GetPartyFame() <= v5->fame |
268 } | 255 } |
269 } | 256 } |
270 } | 257 } |
271 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) != 0 ) | 258 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) != 0 ) |
272 v9 = 4; | 259 v9 = 4; |
273 v11 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)10, v9, 0); | 260 v11 = GUIWindow::Create(0, 0, 640, 480, WINDOW_Rest, v9, 0); |
274 pDialogueWindow = v11; | 261 pDialogueWindow = v11; |
275 if (v5->Hired()) | 262 if (v5->Hired()) |
276 { | 263 { |
277 if ( !v5->bHasUsedTheAbility ) | 264 if ( !v5->bHasUsedTheAbility ) |
278 { | 265 { |
279 v12 = v5->uProfession; | 266 v12 = v5->uProfession; |
280 if ( v12 >= 10 ) | 267 if ( v12 >= 10 ) |
281 { | 268 { |
282 if ( v12 <= 12 || v12 > 32 && (v12 <= 34 || v12 > 38 && (v12 <= 43 || v12 == 52)) ) | 269 if ( v12 <= 12 || v12 > 32 && (v12 <= 34 || v12 > 38 && (v12 <= 43 || v12 == 52)) ) |
283 { | 270 { |
284 v11->CreateButton( | 271 v11->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, |
285 0x1E0u, | |
286 0xFAu, | |
287 0x8Cu, | |
288 LOBYTE(pFontArrus->uFontHeight) - 3, | |
289 1, | 272 1, |
290 0, | 273 0, |
291 UIMSG_SelectNPCDialogueOption, | 274 UIMSG_SelectNPCDialogueOption, |
292 9u, | 275 9, |
293 0, | 276 0, |
294 "", | 277 "", |
295 0); | 278 0); |
296 pDialogueWindow->_41D08F(4, 1, 0, 1); | 279 pDialogueWindow->_41D08F(4, 1, 0, 1); |
297 } | 280 } |
298 } | 281 } |
299 } | 282 } |
300 } | 283 } |
301 pDialogueWindow->CreateButton(61u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); | 284 |
302 pDialogueWindow->CreateButton(177u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); | 285 pDialogueWindow->CreateButton( 61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); |
303 pDialogueWindow->CreateButton(292u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); | 286 pDialogueWindow->CreateButton(177, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); |
304 pDialogueWindow->CreateButton(407u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); | 287 pDialogueWindow->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); |
288 pDialogueWindow->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | |
289 | |
305 if (v17 && uActiveCharacter && !v5->Hired()) | 290 if (v17 && uActiveCharacter && !v5->Hired()) |
306 { | 291 { |
307 if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21) | 292 if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21) |
308 pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodEvening, 0); | 293 pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodEvening, 0); |
309 else | 294 else |