Mercurial > might-and-magic-trilogy
comparison mm7_5.cpp @ 87:c0cf9393af64
Слияние
author | Ritor1 |
---|---|
date | Mon, 29 Oct 2012 09:28:08 +0600 |
parents | b39bdc150e90 |
children | 51a5b0dc3f30 |
comparison
equal
deleted
inserted
replaced
86:c83d06692295 | 87:c0cf9393af64 |
---|---|
302 bDialogueUI_InitializeActor_NPC_ID = 0; | 302 bDialogueUI_InitializeActor_NPC_ID = 0; |
303 } | 303 } |
304 if ( pMessageQueue_50CBD0->uNumMessages ) | 304 if ( pMessageQueue_50CBD0->uNumMessages ) |
305 { | 305 { |
306 v0 = 1; | 306 v0 = 1; |
307 v1 = nullstring; | 307 v1 = ""; |
308 while ( 2 ) | 308 while ( 2 ) |
309 { | 309 { |
310 if ( !pMessageQueue_50CBD0->uNumMessages ) | |
311 break; | |
312 | |
310 pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam, (int *)&v199); | 313 pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam, (int *)&v199); |
311 switch ( uMessage ) | 314 switch ( uMessage ) |
312 { | 315 { |
313 case UIMSG_ChangeGameState: | 316 case UIMSG_ChangeGameState: |
314 uGameState = v0; | 317 uGameState = v0; |
328 v3 = &pActors[uMessageParam]; | 331 v3 = &pActors[uMessageParam]; |
329 goto _actor_init_dlg; | 332 goto _actor_init_dlg; |
330 case UIMSG_Quit|0x2: | 333 case UIMSG_Quit|0x2: |
331 case 0x87: | 334 case 0x87: |
332 if ( bNoNPCHiring != 1 | 335 if ( bNoNPCHiring != 1 |
333 && !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 336 && !pCurrentScreen ) |
334 { | 337 { |
335 if ( pMessageQueue_50CBD0->uNumMessages ) | 338 if ( pMessageQueue_50CBD0->uNumMessages ) |
336 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 339 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
337 uAction = 0; | 340 uAction = 0; |
338 uNumSeconds = uMessage - 134; | 341 uNumSeconds = uMessage - 134; |
401 if ( pMessageQueue_50CBD0->uNumMessages ) | 404 if ( pMessageQueue_50CBD0->uNumMessages ) |
402 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 405 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
403 pGUIWindow_CurrentMenu->Release(); | 406 pGUIWindow_CurrentMenu->Release(); |
404 uGameState = 4; | 407 uGameState = 4; |
405 LABEL_188: | 408 LABEL_188: |
406 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 409 pCurrentScreen = 0; |
407 viewparams->bRedrawGameUI = v0; | 410 viewparams->bRedrawGameUI = v0; |
408 } | 411 } |
409 else | 412 else |
410 { | 413 { |
411 ShowStatusBarString(pGlobalTXT_LocalizationStrings[201], 2u);// "Are you sure? Click again to start a New Game" | 414 ShowStatusBarString(pGlobalTXT_LocalizationStrings[201], 2u);// "Are you sure? Click again to start a New Game" |
419 pIcons_LOD->_40F9C5(); | 422 pIcons_LOD->_40F9C5(); |
420 pIcons_LOD->_4114F2(); | 423 pIcons_LOD->_4114F2(); |
421 if ( pMessageQueue_50CBD0->uNumMessages ) | 424 if ( pMessageQueue_50CBD0->uNumMessages ) |
422 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 425 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
423 pGUIWindow_CurrentMenu->Release(); | 426 pGUIWindow_CurrentMenu->Release(); |
424 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 12; | 427 pCurrentScreen = 12; |
425 GameUI_DrawLoadMenu(v0); | 428 GameUI_DrawLoadMenu(v0); |
426 goto _continue; | 429 goto _continue; |
427 case UIMSG_Quit: | 430 case UIMSG_Quit: |
428 if ( dword_6BE138 == 132 || uMessageParam ) | 431 if ( dword_6BE138 == 132 || uMessageParam ) |
429 { | 432 { |
430 pIcons_LOD->_40F9C5(); | 433 pIcons_LOD->_40F9C5(); |
431 pIcons_LOD->_4114F2(); | 434 pIcons_LOD->_4114F2(); |
432 if ( pMessageQueue_50CBD0->uNumMessages ) | 435 if ( pMessageQueue_50CBD0->uNumMessages ) |
433 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 436 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
434 pGUIWindow_CurrentMenu->Release(); | 437 pGUIWindow_CurrentMenu->Release(); |
435 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 438 pCurrentScreen = 0; |
436 viewparams->bRedrawGameUI = v0; | 439 viewparams->bRedrawGameUI = v0; |
437 if ( !uMessageParam ) | 440 if ( !uMessageParam ) |
438 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0); | 441 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0); |
439 uGameState = 7; | 442 uGameState = 7; |
440 } | 443 } |
447 goto _release_tex_and_continue; | 450 goto _release_tex_and_continue; |
448 case 0x80: | 451 case 0x80: |
449 pIcons_LOD->_40F9C5(); | 452 pIcons_LOD->_40F9C5(); |
450 pIcons_LOD->_4114F2(); | 453 pIcons_LOD->_4114F2(); |
451 pGUIWindow_CurrentMenu->Release(); | 454 pGUIWindow_CurrentMenu->Release(); |
452 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 2; | 455 pCurrentScreen = 2; |
453 v162 = 0; | 456 v162 = 0; |
454 v148 = 0; | 457 v148 = 0; |
455 v141 = (WindowType)8; | 458 v141 = (WindowType)8; |
456 goto LABEL_439; | 459 goto LABEL_439; |
457 case UIMSG_A2: | 460 case UIMSG_A2: |
494 v133 = 106; | 497 v133 = 106; |
495 goto LABEL_733; | 498 goto LABEL_733; |
496 case UIMSG_A5: | 499 case UIMSG_A5: |
497 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) | 500 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) |
498 pKeyActionMap->_459ED1(0); | 501 pKeyActionMap->_459ED1(0); |
499 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 11 | 502 if ( pCurrentScreen != 11 |
500 || uLoadGameUI_SelectedSlot != dword_6A0C9C + uMessageParam ) | 503 || uLoadGameUI_SelectedSlot != dword_6A0C9C + uMessageParam ) |
501 { | 504 { |
502 v10 = dword_6A0C9C + uMessageParam; | 505 v10 = dword_6A0C9C + uMessageParam; |
503 if ( dword_6BE138 == dword_6A0C9C + uMessageParam ) | 506 if ( dword_6BE138 == dword_6A0C9C + uMessageParam ) |
504 { | 507 { |
552 } | 555 } |
553 DoSavegame(uLoadGameUI_SelectedSlot); | 556 DoSavegame(uLoadGameUI_SelectedSlot); |
554 goto _release_tex_and_continue; | 557 goto _release_tex_and_continue; |
555 case UIMSG_StartNewGame|0x2: | 558 case UIMSG_StartNewGame|0x2: |
556 pGUIWindow_CurrentMenu->Release(); | 559 pGUIWindow_CurrentMenu->Release(); |
557 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 11; | 560 pCurrentScreen = 11; |
558 GameUI_DrawSaveMenu(); | 561 GameUI_DrawSaveMenu(); |
559 goto _continue; | 562 goto _continue; |
560 case UIMSG_Game_OpenOptionsDialog: | 563 case UIMSG_Game_OpenOptionsDialog: |
561 if ( pMessageQueue_50CBD0->uNumMessages ) | 564 if ( pMessageQueue_50CBD0->uNumMessages ) |
562 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 565 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
563 pGUIWindow_CurrentMenu->Release(); | 566 pGUIWindow_CurrentMenu->Release(); |
564 viewparams->field_48 = v0; | 567 viewparams->field_48 = v0; |
565 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 2; | 568 pCurrentScreen = 2; |
566 uTextureID_507C60 = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); | 569 uTextureID_507C60 = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); |
567 uTextureID_507C6C = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); | 570 uTextureID_507C6C = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); |
568 uTextureID_507C68 = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); | 571 uTextureID_507C68 = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); |
569 uTextureID_507C70 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); | 572 uTextureID_507C70 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); |
570 uTextureID_507C74 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); | 573 uTextureID_507C74 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); |
777 case UIMSG_OpenKeyMappingOptions: | 780 case UIMSG_OpenKeyMappingOptions: |
778 if ( pMessageQueue_50CBD0->uNumMessages ) | 781 if ( pMessageQueue_50CBD0->uNumMessages ) |
779 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 782 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
780 pGUIWindow_CurrentMenu->Release(); | 783 pGUIWindow_CurrentMenu->Release(); |
781 viewparams->field_48 = 1; | 784 viewparams->field_48 = 1; |
782 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 26; | 785 pCurrentScreen = 26; |
783 uTextureID_507BF4 = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); | 786 uTextureID_507BF4 = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); |
784 uTextureID_507BF8 = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); | 787 uTextureID_507BF8 = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); |
785 uTextureID_507BFC = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); | 788 uTextureID_507BFC = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); |
786 uTextureID_507C00 = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); | 789 uTextureID_507C00 = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); |
787 uTextureID_507C04 = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); | 790 uTextureID_507C04 = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); |
788 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0); | 791 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0); |
789 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, 0x71u, 0, 0, nullstring, 0); | 792 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, 0x71u, 0, 0, "", 0); |
790 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A0u, 0, 0, nullstring, 0); | 793 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A0u, 0, 0, "", 0); |
791 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A1u, 0, 0, nullstring, 0); | 794 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A1u, 0, 0, "", 0); |
792 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x1A2u, 0, 0, nullstring, 0); | 795 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x1A2u, 0, 0, "", 0); |
793 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x7Fu, 0, 0, nullstring, 0); | 796 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x7Fu, 0, 0, "", 0); |
794 pGUIWindow_CurrentMenu->CreateButton(129u, 0x94u, 0x46u, 0x13u, 1, 0, 0x1A3u, 0, 0, nullstring, 0); | 797 pGUIWindow_CurrentMenu->CreateButton(129u, 0x94u, 0x46u, 0x13u, 1, 0, 0x1A3u, 0, 0, "", 0); |
795 pGUIWindow_CurrentMenu->CreateButton(129u, 0xA7u, 0x46u, 0x13u, 1, 0, 0x1A3u, 1u, 0, nullstring, 0); | 798 pGUIWindow_CurrentMenu->CreateButton(129u, 0xA7u, 0x46u, 0x13u, 1, 0, 0x1A3u, 1u, 0, "", 0); |
796 pGUIWindow_CurrentMenu->CreateButton(129u, 0xBAu, 0x46u, 0x13u, 1, 0, 0x1A3u, 2u, 0, nullstring, 0); | 799 pGUIWindow_CurrentMenu->CreateButton(129u, 0xBAu, 0x46u, 0x13u, 1, 0, 0x1A3u, 2u, 0, "", 0); |
797 pGUIWindow_CurrentMenu->CreateButton(129u, 0xCDu, 0x46u, 0x13u, 1, 0, 0x1A3u, 3u, 0, nullstring, 0); | 800 pGUIWindow_CurrentMenu->CreateButton(129u, 0xCDu, 0x46u, 0x13u, 1, 0, 0x1A3u, 3u, 0, "", 0); |
798 pGUIWindow_CurrentMenu->CreateButton(129u, 224u, 70u, 19u, 1, 0, 0x1A3u, 4u, 0, nullstring, 0); | 801 pGUIWindow_CurrentMenu->CreateButton(129u, 224u, 70u, 19u, 1, 0, 0x1A3u, 4u, 0, "", 0); |
799 pGUIWindow_CurrentMenu->CreateButton(129u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 5u, 0, nullstring, 0); | 802 pGUIWindow_CurrentMenu->CreateButton(129u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 5u, 0, "", 0); |
800 pGUIWindow_CurrentMenu->CreateButton(129u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 6u, 0, nullstring, 0); | 803 pGUIWindow_CurrentMenu->CreateButton(129u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 6u, 0, "", 0); |
801 pGUIWindow_CurrentMenu->CreateButton(350u, 148u, 70u, 0x13u, 1, 0, 0x1A3u, 7u, 0, nullstring, 0); | 804 pGUIWindow_CurrentMenu->CreateButton(350u, 148u, 70u, 0x13u, 1, 0, 0x1A3u, 7u, 0, "", 0); |
802 pGUIWindow_CurrentMenu->CreateButton(350u, 167u, 70u, 0x13u, 1, 0, 0x1A3u, 8u, 0, nullstring, 0); | 805 pGUIWindow_CurrentMenu->CreateButton(350u, 167u, 70u, 0x13u, 1, 0, 0x1A3u, 8u, 0, "", 0); |
803 pGUIWindow_CurrentMenu->CreateButton(350u, 186u, 70u, 0x13u, 1, 0, 0x1A3u, 9u, 0, nullstring, 0); | 806 pGUIWindow_CurrentMenu->CreateButton(350u, 186u, 70u, 0x13u, 1, 0, 0x1A3u, 9u, 0, "", 0); |
804 pGUIWindow_CurrentMenu->CreateButton(350u, 205u, 70u, 0x13u, 1, 0, 0x1A3u, 0xAu, 0, nullstring, 0); | 807 pGUIWindow_CurrentMenu->CreateButton(350u, 205u, 70u, 0x13u, 1, 0, 0x1A3u, 0xAu, 0, "", 0); |
805 pGUIWindow_CurrentMenu->CreateButton(350u, 224u, 70u, 0x13u, 1, 0, 0x1A3u, 0xBu, 0, nullstring, 0); | 808 pGUIWindow_CurrentMenu->CreateButton(350u, 224u, 70u, 0x13u, 1, 0, 0x1A3u, 0xBu, 0, "", 0); |
806 pGUIWindow_CurrentMenu->CreateButton(350u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 0xCu, 0, nullstring, 0); | 809 pGUIWindow_CurrentMenu->CreateButton(350u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 0xCu, 0, "", 0); |
807 pGUIWindow_CurrentMenu->CreateButton(350u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 0xDu, 0, nullstring, 0); | 810 pGUIWindow_CurrentMenu->CreateButton(350u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 0xDu, 0, "", 0); |
808 dword_506E68 = -1; | 811 dword_506E68 = -1; |
809 dword_506F08 = 1; | 812 dword_506F08 = 1; |
810 memset(word_506E6C, 0, 0x1Cu); | 813 memset(word_506E6C, 0, 0x1Cu); |
811 word_506E6C[14] = 0; | 814 word_506E6C[14] = 0; |
812 memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u); | 815 memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u); |
869 case UIMSG_OpenVideoOptions: | 872 case UIMSG_OpenVideoOptions: |
870 if ( pMessageQueue_50CBD0->uNumMessages ) | 873 if ( pMessageQueue_50CBD0->uNumMessages ) |
871 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 874 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
872 pGUIWindow_CurrentMenu->Release(); | 875 pGUIWindow_CurrentMenu->Release(); |
873 viewparams->field_48 = v0; | 876 viewparams->field_48 = v0; |
874 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 28; | 877 pCurrentScreen = 28; |
875 uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE); | 878 uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE); |
876 uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE); | 879 uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE); |
877 uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE); | 880 uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE); |
878 uTextureID_507C1C = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE); | 881 uTextureID_507C1C = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE); |
879 uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); | 882 uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); |
1182 pEventTimer->Resume(); | 1185 pEventTimer->Resume(); |
1183 goto LABEL_188; | 1186 goto LABEL_188; |
1184 case UIMSG_OpenQuestBook: | 1187 case UIMSG_OpenQuestBook: |
1185 if ( pMessageQueue_50CBD0->uNumMessages ) | 1188 if ( pMessageQueue_50CBD0->uNumMessages ) |
1186 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1189 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1187 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1190 if ( pCurrentScreen ) |
1188 pGUIWindow_CurrentMenu->Release(); | 1191 pGUIWindow_CurrentMenu->Release(); |
1189 pEventTimer->Pause(); | 1192 pEventTimer->Pause(); |
1190 pAudioPlayer->StopChannels(-1, -1); | 1193 pAudioPlayer->StopChannels(-1, -1); |
1191 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1194 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
1192 ptr_507BE0 = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)ptr_507A10, 0); | 1195 ptr_507BE0 = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)ptr_507A10, 0); |
1193 bFlashQuestBook = 0; | 1196 bFlashQuestBook = 0; |
1194 goto _continue; | 1197 goto _continue; |
1195 case UIMSG_OpenAutonotes: | 1198 case UIMSG_OpenAutonotes: |
1196 if ( pMessageQueue_50CBD0->uNumMessages ) | 1199 if ( pMessageQueue_50CBD0->uNumMessages ) |
1197 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1200 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1198 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1201 if ( pCurrentScreen ) |
1199 pGUIWindow_CurrentMenu->Release(); | 1202 pGUIWindow_CurrentMenu->Release(); |
1200 pEventTimer->Pause(); | 1203 pEventTimer->Pause(); |
1201 pAudioPlayer->StopChannels(-1, -1); | 1204 pAudioPlayer->StopChannels(-1, -1); |
1202 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1205 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
1203 ptr_507BE0 = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)ptr_507A0C, 0); | 1206 ptr_507BE0 = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)ptr_507A0C, 0); |
1204 bFlashAutonotesBook = 0; | 1207 bFlashAutonotesBook = 0; |
1205 goto _continue; | 1208 goto _continue; |
1206 case UIMSG_OpenMapBook: | 1209 case UIMSG_OpenMapBook: |
1207 if ( pMessageQueue_50CBD0->uNumMessages ) | 1210 if ( pMessageQueue_50CBD0->uNumMessages ) |
1208 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1211 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1209 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1212 if ( pCurrentScreen ) |
1210 pGUIWindow_CurrentMenu->Release(); | 1213 pGUIWindow_CurrentMenu->Release(); |
1211 pEventTimer->Pause(); | 1214 pEventTimer->Pause(); |
1212 viewparams->sPartyPosX = pParty->vPosition.x; | 1215 viewparams->sPartyPosX = pParty->vPosition.x; |
1213 viewparams->sPartyPosZ = pParty->vPosition.z; | 1216 viewparams->sPartyPosZ = pParty->vPosition.y; |
1214 pAudioPlayer->StopChannels(-1, -1); | 1217 pAudioPlayer->StopChannels(-1, -1); |
1215 v26 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1218 v26 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); |
1216 v27 = 353; | 1219 v27 = 353; |
1217 v28 = 546; | 1220 v28 = 546; |
1218 v170 = 0; | 1221 v170 = 0; |
1219 v156 = (int)ptr_507A08; | 1222 v156 = (int)ptr_507A08; |
1220 goto LABEL_210; | 1223 goto LABEL_210; |
1221 case UIMSG_OpenCalendar: | 1224 case UIMSG_OpenCalendar: |
1222 if ( pMessageQueue_50CBD0->uNumMessages ) | 1225 if ( pMessageQueue_50CBD0->uNumMessages ) |
1223 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1226 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1224 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1227 if ( pCurrentScreen ) |
1225 pGUIWindow_CurrentMenu->Release(); | 1228 pGUIWindow_CurrentMenu->Release(); |
1226 pEventTimer->Pause(); | 1229 pEventTimer->Pause(); |
1227 pAudioPlayer->StopChannels(-1, -1); | 1230 pAudioPlayer->StopChannels(-1, -1); |
1228 v26 = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1231 v26 = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
1229 v27 = 354; | 1232 v27 = 354; |
1235 ptr_507BE0 = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170); | 1238 ptr_507BE0 = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170); |
1236 goto _continue; | 1239 goto _continue; |
1237 case UIMSG_OpenHistoryBook: | 1240 case UIMSG_OpenHistoryBook: |
1238 if ( pMessageQueue_50CBD0->uNumMessages ) | 1241 if ( pMessageQueue_50CBD0->uNumMessages ) |
1239 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1242 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1240 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1243 if ( pCurrentScreen ) |
1241 pGUIWindow_CurrentMenu->Release(); | 1244 pGUIWindow_CurrentMenu->Release(); |
1242 pEventTimer->Pause(); | 1245 pEventTimer->Pause(); |
1243 pAudioPlayer->StopChannels(-1, -1); | 1246 pAudioPlayer->StopChannels(-1, -1); |
1244 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1247 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); |
1245 ptr_507BE0 = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)ptr_507A00, 0); | 1248 ptr_507BE0 = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)ptr_507A00, 0); |
1247 goto _continue; | 1250 goto _continue; |
1248 case UIMSG_CloseBook: | 1251 case UIMSG_CloseBook: |
1249 back_to_game(); | 1252 back_to_game(); |
1250 if ( pMessageQueue_50CBD0->uNumMessages ) | 1253 if ( pMessageQueue_50CBD0->uNumMessages ) |
1251 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1254 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1252 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 15 ) | 1255 if ( pCurrentScreen > 15 ) |
1253 { | 1256 { |
1254 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions >= 17 | 1257 if ( pCurrentScreen >= 17 |
1255 && (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 18 | 1258 && (pCurrentScreen <= 18 |
1256 || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 104) ) | 1259 || pCurrentScreen == 104) ) |
1257 { | 1260 { |
1258 LABEL_229: | 1261 LABEL_229: |
1259 if ( dword_50CDC8 ) | 1262 if ( dword_50CDC8 ) |
1260 goto LABEL_232; | 1263 goto LABEL_232; |
1261 sub_42FC15(); | 1264 sub_42FC15(); |
1262 goto LABEL_231; | 1265 goto LABEL_231; |
1263 } | 1266 } |
1264 } | 1267 } |
1265 else | 1268 else |
1266 { | 1269 { |
1267 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions >= 14 | 1270 if ( pCurrentScreen >= 14 |
1268 || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 4 | 1271 || pCurrentScreen == 4 |
1269 || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) | 1272 || pCurrentScreen == 10 ) |
1270 goto LABEL_229; | 1273 goto LABEL_229; |
1271 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 13 | 1274 if ( pCurrentScreen == 13 |
1272 && !dword_50CDC8 | 1275 && !dword_50CDC8 |
1273 && !dword_5C35C8 ) | 1276 && !dword_5C35C8 ) |
1274 { | 1277 { |
1275 sub_42FC15(); | 1278 sub_42FC15(); |
1276 dword_5C35C8 = 0; | 1279 dword_5C35C8 = 0; |
1283 if ( !ptr_507BDC ) | 1286 if ( !ptr_507BDC ) |
1284 { | 1287 { |
1285 pRenderer->ClearZBuffer(0, 479); | 1288 pRenderer->ClearZBuffer(0, 479); |
1286 viewparams->bRedrawGameUI = v0; | 1289 viewparams->bRedrawGameUI = v0; |
1287 viewparams->field_48 = v0; | 1290 viewparams->field_48 = v0; |
1288 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1291 if ( pCurrentScreen ) |
1289 { | 1292 { |
1290 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 103 ) | 1293 if ( pCurrentScreen > 103 ) |
1291 { | 1294 { |
1292 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 104 ) | 1295 if ( pCurrentScreen == 104 ) |
1293 goto LABEL_321; | 1296 goto LABEL_321; |
1294 } | 1297 } |
1295 else | 1298 else |
1296 { | 1299 { |
1297 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions < 100 ) | 1300 if ( pCurrentScreen < 100 ) |
1298 { | 1301 { |
1299 switch ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 1302 switch ( pCurrentScreen ) |
1300 { | 1303 { |
1301 case 23: | 1304 case 23: |
1302 pIcons_LOD->_4114F2(); | 1305 pIcons_LOD->_4114F2(); |
1303 if ( some_active_character ) | 1306 if ( some_active_character ) |
1304 { | 1307 { |
1328 case 12: | 1331 case 12: |
1329 pIcons_LOD->_4114F2(); | 1332 pIcons_LOD->_4114F2(); |
1330 //crt_deconstruct_ptr_6A0118(); | 1333 //crt_deconstruct_ptr_6A0118(); |
1331 goto LABEL_291; | 1334 goto LABEL_291; |
1332 case 15: | 1335 case 15: |
1333 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 10; | 1336 pCurrentScreen = 10; |
1334 goto _continue; | 1337 goto _continue; |
1335 case 10: | 1338 case 10: |
1336 v29 = ptr_507BB8; | 1339 v29 = ptr_507BB8; |
1337 goto LABEL_249; | 1340 goto LABEL_249; |
1338 case 25: | 1341 case 25: |
1339 v29 = ptr_507BC8; | 1342 v29 = ptr_507BC8; |
1340 LABEL_249: | 1343 LABEL_249: |
1341 v29->Release(); | 1344 v29->Release(); |
1342 pIcons_LOD->_4114F2(); | 1345 pIcons_LOD->_4114F2(); |
1343 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 1346 pCurrentScreen = 0; |
1344 viewparams->bRedrawGameUI = v0; | 1347 viewparams->bRedrawGameUI = v0; |
1345 pEventTimer->Resume(); | 1348 pEventTimer->Resume(); |
1346 goto _continue; | 1349 goto _continue; |
1347 case 2: | 1350 case 2: |
1348 thisa = (signed int)&uTextureID_507C60; | 1351 thisa = (signed int)&uTextureID_507C60; |
1479 dword_506F14 = 0; | 1482 dword_506F14 = 0; |
1480 dword_507B94 = v0; | 1483 dword_507B94 = v0; |
1481 goto LABEL_322; | 1484 goto LABEL_322; |
1482 case 14: | 1485 case 14: |
1483 pGUIWindow_CurrentMenu->Release(); | 1486 pGUIWindow_CurrentMenu->Release(); |
1484 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 13; | 1487 pCurrentScreen = 13; |
1485 pIcons_LOD->_4114F2(); | 1488 pIcons_LOD->_4114F2(); |
1486 goto _continue; | 1489 goto _continue; |
1487 case 13: | 1490 case 13: |
1488 if ( uDialogueType ) | 1491 if ( uDialogueType ) |
1489 uDialogueType = 0; | 1492 uDialogueType = 0; |
1525 case 17: | 1528 case 17: |
1526 if ( pParty->vPosition.x < -22528 ) | 1529 if ( pParty->vPosition.x < -22528 ) |
1527 pParty->vPosition.x = -22528; | 1530 pParty->vPosition.x = -22528; |
1528 if ( pParty->vPosition.x > 22528 ) | 1531 if ( pParty->vPosition.x > 22528 ) |
1529 pParty->vPosition.x = 22528; | 1532 pParty->vPosition.x = 22528; |
1530 if ( pParty->vPosition.z < -22528 ) | 1533 if ( pParty->vPosition.y < -22528 ) |
1531 pParty->vPosition.z = -22528; | 1534 pParty->vPosition.y = -22528; |
1532 if ( pParty->vPosition.z > 22528 ) | 1535 if ( pParty->vPosition.y > 22528 ) |
1533 pParty->vPosition.z = 22528; | 1536 pParty->vPosition.y = 22528; |
1534 goto LABEL_317; | 1537 goto LABEL_317; |
1535 case 16: | 1538 case 16: |
1536 pVideoPlayer->Unload(); | 1539 pVideoPlayer->Unload(); |
1537 goto _continue; | 1540 goto _continue; |
1538 case 7: | 1541 case 7: |
1549 pIcons_LOD->_4114F2(); | 1552 pIcons_LOD->_4114F2(); |
1550 } | 1553 } |
1551 LABEL_322: | 1554 LABEL_322: |
1552 if ( ptr_507BD4 ) | 1555 if ( ptr_507BD4 ) |
1553 { | 1556 { |
1554 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 7 ) | 1557 if ( pCurrentScreen == 7 ) |
1555 { | 1558 { |
1556 pMouse->SetCursorBitmap("MICON2"); | 1559 pMouse->SetCursorBitmap("MICON2"); |
1557 } | 1560 } |
1558 else | 1561 else |
1559 { | 1562 { |
1570 pGUIWindow_CurrentMenu->Release(); | 1573 pGUIWindow_CurrentMenu->Release(); |
1571 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) | 1574 if ( pGUIWindow_CurrentMenu == ptr_507BC0 ) |
1572 ptr_507BC0 = 0; | 1575 ptr_507BC0 = 0; |
1573 pGUIWindow_CurrentMenu = 0; | 1576 pGUIWindow_CurrentMenu = 0; |
1574 pEventTimer->Resume(); | 1577 pEventTimer->Resume(); |
1575 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 1578 pCurrentScreen = 0; |
1576 viewparams->bRedrawGameUI = v0; | 1579 viewparams->bRedrawGameUI = v0; |
1577 pIcons_LOD->_4355F7(); | 1580 pIcons_LOD->_4355F7(); |
1578 goto _continue; | 1581 goto _continue; |
1579 } | 1582 } |
1580 v36 = ptr_507BD4; | 1583 v36 = ptr_507BD4; |
1583 dword_6BE138 = -1; | 1586 dword_6BE138 = -1; |
1584 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0); | 1587 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0); |
1585 pEventTimer->Pause(); | 1588 pEventTimer->Pause(); |
1586 pAudioPlayer->StopChannels(-1, -1); | 1589 pAudioPlayer->StopChannels(-1, -1); |
1587 ++pIcons_LOD->uTexturePacksCount; | 1590 ++pIcons_LOD->uTexturePacksCount; |
1588 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = v0; | 1591 pCurrentScreen = v0; |
1589 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 1592 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
1590 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 1593 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
1591 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0); | 1594 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0); |
1592 uTextureID_507944 = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); | 1595 uTextureID_507944 = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); |
1593 uTextureID_507940 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); | 1596 uTextureID_507940 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); |
1685 } | 1688 } |
1686 goto LABEL_333; | 1689 goto LABEL_333; |
1687 } | 1690 } |
1688 sub_41426F(); | 1691 sub_41426F(); |
1689 _continue: | 1692 _continue: |
1690 if ( !pMessageQueue_50CBD0->uNumMessages ) | |
1691 break; | |
1692 continue; | 1693 continue; |
1693 case UIMSG_BC: | 1694 case UIMSG_BC: |
1694 if ( uMessageParam ) | 1695 if ( uMessageParam ) |
1695 { | 1696 { |
1696 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079E8, 0); | 1697 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079E8, 0); |
1736 pParty->vPosition.x = dword_59117C_teleportx; | 1737 pParty->vPosition.x = dword_59117C_teleportx; |
1737 _5B65A8_npcdata_uflags_or_other = dword_59117C_teleportx; | 1738 _5B65A8_npcdata_uflags_or_other = dword_59117C_teleportx; |
1738 } | 1739 } |
1739 if ( dword_591178_teleporty ) | 1740 if ( dword_591178_teleporty ) |
1740 { | 1741 { |
1741 pParty->vPosition.z = dword_591178_teleporty; | 1742 pParty->vPosition.y = dword_591178_teleporty; |
1742 _5B65AC_npcdata_fame_or_other = dword_591178_teleporty; | 1743 _5B65AC_npcdata_fame_or_other = dword_591178_teleporty; |
1743 } | 1744 } |
1744 if ( dword_591174_teleportz ) | 1745 if ( dword_591174_teleportz ) |
1745 { | 1746 { |
1746 pParty->vPosition.y = dword_591174_teleportz; | 1747 pParty->vPosition.z = dword_591174_teleportz; |
1747 _5B65B0_npcdata_rep_or_other = dword_591174_teleportz; | 1748 _5B65B0_npcdata_rep_or_other = dword_591174_teleportz; |
1748 pParty->uFallStartY = dword_591174_teleportz; | 1749 pParty->uFallStartY = dword_591174_teleportz; |
1749 } | 1750 } |
1750 if ( dword_591170_teleport_directiony ) | 1751 if ( dword_591170_teleport_directiony ) |
1751 { | 1752 { |
1797 dword_50CDC8 = v0; | 1798 dword_50CDC8 = v0; |
1798 sub_42FBDD(); | 1799 sub_42FBDD(); |
1799 v195 = (NPCData *)GetTravelTime(); | 1800 v195 = (NPCData *)GetTravelTime(); |
1800 strcpy(pOutdoor->pLevelFilename, pCurrentMapName); | 1801 strcpy(pOutdoor->pLevelFilename, pCurrentMapName); |
1801 if ( bUnderwater != 1 && pParty->bFlying | 1802 if ( bUnderwater != 1 && pParty->bFlying |
1802 || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.z, &pOut, 20) != v0 ) | 1803 || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, &pOut, 20) != v0 ) |
1803 { | 1804 { |
1804 viewparams->bRedrawGameUI = v0; | 1805 viewparams->bRedrawGameUI = v0; |
1805 LABEL_387: | 1806 LABEL_387: |
1806 sub_42FC15(); | 1807 sub_42FC15(); |
1807 if ( pParty->vPosition.x < -22528 ) | 1808 if ( pParty->vPosition.x < -22528 ) |
1808 pParty->vPosition.x = -22528; | 1809 pParty->vPosition.x = -22528; |
1809 if ( pParty->vPosition.x > 22528 ) | 1810 if ( pParty->vPosition.x > 22528 ) |
1810 pParty->vPosition.x = 22528; | 1811 pParty->vPosition.x = 22528; |
1811 if ( pParty->vPosition.z < -22528 ) | 1812 if ( pParty->vPosition.y < -22528 ) |
1812 pParty->vPosition.z = -22528; | 1813 pParty->vPosition.y = -22528; |
1813 if ( pParty->vPosition.z > 22528 ) | 1814 if ( pParty->vPosition.y > 22528 ) |
1814 pParty->vPosition.z = 22528; | 1815 pParty->vPosition.y = 22528; |
1815 LABEL_317: | 1816 LABEL_317: |
1816 sub_44603D(); | 1817 sub_44603D(); |
1817 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 1818 pCurrentScreen = 0; |
1818 } | 1819 } |
1819 else | 1820 else |
1820 { | 1821 { |
1821 pParty->field_6E4 = 0; | 1822 pParty->field_6E4 = 0; |
1822 pParty->field_6E0 = 0; | 1823 pParty->field_6E0 = 0; |
1880 pAudioPlayer->SetMapEAX(); | 1881 pAudioPlayer->SetMapEAX(); |
1881 bDialogueUI_InitializeActor_NPC_ID = 0; | 1882 bDialogueUI_InitializeActor_NPC_ID = 0; |
1882 OnMapLoad(); | 1883 OnMapLoad(); |
1883 pOutdoor->SetFog(); | 1884 pOutdoor->SetFog(); |
1884 TeleportToStartingPoint(uLevel_StartingPointType); | 1885 TeleportToStartingPoint(uLevel_StartingPointType); |
1885 pParty->vPosition.y = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.z, (int *)&v213, 0); | 1886 pParty->vPosition.z = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.y, (int *)&v213, 0); |
1886 pParty->uFallStartY = pParty->vPosition.y; | 1887 pParty->uFallStartY = pParty->vPosition.z; |
1887 sub_461103(); | 1888 sub_461103(); |
1888 pEventTimer->Resume(); | 1889 pEventTimer->Resume(); |
1889 viewparams->bRedrawGameUI = 1; | 1890 viewparams->bRedrawGameUI = 1; |
1890 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 1891 pCurrentScreen = 0; |
1891 pGameLoadingUI_ProgressBar->Release(); | 1892 pGameLoadingUI_ProgressBar->Release(); |
1892 } | 1893 } |
1893 goto LABEL_422; | 1894 goto LABEL_422; |
1894 case UIMSG_SaveGame|0x8: | 1895 case UIMSG_SaveGame|0x8: |
1895 goto LABEL_387; | 1896 goto LABEL_387; |
1930 if ( v45 != 6 ) | 1931 if ( v45 != 6 ) |
1931 goto _continue; | 1932 goto _continue; |
1932 if ( uCurrentlyLoadedLevelType != v0 ) | 1933 if ( uCurrentlyLoadedLevelType != v0 ) |
1933 { | 1934 { |
1934 v50 = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F]; | 1935 v50 = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F]; |
1935 if ( !(BYTE3(v50->uFaceAttributes) & 2) || !v50->sCogTriggeredID ) | 1936 if ( !(v50->uAttributes & 0x02000000) || !v50->sCogTriggeredID ) |
1936 goto _continue; | 1937 goto _continue; |
1937 v44 = uNumSeconds; | 1938 v44 = uNumSeconds; |
1938 goto LABEL_415; | 1939 goto LABEL_415; |
1939 } | 1940 } |
1940 v49 = &pIndoor->pFaces[v46]; | 1941 v49 = &pIndoor->pFaces[v46]; |
2079 } | 2080 } |
2080 v174 = pMapStats->pInfos[sub_410D99_get_map_index(*(short *)(uNumSeconds + 26))].pName; | 2081 v174 = pMapStats->pInfos[sub_410D99_get_map_index(*(short *)(uNumSeconds + 26))].pName; |
2081 v158 = (unsigned int)thise; | 2082 v158 = (unsigned int)thise; |
2082 v146 = pGlobalTXT_LocalizationStrings[475];// "Set %s over %s" | 2083 v146 = pGlobalTXT_LocalizationStrings[475];// "Set %s over %s" |
2083 _sprintex_draw_status_and_continue: | 2084 _sprintex_draw_status_and_continue: |
2084 sprintfex(pTmpBuf, v146, v158, v174); | 2085 sprintf(pTmpBuf, v146, v158, v174); |
2085 goto _set_status_string_pTmpBuf_and_continue; | 2086 goto _set_status_string_pTmpBuf_and_continue; |
2086 case UIMSG_B5: | 2087 case UIMSG_B5: |
2087 dword_50CDC8 = v0; | 2088 dword_50CDC8 = v0; |
2088 goto LABEL_453; | 2089 goto LABEL_453; |
2089 case UIMSG_B3: | 2090 case UIMSG_B3: |
2131 dword_5B65C0 = v0; | 2132 dword_5B65C0 = v0; |
2132 } | 2133 } |
2133 else | 2134 else |
2134 { | 2135 { |
2135 pParty->vPosition.x = v195->uFlags; | 2136 pParty->vPosition.x = v195->uFlags; |
2136 pParty->vPosition.z = v195->fame; | 2137 pParty->vPosition.y = v195->fame; |
2137 pParty->vPosition.y = v195->rep; | 2138 pParty->vPosition.z = v195->rep; |
2138 pParty->uFallStartY = pParty->vPosition.y; | 2139 pParty->uFallStartY = pParty->vPosition.z; |
2139 pParty->sRotationY = LOWORD(v195->house); | 2140 pParty->sRotationY = LOWORD(v195->house); |
2140 pParty->sRotationX = HIWORD(v195->house); | 2141 pParty->sRotationX = HIWORD(v195->house); |
2141 } | 2142 } |
2142 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 2143 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
2143 { | 2144 { |
2162 thisg = 0; | 2163 thisg = 0; |
2163 v62 = pParty->uTimePlayed + (signed __int64)((double)(qword_506350 << 7) * 0.033333335); | 2164 v62 = pParty->uTimePlayed + (signed __int64)((double)(qword_506350 << 7) * 0.033333335); |
2164 v195->pName = (char *)v62; | 2165 v195->pName = (char *)v62; |
2165 v61->uPortraitID = HIDWORD(v62); | 2166 v61->uPortraitID = HIDWORD(v62); |
2166 v61->uFlags = pParty->vPosition.x; | 2167 v61->uFlags = pParty->vPosition.x; |
2167 v61->fame = pParty->vPosition.z; | 2168 v61->fame = pParty->vPosition.y; |
2168 v61->rep = pParty->vPosition.y; | 2169 v61->rep = pParty->vPosition.z; |
2169 LOWORD(v61->house) = LOWORD(pParty->sRotationY); | 2170 LOWORD(v61->house) = LOWORD(pParty->sRotationY); |
2170 HIWORD(v61->house) = LOWORD(pParty->sRotationX); | 2171 HIWORD(v61->house) = LOWORD(pParty->sRotationX); |
2171 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 ) | 2172 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 ) |
2172 goto _continue; | 2173 goto _continue; |
2173 uAction = 0; | 2174 uAction = 0; |
2206 v64 = pMapStats->GetMapInfo(pCurrentMapName); | 2207 v64 = pMapStats->GetMapInfo(pCurrentMapName); |
2207 v65 = uMessageParam; | 2208 v65 = uMessageParam; |
2208 if ( v64 == stru_4ECBB8[uMessageParam].uMapInfoID ) | 2209 if ( v64 == stru_4ECBB8[uMessageParam].uMapInfoID ) |
2209 { | 2210 { |
2210 pParty->vPosition.x = stru_4ECBB8[v65].pos.x; | 2211 pParty->vPosition.x = stru_4ECBB8[v65].pos.x; |
2211 pParty->vPosition.z = stru_4ECBB8[v65].pos.y; | 2212 pParty->vPosition.y = stru_4ECBB8[v65].pos.y; |
2212 pParty->vPosition.y = stru_4ECBB8[v65].pos.z; | 2213 pParty->vPosition.z = stru_4ECBB8[v65].pos.z; |
2213 pParty->uFallStartY = pParty->vPosition.y; | 2214 pParty->uFallStartY = pParty->vPosition.z; |
2214 pParty->sRotationY = stru_4ECBB8[v65].rot_y; | 2215 pParty->sRotationY = stru_4ECBB8[v65].rot_y; |
2215 pParty->sRotationX = stru_4ECBB8[v65].rot_x; | 2216 pParty->sRotationX = stru_4ECBB8[v65].rot_x; |
2216 } | 2217 } |
2217 else | 2218 else |
2218 { | 2219 { |
2228 v66 = stru_4ECBB8[uMessageParam].rot_x; | 2229 v66 = stru_4ECBB8[uMessageParam].rot_x; |
2229 _5B65B4_npcdata_loword_house_or_other = stru_4ECBB8[uMessageParam].rot_y; | 2230 _5B65B4_npcdata_loword_house_or_other = stru_4ECBB8[uMessageParam].rot_y; |
2230 _5B65B8_npcdata_hiword_house_or_other = v66; | 2231 _5B65B8_npcdata_hiword_house_or_other = v66; |
2231 UpdateActors(); | 2232 UpdateActors(); |
2232 } | 2233 } |
2233 v67 = pGUIWindow_CurrentMenu->str_48; | 2234 v67 = pGUIWindow_CurrentMenu->Hint; |
2234 if ( v67 ) | 2235 if ( v67 ) |
2235 *((int *)v67 + 17) = v0; | 2236 *((int *)v67 + 17) = v0; |
2236 else | 2237 else |
2237 pParty->pPlayers[(unsigned __int8)byte_50C0C0].CanCastSpell(0x14u); | 2238 pParty->pPlayers[(unsigned __int8)byte_50C0C0].CanCastSpell(0x14u); |
2238 LABEL_434: | 2239 LABEL_434: |
2349 v195 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2); | 2350 v195 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2); |
2350 v70 = atoi(v216.pProperties[0]); | 2351 v70 = atoi(v216.pProperties[0]); |
2351 if ( v70 <= 0 || v70 >= 77 ) | 2352 if ( v70 <= 0 || v70 >= 77 ) |
2352 { | 2353 { |
2353 LABEL_90: | 2354 LABEL_90: |
2354 v1 = nullstring; | 2355 v1 = ""; |
2355 LABEL_91: | 2356 LABEL_91: |
2356 v0 = 1; | 2357 v0 = 1; |
2357 goto _continue; | 2358 goto _continue; |
2358 } | 2359 } |
2359 v71 = v70; | 2360 v71 = v70; |
2395 if ( pIndoor->GetSector(v74, thisi, v75) ) | 2396 if ( pIndoor->GetSector(v74, thisi, v75) ) |
2396 { | 2397 { |
2397 v77 = thisi; | 2398 v77 = thisi; |
2398 LABEL_544: | 2399 LABEL_544: |
2399 pParty->vPosition.x = v74; | 2400 pParty->vPosition.x = v74; |
2400 pParty->vPosition.z = v77; | 2401 pParty->vPosition.y = v77; |
2401 pParty->vPosition.y = v76; | 2402 pParty->vPosition.z = v76; |
2402 pParty->uFallStartY = v76; | 2403 pParty->uFallStartY = v76; |
2403 goto LABEL_90; | 2404 goto LABEL_90; |
2404 } | 2405 } |
2405 } | 2406 } |
2406 else | 2407 else |
2464 *((char *)v51 + 9) &= 0xFDu; | 2465 *((char *)v51 + 9) &= 0xFDu; |
2465 } | 2466 } |
2466 goto LABEL_416; | 2467 goto LABEL_416; |
2467 case 0x1C: | 2468 case 0x1C: |
2468 if ( !uActiveCharacter | 2469 if ( !uActiveCharacter |
2469 || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 2470 || pCurrentScreen ) |
2470 goto LABEL_90; | 2471 goto LABEL_90; |
2471 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); | 2472 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); |
2472 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 25; | 2473 pCurrentScreen = 25; |
2473 pEventTimer->Pause(); | 2474 pEventTimer->Pause(); |
2474 goto _continue; | 2475 goto _continue; |
2475 case 0x1B: | 2476 case 0x1B: |
2476 if ( !uActiveCharacter ) | 2477 if ( !uActiveCharacter ) |
2477 goto LABEL_90; | 2478 goto LABEL_90; |
2542 _506F18_num_hours_to_sleep = v86 + 720; | 2543 _506F18_num_hours_to_sleep = v86 + 720; |
2543 goto LABEL_615; | 2544 goto LABEL_615; |
2544 case 0x68: | 2545 case 0x68: |
2545 if ( pMessageQueue_50CBD0->uNumMessages ) | 2546 if ( pMessageQueue_50CBD0->uNumMessages ) |
2546 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2547 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2547 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 2548 if ( pCurrentScreen ) |
2548 goto _continue; | 2549 goto _continue; |
2549 if ( sub_42F4DA() ) | 2550 if ( sub_42F4DA() ) |
2550 goto LABEL_594; | 2551 goto LABEL_594; |
2551 if ( pParty->bTurnBasedModeOn == v0 ) | 2552 if ( pParty->bTurnBasedModeOn == v0 ) |
2552 goto LABEL_595; | 2553 goto LABEL_595; |
2668 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; | 2669 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; |
2669 goto _continue; | 2670 goto _continue; |
2670 case 0x4E: | 2671 case 0x4E: |
2671 if ( dword_50654C && byte_506550 ) | 2672 if ( dword_50654C && byte_506550 ) |
2672 { | 2673 { |
2673 v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->field_1A4E].pName; | 2674 v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage].pName; |
2674 v157 = pGlobalTXT_LocalizationStrings[483]; | 2675 v157 = pGlobalTXT_LocalizationStrings[483]; |
2675 _sprintex_2args_draw_status_and_continue: | 2676 _sprintex_2args_draw_status_and_continue: |
2676 sprintfex(pTmpBuf, v157, v173); | 2677 sprintf(pTmpBuf, v157, v173); |
2677 } | 2678 } |
2678 else | 2679 else |
2679 { | 2680 { |
2680 if ( pPlayers[uActiveCharacter]->uQuickSpell ) | 2681 if ( pPlayers[uActiveCharacter]->uQuickSpell ) |
2681 v177 = pGlobalTXT_LocalizationStrings[584];// "Click here to remove your Quick Spell" | 2682 v177 = pGlobalTXT_LocalizationStrings[584];// "Click here to remove your Quick Spell" |
2724 v130 = 0; | 2725 v130 = 0; |
2725 dword_50654C = 0; | 2726 dword_50654C = 0; |
2726 v127 = 203; | 2727 v127 = 203; |
2727 goto _play_sound_and_continue; | 2728 goto _play_sound_and_continue; |
2728 } | 2729 } |
2729 v99 = dword_50654C + 11 * pPlayers[uActiveCharacter]->field_1A4E; | 2730 v99 = dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage; |
2730 pPlayers[uActiveCharacter]->uQuickSpell = v99; | 2731 pPlayers[uActiveCharacter]->uQuickSpell = v99; |
2731 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter); | 2732 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter); |
2732 if ( uActiveCharacter ) | 2733 if ( uActiveCharacter ) |
2733 thisk->PlaySound(12, 0); | 2734 thisk->PlaySound(12, 0); |
2734 byte_506550 = 0; | 2735 byte_506550 = 0; |
2743 thisl = (int)&v100->pActiveSkills[12]; | 2744 thisl = (int)&v100->pActiveSkills[12]; |
2744 do | 2745 do |
2745 { | 2746 { |
2746 if ( *(short *)thisl ) | 2747 if ( *(short *)thisl ) |
2747 { | 2748 { |
2748 if ( v100->field_1A4E == v101 ) | 2749 if ( v100->pNumSpellBookPage == v101 ) |
2749 uAction = (int)v195; | 2750 uAction = (int)v195; |
2750 v102 = (int)v195; | 2751 v102 = (int)v195; |
2751 v195 = (NPCData *)((char *)v195 + 1); | 2752 v195 = (NPCData *)((char *)v195 + 1); |
2752 v217[v102] = v101; | 2753 v217[v102] = v101; |
2753 } | 2754 } |
2768 ++uAction; | 2769 ++uAction; |
2769 if ( uAction >= (signed int)v195 ) | 2770 if ( uAction >= (signed int)v195 ) |
2770 uAction = 0; | 2771 uAction = 0; |
2771 } | 2772 } |
2772 sub_41140B(); | 2773 sub_41140B(); |
2773 pPlayers[uActiveCharacter]->field_1A4E = LOBYTE(v217[uAction]); | 2774 pPlayers[uActiveCharacter]->pNumSpellBookPage = LOBYTE(v217[uAction]); |
2774 goto LABEL_661; | 2775 goto LABEL_661; |
2775 case UIMSG_SaveGame|0x4: | 2776 case UIMSG_SaveGame|0x4: |
2776 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->field_1A4E ) | 2777 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->pNumSpellBookPage ) |
2777 goto _continue; | 2778 goto _continue; |
2778 sub_41140B(); | 2779 sub_41140B(); |
2779 pPlayers[uActiveCharacter]->field_1A4E = uMessageParam; | 2780 pPlayers[uActiveCharacter]->pNumSpellBookPage = uMessageParam; |
2780 LABEL_661: | 2781 LABEL_661: |
2781 pGUIWindow_CurrentMenu->_411621(); | 2782 pGUIWindow_CurrentMenu->_411621(); |
2782 LABEL_662: | 2783 LABEL_662: |
2783 v165 = 0; | 2784 v165 = 0; |
2784 v151 = 0; | 2785 v151 = 0; |
2800 if ( dword_50654C - 1 == uMessageParam ) | 2801 if ( dword_50654C - 1 == uMessageParam ) |
2801 { | 2802 { |
2802 pGUIWindow_CurrentMenu->Release(); | 2803 pGUIWindow_CurrentMenu->Release(); |
2803 pEventTimer->Resume(); | 2804 pEventTimer->Resume(); |
2804 viewparams->bRedrawGameUI = v0; | 2805 viewparams->bRedrawGameUI = v0; |
2805 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 2806 pCurrentScreen = 0; |
2806 pIcons_LOD->_4114F2(); | 2807 pIcons_LOD->_4114F2(); |
2807 v103 = dword_50654C + 11 * *(char *)(uNumSeconds + 6734); | 2808 v103 = dword_50654C + 11 * *(char *)(uNumSeconds + 6734); |
2808 if ( dword_50C9E8 < 40 ) | 2809 if ( dword_50C9E8 < 40 ) |
2809 { | 2810 { |
2810 dword_50C9EC[3 * dword_50C9E8] = 142; | 2811 dword_50C9EC[3 * dword_50C9E8] = 142; |
2867 { | 2868 { |
2868 if ( pMessageQueue_50CBD0->uNumMessages ) | 2869 if ( pMessageQueue_50CBD0->uNumMessages ) |
2869 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2870 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2870 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) | 2871 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery ) |
2871 { | 2872 { |
2872 if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 2873 if ( !pCurrentScreen ) |
2873 goto LABEL_693; | 2874 goto LABEL_693; |
2874 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 5 | 2875 if ( pCurrentScreen != 5 |
2875 && uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 7 | 2876 && pCurrentScreen != 7 |
2876 && (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 99 | 2877 && (pCurrentScreen <= 99 |
2877 || uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions > 103) ) | 2878 || pCurrentScreen > 103) ) |
2878 { | 2879 { |
2879 pGUIWindow_CurrentMenu->Release(); | 2880 pGUIWindow_CurrentMenu->Release(); |
2880 LABEL_693: | 2881 LABEL_693: |
2881 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F8, 0); | 2882 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F8, 0); |
2882 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 8; | 2883 pCurrentScreen = 8; |
2883 pEventTimer->Pause(); | 2884 pEventTimer->Pause(); |
2884 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); | 2885 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); |
2885 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 2886 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
2886 viewparams->field_48 = v0; | 2887 viewparams->field_48 = v0; |
2887 goto _continue; | 2888 goto _continue; |
2890 } | 2891 } |
2891 goto _continue; | 2892 goto _continue; |
2892 case 0x6A: | 2893 case 0x6A: |
2893 if ( pMessageQueue_50CBD0->uNumMessages ) | 2894 if ( pMessageQueue_50CBD0->uNumMessages ) |
2894 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2895 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2895 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 2896 if ( pCurrentScreen ) |
2896 pGUIWindow_CurrentMenu->Release(); | 2897 pGUIWindow_CurrentMenu->Release(); |
2897 ++pIcons_LOD->uTexturePacksCount; | 2898 ++pIcons_LOD->uTexturePacksCount; |
2898 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 2899 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
2899 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 2900 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
2900 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F4, 0); | 2901 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F4, 0); |
2901 viewparams->bRedrawGameUI = v0; | 2902 viewparams->bRedrawGameUI = v0; |
2902 pEventTimer->Pause(); | 2903 pEventTimer->Pause(); |
2903 pAudioPlayer->StopChannels(-1, -1); | 2904 pAudioPlayer->StopChannels(-1, -1); |
2904 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 104; | 2905 pCurrentScreen = 104; |
2905 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); | 2906 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); |
2906 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); | 2907 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); |
2907 ptr_5076F4 = pGUIWindow_CurrentMenu->CreateButton( | 2908 ptr_5076F4 = pGUIWindow_CurrentMenu->CreateButton( |
2908 0x187u, | 2909 0x187u, |
2909 0x13Cu, | 2910 0x13Cu, |
2918 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), | 2919 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), |
2919 0, | 2920 0, |
2920 v179); | 2921 v179); |
2921 goto _continue; | 2922 goto _continue; |
2922 case 0x6B: | 2923 case 0x6B: |
2923 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 2924 if ( pCurrentScreen ) |
2924 { | 2925 { |
2925 pGUIWindow_CurrentMenu->Release(); | 2926 pGUIWindow_CurrentMenu->Release(); |
2926 pEventTimer->Resume(); | 2927 pEventTimer->Resume(); |
2927 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 2928 pCurrentScreen = 0; |
2928 viewparams->bRedrawGameUI = v0; | 2929 viewparams->bRedrawGameUI = v0; |
2929 } | 2930 } |
2930 stru_506E40.Release(); | 2931 stru_506E40.Release(); |
2931 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); | 2932 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); |
2932 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); | 2933 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); |
3152 { | 3153 { |
3153 v195 = (NPCData *)((char *)v195 - 12); | 3154 v195 = (NPCData *)((char *)v195 - 12); |
3154 } | 3155 } |
3155 if ( pParty->uCurrentHour < 0xC || (uNumSeconds = v0, pParty->uCurrentHour >= 0x18) ) | 3156 if ( pParty->uCurrentHour < 0xC || (uNumSeconds = v0, pParty->uCurrentHour >= 0x18) ) |
3156 uNumSeconds = 0; | 3157 uNumSeconds = 0; |
3157 sprintfex( | 3158 sprintf( |
3158 pTmpBuf, | 3159 pTmpBuf, |
3159 "%d:%02d%s %s %d %s %d", | 3160 "%d:%02d%s %s %d %s %d", |
3160 v195, | 3161 v195, |
3161 pParty->uCurrentMinute, | 3162 pParty->uCurrentMinute, |
3162 aAMPMNames[uNumSeconds], | 3163 aAMPMNames[uNumSeconds], |
3169 v173 = (char *)pParty->uNumFoodRations; | 3170 v173 = (char *)pParty->uNumFoodRations; |
3170 v157 = pGlobalTXT_LocalizationStrings[501];// You have %lu food" | 3171 v157 = pGlobalTXT_LocalizationStrings[501];// You have %lu food" |
3171 goto _sprintex_2args_draw_status_and_continue; | 3172 goto _sprintex_2args_draw_status_and_continue; |
3172 case UIMSG_ShowStatus_Player: | 3173 case UIMSG_ShowStatus_Player: |
3173 v106 = pPlayers[uMessageParam]; | 3174 v106 = pPlayers[uMessageParam]; |
3174 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v106->pName, pClassNames[v106->uClass]);// "%s the %s" | 3175 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v106->pName, pClassNames[v106->uClass]);// "%s the %s" |
3175 strcat(pTmpBuf, ": "); | 3176 strcat(pTmpBuf, ": "); |
3176 v107 = v106->GetMajorConditionIdx(); | 3177 v107 = v106->GetMajorConditionIdx(); |
3177 strcat(pTmpBuf, aCharacterConditionNames[v107]); | 3178 strcat(pTmpBuf, aCharacterConditionNames[v107]); |
3178 sub_41C0B8_set_status_string(pTmpBuf); | 3179 sub_41C0B8_set_status_string(pTmpBuf); |
3179 v108 = 8 * uMessageParam - 8; | 3180 v108 = 8 * uMessageParam - 8; |
3185 v110 = pPlayers[uMessageParam]; | 3186 v110 = pPlayers[uMessageParam]; |
3186 v111 = v110->GetMaxMana(); | 3187 v111 = v110->GetMaxMana(); |
3187 v112 = v110->sMana; | 3188 v112 = v110->sMana; |
3188 v113 = pGlobalTXT_LocalizationStrings[108];// "Hit Points" | 3189 v113 = pGlobalTXT_LocalizationStrings[108];// "Hit Points" |
3189 v114 = v110->GetMaxHealth(); | 3190 v114 = v110->GetMaxHealth(); |
3190 sprintfex(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109); | 3191 sprintf(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109); |
3191 goto _set_status_string_pTmpBuf_and_continue; | 3192 goto _set_status_string_pTmpBuf_and_continue; |
3192 case 0xC: | 3193 case 0xC: |
3193 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 15 ) | 3194 if ( pCurrentScreen == 15 ) |
3194 goto LABEL_762; | 3195 goto LABEL_762; |
3195 sub_420E01(); | 3196 sub_420E01(); |
3196 goto _continue; | 3197 goto _continue; |
3197 case UIMSG_ChangeMusicVolume|0x8: | 3198 case UIMSG_ChangeMusicVolume|0x8: |
3198 LABEL_762: | 3199 LABEL_762: |
3258 if ( pMessageQueue_50CBD0->uNumMessages ) | 3259 if ( pMessageQueue_50CBD0->uNumMessages ) |
3259 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3260 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3260 OnPressSpace(); | 3261 OnPressSpace(); |
3261 goto _continue; | 3262 goto _continue; |
3262 case UIMSG_ChangeSoundVolume|0x100: | 3263 case UIMSG_ChangeSoundVolume|0x100: |
3263 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 3264 if ( pCurrentScreen ) |
3264 goto _continue; | 3265 goto _continue; |
3265 pParty->uFlags |= 2u; | 3266 pParty->uFlags |= 2u; |
3266 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); | 3267 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); |
3267 uNumSeconds = 131072; | 3268 uNumSeconds = 131072; |
3268 v118 = 2 * viewparams->uMinimapZoom; | 3269 v118 = 2 * viewparams->uMinimapZoom; |
3281 if ( (signed int)v118 <= 2048 ) | 3282 if ( (signed int)v118 <= 2048 ) |
3282 goto LABEL_789; | 3283 goto LABEL_789; |
3283 viewparams->field_28 = 11; | 3284 viewparams->field_28 = 11; |
3284 goto LABEL_788; | 3285 goto LABEL_788; |
3285 case UIMSG_ChangeMusicVolume|0x100: | 3286 case UIMSG_ChangeMusicVolume|0x100: |
3286 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 3287 if ( pCurrentScreen ) |
3287 goto _continue; | 3288 goto _continue; |
3288 pParty->uFlags |= 2u; | 3289 pParty->uFlags |= 2u; |
3289 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); | 3290 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); |
3290 uNumSeconds = 32768; | 3291 uNumSeconds = 32768; |
3291 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; | 3292 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; |
3361 dword_507BF0_is_there_popup_onscreen = 0; | 3362 dword_507BF0_is_there_popup_onscreen = 0; |
3362 dword_4E455C = 1; | 3363 dword_4E455C = 1; |
3363 dword_50CDCC = 0; | 3364 dword_50CDCC = 0; |
3364 if ( ptr_507BC4 ) | 3365 if ( ptr_507BC4 ) |
3365 free_book_subwindow(); | 3366 free_book_subwindow(); |
3366 if ( !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions | 3367 if ( !pCurrentScreen |
3367 && !ptr_507BD4 ) | 3368 && !ptr_507BD4 ) |
3368 pEventTimer->Resume(); | 3369 pEventTimer->Resume(); |
3369 viewparams->bRedrawGameUI = 1; | 3370 viewparams->bRedrawGameUI = 1; |
3370 } | 3371 } |
3371 //----- (00435748) -------------------------------------------------------- | 3372 //----- (00435748) -------------------------------------------------------- |
3398 int v24; // eax@118 | 3399 int v24; // eax@118 |
3399 unsigned int v25; // eax@120 | 3400 unsigned int v25; // eax@120 |
3400 unsigned int v26; // ecx@127 | 3401 unsigned int v26; // ecx@127 |
3401 unsigned int v27; // eax@129 | 3402 unsigned int v27; // eax@129 |
3402 unsigned __int8 v28; // of@129 | 3403 unsigned __int8 v28; // of@129 |
3403 SoundID v29; // [sp-2Ch] [bp-3Ch]@36 | 3404 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36 |
3404 signed int v30; // [sp-28h] [bp-38h]@36 | 3405 signed int v30; // [sp-28h] [bp-38h]@36 |
3405 unsigned int v31; // [sp-24h] [bp-34h]@36 | 3406 unsigned int v31; // [sp-24h] [bp-34h]@36 |
3406 signed int v32; // [sp-20h] [bp-30h]@36 | 3407 signed int v32; // [sp-20h] [bp-30h]@36 |
3407 unsigned int v33; // [sp-20h] [bp-30h]@105 | 3408 unsigned int v33; // [sp-20h] [bp-30h]@105 |
3408 signed int v34; // [sp-1Ch] [bp-2Ch]@36 | 3409 signed int v34; // [sp-1Ch] [bp-2Ch]@36 |
3413 int v39; // [sp-14h] [bp-24h]@56 | 3414 int v39; // [sp-14h] [bp-24h]@56 |
3414 signed int v40; // [sp-10h] [bp-20h]@15 | 3415 signed int v40; // [sp-10h] [bp-20h]@15 |
3415 signed int v41; // [sp-10h] [bp-20h]@29 | 3416 signed int v41; // [sp-10h] [bp-20h]@29 |
3416 int v42; // [sp-10h] [bp-20h]@36 | 3417 int v42; // [sp-10h] [bp-20h]@36 |
3417 int v43; // [sp-10h] [bp-20h]@56 | 3418 int v43; // [sp-10h] [bp-20h]@56 |
3418 unsigned __int8 uClass[4]; // [sp+4h] [bp-Ch]@3 | 3419 int uNum; // [sp+4h] [bp-Ch]@3 |
3419 UIMessageType v45; // [sp+8h] [bp-8h]@3 | 3420 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 |
3420 int v46; // [sp+Ch] [bp-4h]@3 | 3421 int v46; // [sp+Ch] [bp-4h]@3 |
3422 Player *pPlayer; | |
3421 | 3423 |
3422 if ( pMessageQueue_50CBD0->uNumMessages ) | 3424 if ( pMessageQueue_50CBD0->uNumMessages ) |
3423 { | 3425 { |
3424 //v0 = pAudioPlayer; | 3426 //v0 = pAudioPlayer; |
3425 v1 = (char *)pParty->pPlayers; | 3427 v1 = (char *)pParty->pPlayers; |
3428 pPlayer = pParty->pPlayers; | |
3426 do | 3429 do |
3427 { | 3430 { |
3428 pMessageQueue_50CBD0->PopMessage(&v45, (int *)uClass, &v46); | 3431 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &v46); |
3429 switch (v45) | 3432 switch (pUIMessageType) |
3430 { | 3433 { |
3431 case UIMSG_MainMenu_ShowPartyCreationWnd: | 3434 case UIMSG_MainMenu_ShowPartyCreationWnd: |
3432 { | 3435 { |
3433 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); | 3436 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0); |
3434 SetCurrentMenuID(MENU_NEWGAME); | 3437 SetCurrentMenuID(MENU_NEWGAME); |
3465 } | 3468 } |
3466 continue; | 3469 continue; |
3467 } | 3470 } |
3468 | 3471 |
3469 | 3472 |
3470 switch (v45) | 3473 switch (pUIMessageType) |
3471 { | 3474 { |
3472 case UIMSG_A5: // WINDOW_5A | 3475 case UIMSG_A5: // WINDOW_5A |
3473 { | 3476 { |
3474 //main menu save/load wnd clicking on savegame lines | 3477 //main menu save/load wnd clicking on savegame lines |
3475 if (pGUIWindow_CurrentMenu->field_40 == 1) | 3478 if (pGUIWindow_CurrentMenu->field_40 == 1) |
3476 pKeyActionMap->_459ED1(0); | 3479 pKeyActionMap->_459ED1(0); |
3477 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 11 | 3480 if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != uNum + dword_6A0C9C ) |
3478 || uLoadGameUI_SelectedSlot != *(int *)uClass + dword_6A0C9C ) | |
3479 { | 3481 { |
3480 //load clicked line | 3482 //load clicked line |
3481 v26 = *(int *)uClass + dword_6A0C9C; | 3483 v26 = uNum + dword_6A0C9C; |
3482 if ( dword_6BE138 == *(int *)uClass + dword_6A0C9C ) | 3484 if ( dword_6BE138 == uNum + dword_6A0C9C ) |
3483 { | 3485 { |
3484 pMessageQueue_50CBD0->SendMessage(UIMSG_A4, 0, 0); | 3486 pMessageQueue_50CBD0->SendMessage(UIMSG_A4, 0, 0); |
3485 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); | 3487 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); |
3486 } | 3488 } |
3487 uLoadGameUI_SelectedSlot = v26; | 3489 uLoadGameUI_SelectedSlot = v26; |
3500 continue; | 3502 continue; |
3501 | 3503 |
3502 | 3504 |
3503 case UIMSG_A4: | 3505 case UIMSG_A4: |
3504 { | 3506 { |
3505 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, | 3507 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, pGUIWindow_CurrentMenu->uFrameY + 302, |
3506 pGUIWindow_CurrentMenu->uFrameY + 302, | |
3507 61, 28, WINDOW_5E, (int)ptr_69BD64, 0); | 3508 61, 28, WINDOW_5E, (int)ptr_69BD64, 0); |
3508 } | 3509 } |
3509 continue; | 3510 continue; |
3510 } | 3511 } |
3511 | 3512 |
3512 if ( (signed int)v45 > 75 ) | 3513 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationRemoveDownSkill ) |
3513 { | 3514 { |
3514 if ( v45 > UIMSG_A3 ) | 3515 if ( pUIMessageType > UIMSG_A3 ) |
3515 { | 3516 { |
3516 if ( v45 == UIMSG_A6 ) | 3517 if ( pUIMessageType == UIMSG_A6 ) |
3517 { | 3518 { |
3518 v43 = 0; | 3519 v43 = 0; |
3519 v39 = (int)ptr_69BD60; | 3520 v39 = (int)ptr_69BD60; |
3520 v8 = pGUIWindow_CurrentMenu->uFrameY + 302; | 3521 v8 = pGUIWindow_CurrentMenu->uFrameY + 302; |
3521 v37 = (WindowType)95; | 3522 v37 = (WindowType)95; |
3523 v35 = 28; | 3524 v35 = 28; |
3524 v33 = 61; | 3525 v33 = 61; |
3525 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); | 3526 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); |
3526 continue; | 3527 continue; |
3527 } | 3528 } |
3528 if ( v45 == UIMSG_AB ) | 3529 if ( pUIMessageType == UIMSG_SelectFacePlayerBack ) |
3529 { | 3530 { |
3530 v23 = (char *)&pParty->pPlayers[*(int *)uClass]; | 3531 pPlayer = &pParty->pPlayers[uNum]; |
3531 v24 = (int)(v23 + 186); | 3532 v12 = (char)((int)pPlayer->uFace - 1) < 0; |
3532 v12 = (char)(v23[186] - 1) < 0; | 3533 --pPlayer->uFace; |
3533 --*(char *)v24; | |
3534 if ( v12 ) | 3534 if ( v12 ) |
3535 *(char *)v24 = 19; | 3535 pPlayer->uFace = 19; |
3536 *((int *)v23 + 1608) = *(char *)v24; | 3536 pPlayer->uVoiceID = pPlayer->uFace; |
3537 ((Player *)v23)->SetInitialStats(); | 3537 pPlayer->SetInitialStats(); |
3538 ((Player *)v23)->SetSexByVoice(); | 3538 pPlayer->SetSexByVoice(); |
3539 ((Player *)v23)->RandomizeName(); | 3539 pPlayer->RandomizeName(); |
3540 v25 = *(int *)uClass; | 3540 v25 = uNum; |
3541 pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id | 3541 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3542 - pGUIWindow_CurrentMenu->field_38) | 3542 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3543 % 7 | |
3544 + pGUIWindow_CurrentMenu->field_38 | |
3545 + 7 * *(int *)uClass; | |
3546 uPlayerCreationUI_SelectedCharacter = v25; | 3543 uPlayerCreationUI_SelectedCharacter = v25; |
3547 GUIWindow::Create( | 3544 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, |
3548 pCreationUI_BtnPressLeft[v25]->uX, | 3545 (enum WindowType)92, (int)pCreationUI_BtnPressLeft[v25], 1); |
3549 pCreationUI_BtnPressLeft[v25]->uY, | |
3550 0, | |
3551 0, | |
3552 (enum WindowType)92, | |
3553 (int)pCreationUI_BtnPressLeft[v25], | |
3554 1); | |
3555 //v0 = pAudioPlayer; | 3546 //v0 = pAudioPlayer; |
3556 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); | 3547 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0); |
3557 v22 = (Player *)v23; | 3548 v22 = pPlayer; |
3558 goto LABEL_117; | |
3559 } | |
3560 if ( v45 == UIMSG_AC ) | |
3561 { | |
3562 v19 = (int)&v1[6972 * *(int *)uClass]; | |
3563 v20 = (char)(*(char *)(v19 + 186) + 1) % 20; | |
3564 *(char *)(v19 + 186) = v20; | |
3565 *(int *)(v19 + 6432) = v20; | |
3566 ((Player *)v19)->SetInitialStats(); | |
3567 ((Player *)v19)->SetSexByVoice(); | |
3568 ((Player *)v19)->RandomizeName(); | |
3569 v21 = *(int *)uClass; | |
3570 pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id | |
3571 - pGUIWindow_CurrentMenu->field_38) | |
3572 % 7 | |
3573 + pGUIWindow_CurrentMenu->field_38 | |
3574 + 7 * *(int *)uClass; | |
3575 uPlayerCreationUI_SelectedCharacter = v21; | |
3576 GUIWindow::Create( | |
3577 pCreationUI_BtnPressRight[v21]->uX, | |
3578 pCreationUI_BtnPressRight[v21]->uY, | |
3579 0, | |
3580 0, | |
3581 (enum WindowType)92, | |
3582 (int)pCreationUI_BtnPressRight[v21], | |
3583 1); | |
3584 //v0 = pAudioPlayer; | |
3585 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | |
3586 v22 = (Player *)v19; | |
3587 LABEL_117: | |
3588 v22->PlaySound(102, 0); | 3549 v22->PlaySound(102, 0); |
3589 v1 = (char *)pParty->pPlayers; | 3550 v1 = (char *)pParty->pPlayers; |
3590 continue; | 3551 continue; |
3591 } | 3552 } |
3592 if ( v45 == UIMSG_AD ) | 3553 if ( pUIMessageType == UIMSG_SelectFacePlayerForward ) |
3593 { | 3554 { |
3594 GUIWindow::Create( | 3555 pPlayer = &pParty->pPlayers[uNum]; |
3595 pMainMenu_BtnNew->uX, | 3556 v20 = (char)((int)pPlayer->uFace + 1) % 20; |
3596 pMainMenu_BtnNew->uY, | 3557 pPlayer->uFace = v20; |
3597 0, | 3558 pPlayer->uVoiceID = v20; |
3598 0, | 3559 pPlayer->SetInitialStats(); |
3599 (enum WindowType)90, | 3560 pPlayer->SetSexByVoice(); |
3600 (int)pMainMenu_BtnNew, | 3561 pPlayer->RandomizeName(); |
3601 0); | 3562 v21 = uNum; |
3563 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) | |
3564 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; | |
3565 uPlayerCreationUI_SelectedCharacter = v21; | |
3566 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, (enum WindowType)92, | |
3567 (int)pCreationUI_BtnPressRight[v21], 1); | |
3568 //v0 = pAudioPlayer; | |
3569 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | |
3570 v22 = pPlayer; | |
3571 v22->PlaySound(102, 0); | |
3572 v1 = (char *)pParty->pPlayers; | |
3573 continue; | |
3574 } | |
3575 if ( pUIMessageType == UIMSG_AD ) | |
3576 { | |
3577 GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0); | |
3602 SetCurrentMenuID(MENU_LOAD); | 3578 SetCurrentMenuID(MENU_LOAD); |
3603 continue; | 3579 continue; |
3604 } | 3580 } |
3605 if ( v45 != 174 ) | 3581 if ( pUIMessageType != UIMSG_AE ) |
3606 continue; | 3582 continue; |
3607 GUIWindow::Create( | 3583 GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0); |
3608 pMainMenu_BtnExit->uX, | |
3609 pMainMenu_BtnExit->uY, | |
3610 0, | |
3611 0, | |
3612 (enum WindowType)90, | |
3613 (int)pMainMenu_BtnExit, | |
3614 0); | |
3615 LABEL_114: | 3584 LABEL_114: |
3616 v40 = 10; | 3585 v40 = 10; |
3617 LABEL_89: | 3586 LABEL_89: |
3618 v2 = v40; | 3587 v2 = v40; |
3619 LABEL_90: | |
3620 SetCurrentMenuID((MENU_STATE)v2); | 3588 SetCurrentMenuID((MENU_STATE)v2); |
3621 continue; | 3589 continue; |
3622 } | 3590 } |
3623 if ( v45 == UIMSG_A3 ) | 3591 if ( pUIMessageType == UIMSG_A3 ) |
3624 { | 3592 { |
3625 ++dword_6A0C9C; | 3593 ++dword_6A0C9C; |
3626 if ( dword_6A0C9C >= *(int *)uClass ) | 3594 if ( dword_6A0C9C >= uNum ) |
3627 dword_6A0C9C = *(int *)uClass - 1; | 3595 dword_6A0C9C = uNum - 1; |
3628 if ( dword_6A0C9C < 1 ) | 3596 if ( dword_6A0C9C < 1 ) |
3629 dword_6A0C9C = 0; | 3597 dword_6A0C9C = 0; |
3630 v7 = pGUIWindow_CurrentMenu; | 3598 v7 = pGUIWindow_CurrentMenu; |
3631 v43 = 0; | 3599 v43 = 0; |
3632 v39 = (int)ptr_69BD58; | 3600 v39 = (int)ptr_69BD58; |
3633 v8 = pGUIWindow_CurrentMenu->uFrameY + 323; | 3601 v8 = pGUIWindow_CurrentMenu->uFrameY + 323; |
3634 goto LABEL_105; | 3602 goto LABEL_105; |
3635 } | 3603 } |
3636 if ( v45 == 107 ) | 3604 if ( pUIMessageType == UIMSG_6B ) |
3637 { | 3605 { |
3638 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 3606 if ( pCurrentScreen ) |
3639 { | 3607 { |
3640 pGUIWindow_CurrentMenu->Release(); | 3608 pGUIWindow_CurrentMenu->Release(); |
3641 pEventTimer->Resume(); | 3609 pEventTimer->Resume(); |
3642 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 3610 pCurrentScreen = 0; |
3643 viewparams->bRedrawGameUI = 1; | 3611 viewparams->bRedrawGameUI = 1; |
3644 } | 3612 } |
3645 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0); | 3613 GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0); |
3646 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 3614 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
3647 continue; | 3615 continue; |
3648 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | 3616 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CloseBook; |
3649 goto LABEL_93; | 3617 goto LABEL_93; |
3650 } | 3618 } |
3651 if ( v45 == UIMSG_CloseBook ) | 3619 if ( pUIMessageType == UIMSG_CloseBook ) |
3652 { | 3620 { |
3653 if ( ptr_507BDC ) | 3621 if ( ptr_507BDC ) |
3654 { | 3622 { |
3655 sub_41426F(); | 3623 sub_41426F(); |
3656 continue; | 3624 continue; |
3661 pVideoPlayer->bStopBeforeSchedule = 1; | 3629 pVideoPlayer->bStopBeforeSchedule = 1; |
3662 viewparams->bRedrawGameUI = 1; | 3630 viewparams->bRedrawGameUI = 1; |
3663 viewparams->field_48 = 1; | 3631 viewparams->field_48 = 1; |
3664 if ( !GetCurrentMenuID() || GetCurrentMenuID() == 6 || GetCurrentMenuID() == 7 ) | 3632 if ( !GetCurrentMenuID() || GetCurrentMenuID() == 6 || GetCurrentMenuID() == 7 ) |
3665 { | 3633 { |
3666 v17 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; | 3634 v17 = pCurrentScreen; |
3667 LABEL_83: | 3635 LABEL_83: |
3668 if ( v17 == 16 ) | 3636 if ( v17 == 16 ) |
3669 pVideoPlayer->FastForwardToFrame(pVideoPlayer->field_40); | 3637 pVideoPlayer->FastForwardToFrame(pVideoPlayer->field_40); |
3670 if (GetCurrentMenuID() == MENU_7) | 3638 if (GetCurrentMenuID() == MENU_7) |
3671 { | 3639 { |
3687 continue; | 3655 continue; |
3688 } | 3656 } |
3689 continue; | 3657 continue; |
3690 } | 3658 } |
3691 v16 = GetCurrentMenuID() == 8; | 3659 v16 = GetCurrentMenuID() == 8; |
3692 v17 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; | 3660 v17 = pCurrentScreen; |
3693 if ( v16 | 3661 if ( v16 && !pCurrentScreen ) |
3694 && !uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | |
3695 goto LABEL_83; | 3662 goto LABEL_83; |
3696 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 12 ) | 3663 if ( pCurrentScreen == 12 ) |
3697 { | 3664 { |
3698 pIcons_LOD->_4114F2(); | 3665 pIcons_LOD->_4114F2(); |
3699 //crt_deconstruct_ptr_6A0118(); | 3666 //crt_deconstruct_ptr_6A0118(); |
3700 stru_506F20.Release(); | 3667 pTexture_PCX.Release(); |
3701 stru_506F20.Load("title.pcx", 0); | 3668 pTexture_PCX.Load("title.pcx", 0); |
3702 SetCurrentMenuID(MENU_MAIN); | 3669 SetCurrentMenuID(MENU_MAIN); |
3703 v15 = 1; | 3670 v15 = 1; |
3704 LABEL_81: | 3671 LABEL_81: |
3705 pGUIWindow_CurrentMenu->Release(); | 3672 pGUIWindow_CurrentMenu->Release(); |
3706 pGUIWindow2->Release(); | 3673 pGUIWindow2->Release(); |
3707 pGUIWindow2 = 0; | 3674 pGUIWindow2 = 0; |
3708 pEventTimer->Resume(); | 3675 pEventTimer->Resume(); |
3709 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 3676 pCurrentScreen = 0; |
3710 viewparams->bRedrawGameUI = v15; | 3677 viewparams->bRedrawGameUI = v15; |
3711 continue; | 3678 continue; |
3712 } | 3679 } |
3713 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 ) | 3680 if ( pCurrentScreen == 16 ) |
3714 { | 3681 { |
3715 pVideoPlayer->Unload(); | 3682 pVideoPlayer->Unload(); |
3716 } | 3683 } |
3717 else | 3684 else |
3718 { | 3685 { |
3719 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 27 ) | 3686 if ( pCurrentScreen != 27 ) |
3720 goto LABEL_81; | 3687 goto LABEL_81; |
3721 //VideoPlayer::dtor(); | 3688 //VideoPlayer::dtor(); |
3722 } | 3689 } |
3723 } | 3690 } |
3724 else | 3691 else |
3725 { | 3692 { |
3726 if ( v45 == 118 ) | 3693 if ( pUIMessageType == UIMSG_PlayerCreationSelectQuality ) |
3727 { | 3694 { |
3728 v14 = *(int *)uClass; | 3695 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3729 pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id | 3696 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3730 - pGUIWindow_CurrentMenu->field_38) | 3697 uPlayerCreationUI_SelectedCharacter = uNum; |
3731 % 7 | |
3732 + pGUIWindow_CurrentMenu->field_38 | |
3733 + 7 * *(int *)uClass; | |
3734 uPlayerCreationUI_SelectedCharacter = v14; | |
3735 LABEL_36: | 3698 LABEL_36: |
3736 v42 = 0; | 3699 v42 = 0; |
3737 v38 = 0; | 3700 v38 = 0; |
3738 v36 = 0; | 3701 v36 = 0; |
3739 v34 = 0; | 3702 v34 = 0; |
3740 v32 = -1; | 3703 v32 = -1; |
3741 v31 = 0; | 3704 v31 = 0; |
3742 v30 = 0; | 3705 v30 = 0; |
3743 v29 = (SoundID)66; | 3706 pSoundID = (SoundID)66; |
3744 LABEL_40: | 3707 LABEL_40: |
3745 pAudioPlayer->PlaySound(v29, v30, v31, v32, v34, v36, v38, v42); | 3708 pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42); |
3746 continue; | 3709 continue; |
3747 } | 3710 } |
3748 if ( v45 == 144 ) | 3711 if ( pUIMessageType == UIMSG_PlayerCreationVoiceBack ) |
3749 { | 3712 { |
3750 v9 = (Player *)&v1[6972 * *(int *)uClass]; | 3713 v9 = &pPlayer[uNum]; |
3751 v46 = v9->GetSexByVoice(); | 3714 v46 = v9->GetSexByVoice(); |
3752 do | 3715 do |
3753 { | 3716 { |
3754 v12 = ((v9->uVoiceID-- - 1) & 0x80000000u) != 0; | 3717 v12 = ((v9->uVoiceID-- - 1) & 0x80000000u) != 0; |
3755 if ( v12 ) | 3718 if ( v12 ) |
3756 v9->uVoiceID = 19; | 3719 v9->uVoiceID = 19; |
3757 v13 = v9->GetSexByVoice(); | 3720 v13 = v9->GetSexByVoice(); |
3758 } | 3721 } |
3759 while ( v13 != v46 ); | 3722 while ( v13 != v46 ); |
3760 v11 = pCreationUI_BtnPressLeft2[*(int *)uClass]; | 3723 v11 = pCreationUI_BtnPressLeft2[uNum]; |
3761 goto LABEL_60; | 3724 goto LABEL_60; |
3762 } | 3725 } |
3763 if ( v45 == 145 ) | 3726 if ( pUIMessageType == UIMSG_PlayerCreationVoiceForward ) |
3764 { | 3727 { |
3765 v9 = (Player *)&v1[6972 * *(int *)uClass]; | 3728 v9 = &pPlayer[uNum]; |
3766 v46 = v9->GetSexByVoice(); | 3729 v46 = v9->GetSexByVoice(); |
3767 do | 3730 do |
3768 { | 3731 { |
3769 v9->uVoiceID = (signed int)(v9->uVoiceID + 1) % 20; | 3732 v9->uVoiceID = (signed int)(v9->uVoiceID + 1) % 20; |
3770 v10 = v9->GetSexByVoice(); | 3733 v10 = v9->GetSexByVoice(); |
3771 } | 3734 } |
3772 while ( v10 != v46 ); | 3735 while ( v10 != v46 ); |
3773 v11 = pCreationUI_BtnPressRight2[*(int *)uClass]; | 3736 v11 = pCreationUI_BtnPressRight2[uNum]; |
3774 LABEL_60: | 3737 LABEL_60: |
3775 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1); | 3738 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1); |
3776 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); | 3739 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0); |
3777 v9->PlaySound(102, 0); | 3740 v9->PlaySound(102, 0); |
3778 continue; | 3741 continue; |
3779 } | 3742 } |
3780 if ( v45 == UIMSG_A2 ) | 3743 if ( pUIMessageType == UIMSG_A2 ) |
3781 { | 3744 { |
3782 --dword_6A0C9C; | 3745 --dword_6A0C9C; |
3783 if ( dword_6A0C9C < 0 ) | 3746 if ( dword_6A0C9C < 0 ) |
3784 dword_6A0C9C = 0; | 3747 dword_6A0C9C = 0; |
3785 v7 = pGUIWindow_CurrentMenu; | 3748 v7 = pGUIWindow_CurrentMenu; |
3786 v43 = 0; | 3749 v43 = 0; |
3787 v39 = (int)ptr_69BD5C; | 3750 v39 = (int)ptr_69BD5C; |
3788 v8 = pGUIWindow_CurrentMenu->uFrameY + 197; | 3751 v8 = pGUIWindow_CurrentMenu->uFrameY + 197; |
3789 LABEL_105: | 3752 LABEL_105: |
3790 v37 = (WindowType)90; | 3753 GUIWindow::Create(v7->uFrameX + 215, v8, 0, 0, (WindowType)90, v39, v43); |
3791 v35 = 0; | |
3792 v33 = 0; | |
3793 v18 = v7->uFrameX + 215; | |
3794 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43); | |
3795 continue; | 3754 continue; |
3796 } | 3755 } |
3797 } | 3756 } |
3798 } | 3757 } |
3799 else | 3758 else |
3800 { | 3759 { |
3801 if ( v45 == 75 ) | 3760 if ( pUIMessageType == UIMSG_PlayerCreationRemoveDownSkill ) |
3802 { | 3761 { |
3803 uPlayerCreationUI_SelectedCharacter = *(int *)uClass; | 3762 uPlayerCreationUI_SelectedCharacter = uNum; |
3804 v41 = 3; | 3763 v41 = 3; |
3805 v1 = (char *)pParty->pPlayers; | 3764 v1 = (char *)pParty->pPlayers; |
3806 v5 = (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7 | 3765 v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 |
3807 + pGUIWindow_CurrentMenu->field_38 | 3766 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum; |
3808 + 7 * *(int *)uClass; | |
3809 goto LABEL_44; | 3767 goto LABEL_44; |
3810 } | 3768 } |
3811 if ( (signed int)v45 > 60 ) | 3769 if ( (signed int)pUIMessageType > UIMSG_3C ) |
3812 { | 3770 { |
3813 if ( v45 == 62 ) | 3771 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus ) |
3814 { | 3772 { |
3815 GUIWindow::Create(0x265u, 0x189u, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); | 3773 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); |
3816 ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( | 3774 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( |
3817 (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7); | 3775 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3818 v42 = 0; | 3776 v42 = 0; |
3819 v38 = 0; | 3777 v38 = 0; |
3820 v36 = 0; | 3778 v36 = 0; |
3821 v34 = 0; | 3779 v34 = 0; |
3822 v32 = -1; | 3780 v32 = -1; |
3823 v31 = 0; | 3781 v31 = 0; |
3824 v30 = 0; | 3782 v30 = 0; |
3825 v29 = (SoundID)20; | 3783 pSoundID = (SoundID)20; |
3826 goto LABEL_40; | 3784 goto LABEL_40; |
3827 } | 3785 } |
3828 if ( v45 == 63 ) | 3786 if ( pUIMessageType == UIMSG_PlayerCreationClickMinus ) |
3829 { | 3787 { |
3830 GUIWindow::Create(0x20Bu, 0x189u, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); | 3788 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); |
3831 ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( | 3789 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( |
3832 (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7); | 3790 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3833 v42 = 0; | 3791 v42 = 0; |
3834 v38 = 0; | 3792 v38 = 0; |
3835 v36 = 0; | 3793 v36 = 0; |
3836 v34 = 0; | 3794 v34 = 0; |
3837 v32 = -1; | 3795 v32 = -1; |
3838 v31 = 0; | 3796 v31 = 0; |
3839 v30 = 0; | 3797 v30 = 0; |
3840 v29 = (SoundID)23; | 3798 pSoundID = (SoundID)23; |
3841 goto LABEL_40; | 3799 goto LABEL_40; |
3842 } | 3800 } |
3843 if ( v45 == 64 ) | 3801 if ( pUIMessageType == UIMSG_PlayerCreationSelectActiveSkill ) |
3844 { | 3802 { |
3845 auto _t = (Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter]; | 3803 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter]; |
3846 v6 = _t->GetSkillIdxByOrder( | 3804 v6 = _t->GetSkillIdxByOrder(uNum + 4); |
3847 *(int *)uClass + 4); | |
3848 if ( _t->GetSkillIdxByOrder(3) == 37 ) | 3805 if ( _t->GetSkillIdxByOrder(3) == 37 ) |
3849 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; | 3806 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1; |
3850 v42 = 0; | 3807 v42 = 0; |
3851 v38 = 0; | 3808 v38 = 0; |
3852 v36 = 0; | 3809 v36 = 0; |
3853 v34 = 0; | 3810 v34 = 0; |
3854 v32 = -1; | 3811 v32 = -1; |
3855 v31 = 0; | 3812 v31 = 0; |
3856 v30 = 0; | 3813 v30 = 0; |
3857 v29 = (SoundID)24; | 3814 pSoundID = (SoundID)24; |
3858 goto LABEL_40; | 3815 goto LABEL_40; |
3859 } | 3816 } |
3860 if ( v45 == 65 ) | 3817 if ( pUIMessageType == UIMSG_PlayerCreationSelectClass ) |
3861 { | 3818 { |
3862 ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->Reset(uClass[0]); | 3819 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(uNum); |
3863 goto LABEL_36; | 3820 goto LABEL_36; |
3864 } | 3821 } |
3865 if ( v45 == 66 ) | 3822 if ( pUIMessageType == UIMSG_PlayerCreationClickOK ) |
3866 { | 3823 { |
3867 GUIWindow::Create(0x244u, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); | 3824 GUIWindow::Create(580, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); |
3868 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() ) | 3825 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() ) |
3869 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; | 3826 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; |
3870 else | 3827 else |
3871 uGameState = 6; | 3828 uGameState = 6; |
3872 continue; | 3829 continue; |
3873 } | 3830 } |
3874 if ( v45 == 67 ) | 3831 if ( pUIMessageType == UIMSG_PlayerCreationClickReset ) |
3875 { | 3832 { |
3876 GUIWindow::Create(0x20Fu, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0); | 3833 GUIWindow::Create(527, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0); |
3877 pParty->Reset(); | 3834 pParty->Reset(); |
3878 } | 3835 } |
3879 else | 3836 else |
3880 { | 3837 { |
3881 if ( v45 == 74 ) | 3838 if ( pUIMessageType == UIMSG_PlayerCreationRemoveUpSkill ) |
3882 { | 3839 { |
3883 uPlayerCreationUI_SelectedCharacter = *(int *)uClass; | 3840 uPlayerCreationUI_SelectedCharacter = uNum; |
3884 v4 = pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38; | 3841 v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem; |
3885 v46 = pGUIWindow_CurrentMenu->field_38; | 3842 v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem; |
3886 v41 = 2; | 3843 v41 = 2; |
3887 v5 = v4 % 7 + v46 + 7 * *(int *)uClass; | 3844 v5 = v4 % 7 + v46 + 7 * uNum; |
3888 LABEL_44: | 3845 LABEL_44: |
3889 pGUIWindow_CurrentMenu->field_2C_focus_id = v5; | 3846 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5; |
3890 pParty->pPlayers[0].pActiveSkills[((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) | 3847 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41) |
3891 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; | 3848 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0; |
3892 continue; | 3849 continue; |
3893 } | 3850 } |
3894 } | 3851 } |
3895 } | 3852 } |
3896 else | 3853 else |
3897 { | 3854 { |
3898 switch ( v45 ) | 3855 switch ( pUIMessageType ) |
3899 { | 3856 { |
3900 case 60: | 3857 case 60: |
3901 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); | 3858 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0); |
3902 v3 = *(void **)uClass; | 3859 v3 = (void *)uNum; |
3903 uPlayerCreationUI_SelectedCharacter = *(int *)uClass; | 3860 uPlayerCreationUI_SelectedCharacter = uNum; |
3904 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu); | 3861 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu); |
3905 pGUIWindow_CurrentMenu->ptr_1C = v3; | 3862 pGUIWindow_CurrentMenu->ptr_1C = v3; |
3906 break; | 3863 break; |
3907 case 5: | 3864 case 5: |
3908 uGameState = 1; | 3865 uGameState = 1; |
3909 break; | 3866 break; |
3910 case 17: | 3867 case 17: |
3911 pMouse->SetCursorBitmap("MICON2"); | 3868 pMouse->SetCursorBitmap("MICON2"); |
3912 break; | 3869 break; |
3913 default: | 3870 default: |
3914 if ( v45 == 58 ) | 3871 if ( pUIMessageType == 58 ) |
3915 goto LABEL_114; | 3872 goto LABEL_114; |
3916 break; | 3873 break; |
3917 } | 3874 } |
3918 } | 3875 } |
3919 } | 3876 } |
3945 result = 16192.0; | 3902 result = 16192.0; |
3946 return result; | 3903 return result; |
3947 } | 3904 } |
3948 | 3905 |
3949 //----- (0043648F) -------------------------------------------------------- | 3906 //----- (0043648F) -------------------------------------------------------- |
3950 void __thiscall Vec3_short__to_RenderVertexSoft(RenderVertexSoft *_this, Vec3_short_ *a2) | 3907 void Vec3_short__to_RenderVertexSoft(RenderVertexSoft *_this, Vec3_short_ *a2) |
3951 { | 3908 { |
3952 signed int v2; // edx@1 | |
3953 double v3; // st7@1 | |
3954 | |
3955 _this->flt_2C = 0.0; | 3909 _this->flt_2C = 0.0; |
3956 v2 = a2->y; | 3910 |
3957 v3 = (double)a2->z; | 3911 _this->vWorldPosition.x = a2->x; |
3958 _this->vWorldPosition.x = (double)a2->x; | 3912 _this->vWorldPosition.y = a2->y; |
3959 _this->vWorldPosition.y = (double)v2; | 3913 _this->vWorldPosition.z = a2->z; |
3960 _this->vWorldPosition.z = v3; | |
3961 } | 3914 } |
3962 | 3915 |
3963 //----- (004369DB) -------------------------------------------------------- | 3916 //----- (004369DB) -------------------------------------------------------- |
3964 void Vec3_float_::Normalize() | 3917 void Vec3_float_::Normalize() |
3965 { | 3918 { |
4711 if ( v8 ) | 4664 if ( v8 ) |
4712 { | 4665 { |
4713 if ( v8 == 1 ) | 4666 if ( v8 == 1 ) |
4714 { | 4667 { |
4715 v9 = *(short *)v1; | 4668 v9 = *(short *)v1; |
4716 v10 = pParty->vPosition.z - *((short *)v1 - 100); | 4669 v10 = pParty->vPosition.y - *((short *)v1 - 100); |
4717 a1 = pParty->vPosition.x - *((short *)v1 - 200); | 4670 a1 = pParty->vPosition.x - *((short *)v1 - 200); |
4718 v48 = v10; | 4671 v48 = v10; |
4719 if ( a1 * a1 | 4672 if ( a1 * a1 |
4720 + v10 * v10 | 4673 + v10 * v10 |
4721 + ((signed int)(pParty->vPosition.y + pParty->uPartyHeight) >> (1 - v9)) | 4674 + ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - v9)) |
4722 * ((signed int)(pParty->vPosition.y + pParty->uPartyHeight) >> (1 - v9)) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) ) | 4675 * ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - v9)) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) ) |
4723 { | 4676 { |
4724 v11.z = *(short *)v1; | 4677 v11.z = *(short *)v1; |
4725 v11.y = *((short *)v1 - 100); | 4678 v11.y = *((short *)v1 - 100); |
4726 v11.x = *((short *)v1 - 200); | 4679 v11.x = *((short *)v1 - 200); |
4727 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.z, pParty->vPosition.y + pParty->sEyelevel, v11) ) | 4680 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v11) ) |
4728 { | 4681 { |
4729 v12 = stru_50C198.which_player_would_attack(&pActors[v39]); | 4682 v12 = stru_50C198.which_player_would_attack(&pActors[v39]); |
4730 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v12); | 4683 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v12); |
4731 } | 4684 } |
4732 } | 4685 } |
4770 } | 4723 } |
4771 } | 4724 } |
4772 } | 4725 } |
4773 else | 4726 else |
4774 { | 4727 { |
4775 v23 = pParty->vPosition.z - *((short *)v1 - 100); | 4728 v23 = pParty->vPosition.y - *((short *)v1 - 100); |
4776 v24 = ((signed int)pParty->uPartyHeight >> 1) - *(short *)v1; | 4729 v24 = ((signed int)pParty->uPartyHeight >> 1) - *(short *)v1; |
4777 a1 = pParty->vPosition.x - *((short *)v1 - 200); | 4730 a1 = pParty->vPosition.x - *((short *)v1 - 200); |
4778 v48 = v23; | 4731 v48 = v23; |
4779 if ( a1 * a1 + v23 * v23 + (pParty->vPosition.y + v24) * (pParty->vPosition.y + v24) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) ) | 4732 if ( a1 * a1 + v23 * v23 + (pParty->vPosition.z + v24) * (pParty->vPosition.z + v24) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) ) |
4780 { | 4733 { |
4781 v25.z = *(short *)v1; | 4734 v25.z = *(short *)v1; |
4782 v25.y = *((short *)v1 - 100); | 4735 v25.y = *((short *)v1 - 100); |
4783 v25.x = *((short *)v1 - 200); | 4736 v25.x = *((short *)v1 - 200); |
4784 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.z, pParty->vPosition.y + pParty->sEyelevel, v25) ) | 4737 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v25) ) |
4785 { | 4738 { |
4786 v26 = 0; | 4739 v26 = 0; |
4787 v27 = (char *)&pParty->pPlayers[0].pConditions[15]; | 4740 v27 = (char *)&pParty->pPlayers[0].pConditions[15]; |
4788 do | 4741 do |
4789 { | 4742 { |
5009 if ( !v19 ) | 4962 if ( !v19 ) |
5010 { | 4963 { |
5011 v9 = (LayingItem *)uDamageAmount; | 4964 v9 = (LayingItem *)uDamageAmount; |
5012 v50 = pParty->vPosition.x - *(int *)(uDamageAmount + 4); | 4965 v50 = pParty->vPosition.x - *(int *)(uDamageAmount + 4); |
5013 v55 = abs(v50); | 4966 v55 = abs(v50); |
5014 pMonsterName = (char *)(pParty->vPosition.z - v9->vPosition.y); | 4967 pMonsterName = (char *)(pParty->vPosition.y - v9->vPosition.y); |
5015 v51 = (unsigned __int64 *)abs((int)pMonsterName); | 4968 v51 = (unsigned __int64 *)abs((int)pMonsterName); |
5016 pPlayerName = (char *)(pParty->vPosition.y - v9->vPosition.z); | 4969 pPlayerName = (char *)(pParty->vPosition.z - v9->vPosition.z); |
5017 v52 = abs((int)pPlayerName); | 4970 v52 = abs((int)pPlayerName); |
5018 v61 = v55; | 4971 v61 = v55; |
5019 v10 = v55; | 4972 v10 = v55; |
5020 v11 = (int)v51; | 4973 v11 = (int)v51; |
5021 v12 = v52; | 4974 v12 = v52; |
6396 v15->field_8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6349 v15->field_8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6397 _43C91D_FormItemTextureFilename(pContainer, 532, v14, 0); | 6350 _43C91D_FormItemTextureFilename(pContainer, 532, v14, 0); |
6398 v15->field_C = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6351 v15->field_C = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6399 _43C91D_FormItemTextureFilename(pContainer, 544, v14, 0); | 6352 _43C91D_FormItemTextureFilename(pContainer, 544, v14, 0); |
6400 v15->field_10 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6353 v15->field_10 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6401 if ( sub_43ED6F_get_some_race_sex_relation(1u) ) | 6354 if ( _43ED6F_check_party_races(true) ) |
6402 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); | 6355 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); |
6403 v35 += 28; | 6356 v35 += 28; |
6404 ++v14; | 6357 ++v14; |
6405 ++v15; | 6358 ++v15; |
6406 } | 6359 } |
6553 const char *v6; // [sp-Ch] [bp-18h]@88 | 6506 const char *v6; // [sp-Ch] [bp-18h]@88 |
6554 signed int v7; // [sp-8h] [bp-14h]@61 | 6507 signed int v7; // [sp-8h] [bp-14h]@61 |
6555 int v8; // [sp-4h] [bp-10h]@61 | 6508 int v8; // [sp-4h] [bp-10h]@61 |
6556 signed int v9; // [sp-4h] [bp-10h]@69 | 6509 signed int v9; // [sp-4h] [bp-10h]@69 |
6557 | 6510 |
6511 result = 0; //BUG fn is void | |
6558 if ( a2 <= 500 ) | 6512 if ( a2 <= 500 ) |
6559 { | 6513 { |
6560 v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0; | 6514 //v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0; |
6515 v5 = byte_5111C0[(a2 - 100) + 32 + 2] == 0; | |
6561 LABEL_21: | 6516 LABEL_21: |
6562 if ( v5 ) | 6517 if ( v5 ) |
6563 return result; | 6518 return result; |
6564 result = 516; | 6519 result = 516; |
6565 if ( a2 < 66 || a2 > 78 ) | 6520 if ( a2 < 66 || a2 > 78 ) |
8689 255); | 8644 255); |
8690 } | 8645 } |
8691 | 8646 |
8692 | 8647 |
8693 //----- (0043ED6F) -------------------------------------------------------- | 8648 //----- (0043ED6F) -------------------------------------------------------- |
8694 bool __thiscall sub_43ED6F_get_some_race_sex_relation(unsigned int a1) | 8649 bool _43ED6F_check_party_races(bool a1) |
8695 { | 8650 { |
8696 unsigned int v1; // ebp@1 | 8651 bool v6; // zf@5 |
8697 Player **v2; // ebx@1 | 8652 |
8698 Player *v3; // esi@2 | 8653 for (uint i = 0; i < 4; ++i) |
8699 enum CHARACTER_RACE v4; // edi@2 | 8654 { |
8700 bool result; // eax@2 | 8655 auto player = pParty->pPlayers + i; |
8701 char v6; // zf@5 | 8656 auto race = player->GetRace(); |
8702 | 8657 |
8703 v1 = a1; | 8658 if (race != CHARACTER_RACE_HUMAN && |
8704 v2 = &pPlayers[1]; | 8659 race != CHARACTER_RACE_ELF && |
8705 while ( 1 ) | 8660 race != CHARACTER_RACE_GOBLIN) |
8706 { | 8661 v6 = a1 == 1; |
8707 v3 = *v2; | |
8708 v4 = v3->GetRace(); | |
8709 result = v3->GetSexByVoice(); | |
8710 if ( v4 && v4 != CHARACTER_RACE_ELF && v4 != CHARACTER_RACE_GOBLIN ) | |
8711 v6 = v1 == 1; | |
8712 else | 8662 else |
8713 v6 = v1 == 0; | 8663 v6 = !a1; |
8714 if ( v6 ) | 8664 |
8715 break; | 8665 if (v6) |
8716 ++v2; | 8666 return true; |
8717 if ( (signed int)v2 >= (signed int)&qword_A750D8 ) | 8667 } |
8718 { | 8668 return false; |
8719 LOBYTE(result) = 0; | |
8720 return result; | |
8721 } | |
8722 } | |
8723 LOBYTE(result) = 1; | |
8724 return result; | |
8725 } | 8669 } |
8726 // A750D8: using guessed type __int64 qword_A750D8; | 8670 // A750D8: using guessed type __int64 qword_A750D8; |
8727 | 8671 |
8728 //----- (0043EDB9) -------------------------------------------------------- | 8672 //----- (0043EDB9) -------------------------------------------------------- |
8729 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this) | 8673 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this) |
8955 return result; | 8899 return result; |
8956 } | 8900 } |
8957 | 8901 |
8958 | 8902 |
8959 //----- (0043F333) -------------------------------------------------------- | 8903 //----- (0043F333) -------------------------------------------------------- |
8960 int stru170::RenderWalls() | 8904 void stru170::MakeVisibleSectorList() |
8961 { | 8905 { |
8962 signed int result; // eax@1 | |
8963 unsigned __int8 v2; // zf@1 | |
8964 unsigned __int8 v3; // sf@1 | |
8965 stru170_stru0 *v4; // edx@2 | |
8966 int v5; // eax@3 | |
8967 int v6; // ebx@3 | 8906 int v6; // ebx@3 |
8968 char *v7; // esi@4 | 8907 |
8969 signed int v8; // [sp+0h] [bp-4h]@1 | 8908 uNumVisibleNotEmptySectors = 0; |
8970 | 8909 for (uint i = 0; i < std__vector_000FA8; ++i) |
8971 result = 0; | 8910 { |
8972 v2 = this->std__vector_000FA8 == 0; | |
8973 v3 = (this->std__vector_000FA8 & 0x80000000u) != 0; | |
8974 this->field_53730 = 0; | |
8975 v8 = 0; | |
8976 if ( !(v3 | v2) ) | |
8977 { | |
8978 v4 = this->field_FA8; | |
8979 do | |
8980 { | |
8981 v5 = this->field_53730; | |
8982 v6 = 0; | 8911 v6 = 0; |
8983 if ( v5 <= 0 ) | 8912 if (!uNumVisibleNotEmptySectors) |
8984 { | 8913 { |
8985 LABEL_7: | 8914 LABEL_7: |
8986 this->pSectorIDs_toDrawDecorationsFrom[v5] = v4->uSectorID; | 8915 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID; |
8987 ++this->field_53730; | |
8988 } | 8916 } |
8989 else | 8917 else |
8990 { | 8918 { |
8991 v7 = (char *)this->pSectorIDs_toDrawDecorationsFrom; | 8919 while (pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6] != field_FA8[i].uSectorID ) |
8992 while ( *(short *)v7 != v4->uSectorID ) | |
8993 { | 8920 { |
8994 ++v6; | 8921 ++v6; |
8995 v7 += 2; | 8922 if ( v6 >= uNumVisibleNotEmptySectors) |
8996 if ( v6 >= v5 ) | 8923 { |
8997 goto LABEL_7; | 8924 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID; |
8925 continue; | |
8926 } | |
8998 } | 8927 } |
8999 } | 8928 } |
9000 ++v8; | 8929 } |
9001 ++v4; | |
9002 result = v8; | |
9003 } | |
9004 while ( v8 < (signed int)this->std__vector_000FA8 ); | |
9005 } | |
9006 return result; | |
9007 } | 8930 } |
9008 | 8931 |
9009 | 8932 |
9010 //----- (0043F515) -------------------------------------------------------- | 8933 //----- (0043F515) -------------------------------------------------------- |
9011 void __cdecl MessWithBillboards_BLV() | 8934 void MessWithBillboards_BLV() |
9012 { | 8935 { |
9013 signed int v0; // edi@1 | 8936 for (uint i = 0; i < uNumBillboardsToDraw; ++i) |
9014 char *v1; // esi@2 | 8937 { |
9015 | 8938 auto p = pBillboardRenderList + i; |
9016 v0 = 0; | 8939 |
9017 if ( (signed int)uNumBillboardsToDraw > 0 ) | 8940 if (p->field_1E & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !p->uIndoorSectorID) |
9018 { | 8941 p->uPaletteSubindex = 0; |
9019 v1 = (char *)&pBillboardRenderList[0].field_2A; | 8942 else |
9020 do | 8943 p->uPaletteSubindex = _43F55F_get_billboard_light_level(p, -1); |
9021 { | |
9022 if ( *(v1 - 12) & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !*((short *)v1 - 7) ) | |
9023 *(short *)v1 = 0; | |
9024 else | |
9025 *(short *)v1 = sub_43F55F((RenderBillboard *)(v1 - 42), -1); | |
9026 ++v0; | |
9027 v1 += 52; | |
9028 } | |
9029 while ( v0 < (signed int)uNumBillboardsToDraw ); | |
9030 } | 8944 } |
9031 } | 8945 } |
9032 | 8946 |
9033 //----- (0043F55F) -------------------------------------------------------- | 8947 //----- (0043F55F) -------------------------------------------------------- |
9034 signed int __fastcall sub_43F55F(RenderBillboard *a1, signed int a2) | 8948 int __fastcall _43F55F_get_billboard_light_level(RenderBillboard *a1, int uBaseLightLevel) |
9035 { | 8949 { |
9036 RenderBillboard *v2; // eax@1 | |
9037 signed int v3; // ecx@2 | 8950 signed int v3; // ecx@2 |
9038 float v4; // ST08_4@6 | 8951 |
9039 float v5; // ST04_4@6 | |
9040 float v6; // ST00_4@6 | |
9041 | |
9042 v2 = a1; | |
9043 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 8952 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
9044 { | 8953 { |
9045 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel; | 8954 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel; |
9046 } | 8955 } |
9047 else | 8956 else |
9048 { | 8957 { |
9049 if ( a2 == -1 ) | 8958 if ( uBaseLightLevel == -1 ) |
9050 v3 = a1->field_2A; | 8959 v3 = a1->uPaletteSubindex; |
9051 else | 8960 else |
9052 v3 = a2; | 8961 v3 = uBaseLightLevel; |
9053 } | 8962 } |
9054 v4 = (double)v2->field_24; | 8963 return _43F5C8_get_point_light_level_with_respect_to_lights(v3, a1->uIndoorSectorID, a1->some_x, a1->some_y, a1->some_z); |
9055 v5 = (double)v2->field_22; | |
9056 v6 = (double)v2->field_20; | |
9057 return sub_43F5C8(v3, v2->uIndoorSectorID, v6, v5, v4); | |
9058 } | 8964 } |
9059 | 8965 |
9060 //----- (0043F5C8) -------------------------------------------------------- | 8966 //----- (0043F5C8) -------------------------------------------------------- |
9061 signed int __fastcall sub_43F5C8(signed int a1, int a2, float a3, float a4, float a5) | 8967 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z) |
9062 { | 8968 { |
9063 int v5; // esi@1 | 8969 int v5; // esi@1 |
9064 signed int v6; // edi@1 | 8970 signed int v6; // edi@1 |
9065 char *v7; // ebx@2 | |
9066 int v8; // eax@6 | 8971 int v8; // eax@6 |
9067 int v9; // ebx@6 | 8972 int v9; // ebx@6 |
9068 unsigned int v10; // ecx@6 | 8973 unsigned int v10; // ecx@6 |
9069 unsigned int v11; // edx@9 | 8974 unsigned int v11; // edx@9 |
9070 unsigned int v12; // edx@11 | 8975 unsigned int v12; // edx@11 |
9071 signed int v13; // ecx@12 | 8976 signed int v13; // ecx@12 |
9072 BLVSector *v14; // esi@17 | |
9073 int v15; // ecx@17 | |
9074 BLVLightMM7 *v16; // esi@20 | 8977 BLVLightMM7 *v16; // esi@20 |
9075 int v17; // ebx@21 | 8978 int v17; // ebx@21 |
9076 int v18; // eax@24 | 8979 int v18; // eax@24 |
9077 int v19; // ebx@24 | 8980 int v19; // ebx@24 |
9078 unsigned int v20; // ecx@24 | 8981 unsigned int v20; // ecx@24 |
9079 int v21; // edx@25 | 8982 int v21; // edx@25 |
9080 unsigned int v22; // edx@27 | 8983 unsigned int v22; // edx@27 |
9081 unsigned int v23; // edx@29 | 8984 unsigned int v23; // edx@29 |
9082 signed int v24; // ecx@30 | 8985 signed int v24; // ecx@30 |
9083 char *v25; // esi@34 | |
9084 int v26; // ebx@35 | 8986 int v26; // ebx@35 |
9085 int v27; // eax@38 | 8987 int v27; // eax@38 |
9086 int v28; // ebx@38 | 8988 int v28; // ebx@38 |
9087 unsigned int v29; // ecx@38 | 8989 unsigned int v29; // ecx@38 |
9088 int v30; // edx@39 | 8990 int v30; // edx@39 |
9089 unsigned int v31; // edx@41 | 8991 unsigned int v31; // edx@41 |
9090 unsigned int v32; // edx@43 | 8992 unsigned int v32; // edx@43 |
9091 signed int v33; // ecx@44 | 8993 signed int v33; // ecx@44 |
9092 int v35; // [sp+Ch] [bp-18h]@4 | |
9093 BLVSector *v36; // [sp+Ch] [bp-18h]@17 | |
9094 int v37; // [sp+Ch] [bp-18h]@37 | 8994 int v37; // [sp+Ch] [bp-18h]@37 |
9095 int v38; // [sp+10h] [bp-14h]@5 | 8995 int v38; // [sp+10h] [bp-14h]@5 |
9096 int v39; // [sp+10h] [bp-14h]@23 | 8996 int v39; // [sp+10h] [bp-14h]@23 |
9097 int v40; // [sp+10h] [bp-14h]@36 | 8997 int v40; // [sp+10h] [bp-14h]@36 |
9098 int v41; // [sp+14h] [bp-10h]@3 | |
9099 int v42; // [sp+14h] [bp-10h]@22 | 8998 int v42; // [sp+14h] [bp-10h]@22 |
9100 unsigned int v43; // [sp+18h] [bp-Ch]@12 | 8999 unsigned int v43; // [sp+18h] [bp-Ch]@12 |
9101 unsigned int v44; // [sp+18h] [bp-Ch]@30 | 9000 unsigned int v44; // [sp+18h] [bp-Ch]@30 |
9102 unsigned int v45; // [sp+18h] [bp-Ch]@44 | 9001 unsigned int v45; // [sp+18h] [bp-Ch]@44 |
9103 char *v46; // [sp+1Ch] [bp-8h]@2 | 9002 |
9104 int v47; // [sp+1Ch] [bp-8h]@17 | 9003 v6 = uBaseLightLevel; |
9105 int v48; // [sp+20h] [bp-4h]@1 | 9004 for (uint i = 0; i < pMobileLightsStack->uNumLightsActive; ++i) |
9106 int v49; // [sp+20h] [bp-4h]@17 | 9005 { |
9107 int v50; // [sp+20h] [bp-4h]@33 | 9006 auto p = pMobileLightsStack->pLights + i; |
9108 | 9007 |
9109 v48 = 0; | 9008 auto distX = abs(p->vPosition.x - x); |
9110 v5 = a2; | 9009 if ( distX <= p->uRadius) |
9111 v6 = a1; | |
9112 if ( uNumMobileLightsApplied > 0 ) | |
9113 { | |
9114 v7 = (char *)&pMobileLights[0].uRadius; | |
9115 v46 = (char *)&pMobileLights[0].uRadius; | |
9116 do | |
9117 { | |
9118 v41 = abs((signed __int64)((double)*((short *)v7 - 3) - a3)); | |
9119 if ( v41 <= *(short *)v7 ) | |
9120 { | 9010 { |
9121 v35 = abs((signed __int64)((double)*((short *)v7 - 2) - a4)); | 9011 auto distY = abs(p->vPosition.y - y); |
9122 if ( v35 <= *(short *)v7 ) | 9012 if ( distY <= p->uRadius) |
9123 { | 9013 { |
9124 v38 = abs((signed __int64)((double)*((short *)v7 - 1) - a5)); | 9014 auto distZ = abs(p->vPosition.z - z); |
9125 if ( v38 <= *(short *)v7 ) | 9015 if ( distZ <= p->uRadius) |
9126 { | 9016 { |
9127 v8 = v41; | 9017 v8 = distX; |
9128 v9 = v35; | 9018 v9 = distY; |
9129 v10 = v38; | 9019 v10 = distZ; |
9130 if ( v41 < v35 ) | 9020 if (distX < distY) |
9131 { | 9021 { |
9132 v8 = v35; | 9022 v8 = distY; |
9133 v9 = v41; | 9023 v9 = distX; |
9134 } | 9024 } |
9135 if ( v8 < v38 ) | 9025 if ( v8 < distZ ) |
9136 { | 9026 { |
9137 v11 = v8; | 9027 v11 = v8; |
9138 v8 = v38; | 9028 v8 = distZ; |
9139 v10 = v11; | 9029 v10 = v11; |
9140 } | 9030 } |
9141 if ( v9 < (signed int)v10 ) | 9031 if ( v9 < (signed int)v10 ) |
9142 { | 9032 { |
9143 v12 = v10; | 9033 v12 = v10; |
9144 v10 = v9; | 9034 v10 = v9; |
9145 v9 = v12; | 9035 v9 = v12; |
9146 } | 9036 } |
9147 v43 = ((unsigned int)(11 * v9) >> 5) + (v10 >> 2) + v8; | 9037 v43 = ((unsigned int)(11 * v9) / 32) + (v10 / 4) + v8; |
9148 v13 = *(short *)v46; | 9038 v13 = p->uRadius; |
9149 if ( (signed int)v43 < v13 ) | 9039 if ( (signed int)v43 < v13 ) |
9150 v6 = v6 + ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30; | 9040 v6 += ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30; |
9151 v7 = v46; | |
9152 } | 9041 } |
9153 } | 9042 } |
9154 } | 9043 } |
9155 ++v48; | 9044 } |
9156 v7 += 18; | 9045 |
9157 v46 = v7; | |
9158 } | |
9159 while ( v48 < uNumMobileLightsApplied ); | |
9160 } | |
9161 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 9046 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
9162 { | 9047 { |
9163 v14 = &pIndoor->pSectors[v5]; | 9048 auto pSector = pIndoor->pSectors + uSectorID; |
9164 v15 = 0; | 9049 |
9165 v49 = 0; | 9050 for (uint i = 0; i < pSector->uNumLights; ++i) |
9166 v36 = v14; | 9051 { |
9167 v47 = v14->uNumLights; | 9052 v16 = pIndoor->pLights + pSector->pLights[i]; |
9168 if ( v14->uNumLights > 0 ) | 9053 if (~v16->uAtributes & 8) |
9169 { | |
9170 while ( 1 ) | |
9171 { | |
9172 v16 = &pIndoor->pLights[*(&v14->pLights->vPosition.x + v15)]; | |
9173 if ( !(v16->uAtributes & 8) ) | |
9174 { | 9054 { |
9175 v17 = abs((signed __int64)((double)v16->vPosition.x - a3)); | 9055 v17 = abs(v16->vPosition.x - x); |
9176 if ( v17 <= v16->uRadius ) | 9056 if ( v17 <= v16->uRadius ) |
9177 { | 9057 { |
9178 v42 = abs((signed __int64)((double)v16->vPosition.y - a4)); | 9058 v42 = abs(v16->vPosition.y - y); |
9179 if ( v42 <= v16->uRadius ) | 9059 if ( v42 <= v16->uRadius ) |
9180 { | 9060 { |
9181 v39 = abs((signed __int64)((double)v16->vPosition.z - a5)); | 9061 v39 = abs(v16->vPosition.z - z); |
9182 if ( v39 <= v16->uRadius ) | 9062 if ( v39 <= v16->uRadius ) |
9183 { | 9063 { |
9184 v18 = v17; | 9064 v18 = v17; |
9185 v19 = v42; | 9065 v19 = v42; |
9186 v20 = v39; | 9066 v20 = v39; |
9203 v19 = v23; | 9083 v19 = v23; |
9204 } | 9084 } |
9205 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18; | 9085 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18; |
9206 v24 = v16->uRadius; | 9086 v24 = v16->uRadius; |
9207 if ( (signed int)v44 < v24 ) | 9087 if ( (signed int)v44 < v24 ) |
9208 v6 = v6 + ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30; | 9088 v6 += ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30; |
9209 } | 9089 } |
9210 } | 9090 } |
9211 } | 9091 } |
9212 } | 9092 } |
9213 v15 = v49++ + 1; | 9093 } |
9214 if ( v49 >= v47 ) | 9094 } |
9215 break; | 9095 |
9216 v14 = v36; | 9096 for (uint i = 0; i < pStationaryLightsStack->uNumLightsActive; ++i) |
9217 } | 9097 { |
9218 } | 9098 auto p = pStationaryLightsStack->pLights + i; |
9219 } | 9099 v26 = abs(p->vPosition.x - x); |
9220 v50 = 0; | 9100 if ( v26 <= p->uRadius) |
9221 if ( uNumStationaryLightsApplied > 0 ) | |
9222 { | |
9223 v25 = (char *)&pStationaryLights[0].uRadius; | |
9224 do | |
9225 { | |
9226 v26 = abs((signed __int64)((double)*((short *)v25 - 3) - a3)); | |
9227 if ( v26 <= *(short *)v25 ) | |
9228 { | 9101 { |
9229 v40 = abs((signed __int64)((double)*((short *)v25 - 2) - a4)); | 9102 v40 = abs(p->vPosition.y - y); |
9230 if ( v40 <= *(short *)v25 ) | 9103 if ( v40 <= p->uRadius) |
9231 { | 9104 { |
9232 v37 = abs((signed __int64)((double)*((short *)v25 - 1) - a5)); | 9105 v37 = abs(p->vPosition.z - z); |
9233 if ( v37 <= *(short *)v25 ) | 9106 if ( v37 <= p->uRadius) |
9234 { | 9107 { |
9235 v27 = v26; | 9108 v27 = v26; |
9236 v28 = v40; | 9109 v28 = v40; |
9237 v29 = v37; | 9110 v29 = v37; |
9238 if ( v27 < v40 ) | 9111 if ( v27 < v40 ) |
9252 v32 = v29; | 9125 v32 = v29; |
9253 v29 = v28; | 9126 v29 = v28; |
9254 v28 = v32; | 9127 v28 = v32; |
9255 } | 9128 } |
9256 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27; | 9129 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27; |
9257 v33 = *(short *)v25; | 9130 v33 = p->uRadius; |
9258 if ( (signed int)v45 < v33 ) | 9131 if ( (signed int)v45 < v33 ) |
9259 v6 = v6 + ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30; | 9132 v6 += ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30; |
9260 } | 9133 } |
9261 } | 9134 } |
9262 } | 9135 } |
9263 ++v50; | 9136 } |
9264 v25 += 12; | 9137 |
9265 } | |
9266 while ( v50 < uNumStationaryLightsApplied ); | |
9267 } | |
9268 if ( v6 <= 31 ) | 9138 if ( v6 <= 31 ) |
9269 { | 9139 { |
9270 if ( v6 < 0 ) | 9140 if ( v6 < 0 ) |
9271 v6 = 0; | 9141 v6 = 0; |
9272 } | 9142 } |
9274 { | 9144 { |
9275 v6 = 31; | 9145 v6 = 31; |
9276 } | 9146 } |
9277 return v6; | 9147 return v6; |
9278 } | 9148 } |
9279 // 519AB4: using guessed type int uNumStationaryLightsApplied; | |
9280 | 9149 |
9281 //----- (00406051) -------------------------------------------------------- | 9150 //----- (00406051) -------------------------------------------------------- |
9282 __int16 stru262_TurnBased::StartTurn() | 9151 __int16 stru262_TurnBased::StartTurn() |
9283 { | 9152 { |
9284 stru262_TurnBased *v1; // esi@1 | 9153 stru262_TurnBased *v1; // esi@1 |
9481 } | 9350 } |
9482 v6 = (signed __int16)v6; | 9351 v6 = (signed __int16)v6; |
9483 if ( (signed __int16)v6 == 4 ) | 9352 if ( (signed __int16)v6 == 4 ) |
9484 { | 9353 { |
9485 v3 = 0; | 9354 v3 = 0; |
9486 v5->uAIState = 5; | 9355 v5->uAIState = Dead; |
9487 v5->uCurrentActionTime = 0; | 9356 v5->uCurrentActionTime = 0; |
9488 v5->uCurrentActionLength = 0; | 9357 v5->uCurrentActionLength = 0; |
9489 v5->UpdateAnimation(); | 9358 v5->UpdateAnimation(); |
9490 } | 9359 } |
9491 else | 9360 else |
10233 { | 10102 { |
10234 if ( v7 == 4 ) | 10103 if ( v7 == 4 ) |
10235 { | 10104 { |
10236 v6->uCurrentActionTime = 0; | 10105 v6->uCurrentActionTime = 0; |
10237 v6->uCurrentActionLength = 0; | 10106 v6->uCurrentActionLength = 0; |
10238 v6->uAIState = 5; | 10107 v6->uAIState = Dead; |
10239 v6->UpdateAnimation(); | 10108 v6->UpdateAnimation(); |
10240 } | 10109 } |
10241 if ( !thisa->_406D10(a2) ) | 10110 if ( !thisa->_406D10(a2) ) |
10242 LABEL_26: | 10111 LABEL_26: |
10243 Actor::_403EB6(v12, v13, 0x20u, &v9); | 10112 Actor::_403EB6(v12, v13, 0x20u, &v9); |
10504 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11)); | 10373 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11)); |
10505 memcpy(&a4, &v11, sizeof(a4)); | 10374 memcpy(&a4, &v11, sizeof(a4)); |
10506 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed; | 10375 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed; |
10507 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength ) | 10376 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength ) |
10508 { | 10377 { |
10509 if ( v5->uAIState == 4 ) | 10378 if (v5->uAIState == Dying) |
10510 { | 10379 { |
10511 v5->uCurrentActionTime = 0; | 10380 v5->uCurrentActionTime = 0; |
10512 v5->uCurrentActionLength = 0; | 10381 v5->uCurrentActionLength = 0; |
10513 v5->uAIState = 5; | 10382 v5->uAIState = Dead; |
10514 v5->UpdateAnimation(); | 10383 v5->UpdateAnimation(); |
10515 return; | 10384 return; |
10516 } | 10385 } |
10517 if ( rand() % 2 ) | 10386 if ( rand() % 2 ) |
10518 Actor::_403EB6(uActorID, a2, 0x40u, &a4); | 10387 Actor::_403EB6(uActorID, a2, 0x40u, &a4); |
10658 v43 = pLevelDecorations[v16].vPosition.y; | 10527 v43 = pLevelDecorations[v16].vPosition.y; |
10659 } | 10528 } |
10660 else | 10529 else |
10661 { | 10530 { |
10662 v18 = pParty->vPosition.x; | 10531 v18 = pParty->vPosition.x; |
10663 v17 = pParty->sEyelevel + pParty->vPosition.y; | 10532 v17 = pParty->sEyelevel + pParty->vPosition.z; |
10664 v60 = pParty->vPosition.z; | 10533 v60 = pParty->vPosition.y; |
10665 v44 = pParty->sEyelevel + pParty->vPosition.y; | 10534 v44 = pParty->sEyelevel + pParty->vPosition.z; |
10666 v43 = pParty->vPosition.z; | 10535 v43 = pParty->vPosition.y; |
10667 } | 10536 } |
10668 v19 = pIndoor->GetSector(v18, v43, v44); | 10537 v19 = pIndoor->GetSector(v18, v43, v44); |
10669 } | 10538 } |
10670 else | 10539 else |
10671 { | 10540 { |
10979 int v25; // [sp+14h] [bp-8h]@14 | 10848 int v25; // [sp+14h] [bp-8h]@14 |
10980 int a4a; // [sp+28h] [bp+Ch]@2 | 10849 int a4a; // [sp+28h] [bp+Ch]@2 |
10981 signed int a5a; // [sp+2Ch] [bp+10h]@14 | 10850 signed int a5a; // [sp+2Ch] [bp+10h]@14 |
10982 | 10851 |
10983 v5 = a4; | 10852 v5 = a4; |
10984 v6 = a4->uFaceAttributes; | 10853 v6 = a4->uAttributes; |
10985 v7 = 0; | 10854 v7 = 0; |
10986 if ( v6 & 0x100 ) | 10855 if ( v6 & 0x100 ) |
10987 { | 10856 { |
10988 v8 = a4->uNumVertices == 0; | 10857 v8 = a4->uNumVertices == 0; |
10989 a4a = a1; | 10858 a4a = a1; |
11348 v60 = pIndoor->pSectors; | 11217 v60 = pIndoor->pSectors; |
11349 v61 = 116 * v59; | 11218 v61 = 116 * v59; |
11350 sDepthb = 0; | 11219 sDepthb = 0; |
11351 for ( i = 116 * v59; | 11220 for ( i = 116 * v59; |
11352 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61) | 11221 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61) |
11353 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->field_4 + v61); | 11222 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v61); |
11354 ++sDepthb ) | 11223 ++sDepthb ) |
11355 { | 11224 { |
11356 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]]; | 11225 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]]; |
11357 if ( v62->uAttributes & 1 | 11226 if ( v62->uAttributes & 1 |
11358 || v119 > v62->pBounding.x2 | 11227 || v119 > v62->pBounding.x2 |
11502 v88 = pIndoor->pSectors; | 11371 v88 = pIndoor->pSectors; |
11503 v89 = 116 * v87; | 11372 v89 = 116 * v87; |
11504 v162 = 0; | 11373 v162 = 0; |
11505 v112 = v89; | 11374 v112 = v89; |
11506 if ( *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89) | 11375 if ( *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89) |
11507 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->field_4 + v89) > 0 ) | 11376 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) > 0 ) |
11508 break; | 11377 break; |
11509 LABEL_148: | 11378 LABEL_148: |
11510 ++a5c; | 11379 ++a5c; |
11511 if ( a5c >= 2 ) | 11380 if ( a5c >= 2 ) |
11512 return !v114 || !v113; | 11381 return !v114 || !v113; |
11582 v89 = v112; | 11451 v89 = v112; |
11583 LABEL_145: | 11452 LABEL_145: |
11584 v88 = pIndoor->pSectors; | 11453 v88 = pIndoor->pSectors; |
11585 ++v162; | 11454 ++v162; |
11586 if ( v162 >= *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89) | 11455 if ( v162 >= *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89) |
11587 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->field_4 + v89) ) | 11456 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) ) |
11588 goto LABEL_148; | 11457 goto LABEL_148; |
11589 } | 11458 } |
11590 } | 11459 } |
11591 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz); | 11460 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz); |
11592 v5.z = v.z; | 11461 v5.z = v.z; |
11913 } | 11782 } |
11914 return v1; | 11783 return v1; |
11915 } | 11784 } |
11916 | 11785 |
11917 //----- (00408896) -------------------------------------------------------- | 11786 //----- (00408896) -------------------------------------------------------- |
11918 char *__cdecl UpdateLayingItems() | 11787 void UpdateLayingItems() |
11919 { | 11788 { |
11920 unsigned int v0; // edi@1 | 11789 unsigned int v0; // edi@1 |
11921 char *v1; // esi@1 | 11790 char *v1; // esi@1 |
11922 char *result; // eax@7 | 11791 char *result; // eax@7 |
11923 | 11792 |
11929 LayingItem::_42F933(v0); | 11798 LayingItem::_42F933(v0); |
11930 v1 += 112; | 11799 v1 += 112; |
11931 ++v0; | 11800 ++v0; |
11932 } | 11801 } |
11933 while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) ); | 11802 while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) ); |
11934 result = (char *)&array_5118E8.pElements[0].field_C; | 11803 |
11935 do | 11804 for (uint i = 0; i < 100; ++i) |
11936 { | 11805 array_5118E8.pElements[i].field_C_time_left = 0; |
11937 *(short *)result = 0; | |
11938 result += 24; | |
11939 } | |
11940 while ( (signed int)result < (signed int)&pBillboardRenderList[0].field_4 ); | |
11941 return result; | |
11942 } | 11806 } |
11943 | 11807 |
11944 //----- (004088E9) -------------------------------------------------------- | 11808 //----- (004088E9) -------------------------------------------------------- |
11945 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6) | 11809 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6) |
11946 { | 11810 { |
12188 pRenderer->BeginScene(); | 12052 pRenderer->BeginScene(); |
12189 pRenderer->Clip_v2(0, 0, 639u, 479u); | 12053 pRenderer->Clip_v2(0, 0, 639u, 479u); |
12190 if ( bSolidFill ) | 12054 if ( bSolidFill ) |
12191 { | 12055 { |
12192 for ( i = v3->y; (signed int)i <= v3->w; ++i ) | 12056 for ( i = v3->y; (signed int)i <= v3->w; ++i ) |
12193 pRenderer->FillRect(v3->x, i, v3->z, i, v4); | 12057 pRenderer->Line2D(v3->x, i, v3->z, i, v4); |
12194 } | 12058 } |
12195 else | 12059 else |
12196 { | 12060 { |
12197 pRenderer->FillRect(v3->x, v3->y, v3->z, v3->y, v4); | 12061 pRenderer->Line2D(v3->x, v3->y, v3->z, v3->y, v4); |
12198 pRenderer->FillRect(v3->z, v3->y, v3->z, v3->w, v4); | 12062 pRenderer->Line2D(v3->z, v3->y, v3->z, v3->w, v4); |
12199 pRenderer->FillRect(v3->z, v3->w, v3->x, v3->w, v4); | 12063 pRenderer->Line2D(v3->z, v3->w, v3->x, v3->w, v4); |
12200 pRenderer->FillRect(v3->x, v3->w, v3->x, v3->y, v4); | 12064 pRenderer->Line2D(v3->x, v3->w, v3->x, v3->y, v4); |
12201 } | 12065 } |
12202 pRenderer->EndScene(); | 12066 pRenderer->EndScene(); |
12203 } | 12067 } |
12204 | 12068 |
12205 | 12069 |
12644 int v12; // [sp+6Ch] [bp-8h]@4 | 12508 int v12; // [sp+6Ch] [bp-8h]@4 |
12645 int v13; // [sp+70h] [bp-4h]@4 | 12509 int v13; // [sp+70h] [bp-4h]@4 |
12646 | 12510 |
12647 v1 = pPlayers[uActiveCharacter]; | 12511 v1 = pPlayers[uActiveCharacter]; |
12648 v10 = _this; | 12512 v10 = _this; |
12649 v2 = &pSpellStats->pInfos[(signed int)((char *)_this + 11 * v1->field_1A4E) + 1]; | 12513 v2 = &pSpellStats->pInfos[(signed int)((char *)_this + 11 * v1->pNumSpellBookPage) + 1]; |
12650 if ( pMouse->GetCursorPos(&a2)->y <= 250 ) | 12514 if ( pMouse->GetCursorPos(&a2)->y <= 250 ) |
12651 v3 = pMouse->GetCursorPos(&a2)->y + 30; | 12515 v3 = pMouse->GetCursorPos(&a2)->y + 30; |
12652 else | 12516 else |
12653 v3 = 30; | 12517 v3 = 30; |
12654 a1.uFrameY = v3; | 12518 a1.uFrameY = v3; |
12655 a1.uFrameWidth = 328; | 12519 a1.uFrameWidth = 328; |
12656 a1.uFrameHeight = 68; | 12520 a1.uFrameHeight = 68; |
12657 a1.uFrameX = 90; | 12521 a1.uFrameX = 90; |
12658 a1.uFrameZ = 417; | 12522 a1.uFrameZ = 417; |
12659 a1.uFrameW = v3 + 67; | 12523 a1.uFrameW = v3 + 67; |
12660 a1.str_48 = 0; | 12524 a1.Hint = 0; |
12661 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]); | 12525 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]); |
12662 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]); | 12526 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]); |
12663 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]); | 12527 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]); |
12664 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]); | 12528 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]); |
12665 v5 = a2.y; | 12529 v5 = a2.y; |
12692 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0); | 12556 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0); |
12693 a1.uFrameHeight += v6; | 12557 a1.uFrameHeight += v6; |
12694 if ( (signed int)a1.uFrameHeight < 150 ) | 12558 if ( (signed int)a1.uFrameHeight < 150 ) |
12695 a1.uFrameHeight = 150; | 12559 a1.uFrameHeight = 150; |
12696 a1.uFrameWidth = 460; | 12560 a1.uFrameWidth = 460; |
12697 a1._415551(0); | 12561 a1.DrawMessageBox(0); |
12698 a1.uFrameWidth -= 12; | 12562 a1.uFrameWidth -= 12; |
12699 a1.uFrameHeight -= 12; | 12563 a1.uFrameHeight -= 12; |
12700 v7 = v2->pName; | 12564 v7 = v2->pName; |
12701 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | 12565 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; |
12702 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; | 12566 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; |
12703 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 12567 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
12704 a1.DrawText2(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); | 12568 a1.DrawText2(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); |
12705 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0); | 12569 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0); |
12706 a1.uFrameWidth = 108; | 12570 a1.uFrameWidth = 108; |
12707 a1.uFrameZ = a1.uFrameX + 107; | 12571 a1.uFrameZ = a1.uFrameX + 107; |
12708 a1.DrawText2(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->field_1A4E + 12], 3u); | 12572 a1.DrawText2(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->pNumSpellBookPage + 12], 3u); |
12709 sprintfex( | 12573 sprintfex( |
12710 pTmpBuf, | 12574 pTmpBuf, |
12711 "%s\n%d", | 12575 "%s\n%d", |
12712 pGlobalTXT_LocalizationStrings[522], | 12576 pGlobalTXT_LocalizationStrings[522], |
12713 *(&pSpellDatas[0].field_14 | 12577 *(&pSpellDatas[0].field_14 |
12714 + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->field_1A4E + 12]) >> 6) | 12578 + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->pNumSpellBookPage + 12]) >> 6) |
12715 + 10 * (int)((char *)v10 + 11 * v1->field_1A4E))); | 12579 + 10 * (int)((char *)v10 + 11 * v1->pNumSpellBookPage))); |
12716 a1.DrawText2(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u); | 12580 a1.DrawText2(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u); |
12717 dword_507B00_spell_info_to_draw_in_popup = 0; | 12581 dword_507B00_spell_info_to_draw_in_popup = 0; |
12718 } | 12582 } |
12719 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; | 12583 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; |
12720 | 12584 |
13125 } | 12989 } |
13126 | 12990 |
13127 //----- (00411473) -------------------------------------------------------- | 12991 //----- (00411473) -------------------------------------------------------- |
13128 void __cdecl sub_411473() | 12992 void __cdecl sub_411473() |
13129 { | 12993 { |
13130 char *v0; // esi@1 | 12994 Texture **v0; // esi@1 |
13131 Texture **v1; // edi@1 | 12995 Texture **v1; // edi@1 |
13132 Texture *v2; // ecx@2 | 12996 Texture *v2; // ecx@2 |
13133 Texture *v3; // ecx@2 | 12997 Texture *v3; // ecx@2 |
13134 | 12998 |
13135 pTexture_pagemask->Release(); | 12999 pTexture_pagemask->Release(); |
13136 pTexture_506448->Release(); | 13000 pTexture_506448->Release(); |
13137 pTexture_50643C->Release(); | 13001 pTexture_50643C->Release(); |
13138 v0 = &pTextures_tabs[0][0].pName[4]; | 13002 v0 = &pTextures_tabs[0][1]; |
13139 v1 = pTextures_5064A0; | 13003 v1 = pTextures_5064A0; |
13140 do | 13004 do |
13141 { | 13005 { |
13142 (*v1)->Release(); | 13006 (*v1)->Release(); |
13143 v2 = (Texture *)*((int *)v0 - 1); | 13007 v2 = (Texture *)*((int *)v0 - 1); |
13222 int v23[2]; // [sp+10h] [bp-10h]@5 | 13086 int v23[2]; // [sp+10h] [bp-10h]@5 |
13223 POINT a2; // [sp+18h] [bp-8h]@13 | 13087 POINT a2; // [sp+18h] [bp-8h]@13 |
13224 | 13088 |
13225 sub_412AF9(); | 13089 sub_412AF9(); |
13226 v0 = pPlayers[uActiveCharacter]; | 13090 v0 = pPlayers[uActiveCharacter]; |
13227 v1 = 11 * v0->field_1A4E; | 13091 v1 = 11 * v0->pNumSpellBookPage; |
13228 v2 = pIcons_LOD->FindTextureByName("Pending"); | 13092 v2 = pIcons_LOD->FindTextureByName("Pending"); |
13229 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); | 13093 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); |
13230 pRenderer->ClearZBuffer(0, 479); | 13094 pRenderer->ClearZBuffer(0, 479); |
13231 v4 = 1; | 13095 v4 = 1; |
13232 if ( __OFSUB__(v1, v1 + 11) ^ 1 ) | 13096 if ( __OFSUB__(v1, v1 + 11) ^ 1 ) |
13248 v23[0] = dword_506408[v4]; | 13112 v23[0] = dword_506408[v4]; |
13249 v6 = v5; | 13113 v6 = v5; |
13250 } | 13114 } |
13251 if ( v6->pLevelOfDetail0 ) | 13115 if ( v6->pLevelOfDetail0 ) |
13252 { | 13116 { |
13253 v7 = 2 * (12 * v0->field_1A4E + (unsigned __int8)*(&byte_4E2430[12 * v0->field_1A4E] + v4)); | 13117 v7 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage + v4])); |
13254 v19 = pViewport->uViewportY + dword_4E20D0[v7 + 1]; | 13118 v19 = pViewport->uViewportY + dword_4E20D0[v7 + 1]; |
13255 v17 = pViewport->uViewportX + dword_4E20D0[v7]; | 13119 v17 = pViewport->uViewportX + dword_4E20D0[v7]; |
13256 if ( BYTE1(v6->pBits) & 2 ) | 13120 if ( BYTE1(v6->pBits) & 2 ) |
13257 pRenderer->DrawTextureTransparent(v17, v19, v6); | 13121 pRenderer->DrawTextureTransparent(v17, v19, v6); |
13258 else | 13122 else |
13259 pRenderer->DrawTextureIndexed(v17, v19, v6); | 13123 pRenderer->DrawTextureIndexed(v17, v19, v6); |
13260 v8 = 2 * (12 * v0->field_1A4E + (unsigned __int8)*(&byte_4E2430[12 * v0->field_1A4E] + v4)); | 13124 v8 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage] + v4)); |
13261 pRenderer->_4A612A(dword_4E20D0[v8], dword_4E20D0[v8 + 1], (Texture *)v23[0], v4); | 13125 pRenderer->_4A612A(dword_4E20D0[v8], dword_4E20D0[v8 + 1], (Texture *)v23[0], v4); |
13262 } | 13126 } |
13263 } | 13127 } |
13264 } | 13128 } |
13265 ++v4; | 13129 ++v4; |
13272 { | 13136 { |
13273 v11 = dword_5063D8[v10]; | 13137 v11 = dword_5063D8[v10]; |
13274 if ( v11->pLevelOfDetail0 ) | 13138 if ( v11->pLevelOfDetail0 ) |
13275 { | 13139 { |
13276 v21 = dword_5063D8[v10]; | 13140 v21 = dword_5063D8[v10]; |
13277 v12 = 2 * (12 * v0->field_1A4E + (unsigned __int8)*(&byte_4E2430[12 * v0->field_1A4E] + v10)); | 13141 v12 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage] + v10)); |
13278 v20 = pViewport->uViewportY + dword_4E20D0[v12 + 1]; | 13142 v20 = pViewport->uViewportY + dword_4E20D0[v12 + 1]; |
13279 v18 = pViewport->uViewportX + dword_4E20D0[v12]; | 13143 v18 = pViewport->uViewportX + dword_4E20D0[v12]; |
13280 if ( BYTE1(v11->pBits) & 2 ) | 13144 if ( BYTE1(v11->pBits) & 2 ) |
13281 pRenderer->DrawTextureTransparent(v18, v20, v21); | 13145 pRenderer->DrawTextureTransparent(v18, v20, v21); |
13282 else | 13146 else |
13290 v23[0] = 0; | 13154 v23[0] = 0; |
13291 do | 13155 do |
13292 { | 13156 { |
13293 if ( *(short *)a2.x ) | 13157 if ( *(short *)a2.x ) |
13294 { | 13158 { |
13295 if ( v0->field_1A4E == v13 ) | 13159 if ( v0->pNumSpellBookPage == v13 ) |
13296 { | 13160 { |
13297 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13 + 4]; | 13161 v16 = pTextures_tabs[v13][1]; |
13298 switch ( v13 ) | 13162 switch ( v13 ) |
13299 { | 13163 { |
13300 case 0: | 13164 case 0: |
13301 v14 = 406; | 13165 v14 = 406; |
13302 v22 = 9; | 13166 v22 = 9; |
13332 break; | 13196 break; |
13333 } | 13197 } |
13334 } | 13198 } |
13335 else | 13199 else |
13336 { | 13200 { |
13337 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13]; | 13201 v16 = pTextures_tabs[v13][0]; |
13338 switch ( v13 ) | 13202 switch ( v13 ) |
13339 { | 13203 { |
13340 case 0: | 13204 case 0: |
13341 v14 = 415; | 13205 v14 = 415; |
13342 v22 = 10; | 13206 v22 = 10; |
14037 v22.uFrameW = 467; | 13901 v22.uFrameW = 467; |
14038 v7 = pMapStats->GetMapInfo(pCurrentMapName); | 13902 v7 = pMapStats->GetMapInfo(pCurrentMapName); |
14039 if ( v7 ) | 13903 if ( v7 ) |
14040 v22.DrawText2(pBook2Font, 0xFFFFFFF2u, 0xCu, 0, pMapStats->pInfos[v7].pName, 3u); | 13904 v22.DrawText2(pBook2Font, 0xFFFFFFF2u, 0xCu, 0, pMapStats->pInfos[v7].pName, 3u); |
14041 v22.uFrameX = 0; | 13905 v22.uFrameX = 0; |
14042 sprintfex(Str, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.z); | 13906 sprintfex(Str, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); |
14043 return v22.DrawText2(pFontComic, 0, 0x140u, 0, Str, 0); | 13907 return v22.DrawText2(pFontComic, 0, 0x140u, 0, Str, 0); |
14044 } | 13908 } |
14045 | 13909 |
14046 | 13910 |
14047 //----- (00413CC6) -------------------------------------------------------- | 13911 //----- (00413CC6) -------------------------------------------------------- |
14243 GUIWindow *result; // eax@1 | 14107 GUIWindow *result; // eax@1 |
14244 | 14108 |
14245 v2 = pStr; | 14109 v2 = pStr; |
14246 v3 = a4; | 14110 v3 = a4; |
14247 pEventTimer->Pause(); | 14111 pEventTimer->Pause(); |
14248 dword_506F0C[0] = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; | 14112 dword_506F0C[0] = pCurrentScreen; |
14249 result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2); | 14113 result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2); |
14250 ptr_507BDC = result; | 14114 ptr_507BDC = result; |
14251 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 22; | 14115 pCurrentScreen = 22; |
14252 return result; | 14116 return result; |
14253 } | 14117 } |
14254 // 4E28F8: using guessed type int uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; | 14118 // 4E28F8: using guessed type int pCurrentScreen; |
14255 | 14119 |
14256 //----- (0041420D) -------------------------------------------------------- | 14120 //----- (0041420D) -------------------------------------------------------- |
14257 void __cdecl sub_41420D_press_esc() | 14121 void __cdecl sub_41420D_press_esc() |
14258 { | 14122 { |
14259 GUIWindow v0; // [sp+4h] [bp-54h]@1 | 14123 GUIWindow v0; // [sp+4h] [bp-54h]@1 |
14260 | 14124 |
14261 sprintfex(pTmpBuf2, "%s\n \n%s", ptr_507BDC->str_48, pGlobalTXT_LocalizationStrings[61]);// Press Escape | 14125 sprintfex(pTmpBuf2, "%s\n \n%s", ptr_507BDC->Hint, pGlobalTXT_LocalizationStrings[61]);// Press Escape |
14262 v0.str_48 = pTmpBuf2; | 14126 v0.Hint = pTmpBuf2; |
14263 v0.uFrameWidth = 400; | 14127 v0.uFrameWidth = 400; |
14264 v0.uFrameHeight = 100; | 14128 v0.uFrameHeight = 100; |
14265 v0.uFrameX = 120; | 14129 v0.uFrameX = 120; |
14266 v0.uFrameY = 140; | 14130 v0.uFrameY = 140; |
14267 v0.uFrameZ = 519; | 14131 v0.uFrameZ = 519; |
14268 v0.uFrameW = 239; | 14132 v0.uFrameW = 239; |
14269 v0._415551(0); | 14133 v0.DrawMessageBox(0); |
14270 } | 14134 } |
14271 | 14135 |
14272 //----- (0041426F) -------------------------------------------------------- | 14136 //----- (0041426F) -------------------------------------------------------- |
14273 void __cdecl sub_41426F() | 14137 void __cdecl sub_41426F() |
14274 { | 14138 { |
14282 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 14146 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
14283 ++pMessageQueue_50CBD0->uNumMessages; | 14147 ++pMessageQueue_50CBD0->uNumMessages; |
14284 } | 14148 } |
14285 v0->Release(); | 14149 v0->Release(); |
14286 ptr_507BDC = 0; | 14150 ptr_507BDC = 0; |
14287 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = dword_506F0C[0]; | 14151 pCurrentScreen = dword_506F0C[0]; |
14288 pEventTimer->Resume(); | 14152 pEventTimer->Resume(); |
14289 } | 14153 } |
14290 // 4E28F8: using guessed type int uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions; | 14154 // 4E28F8: using guessed type int pCurrentScreen; |
14291 | 14155 |
14292 //----- (004142D3) -------------------------------------------------------- | 14156 //----- (004142D3) -------------------------------------------------------- |
14293 char __cdecl GameMenuUI_DrawKeyBindings() | 14157 char __cdecl GameMenuUI_DrawKeyBindings() |
14294 { | 14158 { |
14295 unsigned int v0; // ebp@1 | 14159 unsigned int v0; // ebp@1 |
14833 + 2 * LOBYTE(pFontSmallnum->uFontHeight) | 14697 + 2 * LOBYTE(pFontSmallnum->uFontHeight) |
14834 + 24; | 14698 + 24; |
14835 Dst.uFrameY = 470 - Dst.uFrameHeight; | 14699 Dst.uFrameY = 470 - Dst.uFrameHeight; |
14836 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 14700 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
14837 Dst.uFrameW = 469; | 14701 Dst.uFrameW = 469; |
14838 Dst._415551(0); | 14702 Dst.DrawMessageBox(0); |
14839 Dst.uFrameWidth -= 24; | 14703 Dst.uFrameWidth -= 24; |
14840 Dst.uFrameX += 12; | 14704 Dst.uFrameX += 12; |
14841 Dst.uFrameY += 12; | 14705 Dst.uFrameY += 12; |
14842 Dst.uFrameHeight -= 12; | 14706 Dst.uFrameHeight -= 12; |
14843 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 14707 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
14849 | 14713 |
14850 | 14714 |
14851 //----- (004156F0) -------------------------------------------------------- | 14715 //----- (004156F0) -------------------------------------------------------- |
14852 void __cdecl GUI_UpdateWindows() | 14716 void __cdecl GUI_UpdateWindows() |
14853 { | 14717 { |
14854 GUIWindow *v0; // esi@4 | 14718 GUIWindow *pWindow; // esi@4 |
14855 unsigned int v1; // eax@4 | 14719 unsigned int pWindowType; // eax@4 |
14856 int v2; // eax@10 | 14720 int v2; // eax@10 |
14857 int v3; // eax@11 | 14721 int v3; // eax@11 |
14858 int v4; // eax@12 | 14722 int v4; // eax@12 |
14859 int v5; // eax@20 | 14723 int v5; // eax@20 |
14860 int v6; // eax@21 | 14724 int v6; // eax@21 |
14907 if (GetCurrentMenuID() != MENU_CREATEPARTY) | 14771 if (GetCurrentMenuID() != MENU_CREATEPARTY) |
14908 sub_41CD4F(34); | 14772 sub_41CD4F(34); |
14909 for ( i = 1; i <= uNumVisibleWindows; ++i ) | 14773 for ( i = 1; i <= uNumVisibleWindows; ++i ) |
14910 { | 14774 { |
14911 //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]]; | 14775 //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]]; |
14912 v0 = &pWindowList[pVisibleWindowsIdxs[i] - 1]; | 14776 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1]; |
14913 v1 = v0->eWindowType; | 14777 pWindowType = pWindow->eWindowType; |
14914 | 14778 |
14915 switch (v0->eWindowType) | 14779 switch (pWindow->eWindowType) |
14916 { | 14780 { |
14917 case WINDOW_MainMenu_Load: | 14781 case WINDOW_MainMenu_Load: |
14918 GameUI_MainMenu_DrawLoad(); | 14782 GameUI_MainMenu_DrawLoad(); |
14919 continue; | 14783 continue; |
14920 | 14784 |
14921 case WINDOW_5E: // window that initiates savegame loading | 14785 case WINDOW_5E: // window that initiates savegame loading |
14922 { | 14786 { |
14923 if (v0->str_48 != (char *)1) | 14787 if (pWindow->Hint != (char *)1) |
14924 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14788 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14925 auto v20 = (GUIButton *)v0->ptr_1C; | 14789 auto v20 = (GUIButton *)pWindow->ptr_1C; |
14926 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v20->pTextures[0]); | 14790 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v20->pTextures[0]); |
14927 v21 = v0->str_48; | 14791 v21 = pWindow->Hint; |
14928 viewparams->bRedrawGameUI = 1; | 14792 viewparams->bRedrawGameUI = 1; |
14929 if ( v21 && v21 != (char *)1 ) | 14793 if ( v21 && v21 != (char *)1 ) |
14930 v20->DrawLabel(v21, pFontCreate, 0, 0); | 14794 v20->DrawLabel(v21, pFontCreate, 0, 0); |
14931 v0->Release(); | 14795 pWindow->Release(); |
14932 if (uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 11) | 14796 if (pCurrentScreen == 11) |
14933 pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0); | 14797 pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0); |
14934 else | 14798 else |
14935 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); | 14799 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); |
14936 } | 14800 } |
14937 continue; | 14801 continue; |
14938 } | 14802 } |
14939 | 14803 |
14940 | 14804 |
14941 if ( (signed int)v1 > 70 ) | 14805 if ( (signed int)pWindowType > 70 ) |
14942 { | 14806 { |
14943 if ( (signed int)v1 > 95 ) | 14807 if ( (signed int)pWindowType > 95 ) |
14944 { | 14808 { |
14945 v33 = v1 - 96; | 14809 v33 = pWindowType - 96; |
14946 if ( !v33 ) | 14810 if ( !v33 ) |
14947 { | 14811 { |
14948 if ( v0->str_48 != (char *)1 ) | 14812 if ( pWindow->Hint != (char *)1 ) |
14949 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14813 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
14950 v42 = (GUIButton *)v0->ptr_1C; | 14814 v42 = (GUIButton *)pWindow->ptr_1C; |
14951 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v42->pTextures[0]); | 14815 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v42->pTextures[0]); |
14952 v43 = v0->str_48; | 14816 v43 = pWindow->Hint; |
14953 viewparams->bRedrawGameUI = 1; | 14817 viewparams->bRedrawGameUI = 1; |
14954 if ( v43 && v43 != (char *)1 ) | 14818 if ( v43 && v43 != (char *)1 ) |
14955 v42->DrawLabel(v43, pFontCreate, 0, 0); | 14819 v42->DrawLabel(v43, pFontCreate, 0, 0); |
14956 v0->Release(); | 14820 pWindow->Release(); |
14957 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 14821 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
14958 continue; | 14822 continue; |
14959 v41 = pMessageQueue_50CBD0->uNumMessages; | 14823 v41 = pMessageQueue_50CBD0->uNumMessages; |
14960 LABEL_151: | 14824 LABEL_151: |
14961 pMessageQueue_50CBD0->pMessages[v41].eType = (UIMessageType)113; | 14825 pMessageQueue_50CBD0->pMessages[v41].eType = (UIMessageType)113; |
14988 GameMenuUI_DrawKeyBindings(); | 14852 GameMenuUI_DrawKeyBindings(); |
14989 } | 14853 } |
14990 } | 14854 } |
14991 else | 14855 else |
14992 { | 14856 { |
14993 v0->_415551(0); | 14857 pWindow->DrawMessageBox(0); |
14994 v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); | 14858 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); |
14995 v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); | 14859 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); |
14996 if ( !pKeyActionMap->field_204 ) | 14860 if ( !pKeyActionMap->field_204 ) |
14997 { | 14861 { |
14998 v51.Reset(); | 14862 v51.Reset(); |
14999 v0->Release(); | 14863 pWindow->Release(); |
15000 pEventTimer->Resume(); | 14864 pEventTimer->Resume(); |
15001 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 14865 pCurrentScreen = 0; |
15002 viewparams->bRedrawGameUI = 1; | 14866 viewparams->bRedrawGameUI = 1; |
15003 v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); | 14867 v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); |
15004 if ( v39 > 0 ) | 14868 if ( v39 > 0 ) |
15005 { | 14869 { |
15006 if ( v39 < 800 ) | 14870 if ( v39 < 800 ) |
15008 } | 14872 } |
15009 } | 14873 } |
15010 } | 14874 } |
15011 continue; | 14875 continue; |
15012 } | 14876 } |
15013 v46 = (Texture *)*((_DWORD *)v0->ptr_1C + 15); | 14877 v46 = (Texture *)*((_DWORD *)pWindow->ptr_1C + 15); |
15014 v45 = v0->uFrameY; | 14878 v45 = pWindow->uFrameY; |
15015 v44 = v0->uFrameX; | 14879 v44 = pWindow->uFrameX; |
15016 LABEL_18: | 14880 LABEL_18: |
15017 pRenderer->DrawTextureIndexed(v44, v45, v46); | 14881 pRenderer->DrawTextureIndexed(v44, v45, v46); |
15018 LABEL_114: | 14882 LABEL_114: |
15019 viewparams->bRedrawGameUI = 1; | 14883 viewparams->bRedrawGameUI = 1; |
15020 continue; | 14884 continue; |
15026 Dst.uY = 161; | 14890 Dst.uY = 161; |
15027 Dst.uWidth = 171; | 14891 Dst.uWidth = 171; |
15028 Dst.uHeight = 37; | 14892 Dst.uHeight = 37; |
15029 Dst.pParent = pButton_RestUI_WaitUntilDawn->pParent; | 14893 Dst.pParent = pButton_RestUI_WaitUntilDawn->pParent; |
15030 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14894 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15031 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 15)); | 14895 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15)); |
15032 viewparams->bRedrawGameUI = 1; | 14896 viewparams->bRedrawGameUI = 1; |
15033 Dst.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0); | 14897 Dst.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0); |
15034 Dst.pParent = 0; | 14898 Dst.pParent = 0; |
15035 goto LABEL_134; | 14899 goto LABEL_134; |
15036 } | 14900 } |
15037 if ( v0->str_48 != (char *)1 ) | 14901 if ( pWindow->Hint != (char *)1 ) |
15038 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14902 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15039 v32 = v0->ptr_1C; | 14903 v32 = pWindow->ptr_1C; |
15040 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 16)); | 14904 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16)); |
15041 goto LABEL_138; | 14905 goto LABEL_138; |
15042 } | 14906 } |
15043 if ( v1 == 95 ) | 14907 if ( pWindowType == 95 ) |
15044 { | 14908 { |
15045 if ( v0->str_48 != (char *)1 ) | 14909 if ( pWindow->Hint != (char *)1 ) |
15046 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14910 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15047 v32 = v0->ptr_1C; | 14911 v32 = pWindow->ptr_1C; |
15048 pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 15)); | 14912 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 15)); |
15049 LABEL_138: | 14913 LABEL_138: |
15050 v40 = v0->str_48; | 14914 v40 = pWindow->Hint; |
15051 viewparams->bRedrawGameUI = 1; | 14915 viewparams->bRedrawGameUI = 1; |
15052 if ( v40 && v40 != (char *)1 ) | 14916 if ( v40 && v40 != (char *)1 ) |
15053 ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0); | 14917 ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0); |
15054 v0->Release(); | 14918 pWindow->Release(); |
15055 LABEL_142: | 14919 LABEL_142: |
15056 v41 = pMessageQueue_50CBD0->uNumMessages; | 14920 v41 = pMessageQueue_50CBD0->uNumMessages; |
15057 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 14921 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
15058 goto LABEL_151; | 14922 goto LABEL_151; |
15059 continue; | 14923 continue; |
15060 } | 14924 } |
15061 v14 = v1 - 80; | 14925 v14 = pWindowType - 80; |
15062 if ( v14 ) | 14926 if ( v14 ) |
15063 { | 14927 { |
15064 v15 = v14 - 9; | 14928 v15 = v14 - 9; |
15065 if ( !v15 ) | 14929 if ( !v15 ) |
15066 { | 14930 { |
15067 v0->_415551(0); | 14931 pWindow->DrawMessageBox(0); |
15068 v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); | 14932 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); |
15069 v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); | 14933 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); |
15070 if ( !pKeyActionMap->field_204 ) | 14934 if ( !pKeyActionMap->field_204 ) |
15071 { | 14935 { |
15072 _this.Reset(); | 14936 _this.Reset(); |
15073 v0->Release(); | 14937 pWindow->Release(); |
15074 pEventTimer->Resume(); | 14938 pEventTimer->Resume(); |
15075 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 14939 pCurrentScreen = 0; |
15076 viewparams->bRedrawGameUI = 1; | 14940 viewparams->bRedrawGameUI = 1; |
15077 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); | 14941 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); |
15078 if ( v26 > 0 ) | 14942 if ( v26 > 0 ) |
15079 { | 14943 { |
15080 if ( v26 < 800 ) | 14944 if ( v26 < 800 ) |
15099 continue; | 14963 continue; |
15100 } | 14964 } |
15101 v16 = v15 - 1; | 14965 v16 = v15 - 1; |
15102 if ( !v16 ) | 14966 if ( !v16 ) |
15103 { | 14967 { |
15104 if ( v0->str_48 != (char *)1 ) | 14968 if ( pWindow->Hint != (char *)1 ) |
15105 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 14969 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15106 v22 = (GUIButton *)v0->ptr_1C; | 14970 v22 = (GUIButton *)pWindow->ptr_1C; |
15107 if ( (v22->uX & 0x80000000u) == 0 ) | 14971 if ( (v22->uX & 0x80000000u) == 0 ) |
15108 { | 14972 { |
15109 if ( (signed int)v22->uX <= 640 ) | 14973 if ( (signed int)v22->uX <= 640 ) |
15110 { | 14974 { |
15111 v25 = v22->uY; | 14975 v25 = v22->uY; |
15117 goto LABEL_94; | 14981 goto LABEL_94; |
15118 } | 14982 } |
15119 } | 14983 } |
15120 } | 14984 } |
15121 } | 14985 } |
15122 v23 = v0->str_48; | 14986 v23 = pWindow->Hint; |
15123 viewparams->bRedrawGameUI = 1; | 14987 viewparams->bRedrawGameUI = 1; |
15124 if ( v23 ) | 14988 if ( v23 ) |
15125 { | 14989 { |
15126 v24 = v23 == (char *)1; | 14990 v24 = v23 == (char *)1; |
15127 goto LABEL_82; | 14991 goto LABEL_82; |
15128 } | 14992 } |
15129 LABEL_134: | 14993 LABEL_134: |
15130 v28 = v0; | 14994 v28 = pWindow; |
15131 goto LABEL_110; | 14995 goto LABEL_110; |
15132 } | 14996 } |
15133 v17 = v16 - 1; | 14997 v17 = v16 - 1; |
15134 if ( !v17 ) | 14998 if ( !v17 ) |
15135 { | 14999 { |
15136 if ( v0->str_48 != (char *)1 ) | 15000 if ( pWindow->Hint != (char *)1 ) |
15137 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 15001 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15138 v22 = (GUIButton *)v0->ptr_1C; | 15002 v22 = (GUIButton *)pWindow->ptr_1C; |
15139 v47 = v22->pTextures[1]; | 15003 v47 = v22->pTextures[1]; |
15140 LABEL_94: | 15004 LABEL_94: |
15141 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v47); | 15005 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v47); |
15142 LABEL_80: | 15006 LABEL_80: |
15143 v23 = v0->str_48; | 15007 v23 = pWindow->Hint; |
15144 viewparams->bRedrawGameUI = 1; | 15008 viewparams->bRedrawGameUI = 1; |
15145 if ( v23 ) | 15009 if ( v23 ) |
15146 { | 15010 { |
15147 v24 = v23 == (char *)1; | 15011 v24 = v23 == (char *)1; |
15148 LABEL_82: | 15012 LABEL_82: |
15152 goto LABEL_134; | 15016 goto LABEL_134; |
15153 } | 15017 } |
15154 v18 = v17 - 1; | 15018 v18 = v17 - 1; |
15155 if ( !v18 ) | 15019 if ( !v18 ) |
15156 { | 15020 { |
15157 if ( v0->str_48 != (char *)1 ) | 15021 if ( pWindow->Hint != (char *)1 ) |
15158 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 15022 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15159 v22 = (GUIButton *)v0->ptr_1C; | 15023 v22 = (GUIButton *)pWindow->ptr_1C; |
15160 pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, v22->pTextures[0]); | 15024 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, v22->pTextures[0]); |
15161 goto LABEL_80; | 15025 goto LABEL_80; |
15162 } | 15026 } |
15163 v19 = v18 - 1; | 15027 v19 = v18 - 1; |
15164 if ( !v19 ) | 15028 if ( !v19 ) |
15165 { | 15029 { |
15166 if ( v0->str_48 != (char *)1 ) | 15030 if ( pWindow->Hint != (char *)1 ) |
15167 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 15031 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
15168 pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 16)); | 15032 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 16)); |
15169 viewparams->bRedrawGameUI = 1; | 15033 viewparams->bRedrawGameUI = 1; |
15170 goto LABEL_134; | 15034 goto LABEL_134; |
15171 } | 15035 } |
15172 } | 15036 } |
15173 else | 15037 else |
15174 { | 15038 { |
15175 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 15039 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
15176 if ( ptr_507BD0->field_40 == 1 ) | 15040 if ( ptr_507BD0->field_40 == 1 ) |
15177 { | 15041 { |
15178 ptr_507BD0->_415551(0); | 15042 ptr_507BD0->DrawMessageBox(0); |
15179 ptr_507BD0->DrawText( | 15043 ptr_507BD0->DrawText( |
15180 pFontCreate, | 15044 pFontCreate, |
15181 30, | 15045 30, |
15182 40, | 15046 40, |
15183 v27, | 15047 v27, |
15191 continue; | 15055 continue; |
15192 } | 15056 } |
15193 if ( ptr_507BD0->field_40 == 2 ) | 15057 if ( ptr_507BD0->field_40 == 2 ) |
15194 { | 15058 { |
15195 v29 = pMessageQueue_50CBD0->uNumMessages; | 15059 v29 = pMessageQueue_50CBD0->uNumMessages; |
15196 v0->field_40 = 0; | 15060 pWindow->field_40 = 0; |
15197 if ( (signed int)v29 < 40 ) | 15061 if ( (signed int)v29 < 40 ) |
15198 { | 15062 { |
15199 pMessageQueue_50CBD0->pMessages[v29].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C; | 15063 pMessageQueue_50CBD0->pMessages[v29].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C; |
15200 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 15064 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
15201 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 15065 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
15202 ++pMessageQueue_50CBD0->uNumMessages; | 15066 ++pMessageQueue_50CBD0->uNumMessages; |
15203 } | 15067 } |
15204 pEventTimer->Resume(); | 15068 pEventTimer->Resume(); |
15205 ptr_507BD0->Release(); | 15069 ptr_507BD0->Release(); |
15206 uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; | 15070 pCurrentScreen = 0; |
15207 goto LABEL_114; | 15071 goto LABEL_114; |
15208 } | 15072 } |
15209 if ( ptr_507BD0->field_40 == 3 ) | 15073 if ( ptr_507BD0->field_40 == 3 ) |
15210 { | 15074 { |
15211 v0->field_40 = 0; | 15075 pWindow->field_40 = 0; |
15212 pEventTimer->Resume(); | 15076 pEventTimer->Resume(); |
15213 v28 = ptr_507BD0; | 15077 v28 = ptr_507BD0; |
15214 LABEL_110: | 15078 LABEL_110: |
15215 v28->Release(); | 15079 v28->Release(); |
15216 continue; | 15080 continue; |
15217 } | 15081 } |
15218 } | 15082 } |
15219 } | 15083 } |
15220 else | 15084 else |
15221 { | 15085 { |
15222 if ( v1 == 70 ) | 15086 if ( pWindowType == 70 ) |
15223 { | 15087 { |
15224 sub_41420D_press_esc(); | 15088 sub_41420D_press_esc(); |
15225 continue; | 15089 continue; |
15226 } | 15090 } |
15227 if ( (signed int)v1 > 18 ) | 15091 if ( (signed int)pWindowType > 18 ) |
15228 { | 15092 { |
15229 if ( (signed int)v1 > 25 ) | 15093 if ( (signed int)pWindowType > 25 ) |
15230 { | 15094 { |
15231 v12 = v1 - 26; | 15095 v12 = pWindowType - 26; |
15232 if ( v12 ) | 15096 if ( v12 ) |
15233 { | 15097 { |
15234 v13 = v12 - 4; | 15098 v13 = v12 - 4; |
15235 if ( v13 ) | 15099 if ( v13 ) |
15236 { | 15100 { |
15255 { | 15119 { |
15256 TransitionUI_Draw(); | 15120 TransitionUI_Draw(); |
15257 } | 15121 } |
15258 continue; | 15122 continue; |
15259 } | 15123 } |
15260 if ( v1 != 25 ) | 15124 if ( pWindowType != 25 ) |
15261 { | 15125 { |
15262 v7 = v1 - 19; | 15126 v7 = pWindowType - 19; |
15263 if ( v7 ) | 15127 if ( v7 ) |
15264 { | 15128 { |
15265 v8 = v7 - 1; | 15129 v8 = v7 - 1; |
15266 if ( v8 ) | 15130 if ( v8 ) |
15267 { | 15131 { |
15276 sub_4606FE(); | 15140 sub_4606FE(); |
15277 } | 15141 } |
15278 } | 15142 } |
15279 else | 15143 else |
15280 { | 15144 { |
15281 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) | 15145 if ( pCurrentScreen == 10 ) |
15282 { | 15146 { |
15283 Chest::DrawChestUI((unsigned int)v0->ptr_1C); | 15147 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C); |
15284 } | 15148 } |
15285 else | 15149 else |
15286 { | 15150 { |
15287 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 15 ) | 15151 if ( pCurrentScreen == 15 ) |
15288 { | 15152 { |
15289 pRenderer->ClearZBuffer(0, 479); | 15153 pRenderer->ClearZBuffer(0, 479); |
15290 draw_leather(); | 15154 draw_leather(); |
15291 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 15155 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
15292 pRenderer->DrawTextureIndexed( | 15156 pRenderer->DrawTextureIndexed( |
15322 } | 15186 } |
15323 continue; | 15187 continue; |
15324 } | 15188 } |
15325 goto LABEL_142; | 15189 goto LABEL_142; |
15326 } | 15190 } |
15327 if ( v1 == 18 ) | 15191 if ( pWindowType == 18 ) |
15328 { | 15192 { |
15329 sub_412B58(); | 15193 sub_412B58(); |
15330 } | 15194 } |
15331 else | 15195 else |
15332 { | 15196 { |
15333 if ( (signed int)v1 > 10 ) | 15197 if ( (signed int)pWindowType > 10 ) |
15334 { | 15198 { |
15335 v5 = v1 - 12; | 15199 v5 = pWindowType - 12; |
15336 if ( v5 ) | 15200 if ( v5 ) |
15337 { | 15201 { |
15338 v6 = v5 - 4; | 15202 v6 = v5 - 4; |
15339 if ( v6 ) | 15203 if ( v6 ) |
15340 { | 15204 { |
15350 { | 15214 { |
15351 QuickRefDraw(); | 15215 QuickRefDraw(); |
15352 } | 15216 } |
15353 continue; | 15217 continue; |
15354 } | 15218 } |
15355 if ( v1 != 10 ) | 15219 if ( pWindowType != 10 ) |
15356 { | 15220 { |
15357 v2 = v1 - 3; | 15221 v2 = pWindowType - 3; |
15358 if ( v2 ) | 15222 if ( v2 ) |
15359 { | 15223 { |
15360 v3 = v2 - 1; | 15224 v3 = v2 - 1; |
15361 if ( v3 ) | 15225 if ( v3 ) |
15362 { | 15226 { |
15363 v4 = v3 - 2; | 15227 v4 = v3 - 2; |
15364 if ( v4 ) | 15228 if ( v4 ) |
15365 { | 15229 { |
15366 if ( v4 == 3 ) | 15230 if ( v4 == 3 ) |
15367 DrawSpellbook((unsigned int)v0->ptr_1C); | 15231 DrawSpellbook((unsigned int)pWindow->ptr_1C); |
15368 } | 15232 } |
15369 else | 15233 else |
15370 { | 15234 { |
15371 sub_414F82_DrawGameOptions(); | 15235 sub_414F82_DrawGameOptions(); |
15372 } | 15236 } |
15480 pOut.z = v7; | 15344 pOut.z = v7; |
15481 } | 15345 } |
15482 if ( !v0->CanAct() ) | 15346 if ( !v0->CanAct() ) |
15483 { | 15347 { |
15484 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[427], v0->pName, pGlobalTXT_LocalizationStrings[541]); | 15348 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[427], v0->pName, pGlobalTXT_LocalizationStrings[541]); |
15485 v43.str_48 = pTmpBuf; | 15349 v43.Hint = pTmpBuf; |
15486 v43.uFrameWidth = 384; | 15350 v43.uFrameWidth = 384; |
15487 v43.uFrameHeight = 180; | 15351 v43.uFrameHeight = 180; |
15488 v43.uFrameY = 40; | 15352 v43.uFrameY = 40; |
15489 if ( pMouse->GetCursorPos(&a2)->x <= 320 ) | 15353 if ( pMouse->GetCursorPos(&a2)->x <= 320 ) |
15490 v38 = pMouse->GetCursorPos(&a2)->x + 30; | 15354 v38 = pMouse->GetCursorPos(&a2)->x + 30; |
15491 else | 15355 else |
15492 v38 = pMouse->GetCursorPos(&a2)->x - 414; | 15356 v38 = pMouse->GetCursorPos(&a2)->x - 414; |
15493 v43.uFrameX = v38; | 15357 v43.uFrameX = v38; |
15494 v43._415551(0); | 15358 v43.DrawMessageBox(0); |
15495 return; | 15359 return; |
15496 } | 15360 } |
15497 --pOut.z; | 15361 --pOut.z; |
15498 LOBYTE(v8) = v0->GetActualSkillLevel(PLAYER_SKILL_ALCHEMY); | 15362 LOBYTE(v8) = v0->GetActualSkillLevel(PLAYER_SKILL_ALCHEMY); |
15499 v9 = v8 & 0x3F; | 15363 v9 = v8 & 0x3F; |
15693 ++pMessageQueue_50CBD0->uNumMessages; | 15557 ++pMessageQueue_50CBD0->uNumMessages; |
15694 } | 15558 } |
15695 v42 = (int *)&a2.y; | 15559 v42 = (int *)&a2.y; |
15696 v41 = (int *)&y.y; | 15560 v41 = (int *)&y.y; |
15697 v40 = (int *)&pOut; | 15561 v40 = (int *)&pOut; |
15698 v39.z = pParty->vPosition.y + pParty->sEyelevel; | 15562 v39.z = pParty->vPosition.z + pParty->sEyelevel; |
15699 } | 15563 } |
15700 else | 15564 else |
15701 { | 15565 { |
15702 if ( v51 == 2 ) | 15566 if ( v51 == 2 ) |
15703 { | 15567 { |
15767 ++pMessageQueue_50CBD0->uNumMessages; | 15631 ++pMessageQueue_50CBD0->uNumMessages; |
15768 } | 15632 } |
15769 v42 = (int *)&a2.y; | 15633 v42 = (int *)&a2.y; |
15770 v41 = (int *)&y.y; | 15634 v41 = (int *)&y.y; |
15771 v40 = (int *)&pOut; | 15635 v40 = (int *)&pOut; |
15772 v39.z = pParty->vPosition.y + pParty->sEyelevel; | 15636 v39.z = pParty->vPosition.z + pParty->sEyelevel; |
15773 } | 15637 } |
15774 *(_QWORD *)&v39.x = *(_QWORD *)&pParty->vPosition.x; | 15638 *(_QWORD *)&v39.x = *(_QWORD *)&pParty->vPosition.x; |
15775 Vec3_int_::Rotate(64, pParty->sRotationY, pParty->sRotationX, v39, v40, v41, v42); | 15639 Vec3_int_::Rotate(64, pParty->sRotationY, pParty->sRotationX, v39, v40, v41, v42); |
15776 sub_42F7EB_DropItemAt(0x41Bu, pOut.x, y.y, a2.y, 0, 1, 0, 0, 0); | 15640 sub_42F7EB_DropItemAt(0x41Bu, pOut.x, y.y, a2.y, 0, 1, 0, 0, 0); |
15777 if ( dword_4E455C ) | 15641 if ( dword_4E455C ) |
15896 lpsz = v7; | 15760 lpsz = v7; |
15897 if ( !v7 ) | 15761 if ( !v7 ) |
15898 { | 15762 { |
15899 lpsz = (LPCSTR)*(&pNPCStats->field_13A64 + 5 * v6->uProfession); | 15763 lpsz = (LPCSTR)*(&pNPCStats->field_13A64 + 5 * v6->uProfession); |
15900 if ( !lpsz ) | 15764 if ( !lpsz ) |
15901 lpsz = nullstring; | 15765 lpsz = ""; |
15902 } | 15766 } |
15903 a1.str_48 = 0; | 15767 a1.Hint = 0; |
15904 a1.uFrameX = 38; | 15768 a1.uFrameX = 38; |
15905 a1.uFrameY = 60; | 15769 a1.uFrameY = 60; |
15906 a1.uFrameWidth = 276; | 15770 a1.uFrameWidth = 276; |
15907 a1.uFrameZ = 313; | 15771 a1.uFrameZ = 313; |
15908 a1.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &a1, 0, 0) | 15772 a1.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &a1, 0, 0) |
15910 + 24; | 15774 + 24; |
15911 if ( (signed int)a1.uFrameHeight < 130 ) | 15775 if ( (signed int)a1.uFrameHeight < 130 ) |
15912 a1.uFrameHeight = 130; | 15776 a1.uFrameHeight = 130; |
15913 a1.uFrameWidth = 400; | 15777 a1.uFrameWidth = 400; |
15914 a1.uFrameZ = a1.uFrameX + 399; | 15778 a1.uFrameZ = a1.uFrameX + 399; |
15915 a1._415551(0); | 15779 a1.DrawMessageBox(0); |
15916 sprintfex(pTmpBuf2, "NPC%03d", v6->uPortraitID); | 15780 sprintfex(pTmpBuf2, "NPC%03d", v6->uPortraitID); |
15917 v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE); | 15781 v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE); |
15918 pRenderer->DrawTextureIndexed( | 15782 pRenderer->DrawTextureIndexed( |
15919 a1.uFrameX + 22, | 15783 a1.uFrameX + 22, |
15920 a1.uFrameY + 36, | 15784 a1.uFrameY + 36, |
15978 char *v29; // [sp+68h] [bp-10h]@33 | 15842 char *v29; // [sp+68h] [bp-10h]@33 |
15979 float v30; // [sp+6Ch] [bp-Ch]@33 | 15843 float v30; // [sp+6Ch] [bp-Ch]@33 |
15980 unsigned int pX; // [sp+70h] [bp-8h]@3 | 15844 unsigned int pX; // [sp+70h] [bp-8h]@3 |
15981 unsigned int pY; // [sp+74h] [bp-4h]@3 | 15845 unsigned int pY; // [sp+74h] [bp-4h]@3 |
15982 | 15846 |
15983 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 ) | 15847 if ( pCurrentScreen == 16 ) |
15984 return; | 15848 return; |
15985 if ( _this ) | 15849 if ( _this ) |
15986 { | 15850 { |
15987 pX = _this->x; | 15851 pX = _this->x; |
15988 pY = _this->y; | 15852 pY = _this->y; |
16017 ++v1; | 15881 ++v1; |
16018 } | 15882 } |
16019 while ( v1 < 4 ); | 15883 while ( v1 < 4 ); |
16020 } | 15884 } |
16021 pEventTimer->Pause(); | 15885 pEventTimer->Pause(); |
16022 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 10 ) | 15886 if ( pCurrentScreen <= 10 ) |
16023 { | 15887 { |
16024 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 10 ) | 15888 if ( pCurrentScreen == 10 ) |
16025 { | 15889 { |
15890 __debugbreak(); | |
16026 if ( !pPlayers[uActiveCharacter]->CanAct() ) | 15891 if ( !pPlayers[uActiveCharacter]->CanAct() ) |
16027 { | 15892 { |
16028 sprintfex( | 15893 sprintfex( |
16029 pTmpBuf, | 15894 pTmpBuf, |
16030 pGlobalTXT_LocalizationStrings[427], | 15895 pGlobalTXT_LocalizationStrings[427], |
16031 pPlayers[uActiveCharacter]->pName, | 15896 pPlayers[uActiveCharacter]->pName, |
16032 pGlobalTXT_LocalizationStrings[541]); | 15897 pGlobalTXT_LocalizationStrings[541]); |
16033 a1.str_48 = pTmpBuf; | 15898 a1.Hint = pTmpBuf; |
16034 a1.uFrameWidth = 384; | 15899 a1.uFrameWidth = 384; |
16035 a1.uFrameHeight = 180; | 15900 a1.uFrameHeight = 180; |
16036 a1.uFrameY = 40; | 15901 a1.uFrameY = 40; |
16037 if ( (signed int)pX <= 320 ) | 15902 if ( (signed int)pX <= 320 ) |
16038 v10 = pX + 30; | 15903 v10 = pX + 30; |
16052 + 2662 * (unsigned int)ptr_507BB8->ptr_1C | 15917 + 2662 * (unsigned int)ptr_507BB8->ptr_1C |
16053 + 3)); | 15918 + 3)); |
16054 } | 15919 } |
16055 else | 15920 else |
16056 { | 15921 { |
16057 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions ) | 15922 if ( pCurrentScreen ) |
16058 { | 15923 { |
16059 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 3 ) | 15924 if ( pCurrentScreen != 3 ) |
16060 { | 15925 { |
16061 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 7 ) | 15926 if ( pCurrentScreen != 7 ) |
16062 { | 15927 { |
16063 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 8 ) | 15928 if ( pCurrentScreen == 8 ) |
16064 { | 15929 { |
16065 if ( dword_507B00_spell_info_to_draw_in_popup ) | 15930 if ( dword_507B00_spell_info_to_draw_in_popup ) |
16066 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); | 15931 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); |
16067 } | 15932 } |
16068 goto LABEL_132; | 15933 goto LABEL_132; |
16069 } | 15934 } |
16070 LABEL_119: | 15935 LABEL_119: |
16071 if ( (signed int)pX > 467 | 15936 if ( (signed int)pX > 467 |
16072 && uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 14 ) | 15937 && pCurrentScreen != 14 ) |
16073 { | 15938 { |
16074 LABEL_126: | 15939 LABEL_126: |
16075 identify_item(); | 15940 identify_item(); |
16076 goto LABEL_132; | 15941 goto LABEL_132; |
16077 } | 15942 } |
16096 if ( !dword_506364 | 15961 if ( !dword_506364 |
16097 || (signed int)pX < (signed int)pViewport->uViewportX | 15962 || (signed int)pX < (signed int)pViewport->uViewportX |
16098 || (signed int)pX > (signed int)pViewport->uViewportZ | 15963 || (signed int)pX > (signed int)pViewport->uViewportZ |
16099 || (signed int)pY < (signed int)pViewport->uViewportY | 15964 || (signed int)pY < (signed int)pViewport->uViewportY |
16100 || (signed int)pY > (signed int)pViewport->uViewportW | 15965 || (signed int)pY > (signed int)pViewport->uViewportW |
16101 || (v2 = (char *)sub_444564(), (a1.str_48 = v2) == 0) ) | 15966 || (v2 = (char *)sub_444564(), (a1.Hint = v2) == 0) ) |
16102 goto LABEL_132; | 15967 goto LABEL_132; |
16103 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); | 15968 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); |
16104 v27 = v30 + 6.7553994e15; | 15969 v27 = v30 + 6.7553994e15; |
16105 v29 = (char *)LODWORD(v27); | 15970 v29 = (char *)LODWORD(v27); |
16106 a1.uFrameWidth = LODWORD(v27); | 15971 a1.uFrameWidth = LODWORD(v27); |
16107 a1.uFrameX = pX + 5; | 15972 a1.uFrameX = pX + 5; |
16108 a1.uFrameY = pY + 5; | 15973 a1.uFrameY = pY + 5; |
16109 goto LABEL_41; | 15974 goto LABEL_41; |
16110 } | 15975 } |
16111 if ( (GetCurrentMenuID() & 0x80000000u) == 0 ) | 15976 if (GetCurrentMenuID() > 0) |
16112 goto LABEL_132; | 15977 goto LABEL_132; |
15978 | |
16113 if ( (signed int)pY > (signed int)pViewport->uViewportW ) | 15979 if ( (signed int)pY > (signed int)pViewport->uViewportW ) |
16114 { | 15980 { |
16115 a1.ptr_1C = (void *)((signed int)pX / 118); | 15981 a1.ptr_1C = (void *)((signed int)pX / 118); |
16116 if ( (signed int)pX / 118 < 4 ) | 15982 if ( (signed int)pX / 118 < 4 ) |
16117 { | 15983 { |
16118 a1.str_48 = 0; | 15984 a1.Hint = 0; |
16119 a1.uFrameWidth = 400; | 15985 a1.uFrameWidth = 400; |
16120 a1.uFrameHeight = 200; | 15986 a1.uFrameHeight = 200; |
16121 a1.uFrameX = 38; | 15987 a1.uFrameX = 38; |
16122 a1.uFrameY = 60; | 15988 a1.uFrameY = 60; |
16123 pAudioPlayer->StopChannels(-1, -1); | 15989 pAudioPlayer->StopChannels(-1, -1); |
16124 a1._41D3B7(); | 15990 a1.DrawQuickCharRecord(); |
16125 } | 15991 } |
16126 goto LABEL_132; | 15992 goto LABEL_132; |
16127 } | 15993 } |
16128 if ( (signed int)pX > (signed int)pViewport->uViewportZ ) | 15994 if ( (signed int)pX > (signed int)pViewport->uViewportZ ) |
16129 { | 15995 { |
16130 if ( (signed int)pY >= 130 ) | 15996 if ( (signed int)pY >= 130 ) |
16131 { | 15997 { |
16132 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) | 15998 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) |
16133 { | 15999 { |
16134 a1.str_48 = 0; | 16000 a1.Hint = 0; |
16135 a1.uFrameWidth = 400; | 16001 a1.uFrameWidth = 400; |
16136 a1.uFrameHeight = 200; | 16002 a1.uFrameHeight = 200; |
16137 a1.uFrameX = 38; | 16003 a1.uFrameX = 38; |
16138 a1.uFrameY = 60; | 16004 a1.uFrameY = 60; |
16139 pAudioPlayer->StopChannels(-1, -1); | 16005 pAudioPlayer->StopChannels(-1, -1); |
16153 v3 = 0; | 16019 v3 = 0; |
16154 } | 16020 } |
16155 sub_416B01(v3); | 16021 sub_416B01(v3); |
16156 goto LABEL_132; | 16022 goto LABEL_132; |
16157 } | 16023 } |
16158 a1.str_48 = _4443D5_GetMinimapRightClickText(); | 16024 a1.Hint = _4443D5_GetMinimapRightClickText(); |
16159 a1.uFrameWidth = 256; | 16025 a1.uFrameWidth = 256; |
16160 a1.uFrameX = 130; | 16026 a1.uFrameX = 130; |
16161 a1.uFrameY = 140; | 16027 a1.uFrameY = 140; |
16162 LABEL_41: | 16028 LABEL_41: |
16163 a1.uFrameHeight = 64; | 16029 a1.uFrameHeight = 64; |
16164 pAudioPlayer->StopChannels(-1, -1); | 16030 pAudioPlayer->StopChannels(-1, -1); |
16165 LABEL_42: | 16031 LABEL_42: |
16166 a1._415551(0); | 16032 a1.DrawMessageBox(0); |
16167 goto LABEL_132; | 16033 goto LABEL_132; |
16168 } | 16034 } |
16169 a1.str_48 = 0; | 16035 a1.Hint = 0; |
16170 a1.uFrameWidth = 320; | 16036 a1.uFrameWidth = 320; |
16171 a1.uFrameHeight = 320; | 16037 a1.uFrameHeight = 320; |
16172 v4 = pX - 350; | 16038 v4 = pX - 350; |
16173 if ( (signed int)pX <= 320 ) | 16039 if ( (signed int)pX <= 320 ) |
16174 v4 = pX + 30; | 16040 v4 = pX + 30; |
16183 { | 16049 { |
16184 if ( (v6 & 7) == 3 ) | 16050 if ( (v6 & 7) == 3 ) |
16185 { | 16051 { |
16186 if ( pRenderer->uNumSceneBegins ) | 16052 if ( pRenderer->uNumSceneBegins ) |
16187 { | 16053 { |
16188 a1._415551(1); | 16054 a1.DrawMessageBox(1); |
16189 MonsterPopup_Draw(v6 >> 3, &a1); | 16055 MonsterPopup_Draw(v6 >> 3, &a1); |
16190 } | 16056 } |
16191 else | 16057 else |
16192 { | 16058 { |
16193 pRenderer->BeginScene(); | 16059 pRenderer->BeginScene(); |
16194 a1._415551(1); | 16060 a1.DrawMessageBox(1); |
16195 MonsterPopup_Draw(v6 >> 3, &a1); | 16061 MonsterPopup_Draw(v6 >> 3, &a1); |
16196 pRenderer->EndScene(); | 16062 pRenderer->EndScene(); |
16197 } | 16063 } |
16198 } | 16064 } |
16199 goto LABEL_132; | 16065 goto LABEL_132; |
16204 v8 = &pLayingItems[v7].stru_24; | 16070 v8 = &pLayingItems[v7].stru_24; |
16205 } | 16071 } |
16206 GameUI_DrawItemInfo(v8); | 16072 GameUI_DrawItemInfo(v8); |
16207 goto LABEL_132; | 16073 goto LABEL_132; |
16208 } | 16074 } |
16209 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 13 ) | 16075 if ( pCurrentScreen == 13 ) |
16210 { | 16076 { |
16211 if ( (signed int)pY < 345 && (signed int)pX < 469 ) | 16077 if ( (signed int)pY < 345 && (signed int)pX < 469 ) |
16212 sub_4B1A2D(); | 16078 sub_4B1A2D(); |
16213 goto LABEL_132; | 16079 goto LABEL_132; |
16214 } | 16080 } |
16215 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 13 ) | 16081 if ( pCurrentScreen <= 13 ) |
16216 goto LABEL_132; | 16082 goto LABEL_132; |
16217 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions <= 15 ) | 16083 if ( pCurrentScreen <= 15 ) |
16218 goto LABEL_119; | 16084 goto LABEL_119; |
16219 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions != 21 ) | 16085 if ( pCurrentScreen != 21 ) |
16220 { | 16086 { |
16221 v11 = uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 23; | 16087 v11 = pCurrentScreen == 23; |
16222 goto LABEL_125; | 16088 goto LABEL_125; |
16223 } | 16089 } |
16224 a1.str_48 = 0; | 16090 a1.Hint = 0; |
16225 v12 = pGUIWindow_CurrentMenu->pControlsHead; | 16091 v12 = pGUIWindow_CurrentMenu->pControlsHead; |
16226 if ( !v12 ) | 16092 if ( !v12 ) |
16227 goto LABEL_132; | 16093 goto LABEL_132; |
16228 v13 = pY; | 16094 v13 = pY; |
16229 v14 = v29; | 16095 v14 = v29; |
16238 v15 = v12->uControlID; | 16104 v15 = v12->uControlID; |
16239 if ( v15 <= 65 ) | 16105 if ( v15 <= 65 ) |
16240 { | 16106 { |
16241 if ( v15 == 65 ) | 16107 if ( v15 == 65 ) |
16242 { | 16108 { |
16243 a1.str_48 = pClassDescriptions[v12->uControlParam]; | 16109 a1.Hint = pClassDescriptions[v12->uControlParam]; |
16244 v14 = pClassNames[v12->uControlParam]; | 16110 v14 = pClassNames[v12->uControlParam]; |
16245 } | 16111 } |
16246 else | 16112 else |
16247 { | 16113 { |
16248 if ( v15 ) | 16114 if ( v15 ) |
16256 if ( v17 == 1 ) | 16122 if ( v17 == 1 ) |
16257 { | 16123 { |
16258 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder( | 16124 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder( |
16259 v12->uControlParam + 4); | 16125 v12->uControlParam + 4); |
16260 v14 = pSkillNames[v18]; | 16126 v14 = pSkillNames[v18]; |
16261 a1.str_48 = pSkillDesc[v18]; | 16127 a1.Hint = pSkillDesc[v18]; |
16262 v13 = pY; | 16128 v13 = pY; |
16263 } | 16129 } |
16264 goto LABEL_117; | 16130 goto LABEL_117; |
16265 } | 16131 } |
16266 v14 = pGlobalTXT_LocalizationStrings[668]; | 16132 v14 = pGlobalTXT_LocalizationStrings[668]; |
16271 v14 = pGlobalTXT_LocalizationStrings[670]; | 16137 v14 = pGlobalTXT_LocalizationStrings[670]; |
16272 v19 = pGlobalTXT_LocalizationStrings[671]; | 16138 v19 = pGlobalTXT_LocalizationStrings[671]; |
16273 } | 16139 } |
16274 goto LABEL_116; | 16140 goto LABEL_116; |
16275 } | 16141 } |
16276 a1.str_48 = pAttributeDescriptions[(signed int)v12->uControlParam % 7]; | 16142 a1.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7]; |
16277 v14 = aAttributeNames[(signed int)v12->uControlParam % 7]; | 16143 v14 = aAttributeNames[(signed int)v12->uControlParam % 7]; |
16278 } | 16144 } |
16279 goto LABEL_117; | 16145 goto LABEL_117; |
16280 } | 16146 } |
16281 if ( v15 == 66 ) | 16147 if ( v15 == 66 ) |
16303 { | 16169 { |
16304 v20 = v12->uControlParam; | 16170 v20 = v12->uControlParam; |
16305 v14 = pParty->pPlayers[v20].pName; | 16171 v14 = pParty->pPlayers[v20].pName; |
16306 v19 = pClassDescriptions[pParty->pPlayers[v20].uClass]; | 16172 v19 = pClassDescriptions[pParty->pPlayers[v20].uClass]; |
16307 LABEL_116: | 16173 LABEL_116: |
16308 a1.str_48 = v19; | 16174 a1.Hint = v19; |
16309 goto LABEL_117; | 16175 goto LABEL_117; |
16310 } | 16176 } |
16311 goto LABEL_117; | 16177 goto LABEL_117; |
16312 } | 16178 } |
16313 v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72); | 16179 v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72); |
16315 pY = v21; | 16181 pY = v21; |
16316 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 ) | 16182 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 ) |
16317 goto LABEL_117; | 16183 goto LABEL_117; |
16318 v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21); | 16184 v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21); |
16319 strcpy(pTmpBuf2, v22); | 16185 strcpy(pTmpBuf2, v22); |
16320 a1.str_48 = pTmpBuf2; | 16186 a1.Hint = pTmpBuf2; |
16321 v14 = pSkillNames[pY]; | 16187 v14 = pSkillNames[pY]; |
16322 LABEL_112: | 16188 LABEL_112: |
16323 v23 = a1.str_48; | 16189 v23 = a1.Hint; |
16324 if ( a1.str_48 ) | 16190 if ( a1.Hint ) |
16325 { | 16191 { |
16326 v24 = a1.str_48; | 16192 v24 = a1.Hint; |
16327 a1.str_48 = 0; | 16193 a1.Hint = 0; |
16328 a1.uFrameWidth = 384; | 16194 a1.uFrameWidth = 384; |
16329 a1.uFrameHeight = 256; | 16195 a1.uFrameHeight = 256; |
16330 a1.uFrameX = 128; | 16196 a1.uFrameX = 128; |
16331 a1.uFrameY = 40; | 16197 a1.uFrameY = 40; |
16332 a1.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &a1, 24, 0) | 16198 a1.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &a1, 24, 0) |
16333 + 2 * LOBYTE(pFontLucida->uFontHeight) | 16199 + 2 * LOBYTE(pFontLucida->uFontHeight) |
16334 + 24; | 16200 + 24; |
16335 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | 16201 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; |
16336 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1; | 16202 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1; |
16337 a1._415551(0); | 16203 a1.DrawMessageBox(0); |
16338 a1.uFrameX += 12; | 16204 a1.uFrameX += 12; |
16339 a1.uFrameWidth -= 24; | 16205 a1.uFrameWidth -= 24; |
16340 a1.uFrameY += 12; | 16206 a1.uFrameY += 12; |
16341 a1.uFrameHeight -= 12; | 16207 a1.uFrameHeight -= 12; |
16342 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | 16208 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; |
16368 int v11; // ecx@52 | 16234 int v11; // ecx@52 |
16369 unsigned int pX; // [sp+14h] [bp-8h]@7 | 16235 unsigned int pX; // [sp+14h] [bp-8h]@7 |
16370 unsigned int pY; // [sp+18h] [bp-4h]@7 | 16236 unsigned int pY; // [sp+18h] [bp-4h]@7 |
16371 | 16237 |
16372 pXY_ = pXY; | 16238 pXY_ = pXY; |
16373 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions == 16 | 16239 if ( pCurrentScreen == 16 |
16374 || sub_4637E0_is_there_popup_onscreen() ) | 16240 || sub_4637E0_is_there_popup_onscreen() ) |
16375 return; | 16241 return; |
16376 if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 ) | 16242 if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 ) |
16377 { | 16243 { |
16378 sub_4452BB(); | 16244 sub_4452BB(); |
16389 { | 16255 { |
16390 pMouse->GetClickPos(&pX, &pY); | 16256 pMouse->GetClickPos(&pX, &pY); |
16391 y = pY; | 16257 y = pY; |
16392 x = pX; | 16258 x = pX; |
16393 } | 16259 } |
16394 if ( uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions | 16260 if ( pCurrentScreen |
16395 || !dword_507B98_ctrl_pressed ) | 16261 || !dword_507B98_ctrl_pressed ) |
16396 goto LABEL_30; | 16262 goto LABEL_30; |
16397 v4 = GetCurrentMenuID(); | 16263 v4 = GetCurrentMenuID(); |
16398 x = pX; | 16264 x = pX; |
16399 if ( (v4 & 0x80000000u) == 0 | 16265 if ( (v4 & 0x80000000u) == 0 |
16526 pArcomageGame->stru1.field_0 = 8; | 16392 pArcomageGame->stru1.field_0 = 8; |
16527 } | 16393 } |
16528 } | 16394 } |
16529 | 16395 |
16530 //----- (004178FE) -------------------------------------------------------- | 16396 //----- (004178FE) -------------------------------------------------------- |
16531 unsigned int __fastcall sub_4178FE(signed int a1, signed int a2) | 16397 unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2) |
16532 { | 16398 { |
16533 unsigned __int16 v2; // dx@2 | 16399 unsigned __int16 v2; // dx@2 |
16534 unsigned __int16 v3; // cx@2 | 16400 unsigned __int16 v3; // cx@2 |
16535 int v5; // eax@5 | 16401 int v5; // eax@5 |
16536 unsigned __int16 v6; // [sp-4h] [bp-8h]@2 | 16402 unsigned __int16 v6; // [sp-4h] [bp-8h]@2 |
16623 Dst.uFrameX = 128; | 16489 Dst.uFrameX = 128; |
16624 Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30; | 16490 Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30; |
16625 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(v2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; | 16491 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(v2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; |
16626 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 16492 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
16627 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; | 16493 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; |
16628 Dst._415551(0); | 16494 Dst.DrawMessageBox(0); |
16629 Dst.uFrameX += 12; | 16495 Dst.uFrameX += 12; |
16630 Dst.uFrameWidth -= 24; | 16496 Dst.uFrameWidth -= 24; |
16631 Dst.uFrameY += 12; | 16497 Dst.uFrameY += 12; |
16632 Dst.uFrameHeight -= 12; | 16498 Dst.uFrameHeight -= 12; |
16633 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; | 16499 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; |
17284 strcat(pTmpBuf, pTmpBuf2); | 17150 strcat(pTmpBuf, pTmpBuf2); |
17285 if ( pPlayer->uSkillPoints ) | 17151 if ( pPlayer->uSkillPoints ) |
17286 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 17152 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); |
17287 else | 17153 else |
17288 v4 = 0xFFFFu; | 17154 v4 = 0xFFFFu; |
17289 sprintfex(pTmpBuf2, &byte_4E2F14, pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints); | 17155 sprintfex(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints); |
17290 strcat(pTmpBuf, pTmpBuf2); | 17156 strcat(pTmpBuf, pTmpBuf2); |
17291 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0); | 17157 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0); |
17292 v5 = pPlayer->GetBaseStrength(); | 17158 v5 = pPlayer->GetBaseStrength(); |
17293 v6 = pPlayer->GetActualMight(); | 17159 v6 = pPlayer->GetActualMight(); |
17294 v7 = pPlayer->GetBaseStrength(); | 17160 v7 = pPlayer->GetBaseStrength(); |
17295 v8 = pPlayer->GetActualMight(); | 17161 v8 = pPlayer->GetActualMight(); |
17296 v9 = sub_4178FE(v8, v7); | 17162 v9 = UI_GetHealthManaStringColor(v8, v7); |
17297 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5); | 17163 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5); |
17298 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0); | 17164 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0); |
17299 v10 = LOBYTE(pFontArrus->uFontHeight) + 51; | 17165 v10 = LOBYTE(pFontArrus->uFontHeight) + 51; |
17300 v11 = pPlayer->GetBaseIntelligence(); | 17166 v11 = pPlayer->GetBaseIntelligence(); |
17301 v12 = pPlayer->GetActualIntelligence(); | 17167 v12 = pPlayer->GetActualIntelligence(); |
17302 v13 = pPlayer->GetBaseIntelligence(); | 17168 v13 = pPlayer->GetBaseIntelligence(); |
17303 v14 = pPlayer->GetActualIntelligence(); | 17169 v14 = pPlayer->GetActualIntelligence(); |
17304 v15 = sub_4178FE(v14, v13); | 17170 v15 = UI_GetHealthManaStringColor(v14, v13); |
17305 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11); | 17171 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11); |
17306 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0); | 17172 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0); |
17307 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2; | 17173 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2; |
17308 v17 = pPlayer->GetBaseWillpower(); | 17174 v17 = pPlayer->GetBaseWillpower(); |
17309 v18 = pPlayer->GetActualWillpower(); | 17175 v18 = pPlayer->GetActualWillpower(); |
17310 v19 = pPlayer->GetBaseWillpower(); | 17176 v19 = pPlayer->GetBaseWillpower(); |
17311 v20 = pPlayer->GetActualWillpower(); | 17177 v20 = pPlayer->GetActualWillpower(); |
17312 v21 = sub_4178FE(v20, v19); | 17178 v21 = UI_GetHealthManaStringColor(v20, v19); |
17313 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17); | 17179 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17); |
17314 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0); | 17180 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0); |
17315 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2; | 17181 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2; |
17316 v23 = pPlayer->GetBaseEndurance(); | 17182 v23 = pPlayer->GetBaseEndurance(); |
17317 v24 = pPlayer->GetActualEndurance(); | 17183 v24 = pPlayer->GetActualEndurance(); |
17318 v25 = pPlayer->GetBaseEndurance(); | 17184 v25 = pPlayer->GetBaseEndurance(); |
17319 v26 = pPlayer->GetActualEndurance(); | 17185 v26 = pPlayer->GetActualEndurance(); |
17320 v27 = sub_4178FE(v26, v25); | 17186 v27 = UI_GetHealthManaStringColor(v26, v25); |
17321 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23); | 17187 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23); |
17322 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0); | 17188 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0); |
17323 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2; | 17189 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2; |
17324 v29 = pPlayer->GetBaseAccuracy(); | 17190 v29 = pPlayer->GetBaseAccuracy(); |
17325 v30 = pPlayer->GetActualAccuracy(); | 17191 v30 = pPlayer->GetActualAccuracy(); |
17326 v31 = pPlayer->GetBaseAccuracy(); | 17192 v31 = pPlayer->GetBaseAccuracy(); |
17327 v32 = pPlayer->GetActualAccuracy(); | 17193 v32 = pPlayer->GetActualAccuracy(); |
17328 v33 = sub_4178FE(v32, v31); | 17194 v33 = UI_GetHealthManaStringColor(v32, v31); |
17329 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29); | 17195 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29); |
17330 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0); | 17196 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0); |
17331 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2; | 17197 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2; |
17332 v35 = pPlayer->GetBaseSpeed(); | 17198 v35 = pPlayer->GetBaseSpeed(); |
17333 v36 = pPlayer->GetActualSpeed(); | 17199 v36 = pPlayer->GetActualSpeed(); |
17334 v37 = pPlayer->GetBaseSpeed(); | 17200 v37 = pPlayer->GetBaseSpeed(); |
17335 v38 = pPlayer->GetActualSpeed(); | 17201 v38 = pPlayer->GetActualSpeed(); |
17336 v39 = sub_4178FE(v38, v37); | 17202 v39 = UI_GetHealthManaStringColor(v38, v37); |
17337 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35); | 17203 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35); |
17338 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0); | 17204 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0); |
17339 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2; | 17205 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2; |
17340 v41 = pPlayer->GetBaseLuck(); | 17206 v41 = pPlayer->GetBaseLuck(); |
17341 v42 = pPlayer->GetActualLuck(); | 17207 v42 = pPlayer->GetActualLuck(); |
17342 v43 = pPlayer->GetBaseLuck(); | 17208 v43 = pPlayer->GetBaseLuck(); |
17343 v44 = pPlayer->GetActualLuck(); | 17209 v44 = pPlayer->GetActualLuck(); |
17344 v45 = sub_4178FE(v44, v43); | 17210 v45 = UI_GetHealthManaStringColor(v44, v43); |
17345 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41); | 17211 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41); |
17346 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0); | 17212 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0); |
17347 a2 = "%s"; | 17213 a2 = "%s"; |
17348 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5; | 17214 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5; |
17349 if ( pPlayer->GetMaxHealth() >= 1000 ) | 17215 if ( pPlayer->GetMaxHealth() >= 1000 ) |
17350 a2 = (const char *)&unk_4E2EB8; | 17216 a2 = (const char *)&unk_4E2EB8; |
17351 v47 = pPlayer->GetMaxHealth(); | 17217 v47 = pPlayer->GetMaxHealth(); |
17352 v48 = pPlayer->sHealth; | 17218 v48 = pPlayer->sHealth; |
17353 v49 = pPlayer->GetMaxHealth(); | 17219 v49 = pPlayer->GetMaxHealth(); |
17354 v50 = sub_4178FE(pPlayer->sHealth, v49); | 17220 v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49); |
17355 sprintfex(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47); | 17221 sprintfex(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47); |
17356 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0); | 17222 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0); |
17357 a2a = "%s"; | 17223 a2a = "%s"; |
17358 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2; | 17224 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2; |
17359 if ( pPlayer->GetMaxMana() >= 1000 ) | 17225 if ( pPlayer->GetMaxMana() >= 1000 ) |
17360 a2a = (const char *)&unk_4E2EB8; | 17226 a2a = (const char *)&unk_4E2EB8; |
17361 v51 = pPlayer->GetMaxMana(); | 17227 v51 = pPlayer->GetMaxMana(); |
17362 v52 = pPlayer->sMana; | 17228 v52 = pPlayer->sMana; |
17363 v53 = pPlayer->GetMaxMana(); | 17229 v53 = pPlayer->GetMaxMana(); |
17364 v54 = sub_4178FE(pPlayer->sMana, v53); | 17230 v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53); |
17365 sprintfex(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51); | 17231 sprintfex(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51); |
17366 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0); | 17232 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0); |
17367 v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2; | 17233 v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2; |
17368 v56 = pPlayer->GetBaseAC(); | 17234 v56 = pPlayer->GetBaseAC(); |
17369 v57 = pPlayer->GetActualAC(); | 17235 v57 = pPlayer->GetActualAC(); |
17370 v58 = pPlayer->GetBaseAC(); | 17236 v58 = pPlayer->GetBaseAC(); |
17371 v59 = pPlayer->GetActualAC(); | 17237 v59 = pPlayer->GetActualAC(); |
17372 v60 = sub_4178FE(v59, v58); | 17238 v60 = UI_GetHealthManaStringColor(v59, v58); |
17373 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56); | 17239 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56); |
17374 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0); | 17240 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0); |
17375 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2; | 17241 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2; |
17376 v62 = pPlayer->GetMajorConditionIdx(); | 17242 v62 = pPlayer->GetMajorConditionIdx(); |
17377 v63 = aCharacterConditionNames[v62]; | 17243 v63 = aCharacterConditionNames[v62]; |
17388 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v65, 0, pTmpBuf, 226, 0); | 17254 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v65, 0, pTmpBuf, 226, 0); |
17389 v68 = pPlayer->GetBaseAge(); | 17255 v68 = pPlayer->GetBaseAge(); |
17390 v69 = pPlayer->GetActualAge(); | 17256 v69 = pPlayer->GetActualAge(); |
17391 v70 = pPlayer->GetBaseAge(); | 17257 v70 = pPlayer->GetBaseAge(); |
17392 v71 = pPlayer->GetActualAge(); | 17258 v71 = pPlayer->GetActualAge(); |
17393 v72 = sub_4178FE(v71, v70); | 17259 v72 = UI_GetHealthManaStringColor(v71, v70); |
17394 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68); | 17260 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68); |
17395 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0); | 17261 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0); |
17396 a2b = "%s"; | 17262 a2b = "%s"; |
17397 uYa = LOBYTE(pFontArrus->uFontHeight) + 48; | 17263 uYa = LOBYTE(pFontArrus->uFontHeight) + 48; |
17398 if ( pPlayer->GetBaseLevel() > 99 ) | 17264 if ( pPlayer->GetBaseLevel() > 99 ) |
17399 a2b = format_4E2E68; | 17265 a2b = format_4E2E68; |
17400 v73 = pPlayer->GetBaseLevel(); | 17266 v73 = pPlayer->GetBaseLevel(); |
17401 v74 = pPlayer->GetActualLevel(); | 17267 v74 = pPlayer->GetActualLevel(); |
17402 v75 = pPlayer->GetBaseLevel(); | 17268 v75 = pPlayer->GetBaseLevel(); |
17403 v76 = pPlayer->GetActualLevel(); | 17269 v76 = pPlayer->GetActualLevel(); |
17404 v77 = sub_4178FE(v76, v75); | 17270 v77 = UI_GetHealthManaStringColor(v76, v75); |
17405 sprintfex(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73); | 17271 sprintfex(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73); |
17406 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0); | 17272 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0); |
17407 uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2; | 17273 uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2; |
17408 if ( (signed __int64)pPlayer->uExperience <= 9999999 ) | 17274 if ( (signed __int64)pPlayer->uExperience <= 9999999 ) |
17409 v78 = pGlobalTXT_LocalizationStrings[83]; | 17275 v78 = pGlobalTXT_LocalizationStrings[83]; |
17435 v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); | 17301 v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); |
17436 v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); | 17302 v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); |
17437 if ( v131 > 99 || v90 > 99 ) | 17303 if ( v131 > 99 || v90 > 99 ) |
17438 a2c = format_4E2E68; | 17304 a2c = format_4E2E68; |
17439 v91 = v90; | 17305 v91 = v90; |
17440 v92 = sub_4178FE(v131, v90); | 17306 v92 = UI_GetHealthManaStringColor(v131, v90); |
17441 sprintfex(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91); | 17307 sprintfex(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91); |
17442 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0); | 17308 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0); |
17443 a2d = format_4E2E10; | 17309 a2d = format_4E2E10; |
17444 uYd = uYc + LOBYTE(pFontArrus->uFontHeight) - 2; | 17310 uYd = uYc + LOBYTE(pFontArrus->uFontHeight) - 2; |
17445 v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); | 17311 v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); |
17446 v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); | 17312 v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); |
17447 if ( v132 > 99 || v93 > 99 ) | 17313 if ( v132 > 99 || v93 > 99 ) |
17448 a2d = format_4E2E68; | 17314 a2d = format_4E2E68; |
17449 v94 = v93; | 17315 v94 = v93; |
17450 v95 = sub_4178FE(v132, v93); | 17316 v95 = UI_GetHealthManaStringColor(v132, v93); |
17451 sprintfex(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94); | 17317 sprintfex(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94); |
17452 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0); | 17318 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0); |
17453 a2e = format_4E2E10; | 17319 a2e = format_4E2E10; |
17454 uYe = uYd + LOBYTE(pFontArrus->uFontHeight) - 2; | 17320 uYe = uYd + LOBYTE(pFontArrus->uFontHeight) - 2; |
17455 v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); | 17321 v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); |
17456 v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); | 17322 v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); |
17457 if ( v133 > 99 || v96 > 99 ) | 17323 if ( v133 > 99 || v96 > 99 ) |
17458 a2e = format_4E2E68; | 17324 a2e = format_4E2E68; |
17459 v97 = v96; | 17325 v97 = v96; |
17460 v98 = sub_4178FE(v133, v96); | 17326 v98 = UI_GetHealthManaStringColor(v133, v96); |
17461 sprintfex(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97); | 17327 sprintfex(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97); |
17462 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0); | 17328 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0); |
17463 a2f = format_4E2E10; | 17329 a2f = format_4E2E10; |
17464 uYf = uYe + LOBYTE(pFontArrus->uFontHeight) - 2; | 17330 uYf = uYe + LOBYTE(pFontArrus->uFontHeight) - 2; |
17465 v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); | 17331 v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); |
17466 v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); | 17332 v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); |
17467 if ( v134 > 99 ) | 17333 if ( v134 > 99 ) |
17468 a2f = format_4E2E68; | 17334 a2f = format_4E2E68; |
17469 v100 = v99; | 17335 v100 = v99; |
17470 v101 = sub_4178FE(v134, v99); | 17336 v101 = UI_GetHealthManaStringColor(v134, v99); |
17471 sprintfex(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100); | 17337 sprintfex(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100); |
17472 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0); | 17338 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0); |
17473 a2g = format_4E2E10; | 17339 a2g = format_4E2E10; |
17474 uYg = uYf + LOBYTE(pFontArrus->uFontHeight) - 2; | 17340 uYg = uYf + LOBYTE(pFontArrus->uFontHeight) - 2; |
17475 v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); | 17341 v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); |
17476 v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); | 17342 v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); |
17477 v137 = v102; | 17343 v137 = v102; |
17478 if ( v135 > 99 || v102 > 99 ) | 17344 if ( v135 > 99 || v102 > 99 ) |
17479 a2g = format_4E2E68; | 17345 a2g = format_4E2E68; |
17480 v103 = v102; | 17346 v103 = v102; |
17481 v104 = sub_4178FE(v135, v102); | 17347 v104 = UI_GetHealthManaStringColor(v135, v102); |
17482 sprintfex(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103); | 17348 sprintfex(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103); |
17483 if ( pPlayer->uClass == 35 && v137 == 200 ) | 17349 if ( pPlayer->uClass == 35 && v137 == 200 ) |
17484 { | 17350 { |
17485 v105 = pGlobalTXT_LocalizationStrings[625]; | 17351 v105 = pGlobalTXT_LocalizationStrings[625]; |
17486 v106 = sub_4178FE(v135, 200); | 17352 v106 = UI_GetHealthManaStringColor(v135, 200); |
17487 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105); | 17353 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105); |
17488 } | 17354 } |
17489 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0); | 17355 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0); |
17490 a2h = format_4E2E10; | 17356 a2h = format_4E2E10; |
17491 uYh = uYg + LOBYTE(pFontArrus->uFontHeight) - 2; | 17357 uYh = uYg + LOBYTE(pFontArrus->uFontHeight) - 2; |
17493 v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); | 17359 v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); |
17494 v138 = v107; | 17360 v138 = v107; |
17495 if ( v136 > 99 || v107 > 99 ) | 17361 if ( v136 > 99 || v107 > 99 ) |
17496 a2h = format_4E2E68; | 17362 a2h = format_4E2E68; |
17497 v108 = v107; | 17363 v108 = v107; |
17498 v109 = sub_4178FE(v136, v107); | 17364 v109 = UI_GetHealthManaStringColor(v136, v107); |
17499 sprintfex(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108); | 17365 sprintfex(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108); |
17500 if ( pPlayer->uClass == 35 && v138 == 200 ) | 17366 if ( pPlayer->uClass == 35 && v138 == 200 ) |
17501 { | 17367 { |
17502 v110 = pGlobalTXT_LocalizationStrings[625]; | 17368 v110 = pGlobalTXT_LocalizationStrings[625]; |
17503 v111 = sub_4178FE(v136, 200); | 17369 v111 = UI_GetHealthManaStringColor(v136, 200); |
17504 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110); | 17370 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110); |
17505 } | 17371 } |
17506 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0); | 17372 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0); |
17507 } | 17373 } |
17508 | 17374 |
17620 1, | 17486 1, |
17621 0, | 17487 0, |
17622 0xA9u, | 17488 0xA9u, |
17623 0, | 17489 0, |
17624 0, | 17490 0, |
17625 nullstring, | 17491 "", |
17626 (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0), | 17492 (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0), |
17627 uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0, | 17493 uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0, |
17628 0); | 17494 0); |
17629 ptr_507BA0 = pGUIWindow_CurrentMenu->CreateButton( | 17495 ptr_507BA0 = pGUIWindow_CurrentMenu->CreateButton( |
17630 0x1B6u, | 17496 0x1B6u, |
17634 1, | 17500 1, |
17635 0, | 17501 0, |
17636 0xAAu, | 17502 0xAAu, |
17637 0, | 17503 0, |
17638 0, | 17504 0, |
17639 nullstring, | 17505 "", |
17640 (Texture *)(uTextureID_ar_dn_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_up] : 0), | 17506 (Texture *)(uTextureID_ar_dn_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_up] : 0), |
17641 uTextureID_ar_dn_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_dn] : 0, | 17507 uTextureID_ar_dn_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_dn] : 0, |
17642 0); | 17508 0); |
17643 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton( | 17509 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton( |
17644 0x1B8u, | 17510 0x1B8u, |
17648 1, | 17514 1, |
17649 0, | 17515 0, |
17650 0xC0u, | 17516 0xC0u, |
17651 0, | 17517 0, |
17652 0, | 17518 0, |
17653 nullstring, | 17519 "", |
17654 0); | 17520 0); |
17655 } | 17521 } |
17656 } | 17522 } |
17657 | 17523 |
17658 | 17524 |
17751 3, | 17617 3, |
17752 *v14 | 0x8000, | 17618 *v14 | 0x8000, |
17753 0x79u, | 17619 0x79u, |
17754 *v14, | 17620 *v14, |
17755 0, | 17621 0, |
17756 nullstring, | 17622 "", |
17757 0); | 17623 0); |
17758 v2 = pFontLucida; | 17624 v2 = pFontLucida; |
17759 } | 17625 } |
17760 ++v14; | 17626 ++v14; |
17761 } | 17627 } |
17779 3, | 17645 3, |
17780 *v15 | 0x8000, | 17646 *v15 | 0x8000, |
17781 0x79u, | 17647 0x79u, |
17782 *v15, | 17648 *v15, |
17783 0, | 17649 0, |
17784 nullstring, | 17650 "", |
17785 0); | 17651 0); |
17786 v2 = pFontLucida; | 17652 v2 = pFontLucida; |
17787 } | 17653 } |
17788 ++v15; | 17654 ++v15; |
17789 } | 17655 } |
17807 3, | 17673 3, |
17808 *v16 | 0x8000, | 17674 *v16 | 0x8000, |
17809 0x79u, | 17675 0x79u, |
17810 *v16, | 17676 *v16, |
17811 0, | 17677 0, |
17812 nullstring, | 17678 "", |
17813 0); | 17679 0); |
17814 v2 = pFontLucida; | 17680 v2 = pFontLucida; |
17815 } | 17681 } |
17816 ++v16; | 17682 ++v16; |
17817 } | 17683 } |
17835 3, | 17701 3, |
17836 *v17 | 0x8000, | 17702 *v17 | 0x8000, |
17837 0x79u, | 17703 0x79u, |
17838 *v17, | 17704 *v17, |
17839 0, | 17705 0, |
17840 nullstring, | 17706 "", |
17841 0); | 17707 0); |
17842 v2 = pFontLucida; | 17708 v2 = pFontLucida; |
17843 } | 17709 } |
17844 ++v17; | 17710 ++v17; |
17845 } | 17711 } |