comparison mm7_5.cpp @ 970:e3123a1dea82

PlayerCreationUI_Draw little clean
author Ritor1
date Wed, 08 May 2013 16:30:37 +0600
parents 4d1259ef6ab2
children 35f2e900618e
comparison
equal deleted inserted replaced
969:4d1259ef6ab2 970:e3123a1dea82
10180 } 10180 }
10181 10181
10182 10182
10183 10183
10184 //----- (004156F0) -------------------------------------------------------- 10184 //----- (004156F0) --------------------------------------------------------
10185 void __cdecl GUI_UpdateWindows() // Нужно всё преобразовать в кейсы 10185 void __cdecl GUI_UpdateWindows()
10186 { 10186 {
10187 GUIWindow *pWindow; // esi@4 10187 GUIWindow *pWindow; // esi@4
10188 unsigned int pWindowType; // eax@4 10188 unsigned int pWindowType; // eax@4
10189 int v2; // eax@10
10190 int v3; // eax@11
10191 int v4; // eax@12
10192 int v5; // eax@20
10193 int v6; // eax@21
10194 int v7; // eax@29
10195 int v8; // eax@30
10196 int v9; // eax@31
10197 void *v10; // eax@41
10198 int v11; // ecx@42
10199 int v12; // eax@48
10200 int v13; // eax@49
10201 int v14; // eax@57
10202 int v15; // eax@58
10203 int v16; // eax@59
10204 int v17; // eax@60
10205 int v18; // eax@61
10206 int v19; // eax@62
10207 void *v20; // ebp@66
10208 char *pHint; // edx@66 10189 char *pHint; // edx@66
10209 GUIButton *pButtonPtr_1C; // ebp@79 10190 GUIButton *pButtonPtr_1C; // ebp@79
10210 char *pHint1; // edx@80 10191 char *pHint1; // edx@80
10211 char v24; // zf@81
10212 //unsigned int v25; // eax@91
10213 int v26; // eax@98 10192 int v26; // eax@98
10214 unsigned int v27; // ebp@106 10193 unsigned int v27; // ebp@106
10215 GUIWindow *pGUIWindow2; // ecx@109 10194 GUIWindow *pGUIWindow2; // ecx@109
10216 unsigned int v29; // eax@111
10217 GUIFont *pGUIFont; // ST1C_4@115 10195 GUIFont *pGUIFont; // ST1C_4@115
10218 int v31; // eax@115 10196 int v31; // eax@115
10219 GUIButton *pButton; // ebp@118 10197 GUIButton *pButton; // ebp@118
10220 int v33; // eax@119
10221 int v34; // eax@120
10222 int v35; // eax@121
10223 int v36; // eax@122
10224 int v37; // eax@123
10225 int v38; // eax@124
10226 int v39; // eax@129 10198 int v39; // eax@129
10227 //char *v40; // edx@138
10228 unsigned int pNumMessages; // eax@142 10199 unsigned int pNumMessages; // eax@142
10229 GUIButton *pGUIButton; // ebp@146 10200 GUIButton *pGUIButton; // ebp@146
10230 //char *v43; // edx@146
10231 unsigned int pX; // [sp-1Ch] [bp-124h]@17 10201 unsigned int pX; // [sp-1Ch] [bp-124h]@17
10232 unsigned int pY; // [sp-18h] [bp-120h]@17 10202 unsigned int pY; // [sp-18h] [bp-120h]@17
10233 Texture *pTexture; // [sp-14h] [bp-11Ch]@17 10203 Texture *pTexture; // [sp-14h] [bp-11Ch]@17
10234 Texture *pTexture2; // [sp-14h] [bp-11Ch]@86 10204 Texture *pTexture2; // [sp-14h] [bp-11Ch]@86
10235 int i; // [sp+0h] [bp-108h]@3 10205 int i; // [sp+0h] [bp-108h]@3
10239 10209
10240 if (GetCurrentMenuID() != MENU_CREATEPARTY) 10210 if (GetCurrentMenuID() != MENU_CREATEPARTY)
10241 sub_41CD4F(34); 10211 sub_41CD4F(34);
10242 for ( i = 1; i <= uNumVisibleWindows; ++i ) 10212 for ( i = 1; i <= uNumVisibleWindows; ++i )
10243 { 10213 {
10244 //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]];
10245 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1]; 10214 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1];
10246 pWindowType = pWindow->eWindowType; 10215 pWindowType = pWindow->eWindowType;
10247 switch (pWindow->eWindowType) 10216 switch (pWindow->eWindowType)
10248 { 10217 {
10249 case WINDOW_OptionsButtons://3 10218 case WINDOW_OptionsButtons:
10250 { 10219 {
10251 pTexture = (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0); 10220 pTexture = (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0);
10252 pY = pViewport->uViewportTL_Y; 10221 pY = pViewport->uViewportTL_Y;
10253 pX = pViewport->uViewportTL_X; 10222 pX = pViewport->uViewportTL_X;
10254 pRenderer->DrawTextureIndexed(pX, pY, pTexture); 10223 pRenderer->DrawTextureIndexed(pX, pY, pTexture);
10255 viewparams->bRedrawGameUI = 1; 10224 viewparams->bRedrawGameUI = 1;
10256 continue; 10225 continue;
10257 } 10226 }
10258 case WINDOW_CharacterRecord://4 10227 case WINDOW_CharacterRecord:
10259 { 10228 {
10260 CharacterUI_CharacterScreen_Draw(uActiveCharacter); 10229 CharacterUI_CharacterScreen_Draw(uActiveCharacter);
10261 continue; 10230 continue;
10262 } 10231 }
10263 case WINDOW_Options://6 10232 case WINDOW_Options:
10264 { 10233 {
10265 DrawGameOptions(); 10234 DrawGameOptions();
10266 continue; 10235 continue;
10267 } 10236 }
10268 case WINDOW_Book://9 10237 case WINDOW_Book:
10269 { 10238 {
10270 DrawCurrentBook((unsigned int)pWindow->ptr_1C); 10239 DrawCurrentBook((unsigned int)pWindow->ptr_1C);
10271 continue; 10240 continue;
10272 } 10241 }
10273 case WINDOW_Dialogue://10 10242 case WINDOW_Dialogue:
10274 { 10243 {
10275 DrawDialogueUI(); 10244 DrawDialogueUI();
10276 continue; 10245 continue;
10277 } 10246 }
10278 case WINDOW_QuickReference://12 10247 case WINDOW_QuickReference:
10279 { 10248 {
10280 QuickRefDraw(); 10249 QuickRefDraw();
10281 continue; 10250 continue;
10282 } 10251 }
10283 case WINDOW_Rest://16 10252 case WINDOW_Rest:
10284 { 10253 {
10285 RestUI_Draw(); 10254 RestUI_Draw();
10286 continue; 10255 continue;
10287 } 10256 }
10288 case WINDOW_ChangeLocation://17 10257 case WINDOW_ChangeLocation:
10289 { 10258 {
10290 TravelUI_Draw(); 10259 TravelUI_Draw();
10291 continue; 10260 continue;
10292 } 10261 }
10293 case WINDOW_SpellBook://18 10262 case WINDOW_SpellBook:
10294 { 10263 {
10295 DrawSpellBookContent(); 10264 DrawSpellBookContent();
10296 continue; 10265 continue;
10297 } 10266 }
10298 case WINDOW_GreetingNPC://19 10267 case WINDOW_GreetingNPC:
10299 { 10268 {
10300 DrawBranchlessDialogueUI(); 10269 DrawBranchlessDialogueUI();
10301 continue; 10270 continue;
10302 } 10271 }
10303 case WINDOW_Chest://20 10272 case WINDOW_Chest:
10304 { 10273 {
10305 if ( pCurrentScreen == SCREEN_CHEST ) 10274 if ( pCurrentScreen == SCREEN_CHEST )
10306 { 10275 {
10307 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C); 10276 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C);
10308 } 10277 }
10314 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, 10283 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY,
10315 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); 10284 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0));
10316 } 10285 }
10317 continue; 10286 continue;
10318 } 10287 }
10319 case WINDOW_SaveLoadButtons://23 10288 case WINDOW_SaveLoadButtons:
10320 { 10289 {
10321 sub_4606FE(); 10290 sub_4606FE();
10322 continue; 10291 continue;
10323 } 10292 }
10324 case WINDOW_MainMenu_Load://24 10293 case WINDOW_MainMenu_Load:
10325 { 10294 {
10326 GameUI_MainMenu_DrawLoad(); 10295 GameUI_MainMenu_DrawLoad();
10327 continue; 10296 continue;
10328 } 10297 }
10329 case WINDOW_HouseInterior://25 10298 case WINDOW_HouseInterior:
10330 { 10299 {
10331 pWindowList[pVisibleWindowsIdxs[i] - 1].HouseDialogManager(); 10300 pWindowList[pVisibleWindowsIdxs[i] - 1].HouseDialogManager();
10332 if ( !window_SpeakInHouse ) 10301 if ( !window_SpeakInHouse )
10333 continue; 10302 continue;
10334 v10 = window_SpeakInHouse->ptr_1C; 10303 if ( (signed int)window_SpeakInHouse->ptr_1C >= 53 )
10335 if ( (signed int)v10 >= 53 )
10336 continue; 10304 continue;
10337 if ( pParty->field_3C._shop_ban_times[(signed int)v10] <=pParty->uTimePlayed ) 10305 if ( pParty->field_3C._shop_ban_times[(signed int)window_SpeakInHouse->ptr_1C] <=pParty->uTimePlayed )
10338 { 10306 {
10339 if ( (signed int)v10 < 53 ) 10307 if ( (signed int)window_SpeakInHouse->ptr_1C < 53 )
10340 { 10308 {
10341 pParty->field_3C._shop_ban_times[(signed int)v10] = 0; 10309 pParty->field_3C._shop_ban_times[(signed int)window_SpeakInHouse->ptr_1C] = 0;
10342 } 10310 }
10343 continue; 10311 continue;
10344 } 10312 }
10345 pNumMessages = pMessageQueue_50CBD0->uNumMessages; 10313 pNumMessages = pMessageQueue_50CBD0->uNumMessages;
10346 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); 10314 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
10347 continue; 10315 continue;
10348 } 10316 }
10349 case WINDOW_Transition://26 10317 case WINDOW_Transition:
10350 { 10318 {
10351 TransitionUI_Draw(); 10319 TransitionUI_Draw();
10352 continue; 10320 continue;
10353 } 10321 }
10354 case WINDOW_Scroll://30 10322 case WINDOW_Scroll:
10355 { 10323 {
10356 CreateScrollWindow(); 10324 CreateScrollWindow();
10357 continue; 10325 continue;
10358 } 10326 }
10359 case WINDOW_CastSpell_InInventory://31 10327 case WINDOW_CastSpell_InInventory:
10360 { 10328 {
10361 pRenderer->ClearZBuffer(0, 479); 10329 pRenderer->ClearZBuffer(0, 479);
10362 draw_leather(); 10330 draw_leather();
10363 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 10331 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
10364 CharacterUI_DrawPaperdoll(uActiveCharacter); 10332 CharacterUI_DrawPaperdoll(uActiveCharacter);
10365 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, 10333 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY,
10366 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); 10334 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
10367 continue; 10335 continue;
10368 } 10336 }
10369 case WINDOW_FinalWindow://70 10337 case WINDOW_FinalWindow:
10370 { 10338 {
10371 sub_41420D_press_esc(); 10339 sub_41420D_press_esc();
10372 continue; 10340 continue;
10373 } 10341 }
10374 case WINDOW_50://80 10342 case WINDOW_50:
10375 { 10343 {
10376 v27 = TargetColor(255, 255, 255); 10344 v27 = TargetColor(255, 255, 255);
10377 if ( ptr_507BD0->field_40 == 1 ) 10345 if ( ptr_507BD0->field_40 == 1 )
10378 { 10346 {
10379 ptr_507BD0->DrawMessageBox(0); 10347 ptr_507BD0->DrawMessageBox(0);
10382 ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, pFontCreate); 10350 ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, pFontCreate);
10383 continue; 10351 continue;
10384 } 10352 }
10385 if ( ptr_507BD0->field_40 == 2 ) 10353 if ( ptr_507BD0->field_40 == 2 )
10386 { 10354 {
10387 //v29 = pMessageQueue_50CBD0->uNumMessages;
10388 pWindow->field_40 = 0; 10355 pWindow->field_40 = 0;
10389 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
10390 {
10391 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C;
10392 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
10393 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
10394 ++pMessageQueue_50CBD0->uNumMessages;
10395 }*/
10396 pMessageQueue_50CBD0->AddMessage((UIMessageType)(int)ptr_507BD0->ptr_1C, 0, 0); 10356 pMessageQueue_50CBD0->AddMessage((UIMessageType)(int)ptr_507BD0->ptr_1C, 0, 0);
10397 pEventTimer->Resume(); 10357 pEventTimer->Resume();
10398 ptr_507BD0->Release(); 10358 ptr_507BD0->Release();
10399 pCurrentScreen = 0; 10359 pCurrentScreen = 0;
10400 viewparams->bRedrawGameUI = 1; 10360 viewparams->bRedrawGameUI = 1;
10406 pEventTimer->Resume(); 10366 pEventTimer->Resume();
10407 ptr_507BD0->Release(); 10367 ptr_507BD0->Release();
10408 continue; 10368 continue;
10409 } 10369 }
10410 } 10370 }
10411 case WINDOW_59://89 10371 case WINDOW_59:
10412 { 10372 {
10413 pWindow->DrawMessageBox(0); 10373 pWindow->DrawMessageBox(0);
10414 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); 10374 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
10415 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); 10375 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
10416 if ( !pKeyActionMap->field_204 ) 10376 if ( !pKeyActionMap->field_204 )
10442 } 10402 }
10443 } 10403 }
10444 } 10404 }
10445 continue; 10405 continue;
10446 } 10406 }
10447 case WINDOW_PressedButton2://90 10407 case WINDOW_PressedButton2:
10448 { 10408 {
10449 if ( pWindow->Hint != (char *)1 ) 10409 if ( pWindow->Hint != (char *)1 )
10450 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); 10410 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
10451 pButton = (GUIButton *)pWindow->ptr_1C; 10411 pButton = (GUIButton *)pWindow->ptr_1C;
10452 if ( pButton->uX >= 0 && pButton->uX <= 640 ) 10412 if ( pButton->uX >= 0 && pButton->uX <= 640 )
10455 { 10415 {
10456 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); 10416 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]);
10457 viewparams->bRedrawGameUI = 1; 10417 viewparams->bRedrawGameUI = 1;
10458 if ( pWindow->Hint ) 10418 if ( pWindow->Hint )
10459 { 10419 {
10460 v24 = pWindow->Hint == (char *)1; 10420 if ( pWindow->Hint != (char *)1 )
10461 if ( !v24 )
10462 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 10421 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
10463 } 10422 }
10464 pWindow->Release(); 10423 pWindow->Release();
10465 continue; 10424 continue;
10466 } 10425 }
10467 } 10426 }
10468 viewparams->bRedrawGameUI = 1; 10427 viewparams->bRedrawGameUI = 1;
10469 if ( pWindow->Hint ) 10428 if ( pWindow->Hint )
10470 { 10429 {
10471 v24 = pWindow->Hint == (char *)1; 10430 if ( pWindow->Hint != (char *)1 )
10472 if ( !v24 )
10473 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 10431 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
10474 } 10432 }
10475 pWindow->Release(); 10433 pWindow->Release();
10476 continue; 10434 continue;
10477 } 10435 }
10478 case WINDOW_CharactersPressedButton://91 10436 case WINDOW_CharactersPressedButton:
10479 { 10437 {
10480 if ( pWindow->Hint != (char *)1 ) 10438 if ( pWindow->Hint != (char *)1 )
10481 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); 10439 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
10482 pButton = (GUIButton *)pWindow->ptr_1C; 10440 pButton = (GUIButton *)pWindow->ptr_1C;
10483 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); 10441 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]);
10484 viewparams->bRedrawGameUI = 1; 10442 viewparams->bRedrawGameUI = 1;
10485 if ( pWindow->Hint ) 10443 if ( pWindow->Hint )
10486 { 10444 {
10487 v24 = pWindow->Hint == (char *)1; 10445 if ( pWindow->Hint != (char *)1 )
10488 if ( !v24 )
10489 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 10446 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
10490 } 10447 }
10491 pWindow->Release(); 10448 pWindow->Release();
10492 continue; 10449 continue;
10493 } 10450 }
10494 case WINDOW_PressedButton://92 10451 case WINDOW_PressedButton:
10495 { 10452 {
10496 if ( pWindow->Hint != (char *)1 ) 10453 if ( pWindow->Hint != (char *)1 )
10497 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); 10454 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
10498 pButton = (GUIButton *)pWindow->ptr_1C; 10455 pButton = (GUIButton *)pWindow->ptr_1C;
10499 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); 10456 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]);
10500 viewparams->bRedrawGameUI = 1; 10457 viewparams->bRedrawGameUI = 1;
10501 if ( pWindow->Hint ) 10458 if ( pWindow->Hint )
10502 { 10459 {
10503 v24 = pWindow->Hint == (char *)1; 10460 if ( pWindow->Hint != (char *)1 )
10504 if ( !v24 )
10505 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 10461 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
10506 } 10462 }
10507 pWindow->Release(); 10463 pWindow->Release();
10508 continue; 10464 continue;
10509 } 10465 }
10510 case WINDOW_5D://93 10466 case WINDOW_5D:
10511 { 10467 {
10512 if ( pWindow->Hint != (char *)1 ) 10468 if ( pWindow->Hint != (char *)1 )
10513 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); 10469 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
10514 pButton = (GUIButton *)pWindow->ptr_1C; 10470 pButton = (GUIButton *)pWindow->ptr_1C;
10515 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); 10471 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]);
10516 viewparams->bRedrawGameUI = 1; 10472 viewparams->bRedrawGameUI = 1;
10517 pWindow->Release(); 10473 pWindow->Release();
10518 continue; 10474 continue;
10519 } 10475 }
10520 case WINDOW_SaveLoadBtn://94 10476 case WINDOW_SaveLoadBtn:
10521 { 10477 {
10522 if (pWindow->Hint != (char *)1) 10478 if (pWindow->Hint != (char *)1)
10523 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); 10479 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
10524 pButton = (GUIButton *)pWindow->ptr_1C; 10480 pButton = (GUIButton *)pWindow->ptr_1C;
10525 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); 10481 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]);
10532 pMessageQueue_50CBD0->AddMessage(UIMSG_SaveGame, 0, 0); 10488 pMessageQueue_50CBD0->AddMessage(UIMSG_SaveGame, 0, 0);
10533 else 10489 else
10534 pMessageQueue_50CBD0->AddMessage(UIMSG_LoadGame, 0, 0); 10490 pMessageQueue_50CBD0->AddMessage(UIMSG_LoadGame, 0, 0);
10535 continue; 10491 continue;
10536 } 10492 }
10537 case WINDOW_LoadGame_CancelBtn://95 10493 case WINDOW_LoadGame_CancelBtn:
10538 { 10494 {
10539 if ( pWindow->Hint != (char *)1 ) 10495 if ( pWindow->Hint != (char *)1 )
10540 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); 10496 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
10541 pButton = (GUIButton *)pWindow->ptr_1C; 10497 pButton = (GUIButton *)pWindow->ptr_1C;
10542 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); 10498 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]);
10543 viewparams->bRedrawGameUI = 1; 10499 viewparams->bRedrawGameUI = 1;
10544 if ( pWindow->Hint && pWindow->Hint != (char *)1 ) 10500 if ( pWindow->Hint && pWindow->Hint != (char *)1 )
10545 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 10501 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
10546 pWindow->Release(); 10502 pWindow->Release();
10547 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
10548 {
10549 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
10550 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
10551 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
10552 ++pMessageQueue_50CBD0->uNumMessages;
10553 continue;
10554 }*/
10555 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); 10503 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
10556 continue; 10504 continue;
10557 } 10505 }
10558 case WINDOW_CloseRestWindowBtn://96 10506 case WINDOW_CloseRestWindowBtn:
10559 { 10507 {
10560 if ( pWindow->Hint != (char *)1 ) 10508 if ( pWindow->Hint != (char *)1 )
10561 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); 10509 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
10562 pGUIButton = (GUIButton *)pWindow->ptr_1C; 10510 pGUIButton = (GUIButton *)pWindow->ptr_1C;
10563 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pGUIButton->pTextures[0]); 10511 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pGUIButton->pTextures[0]);
10567 pGUIButton->DrawLabel(pHint, pFontCreate, 0, 0); 10515 pGUIButton->DrawLabel(pHint, pFontCreate, 0, 0);
10568 pWindow->Release(); 10516 pWindow->Release();
10569 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); 10517 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
10570 continue; 10518 continue;
10571 } 10519 }
10572 case WINDOW_ExitCharacterWindow://97 10520 case WINDOW_ExitCharacterWindow:
10573 { 10521 {
10574 if ( pWindow->Hint != (char *)1 ) 10522 if ( pWindow->Hint != (char *)1 )
10575 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); 10523 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
10576 pButton = (GUIButton *)pWindow->ptr_1C; 10524 pButton = (GUIButton *)pWindow->ptr_1C;
10577 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); 10525 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]);
10582 pWindow->Release(); 10530 pWindow->Release();
10583 pNumMessages = pMessageQueue_50CBD0->uNumMessages; 10531 pNumMessages = pMessageQueue_50CBD0->uNumMessages;
10584 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); 10532 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
10585 continue; 10533 continue;
10586 } 10534 }
10587 case WINDOW_RestWindow://98 10535 case WINDOW_RestWindow:
10588 { 10536 {
10589 memset(&GUIButton2, 0, 0xBCu); 10537 memset(&GUIButton2, 0, 0xBCu);
10590 GUIButton2.uZ = 197; 10538 GUIButton2.uZ = 197;
10591 GUIButton2.uW = 197; 10539 GUIButton2.uW = 197;
10592 GUIButton2.uX = 27; 10540 GUIButton2.uX = 27;
10601 GUIButton2.pParent = 0; 10549 GUIButton2.pParent = 0;
10602 pGUIWindow2 = pWindow; 10550 pGUIWindow2 = pWindow;
10603 pGUIWindow2->Release(); 10551 pGUIWindow2->Release();
10604 continue; 10552 continue;
10605 } 10553 }
10606 case WINDOW_BooksWindow://99 10554 case WINDOW_BooksWindow:
10607 { 10555 {
10608 pButton = (GUIButton *)pWindow->ptr_1C; 10556 pButton = (GUIButton *)pWindow->ptr_1C;
10609 pY = pWindow->uFrameY; 10557 pY = pWindow->uFrameY;
10610 pX = pWindow->uFrameX; 10558 pX = pWindow->uFrameX;
10611 pRenderer->DrawTextureIndexed(pX, pY, pButton->pTextures[0]); 10559 pRenderer->DrawTextureIndexed(pX, pY, pButton->pTextures[0]);
10612 viewparams->bRedrawGameUI = 1; 10560 viewparams->bRedrawGameUI = 1;
10613 continue; 10561 continue;
10614 } 10562 }
10615 case WINDOW_CharacterWindow_Inventory://103 10563 case WINDOW_CharacterWindow_Inventory:
10616 { 10564 {
10617 pWindow->DrawMessageBox(0); 10565 pWindow->DrawMessageBox(0);
10618 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); 10566 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
10619 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); 10567 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
10620 if ( !pKeyActionMap->field_204 ) 10568 if ( !pKeyActionMap->field_204 )
10631 SpawnActor(v39); 10579 SpawnActor(v39);
10632 } 10580 }
10633 } 10581 }
10634 continue; 10582 continue;
10635 } 10583 }
10636 case WINDOW_KeyMappingOptions://105 10584 case WINDOW_KeyMappingOptions:
10637 { 10585 {
10638 GameMenuUI_DrawKeyBindings(); 10586 GameMenuUI_DrawKeyBindings();
10639 continue; 10587 continue;
10640 } 10588 }
10641 case WINDOW_VideoOptions://106 10589 case WINDOW_VideoOptions:
10642 { 10590 {
10643 GameMenuUI_DrawVideoOptions(); 10591 GameMenuUI_DrawVideoOptions();
10644 continue; 10592 continue;
10645 } 10593 }
10646 default: 10594 default: