Mercurial > mm7
comparison mm7_5.cpp @ 986:b584c743cb47
Слияние
author | Ritor1 |
---|---|
date | Sun, 12 May 2013 09:38:30 +0600 |
parents | d982fffb8b96 |
children | 9e132060ada3 c5d8ea1e6ccb |
comparison
equal
deleted
inserted
replaced
985:062788391c88 | 986:b584c743cb47 |
---|---|
1034 dword_50C9D8 = 0; | 1034 dword_50C9D8 = 0; |
1035 } | 1035 } |
1036 if ( ptr_50C9A4 && ptr_50C9A4->uItemID ) | 1036 if ( ptr_50C9A4 && ptr_50C9A4->uItemID ) |
1037 { | 1037 { |
1038 LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu; | 1038 LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu; |
1039 dword_50C9A8 = 0; | 1039 _50C9A8_item_enchantment_timer = 0; |
1040 ptr_50C9A4 = 0; | 1040 ptr_50C9A4 = 0; |
1041 } | 1041 } |
1042 if ( pGUIWindow_Settings ) | 1042 if ( pGUIWindow_Settings ) |
1043 { | 1043 { |
1044 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 1044 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2229 ModalWindow(pFinalMessage, 196); | 2229 ModalWindow(pFinalMessage, 196); |
2230 uGameState = GAME_STATE_FINAL_WINDOW; | 2230 uGameState = GAME_STATE_FINAL_WINDOW; |
2231 continue; | 2231 continue; |
2232 case UIMSG_C4: | 2232 case UIMSG_C4: |
2233 __debugbreak; | 2233 __debugbreak; |
2234 uGameState = GAME_STATE_0; | 2234 uGameState = GAME_STATE_PLAYING; |
2235 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); | 2235 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); |
2236 goto LABEL_524; | 2236 goto LABEL_524; |
2237 case UIMSG_DD: | 2237 case UIMSG_DD: |
2238 LABEL_524: | 2238 LABEL_524: |
2239 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); | 2239 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); |
3339 GUIWindow::Create(495, 282, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnCredits, 0); | 3339 GUIWindow::Create(495, 282, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnCredits, 0); |
3340 SetCurrentMenuID(MENU_CREDITS); | 3340 SetCurrentMenuID(MENU_CREDITS); |
3341 break; | 3341 break; |
3342 case UIMSG_ExitToWindows: | 3342 case UIMSG_ExitToWindows: |
3343 GUIWindow::Create(495, 337, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnExit, 0); | 3343 GUIWindow::Create(495, 337, 0, 0, WINDOW_PressedButton2, (int)pMainMenu_BtnExit, 0); |
3344 SetCurrentMenuID(MENU_FINISHED); | 3344 SetCurrentMenuID(MENU_EXIT_GAME); |
3345 break; | 3345 break; |
3346 case UIMSG_PlayerCreation_SelectAttribute: | 3346 case UIMSG_PlayerCreation_SelectAttribute: |
3347 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) | 3347 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) |
3348 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; | 3348 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; |
3349 uPlayerCreationUI_SelectedCharacter = pParam; | 3349 uPlayerCreationUI_SelectedCharacter = pParam; |
3433 case UIMSG_PlayerCreationClickOK: | 3433 case UIMSG_PlayerCreationClickOK: |
3434 GUIWindow::Create(580, 431, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnOK, 0); | 3434 GUIWindow::Create(580, 431, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnOK, 0); |
3435 if ( PlayerCreation_ComputeAttributeBonus() || !PlayerCreation_Chose4Skills() ) | 3435 if ( PlayerCreation_ComputeAttributeBonus() || !PlayerCreation_Chose4Skills() ) |
3436 GameUI_Footer_TimeLeft = GetTickCount() + 4000; | 3436 GameUI_Footer_TimeLeft = GetTickCount() + 4000; |
3437 else | 3437 else |
3438 uGameState = GAME_STATE_6; | 3438 uGameState = GAME_STATE_STARTING_NEW_GAME; |
3439 break; | 3439 break; |
3440 case UIMSG_PlayerCreationClickReset: | 3440 case UIMSG_PlayerCreationClickReset: |
3441 GUIWindow::Create(527, 431, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnReset, 0); | 3441 GUIWindow::Create(527, 431, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnReset, 0); |
3442 pParty->Reset(); | 3442 pParty->Reset(); |
3443 break; | 3443 break; |
9221 return TargetColor((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor)); | 9221 return TargetColor((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor)); |
9222 } | 9222 } |
9223 | 9223 |
9224 //----- (0040DEF3) -------------------------------------------------------- | 9224 //----- (0040DEF3) -------------------------------------------------------- |
9225 unsigned short TargetColor( unsigned __int16 r, unsigned __int16 g, unsigned __int16 b ) | 9225 unsigned short TargetColor( unsigned __int16 r, unsigned __int16 g, unsigned __int16 b ) |
9226 { | 9226 { |
9227 return ((unsigned int)b >> (8 - LOBYTE(pRenderer->uTargetBBits))) | pRenderer->uTargetGMask & (g << (LOBYTE(pRenderer->uTargetGBits) + | 9227 return ((unsigned int)b >> (8 - LOBYTE(pRenderer->uTargetBBits))) | pRenderer->uTargetGMask & (g << (LOBYTE(pRenderer->uTargetGBits) + |
9228 LOBYTE(pRenderer->uTargetBBits) - 8)) | pRenderer->uTargetRMask & (r << (LOBYTE(pRenderer->uTargetGBits) + | 9228 LOBYTE(pRenderer->uTargetBBits) - 8)) | pRenderer->uTargetRMask & (r << (LOBYTE(pRenderer->uTargetGBits) + |
9229 LOBYTE(pRenderer->uTargetRBits) + LOBYTE(pRenderer->uTargetBBits) - 8)); | 9229 LOBYTE(pRenderer->uTargetRBits) + LOBYTE(pRenderer->uTargetBBits) - 8)); |
9230 } | 9230 } |
9231 | 9231 |
10280 } | 10280 } |
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(pPlayers[uActiveCharacter], true); |
10286 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uExitCancelTextureId)); | 10286 pRenderer->DrawTextureIndexed(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uExitCancelTextureId)); |
10287 } | 10287 } |
10288 continue; | 10288 continue; |
10289 } | 10289 } |
10290 case WINDOW_SaveLoadButtons: | 10290 case WINDOW_SaveLoadButtons: |
10328 } | 10328 } |
10329 case WINDOW_CastSpell_InInventory: | 10329 case WINDOW_CastSpell_InInventory: |
10330 { | 10330 { |
10331 pRenderer->ClearZBuffer(0, 479); | 10331 pRenderer->ClearZBuffer(0, 479); |
10332 draw_leather(); | 10332 draw_leather(); |
10333 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 10333 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true); |
10334 CharacterUI_DrawPaperdoll(uActiveCharacter); | 10334 CharacterUI_DrawPaperdoll(uActiveCharacter); |
10335 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uTextureID_x_x_u)); | 10335 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uTextureID_x_x_u)); |
10336 continue; | 10336 continue; |
10337 } | 10337 } |
10338 case WINDOW_FinalWindow: | 10338 case WINDOW_FinalWindow: |
10779 LODWORD(v32) = pOut.y; | 10779 LODWORD(v32) = pOut.y; |
10780 LOBYTE(v32) = LOBYTE(pOut.y) | 0x18; | 10780 LOBYTE(v32) = LOBYTE(pOut.y) | 0x18; |
10781 HIDWORD(v27->uExpireTime) = HIDWORD(v32); | 10781 HIDWORD(v27->uExpireTime) = HIDWORD(v32); |
10782 v27->uAttributes = v32; | 10782 v27->uAttributes = v32; |
10783 } | 10783 } |
10784 dword_50C9A8 = 256; | 10784 _50C9A8_item_enchantment_timer = 256; |
10785 goto LABEL_92; | 10785 goto LABEL_92; |
10786 } | 10786 } |
10787 v36 = (70.0 - (double)pParty->pPickedItem.uEnchantmentType) * 0.01; | 10787 v36 = (70.0 - (double)pParty->pPickedItem.uEnchantmentType) * 0.01; |
10788 if ( v36 < 0.0 ) | 10788 if ( v36 < 0.0 ) |
10789 v36 = 0.0; | 10789 v36 = 0.0; |
11457 Dst.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3u); | 11457 Dst.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3u); |
11458 return Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0); | 11458 return Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0); |
11459 } | 11459 } |
11460 | 11460 |
11461 //----- (00417AD4) -------------------------------------------------------- | 11461 //----- (00417AD4) -------------------------------------------------------- |
11462 unsigned int __fastcall GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level) | 11462 unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level) |
11463 { | 11463 { |
11464 int v8; // eax@10 | 11464 int v8; // eax@10 |
11465 int v12; // eax@14 | 11465 int v12; // eax@14 |
11466 unsigned int yellow; // [sp+Ch] [bp-Ch]@1 | 11466 unsigned int yellow; // [sp+Ch] [bp-Ch]@1 |
11467 unsigned int red; // [sp+10h] [bp-8h]@1 | 11467 unsigned int red; // [sp+10h] [bp-8h]@1 |