Mercurial > mm7
comparison mm7_1.cpp @ 169:d1dde383af89
Merge
author | Nomad |
---|---|
date | Thu, 14 Feb 2013 14:03:17 +0200 |
parents | ee11772d0ad2 796b79187c27 |
children | 91fa025e6ca6 |
comparison
equal
deleted
inserted
replaced
168:ee11772d0ad2 | 169:d1dde383af89 |
---|---|
881 v16 = pItem->uAttributes; | 881 v16 = pItem->uAttributes; |
882 v17 = uCellX + ((v15 - v10) >> 1) + pSRZBufferLineOffsets[uCellY + ((((v14 - 14) & 0xFFFFFFE0) - v9 + 32) >> 1)]; | 882 v17 = uCellX + ((v15 - v10) >> 1) + pSRZBufferLineOffsets[uCellY + ((((v14 - 14) & 0xFFFFFFE0) - v9 + 32) >> 1)]; |
883 if ( !(v16 & 0xF0) ) | 883 if ( !(v16 & 0xF0) ) |
884 { | 884 { |
885 if ( v16 & 1 | 885 if ( v16 & 1 |
886 || pCurrentScreen != 13 ) | 886 || pCurrentScreen != SCREEN_HOUSE ) |
887 { | 887 { |
888 if ( v16 & 2 ) | 888 if ( v16 & 2 ) |
889 pRenderer->_4A6776(uCellX, uCellY, v7); | 889 pRenderer->_4A6776(uCellX, uCellY, v7); |
890 else | 890 else |
891 pRenderer->DrawTextureTransparent(uCellX, uCellY, v7); | 891 pRenderer->DrawTextureTransparent(uCellX, uCellY, v7); |
1255 // 5118E0: using guessed type int bRingsShownInCharScreen; | 1255 // 5118E0: using guessed type int bRingsShownInCharScreen; |
1256 | 1256 |
1257 //----- (0041AD6E) -------------------------------------------------------- | 1257 //----- (0041AD6E) -------------------------------------------------------- |
1258 void __cdecl GameUI_DrawRightPanelItems() | 1258 void __cdecl GameUI_DrawRightPanelItems() |
1259 { | 1259 { |
1260 if ( (signed int)((pParty->uTimePlayed - qword_507CC8) >> 32) <= 0 | 1260 if ( (signed int)((pParty->uTimePlayed - qword_507CC8) >> 32) <= 0 && (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) != 0i64 ) |
1261 && (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) != 0i64 ) | |
1262 qword_507CC8 = 0i64; | 1261 qword_507CC8 = 0i64; |
1263 if ( (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) == 0i64 | 1262 if ( (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) == 0i64 |
1264 && (!(SHIDWORD(pParty->uTimePlayed) < (LODWORD(pParty->uTimePlayed) < (unsigned int)qword_507CC8) | 1263 && (!(SHIDWORD(pParty->uTimePlayed) < (LODWORD(pParty->uTimePlayed) < (unsigned int)qword_507CC8) |
1265 + HIDWORD(qword_507CC8) | (pParty->uTimePlayed - qword_507CC8) >> 32 == 0) | 1264 + HIDWORD(qword_507CC8) | (pParty->uTimePlayed - qword_507CC8) >> 32 == 0) |
1266 || (unsigned int)(LODWORD(pParty->uTimePlayed) - qword_507CC8) > 0x80) ) | 1265 || (unsigned int)(LODWORD(pParty->uTimePlayed) - qword_507CC8) > 0x80) ) |
1267 { | 1266 { |
1268 qword_507CC8 = pParty->uTimePlayed; | 1267 qword_507CC8 = pParty->uTimePlayed; |
1269 byte_50697C = byte_50697C == 0; | 1268 byte_50697C = byte_50697C == 0; |
1270 if ( byte_50697C | 1269 if ( byte_50697C && pCurrentScreen != SCREEN_REST ) |
1271 && pCurrentScreen != 5 ) | |
1272 { | 1270 { |
1273 if ( bFlashQuestBook ) | 1271 if ( bFlashQuestBook ) |
1274 pRenderer->DrawTextureTransparent( | 1272 pRenderer->DrawTextureTransparent(493, 355, (Texture *)(uTextureID_ib_td1_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0)); |
1275 493u, | |
1276 355u, | |
1277 (Texture *)(uTextureID_ib_td1_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0)); | |
1278 if ( bFlashAutonotesBook ) | 1273 if ( bFlashAutonotesBook ) |
1279 pRenderer->DrawTextureTransparent( | 1274 pRenderer->DrawTextureTransparent(527, 353, (Texture *)(uTextureID_ib_td2_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0)); |
1280 527u, | |
1281 353u, | |
1282 (Texture *)(uTextureID_ib_td2_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0)); | |
1283 if ( bFlashHistoryBook ) | 1275 if ( bFlashHistoryBook ) |
1284 pRenderer->DrawTextureTransparent( | 1276 pRenderer->DrawTextureTransparent(600, 361, (Texture *)(uTextureID_ib_td5_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0)); |
1285 600u, | |
1286 361u, | |
1287 (Texture *)(uTextureID_ib_td5_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0)); | |
1288 } | 1277 } |
1289 else | 1278 else |
1290 { | 1279 { |
1291 pRenderer->DrawTextureRGB(468u, 0, pTexture_RightFrame); | 1280 pRenderer->DrawTextureRGB(468u, 0, pTexture_RightFrame); |
1292 DrawHiredNPCs(); | 1281 DrawHiredNPCs(); |
2086 if ( v26 == 37 ) | 2075 if ( v26 == 37 ) |
2087 { | 2076 { |
2088 v12 = pWindowList[v3].field_34; | 2077 v12 = pWindowList[v3].field_34; |
2089 if ( pWindowList[v3].pCurrentPosActiveItem - pWindowList[v3].pStartingPosActiveItem - v12 >= 0 ) | 2078 if ( pWindowList[v3].pCurrentPosActiveItem - pWindowList[v3].pStartingPosActiveItem - v12 >= 0 ) |
2090 { | 2079 { |
2091 v8 = pCurrentScreen == 21; | 2080 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; |
2092 pWindowList[v3].pCurrentPosActiveItem -= v12; | 2081 pWindowList[v3].pCurrentPosActiveItem -= v12; |
2093 if ( v8 ) | 2082 if ( v8 ) |
2094 { | 2083 { |
2095 pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1); | 2084 pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1); |
2096 v2 = pMessageQueue_50CBD0->uNumMessages; | 2085 v2 = pMessageQueue_50CBD0->uNumMessages; |
2126 if ( v26 == 39 ) | 2115 if ( v26 == 39 ) |
2127 { | 2116 { |
2128 v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34; | 2117 v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34; |
2129 if ( v7 < pWindowList[v3].pNumPresenceButton + pWindowList[v3].pStartingPosActiveItem ) | 2118 if ( v7 < pWindowList[v3].pNumPresenceButton + pWindowList[v3].pStartingPosActiveItem ) |
2130 { | 2119 { |
2131 v8 = pCurrentScreen == 21; | 2120 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; |
2132 pWindowList[v3].pCurrentPosActiveItem = v7; | 2121 pWindowList[v3].pCurrentPosActiveItem = v7; |
2133 if ( v8 ) | 2122 if ( v8 ) |
2134 { | 2123 { |
2135 pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1); | 2124 pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1); |
2136 v2 = pMessageQueue_50CBD0->uNumMessages; | 2125 v2 = pMessageQueue_50CBD0->uNumMessages; |
3670 pTexture_RestUI_CurrentHourglassFrame->Release(); | 3659 pTexture_RestUI_CurrentHourglassFrame->Release(); |
3671 pTexture_RestUI_CurrentHourglassFrame = 0; | 3660 pTexture_RestUI_CurrentHourglassFrame = 0; |
3672 pTexture_RestUI_CurrentSkyFrame = 0; | 3661 pTexture_RestUI_CurrentSkyFrame = 0; |
3673 pIcons_LOD->_4114F2(); | 3662 pIcons_LOD->_4114F2(); |
3674 pIcons_LOD->_40F9C5(); | 3663 pIcons_LOD->_40F9C5(); |
3675 pCurrentScreen = 0; | 3664 pCurrentScreen = SCREEN_GAME; |
3676 viewparams->bRedrawGameUI = 1; | 3665 viewparams->bRedrawGameUI = 1; |
3677 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) | 3666 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) |
3678 { | 3667 { |
3679 pOutdoor->UpdateSunlightVectors(); | 3668 pOutdoor->UpdateSunlightVectors(); |
3680 pOutdoor->UpdateFog(); | 3669 pOutdoor->UpdateFog(); |
3699 if ( !dword_506F14 ) | 3688 if ( !dword_506F14 ) |
3700 pAudioPlayer->StopChannels(-1, -1); | 3689 pAudioPlayer->StopChannels(-1, -1); |
3701 if ( pCurrentScreen ) | 3690 if ( pCurrentScreen ) |
3702 { | 3691 { |
3703 pGUIWindow_CurrentMenu->Release(); | 3692 pGUIWindow_CurrentMenu->Release(); |
3704 pCurrentScreen = 0; | 3693 pCurrentScreen = SCREEN_GAME; |
3705 viewparams->bRedrawGameUI = 1; | 3694 viewparams->bRedrawGameUI = 1; |
3706 } | 3695 } |
3707 pEventTimer->Pause(); | 3696 pEventTimer->Pause(); |
3708 if ( dword_506F14 != 2 ) | 3697 if ( dword_506F14 != 2 ) |
3709 GUIWindow::Create(518u, 450u, 0, 0, (enum WindowType)90, (int)pBtn_Rest, 0); | 3698 GUIWindow::Create(518u, 450u, 0, 0, (enum WindowType)90, (int)pBtn_Rest, 0); |
3738 if ( !_strcmpi(pCurrentMapName, "d29.blv") && (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 98) ) | 3727 if ( !_strcmpi(pCurrentMapName, "d29.blv") && (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 98) ) |
3739 uRestUI_FoodRequiredToRest = 0; | 3728 uRestUI_FoodRequiredToRest = 0; |
3740 ++pIcons_LOD->uTexturePacksCount; | 3729 ++pIcons_LOD->uTexturePacksCount; |
3741 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 3730 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
3742 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 3731 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
3743 pCurrentScreen = 5; | 3732 pCurrentScreen = SCREEN_REST; |
3744 _507CD4_RestUI_hourglass_anim_controller = 0; | 3733 _507CD4_RestUI_hourglass_anim_controller = 0; |
3745 uTextureID_RestUI_restmain = pIcons_LOD->LoadTexture("restmain", TEXTURE_16BIT_PALETTE); | 3734 uTextureID_RestUI_restmain = pIcons_LOD->LoadTexture("restmain", TEXTURE_16BIT_PALETTE); |
3746 uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE); | 3735 uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE); |
3747 uTextureID_RestUI_restb2 = pIcons_LOD->LoadTexture("restb2", TEXTURE_16BIT_PALETTE); | 3736 uTextureID_RestUI_restb2 = pIcons_LOD->LoadTexture("restb2", TEXTURE_16BIT_PALETTE); |
3748 uTextureID_RestUI_restb3 = pIcons_LOD->LoadTexture("restb3", TEXTURE_16BIT_PALETTE); | 3737 uTextureID_RestUI_restb3 = pIcons_LOD->LoadTexture("restb3", TEXTURE_16BIT_PALETTE); |
4548 0, | 4537 0, |
4549 pGlobalTXT_LocalizationStrings[79],// Exit | 4538 pGlobalTXT_LocalizationStrings[79],// Exit |
4550 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), | 4539 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), |
4551 0); | 4540 0); |
4552 pChestWindow->CreateButton(7u, 8u, 460u, 343u, 1, 0, 0xCu, 0, 0, "", 0); | 4541 pChestWindow->CreateButton(7u, 8u, 460u, 343u, 1, 0, 0xCu, 0, 0, "", 0); |
4553 pCurrentScreen = 10; | 4542 pCurrentScreen = SCREEN_CHEST; |
4554 pEventTimer->Pause(); | 4543 pEventTimer->Pause(); |
4555 return 1; | 4544 return 1; |
4556 } | 4545 } |
4557 | 4546 |
4558 //----- (0042092D) -------------------------------------------------------- | 4547 //----- (0042092D) -------------------------------------------------------- |
5211 } | 5200 } |
5212 v1 = uNumVisibleWindows; | 5201 v1 = uNumVisibleWindows; |
5213 if ( uNumVisibleWindows <= 0 ) | 5202 if ( uNumVisibleWindows <= 0 ) |
5214 { | 5203 { |
5215 LABEL_38: | 5204 LABEL_38: |
5216 if ( pCurrentScreen == 10 ) // ChestScreen | 5205 if ( pCurrentScreen == SCREEN_CHEST ) |
5217 { | 5206 { |
5218 sub_42038D(); | 5207 sub_42038D(); |
5219 //goto _return; | 5208 //goto _return; |
5220 if ( pMouse->uPointingObjectID == 0 ) | 5209 if ( pMouse->uPointingObjectID == 0 ) |
5221 { | 5210 { |
5226 } | 5215 } |
5227 } | 5216 } |
5228 uLastPointedObjectID = pMouse->uPointingObjectID; | 5217 uLastPointedObjectID = pMouse->uPointingObjectID; |
5229 return; | 5218 return; |
5230 } | 5219 } |
5231 if ( pCurrentScreen == 13 ) // HouseScreen | 5220 if ( pCurrentScreen == SCREEN_HOUSE ) |
5232 { | 5221 { |
5233 if ( dword_F8B19C != 2 | 5222 if ( dword_F8B19C != 2 |
5234 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) | 5223 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) |
5235 || v16 == -65536 ) | 5224 || v16 == -65536 ) |
5236 //goto _return; | 5225 //goto _return; |
5614 v1 = (int)a4; | 5603 v1 = (int)a4; |
5615 pEventTimer->Pause(); | 5604 pEventTimer->Pause(); |
5616 pAudioPlayer->StopChannels(-1, -1); | 5605 pAudioPlayer->StopChannels(-1, -1); |
5617 bRingsShownInCharScreen = 0; | 5606 bRingsShownInCharScreen = 0; |
5618 CharacterUI_LoadPaperdollTextures(); | 5607 CharacterUI_LoadPaperdollTextures(); |
5619 pCurrentScreen = 23; | 5608 pCurrentScreen = SCREEN_CASTING; |
5620 v2 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|WINDOW_Options), v1, 0); | 5609 v2 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|WINDOW_Options), v1, 0); |
5621 pCharacterScreen_ExitBtn = v2->CreateButton( | 5610 pCharacterScreen_ExitBtn = v2->CreateButton( |
5622 394u, | 5611 394u, |
5623 318u, | 5612 318u, |
5624 75u, | 5613 75u, |
5784 v5 = 7; | 5773 v5 = 7; |
5785 //LABEL_22: | 5774 //LABEL_22: |
5786 pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); | 5775 pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); |
5787 return; | 5776 return; |
5788 } | 5777 } |
5789 if ( pCurrentScreen == 8 ) | 5778 if ( pCurrentScreen == SCREEN_SPELL_BOOK ) |
5790 return; | 5779 return; |
5791 if ( pCurrentScreen == 10 ) | 5780 if ( pCurrentScreen == SCREEN_CHEST ) |
5792 { | 5781 { |
5793 //LABEL_23: | 5782 //LABEL_23: |
5794 viewparams->bRedrawGameUI = 1; | 5783 viewparams->bRedrawGameUI = 1; |
5795 if ( uActiveCharacter == v1 ) | 5784 if ( uActiveCharacter == v1 ) |
5796 { | 5785 { |
5797 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; | 5786 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; |
5798 pCurrentScreen = 15; | 5787 pCurrentScreen = SCREEN_F; |
5799 //goto LABEL_28; | 5788 //goto LABEL_28; |
5800 uActiveCharacter = v1; | 5789 uActiveCharacter = v1; |
5801 return; | 5790 return; |
5802 } | 5791 } |
5803 //LABEL_27: | 5792 //LABEL_27: |
5805 return; | 5794 return; |
5806 //goto LABEL_28; | 5795 //goto LABEL_28; |
5807 uActiveCharacter = v1; | 5796 uActiveCharacter = v1; |
5808 return; | 5797 return; |
5809 } | 5798 } |
5810 if ( pCurrentScreen != 13 ) | 5799 if ( pCurrentScreen != SCREEN_HOUSE ) |
5811 { | 5800 { |
5812 if ( pCurrentScreen == 14 ) | 5801 if ( pCurrentScreen == SCREEN_E ) |
5813 { | 5802 { |
5814 //LABEL_28: | 5803 //LABEL_28: |
5815 uActiveCharacter = v1; | 5804 uActiveCharacter = v1; |
5816 return; | 5805 return; |
5817 } | 5806 } |
5818 if ( pCurrentScreen != 15 ) | 5807 if ( pCurrentScreen != SCREEN_F ) |
5819 { | 5808 { |
5820 viewparams->bRedrawGameUI = 1; | 5809 viewparams->bRedrawGameUI = 1; |
5821 uActiveCharacter = v1; | 5810 uActiveCharacter = v1; |
5822 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 102 ) | 5811 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 102 ) |
5823 sub_419100(); | 5812 sub_419100(); |
5826 //goto LABEL_23; | 5815 //goto LABEL_23; |
5827 viewparams->bRedrawGameUI = 1; | 5816 viewparams->bRedrawGameUI = 1; |
5828 if ( uActiveCharacter == v1 ) | 5817 if ( uActiveCharacter == v1 ) |
5829 { | 5818 { |
5830 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; | 5819 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; |
5831 pCurrentScreen = 15; | 5820 pCurrentScreen = SCREEN_F; |
5832 //goto LABEL_28; | 5821 //goto LABEL_28; |
5833 uActiveCharacter = v1; | 5822 uActiveCharacter = v1; |
5834 return; | 5823 return; |
5835 } | 5824 } |
5836 //LABEL_27: | 5825 //LABEL_27: |
6214 | 6203 |
6215 //----- (004226C2) -------------------------------------------------------- | 6204 //----- (004226C2) -------------------------------------------------------- |
6216 bool __cdecl sub_4226C2() | 6205 bool __cdecl sub_4226C2() |
6217 { | 6206 { |
6218 if ( pCurrentScreen | 6207 if ( pCurrentScreen |
6219 && pCurrentScreen != 4 | 6208 && pCurrentScreen != SCREEN_NPC_DIALOGUE |
6220 && pCurrentScreen != 17 ) | 6209 && pCurrentScreen != SCREEN_CHANGE_LOCATION ) |
6221 { | 6210 { |
6222 if ( pCurrentScreen == 18 ) | 6211 if ( pCurrentScreen == SCREEN_INPUT_BLV ) |
6223 return pVideoPlayer->pSmackerMovie != 0; | 6212 return pVideoPlayer->pSmackerMovie != 0; |
6224 if ( pCurrentScreen != 19 ) | 6213 if ( pCurrentScreen != SCREEN_BRANCHLESS_NPC_DIALOG ) |
6225 return 1; | 6214 return 1; |
6226 } | 6215 } |
6227 return 0; | 6216 return 0; |
6228 } | 6217 } |
6229 // 4E28F8: using guessed type int pCurrentScreen; | 6218 // 4E28F8: using guessed type int pCurrentScreen; |