comparison mm7_5.cpp @ 977:ac85898f5903

Слияние
author Ritor1
date Thu, 09 May 2013 01:33:54 +0600
parents e875f5ab0cfb ec7568e13b24
children 9334a8c59c8d
comparison
equal deleted inserted replaced
976:15c6b80caa3a 977:ac85898f5903
1499 pGlobalTXT_LocalizationStrings[618],// "Quit" 1499 pGlobalTXT_LocalizationStrings[618],// "Quit"
1500 pIcons_LOD->GetTexture(uTextureID_Quit1), 0); 1500 pIcons_LOD->GetTexture(uTextureID_Quit1), 0);
1501 pBtn_Resume = pGUIWindow_CurrentMenu->CreateButton(241, 263, 214, 40, v0, 0, UIMSG_GameMenu_ReturnToGame, 0, 0x52u, 1501 pBtn_Resume = pGUIWindow_CurrentMenu->CreateButton(241, 263, 214, 40, v0, 0, UIMSG_GameMenu_ReturnToGame, 0, 0x52u,
1502 pGlobalTXT_LocalizationStrings[619],// "Return to Game" 1502 pGlobalTXT_LocalizationStrings[619],// "Return to Game"
1503 pIcons_LOD->GetTexture(uTextureID_Resume1), 0); 1503 pIcons_LOD->GetTexture(uTextureID_Resume1), 0);
1504 pGUIWindow_CurrentMenu->_41D08F(6, v0, 0, 0); 1504 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(6, v0, 0, 0);
1505 viewparams->field_48 = v0; 1505 viewparams->field_48 = v0;
1506 stru_506E40.Release(); 1506 stru_506E40.Release();
1507 uNumSeconds = (unsigned int)MakeScreenshot(155, 117); 1507 uNumSeconds = (unsigned int)MakeScreenshot(155, 117);
1508 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117); 1508 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117);
1509 free((void *)uNumSeconds); 1509 free((void *)uNumSeconds);
2862 pCurrentScreen = SCREEN_QUICK_REFERENCE; 2862 pCurrentScreen = SCREEN_QUICK_REFERENCE;
2863 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_QuickReference, 5, 0); 2863 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_QuickReference, 5, 0);
2864 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); 2864 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE);
2865 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, UIMSG_Escape, 0, 0, 2865 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, UIMSG_Escape, 0, 0,
2866 pGlobalTXT_LocalizationStrings[79],// "Exit" 2866 pGlobalTXT_LocalizationStrings[79],// "Exit"
2867 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); //, v179); 2867 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); //, v179);
2868 continue; 2868 continue;
2869 case UIMSG_GameMenuButton: 2869 case UIMSG_GameMenuButton:
2870 if ( pCurrentScreen ) 2870 if ( pCurrentScreen )
2871 { 2871 {
2872 pGUIWindow_CurrentMenu->Release(); 2872 pGUIWindow_CurrentMenu->Release();
2907 bRingsShownInCharScreen ^= v0; 2907 bRingsShownInCharScreen ^= v0;
2908 pCharacterScreen_DetalizBtn->Release(); 2908 pCharacterScreen_DetalizBtn->Release();
2909 pCharacterScreen_DollBtn->Release(); 2909 pCharacterScreen_DollBtn->Release();
2910 if ( bRingsShownInCharScreen ) 2910 if ( bRingsShownInCharScreen )
2911 { 2911 {
2912 v128 = (uTextureID_detaliz_close_button != -1 ? pIcons_LOD->pTextures[uTextureID_detaliz_close_button].uTextureHeight : 26); 2912 v128 = pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)->uTextureHeight;
2913 v125 = (uTextureID_detaliz_close_button != -1 ? pIcons_LOD->pTextures[uTextureID_detaliz_close_button].uTextureWidth : 24); 2913 v125 = pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)->uTextureWidth;
2914 v123 = 445; 2914 v123 = 445;
2915 v121 = 470; 2915 v121 = 470;
2916 } 2916 }
2917 else 2917 else
2918 { 2918 {
9448 } 9448 }
9449 9449
9450 //----- (0040F82D) -------------------------------------------------------- 9450 //----- (0040F82D) --------------------------------------------------------
9451 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue) 9451 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue)
9452 { 9452 {
9453 ZBuffer_DoFill(pZBuffer, (Texture *)(uTextureId != -1 ? (int)&pIcons_LOD->pTextures[uTextureId] : 0), iZValue); 9453 assert(uTextureId != -1);
9454 ZBuffer_DoFill(pZBuffer, pIcons_LOD->GetTexture(uTextureId), iZValue);
9454 } 9455 }
9455 9456
9456 //----- (0040F845) -------------------------------------------------------- 9457 //----- (0040F845) --------------------------------------------------------
9457 __int16 __fastcall sub_40F845(int a1, int a2, int a3, int a4, int a5, __int16 a6, int a7) 9458 __int16 __fastcall sub_40F845(int a1, int a2, int a3, int a4, int a5, __int16 a6, int a7)
9458 { 9459 {
10199 int v31; // eax@115 10200 int v31; // eax@115
10200 GUIButton *pButton; // ebp@118 10201 GUIButton *pButton; // ebp@118
10201 int v39; // eax@129 10202 int v39; // eax@129
10202 unsigned int pNumMessages; // eax@142 10203 unsigned int pNumMessages; // eax@142
10203 GUIButton *pGUIButton; // ebp@146 10204 GUIButton *pGUIButton; // ebp@146
10204 unsigned int pX; // [sp-1Ch] [bp-124h]@17 10205 //unsigned int pX; // [sp-1Ch] [bp-124h]@17
10205 unsigned int pY; // [sp-18h] [bp-120h]@17 10206 //unsigned int pY; // [sp-18h] [bp-120h]@17
10206 Texture *pTexture; // [sp-14h] [bp-11Ch]@17 10207 //Texture *pTexture; // [sp-14h] [bp-11Ch]@17
10207 Texture *pTexture2; // [sp-14h] [bp-11Ch]@86 10208 //Texture *pTexture2; // [sp-14h] [bp-11Ch]@86
10208 int i; // [sp+0h] [bp-108h]@3 10209 int i; // [sp+0h] [bp-108h]@3
10209 ItemGen pItemGen; // [sp+4h] [bp-104h]@98 10210 ItemGen pItemGen; // [sp+4h] [bp-104h]@98
10210 GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133 10211 GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133
10211 ItemGen ItemGen2; // [sp+E4h] [bp-24h]@129 10212 ItemGen ItemGen2; // [sp+E4h] [bp-24h]@129
10212 10213
10213 if (GetCurrentMenuID() != MENU_CREATEPARTY) 10214 if (GetCurrentMenuID() != MENU_CREATEPARTY)
10214 sub_41CD4F(34); 10215 UI_OnKeyDown(VK_NEXT);
10216
10215 for ( i = 1; i <= uNumVisibleWindows; ++i ) 10217 for ( i = 1; i <= uNumVisibleWindows; ++i )
10216 { 10218 {
10217 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1]; 10219 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1];
10218 pWindowType = pWindow->eWindowType; 10220 pWindowType = pWindow->eWindowType;
10219 switch (pWindow->eWindowType) 10221 switch (pWindow->eWindowType)
10220 { 10222 {
10221 case WINDOW_OptionsButtons: 10223 case WINDOW_OptionsButtons:
10222 { 10224 {
10223 pTexture = (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0); 10225 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_Y,
10224 pY = pViewport->uViewportTL_Y; 10226 pViewport->uViewportTL_X, pIcons_LOD->GetTexture(uTextureID_Options));
10225 pX = pViewport->uViewportTL_X;
10226 pRenderer->DrawTextureIndexed(pX, pY, pTexture);
10227 viewparams->bRedrawGameUI = 1; 10227 viewparams->bRedrawGameUI = 1;
10228 continue; 10228 continue;
10229 } 10229 }
10230 case WINDOW_CharacterRecord: 10230 case WINDOW_CharacterRecord:
10231 { 10231 {
10281 else if ( pCurrentScreen == SCREEN_F ) 10281 else if ( pCurrentScreen == SCREEN_F )
10282 { 10282 {
10283 pRenderer->ClearZBuffer(0, 479); 10283 pRenderer->ClearZBuffer(0, 479);
10284 draw_leather(); 10284 draw_leather();
10285 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 10285 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
10286 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, 10286 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uExitCancelTextureId));
10287 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0));
10288 } 10287 }
10289 continue; 10288 continue;
10290 } 10289 }
10291 case WINDOW_SaveLoadButtons: 10290 case WINDOW_SaveLoadButtons:
10292 { 10291 {
10331 { 10330 {
10332 pRenderer->ClearZBuffer(0, 479); 10331 pRenderer->ClearZBuffer(0, 479);
10333 draw_leather(); 10332 draw_leather();
10334 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 10333 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
10335 CharacterUI_DrawPaperdoll(uActiveCharacter); 10334 CharacterUI_DrawPaperdoll(uActiveCharacter);
10336 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, 10335 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uTextureID_x_x_u));
10337 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
10338 continue; 10336 continue;
10339 } 10337 }
10340 case WINDOW_FinalWindow: 10338 case WINDOW_FinalWindow:
10341 { 10339 {
10342 sub_41420D_press_esc(); 10340 sub_41420D_press_esc();
10555 continue; 10553 continue;
10556 } 10554 }
10557 case WINDOW_BooksWindow: 10555 case WINDOW_BooksWindow:
10558 { 10556 {
10559 pButton = (GUIButton *)pWindow->ptr_1C; 10557 pButton = (GUIButton *)pWindow->ptr_1C;
10560 pY = pWindow->uFrameY; 10558 pRenderer->DrawTextureIndexed(pWindow->uFrameY,
10561 pX = pWindow->uFrameX; 10559 pWindow->uFrameX, pButton->pTextures[0]);
10562 pRenderer->DrawTextureIndexed(pX, pY, pButton->pTextures[0]);
10563 viewparams->bRedrawGameUI = 1; 10560 viewparams->bRedrawGameUI = 1;
10564 continue; 10561 continue;
10565 } 10562 }
10566 case WINDOW_CharacterWindow_Inventory: 10563 case WINDOW_CharacterWindow_Inventory:
10567 { 10564 {
11527 i->uZ = 0; 11524 i->uZ = 0;
11528 i->uY = 0; 11525 i->uY = 0;
11529 i->uX = 0; 11526 i->uX = 0;
11530 } 11527 }
11531 } 11528 }
11532 pBtn_Up = pGUIWindow_CurrentMenu->CreateButton(438, 46, (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureWidth : 24), 11529 pBtn_Up = pGUIWindow_CurrentMenu->CreateButton(438, 46,
11533 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureHeight : 26), 11530 pIcons_LOD->GetTexture(uTextureID_ar_up_up)->uTextureWidth,
11534 1, 0, UIMSG_ClickAwardsUpBtn, 0, 0, "", (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0), 11531 pIcons_LOD->GetTexture(uTextureID_ar_up_up)->uTextureHeight,
11535 uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0, 0); 11532 1, 0, UIMSG_ClickAwardsUpBtn, 0, 0, "",
11536 pBtn_Down = pGUIWindow_CurrentMenu->CreateButton(438, 292, (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureWidth : 24), 11533 pIcons_LOD->GetTexture(uTextureID_ar_up_up),
11537 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureHeight : 26), 11534 pIcons_LOD->GetTexture(uTextureID_ar_up_dn), 0);
11538 1, 0, UIMSG_ClickAwardsDownBtn, 0, 0, "", (Texture *)(uTextureID_ar_dn_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_up] : 0), 11535 pBtn_Down = pGUIWindow_CurrentMenu->CreateButton(438, 292,
11539 uTextureID_ar_dn_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_dn] : 0, 0); 11536 pIcons_LOD->GetTexture(uTextureID_ar_dn_up)->uTextureWidth,
11537 pIcons_LOD->GetTexture(uTextureID_ar_dn_up)->uTextureHeight,
11538 1, 0, UIMSG_ClickAwardsDownBtn, 0, 0, "",
11539 pIcons_LOD->GetTexture(uTextureID_ar_dn_up),
11540 pIcons_LOD->GetTexture(uTextureID_ar_dn_dn), 0);
11540 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton(440, 62, 16, 232, 1, 0, UIMSG_C0, 0, 0, "", 0); 11541 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton(440, 62, 16, 232, 1, 0, UIMSG_C0, 0, 0, "", 0);
11541 } 11542 }
11542 } 11543 }
11543 11544
11544 11545
11562 { 11563 {
11563 pButton->uX = dword_50698C; 11564 pButton->uX = dword_50698C;
11564 pButton->uY = dword_506988; 11565 pButton->uY = dword_506988;
11565 pButton->uZ = dword_506984; 11566 pButton->uZ = dword_506984;
11566 pButton->uW = dword_506980; 11567 pButton->uW = dword_506980;
11567 pGUIWindow_CurrentMenu->_41D08F(1, 0, 0, 0); 11568 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(1, 0, 0, 0);
11568 } 11569 }
11569 } 11570 }
11570 } 11571 }
11571 } 11572 }
11572 11573