Mercurial > mm7
comparison mm7_6.cpp @ 437:0a1ea44b4a0a
ui mesages & spellcasting
author | Nomad |
---|---|
date | Sun, 24 Feb 2013 09:51:42 +0200 |
parents | 58b71c1af7d8 |
children | acd8fa960c32 |
comparison
equal
deleted
inserted
replaced
435:4f451a616d3d | 437:0a1ea44b4a0a |
---|---|
2173 //----- (0042777D) -------------------------------------------------------- | 2173 //----- (0042777D) -------------------------------------------------------- |
2174 void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6) | 2174 void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6) |
2175 { | 2175 { |
2176 //bool result; // eax@2 | 2176 //bool result; // eax@2 |
2177 __int16 v6; // bx@4 | 2177 __int16 v6; // bx@4 |
2178 Player *v7; // eax@4 | 2178 //Player *v7; // eax@4 |
2179 char v8; // zf@12 | 2179 char v8; // zf@12 |
2180 unsigned __int16 v9; // cx@16 | 2180 unsigned __int16 v9; // cx@16 |
2181 unsigned int v10; // eax@18 | 2181 unsigned int v10; // eax@18 |
2182 unsigned __int8 v11; // sf@18 | 2182 unsigned __int8 v11; // sf@18 |
2183 unsigned __int8 v12; // of@18 | 2183 unsigned __int8 v12; // of@18 |
2212 return; | 2212 return; |
2213 } | 2213 } |
2214 | 2214 |
2215 | 2215 |
2216 v6 = a5; | 2216 v6 = a5; |
2217 v7 = &pParty->pPlayers[uPlayerID]; | 2217 //v7 = &pParty->pPlayers[uPlayerID]; |
2218 assert(uPlayerID < 4); | |
2219 auto player = &pParty->pPlayers[uPlayerID]; | |
2218 if ( !(a5 & 0x10) ) | 2220 if ( !(a5 & 0x10) ) |
2219 { | 2221 { |
2220 switch ( a1 ) | 2222 switch ( a1 ) |
2221 { | 2223 { |
2222 case 47: | 2224 case 47: |
2273 break; | 2275 break; |
2274 case 46: | 2276 case 46: |
2275 if ( a4 ) | 2277 if ( a4 ) |
2276 v8 = (a4 & 0x1C0) == 0; | 2278 v8 = (a4 & 0x1C0) == 0; |
2277 else | 2279 else |
2278 v8 = (v7->pActiveSkills[16] & 0x1C0) == 0; | 2280 v8 = (player->pActiveSkills[PLAYER_SKILL_SPIRIT] & 0x1C0) == 0; |
2279 if ( v8 ) | 2281 if ( v8 ) |
2280 goto LABEL_25; | 2282 goto LABEL_25; |
2281 break; | 2283 break; |
2282 case 50: | 2284 case 50: |
2283 v9 = a4; | 2285 v9 = a4; |
2284 if ( !a4 ) | 2286 if ( !a4 ) |
2285 v9 = v7->pActiveSkills[16]; | 2287 v9 = player->pActiveSkills[PLAYER_SKILL_SPIRIT]; |
2286 goto LABEL_18; | 2288 goto LABEL_18; |
2287 case 95: | 2289 case 95: |
2288 v9 = a4; | 2290 v9 = a4; |
2289 if ( !a4 ) | 2291 if ( !a4 ) |
2290 v9 = v7->pActiveSkills[20]; | 2292 v9 = player->pActiveSkills[PLAYER_SKILL_DARK]; |
2291 LABEL_18: | 2293 LABEL_18: |
2292 v10 = SkillToMastery(v9); | 2294 v10 = SkillToMastery(v9); |
2293 v12 = __OFSUB__(v10, 3); | 2295 v12 = __OFSUB__(v10, 3); |
2294 v11 = ((v10 - 3) & 0x80000000u) != 0; | 2296 v11 = ((v10 - 3) & 0x80000000u) != 0; |
2295 goto LABEL_24; | 2297 goto LABEL_24; |
2296 case 73: | 2298 case 73: |
2297 v13 = a4; | 2299 v13 = a4; |
2298 if ( !a4 ) | 2300 if ( !a4 ) |
2299 v13 = v7->pActiveSkills[18]; | 2301 v13 = player->pActiveSkills[PLAYER_SKILL_BODY]; |
2300 v14 = SkillToMastery(v13); | 2302 v14 = SkillToMastery(v13); |
2301 v12 = __OFSUB__(v14, 4); | 2303 v12 = __OFSUB__(v14, 4); |
2302 v11 = ((v14 - 4) & 0x80000000u) != 0; | 2304 v11 = ((v14 - 4) & 0x80000000u) != 0; |
2303 LABEL_24: | 2305 LABEL_24: |
2304 if ( v11 ^ v12 ) | 2306 if ( v11 ^ v12 ) |
5611 if ( pPlayer->sMana < (signed int)uRequiredMana ) | 5613 if ( pPlayer->sMana < (signed int)uRequiredMana ) |
5612 goto LABEL_83; | 5614 goto LABEL_83; |
5613 if ( pParty->uFlags & 0x30 && v12 != 4 || rand() % 100 >= amount && v731 != 4 ) | 5615 if ( pParty->uFlags & 0x30 && v12 != 4 || rand() % 100 >= amount && v731 != 4 ) |
5614 goto LABEL_200; | 5616 goto LABEL_200; |
5615 byte_50C0C0 = LOBYTE(v3->uPlayerID); | 5617 byte_50C0C0 = LOBYTE(v3->uPlayerID); |
5616 pMessageQueue_50CBD0->SendMessage((UIMessageType)195, v1, v1); | 5618 pMessageQueue_50CBD0->AddMessage(UIMSG_C3, v1, v1); |
5617 goto LABEL_1056; | 5619 goto LABEL_1056; |
5618 case 33: | 5620 case 33: |
5619 LODWORD(v733) = 604800 * v2; | 5621 LODWORD(v733) = 604800 * v2; |
5620 if ( !_strcmpi(pCurrentMapName, "d05.blv") ) | 5622 if ( !_strcmpi(pCurrentMapName, "d05.blv") ) |
5621 goto LABEL_200; | 5623 goto LABEL_200; |
5622 v319 = uRequiredMana; | 5624 v319 = uRequiredMana; |
5623 if ( pPlayer->sMana >= (signed int)uRequiredMana ) | 5625 if ( pPlayer->sMana >= (signed int)uRequiredMana ) |
5624 { | 5626 { |
5625 pEventTimer->Pause(); | 5627 pEventTimer->Pause(); |
5626 pMessageQueue_50CBD0->SendMessage((UIMessageType)177, v1, v1); | 5628 pMessageQueue_50CBD0->AddMessage(UIMSG_B1, v1, v1); |
5627 qword_506350 = (signed int)v733; | 5629 qword_506350 = (signed int)v733; |
5628 _506348_current_lloyd_playerid = v3->uPlayerID; | 5630 _506348_current_lloyd_playerid = v3->uPlayerID; |
5629 ::uRequiredMana = v319; | 5631 ::uRequiredMana = v319; |
5630 ::sRecoveryTime = sRecoveryTime; | 5632 ::sRecoveryTime = sRecoveryTime; |
5631 dword_50633C = v3->field_10; | 5633 dword_50633C = v3->field_10; |
7793 int IconFrameTable::GetIconAnimLength(unsigned int uIconID) | 7795 int IconFrameTable::GetIconAnimLength(unsigned int uIconID) |
7794 { | 7796 { |
7795 return 8 * this->pIcons[uIconID].uAnimLength; | 7797 return 8 * this->pIcons[uIconID].uAnimLength; |
7796 } | 7798 } |
7797 | 7799 |
7800 | |
7801 const wchar_t *UIMessage2String(UIMessageType msg) | |
7802 { | |
7803 #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b; | |
7804 static wchar_t b[256]; // bad for threads | |
7805 switch (msg) | |
7806 { | |
7807 CASE(UIMSG_SelectSpell) | |
7808 CASE(UIMSG_ChangeGameState) | |
7809 CASE(UIMSG_Attack) | |
7810 CASE(UIMSG_PlayArcomage) | |
7811 CASE(UIMSG_MainMenu_ShowPartyCreationWnd) | |
7812 CASE(UIMSG_MainMenu_ShowLoadWindow) | |
7813 CASE(UIMSG_ShowCredits) | |
7814 CASE(UIMSG_ExitToWindows) | |
7815 CASE(UIMSG_PlayerCreationChangeName) | |
7816 CASE(UIMSG_PlayerCreationClickPlus) | |
7817 CASE(UIMSG_PlayerCreationClickMinus) | |
7818 CASE(UIMSG_PlayerCreationSelectActiveSkill) | |
7819 CASE(UIMSG_PlayerCreationSelectClass) | |
7820 CASE(UIMSG_PlayerCreationClickOK) | |
7821 CASE(UIMSG_PlayerCreationClickReset) | |
7822 CASE(UIMSG_AutonotesBook) | |
7823 CASE(UIMSG_PlayerCreationRemoveUpSkill) | |
7824 CASE(UIMSG_PlayerCreationRemoveDownSkill) | |
7825 CASE(UIMSG_SPellbook_ShowHightlightedSpellInfo) | |
7826 CASE(UIMSG_LoadGame) | |
7827 CASE(UIMSG_SaveGame) | |
7828 CASE(UIMSG_ShowStatus_DateTime) | |
7829 CASE(UIMSG_ShowStatus_ManaHP) | |
7830 CASE(UIMSG_ShowStatus_Player) | |
7831 CASE(UIMSG_Wait5Minutes) | |
7832 CASE(UIMSG_Wait1Hour) | |
7833 CASE(UIMSG_ShowStatus_Food) | |
7834 CASE(UIMSG_ShowStatus_Funds) | |
7835 CASE(UIMSG_QuickReference) | |
7836 CASE(UIMSG_GameMenuButton) | |
7837 CASE(UIMSG_AlreadyResting) | |
7838 CASE(UIMSG_SelectCharacter) | |
7839 CASE(UIMSG_ChangeSoundVolume) | |
7840 CASE(UIMSG_ChangeMusicVolume) | |
7841 CASE(UIMSG_Escape) | |
7842 CASE(UIMSG_PlayerCreation_SelectAttribute) | |
7843 CASE(UIMSG_InventoryLeftClick) | |
7844 CASE(UIMSG_SkillUp) | |
7845 CASE(UIMSG_GameMenu_ReturnToGame) | |
7846 CASE(UIMSG_StartNewGame) | |
7847 CASE(UIMSG_Game_OpenLoadGameDialog) | |
7848 CASE(UIMSG_Game_OpenSaveGameDialog) | |
7849 CASE(UIMSG_Game_OpenOptionsDialog) | |
7850 CASE(UIMSG_SetGraphicsMode) | |
7851 CASE(UIMSG_Quit) | |
7852 CASE(UIMSG_StartHireling1Dialogue) | |
7853 CASE(UIMSG_StartHireling2Dialogue) | |
7854 CASE(UIMSG_SelectDialogueOption) | |
7855 CASE(UIMSG_CastSpellFromBook) | |
7856 CASE(UIMSG_PlayerCreation_VoicePrev) | |
7857 CASE(UIMSG_PlayerCreation_VoiceNext) | |
7858 CASE(UIMSG_StartNPCDialogue) | |
7859 CASE(UIMSG_ArrowUp) | |
7860 CASE(UIMSG_DownArrow) | |
7861 CASE(UIMSG_LoadSlot) | |
7862 CASE(UIMSG_SelectLoadSlot) | |
7863 CASE(UIMSG_Cancel) | |
7864 CASE(UIMSG_ExitRest) | |
7865 CASE(UIMSG_PlayerCreation_FacePrev) | |
7866 CASE(UIMSG_PlayerCreation_FaceNext) | |
7867 CASE(UIMSG_CycleCharacters) | |
7868 CASE(UIMSG_SetTurnSpeed) | |
7869 CASE(UIMSG_ToggleWalkSound) | |
7870 CASE(UIMSG_ChangeVoiceVolume) | |
7871 CASE(UIMSG_ToggleShowDamage) | |
7872 CASE(UIMSG_ScrollNPCPanel) | |
7873 CASE(UIMSG_ShowFinalWindow) | |
7874 CASE(UIMSG_OpenQuestBook) | |
7875 CASE(UIMSG_OpenAutonotes) | |
7876 CASE(UIMSG_OpenMapBook) | |
7877 CASE(UIMSG_OpenCalendar) | |
7878 CASE(UIMSG_OpenHistoryBook) | |
7879 CASE(UIMSG_ToggleAlwaysRun) | |
7880 CASE(UIMSG_ToggleFlipOnExit) | |
7881 CASE(UIMSG_Game_Action) | |
7882 CASE(UIMSG_OpenRestUI) | |
7883 CASE(UIMSG_TransitionUI_Confirm) | |
7884 CASE(UIMSG_OpenKeyMappingOptions) | |
7885 CASE(UIMSG_SelectKeyPage1) | |
7886 CASE(UIMSG_SelectKeyPage2) | |
7887 CASE(UIMSG_ResetKeyMapping) | |
7888 CASE(UIMSG_ChangeKeyButton) | |
7889 CASE(UIMSG_OpenVideoOptions) | |
7890 CASE(UIMSG_ToggleBloodsplats) | |
7891 CASE(UIMSG_ToggleColoredLights) | |
7892 CASE(UIMSG_ToggleTint) | |
7893 default: | |
7894 _swprintf(b, L"UIMSG_%03X", msg); return b; | |
7895 }; | |
7896 #undef CASE | |
7897 } | |
7898 | |
7899 | |
7798 //----- (0042EB8D) -------------------------------------------------------- | 7900 //----- (0042EB8D) -------------------------------------------------------- |
7799 void GUIMessageQueue::SendMessage(UIMessageType msg, int param, unsigned int a4) | 7901 void GUIMessageQueue::AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file, int line) |
7800 { | 7902 { |
7903 Log::Warning(L"%s @ (%S %u)", UIMessage2String(msg), file, line); | |
7801 if (uNumMessages < 40) | 7904 if (uNumMessages < 40) |
7802 { | 7905 { |
7906 files[uNumMessages] = file; | |
7907 lines[uNumMessages] = line; | |
7908 | |
7803 pMessages[uNumMessages].eType = msg; | 7909 pMessages[uNumMessages].eType = msg; |
7804 pMessages[uNumMessages].param = param; | 7910 pMessages[uNumMessages].param = param; |
7805 pMessages[uNumMessages++].field_8 = a4; | 7911 pMessages[uNumMessages++].field_8 = a4; |
7806 } | 7912 } |
7807 } | 7913 } |
9082 || ((v9 = v7->pActiveSkills[(unsigned __int8)v8 / 11 + 12], !(HIBYTE(v9) & 1)) ? ((v9 & 0x80u) == 0 ? (!(v9 & 0x40) ? (v10 = *(&pSpellDatas[0].uNormalLevelMana + 10 * (unsigned __int8)v8)) : (v10 = *(&pSpellDatas[0].uExpertLevelMana + 10 * (unsigned __int8)v8))) : (v10 = *(&pSpellDatas[0].uMasterLevelMana + 10 * (unsigned __int8)v8))) : (v10 = *(&pSpellDatas[0].uMagisterLevelMana + 10 * (unsigned __int8)v8)), | 9188 || ((v9 = v7->pActiveSkills[(unsigned __int8)v8 / 11 + 12], !(HIBYTE(v9) & 1)) ? ((v9 & 0x80u) == 0 ? (!(v9 & 0x40) ? (v10 = *(&pSpellDatas[0].uNormalLevelMana + 10 * (unsigned __int8)v8)) : (v10 = *(&pSpellDatas[0].uExpertLevelMana + 10 * (unsigned __int8)v8))) : (v10 = *(&pSpellDatas[0].uMasterLevelMana + 10 * (unsigned __int8)v8))) : (v10 = *(&pSpellDatas[0].uMagisterLevelMana + 10 * (unsigned __int8)v8)), |
9083 v10 > v7->sMana) ) | 9189 v10 > v7->sMana) ) |
9084 { | 9190 { |
9085 pActionQueue = pPartyActionQueue; | 9191 pActionQueue = pPartyActionQueue; |
9086 LABEL_120: | 9192 LABEL_120: |
9087 | 9193 pMessageQueue_50CBD0->AddMessage(UIMSG_Attack, 0, 0); |
9088 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 9194 break; |
9195 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
9089 { | 9196 { |
9090 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Attack; | 9197 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Attack; |
9091 //goto _send_message; | 9198 //goto _send_message; |
9092 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9199 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9093 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9200 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9094 ++pMessageQueue_50CBD0->uNumMessages; | 9201 ++pMessageQueue_50CBD0->uNumMessages; |
9095 break; | 9202 break; |
9096 } | 9203 }*/ |
9097 } | 9204 } |
9098 else | 9205 else |
9099 { | 9206 { |
9100 pActionQueue = pPartyActionQueue; | 9207 pActionQueue = pPartyActionQueue; |
9101 if ( dword_50C9E8 < 40 ) | 9208 if ( dword_50C9E8 < 40 ) |
9102 { | 9209 { |
9103 dword_50C9EC[3 * dword_50C9E8] = 25; | 9210 dword_50C9EC[3 * dword_50C9E8] = 25; |
9104 dword_50C9F0[3 * dword_50C9E8] = 0; | 9211 dword_50C9EC[3 * dword_50C9E8 + 1] = 0; |
9105 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | 9212 dword_50C9EC[3 * dword_50C9E8 + 2] = 0; |
9106 ++dword_50C9E8; | 9213 ++dword_50C9E8; |
9107 } | 9214 } |
9108 } | 9215 } |
9109 break; | 9216 break; |
9110 case INPUT_Attack: | 9217 case INPUT_Attack: |
9117 pTurnEngine->field_18 |= 8u; | 9224 pTurnEngine->field_18 |= 8u; |
9118 break; | 9225 break; |
9119 case INPUT_EventTrigger: | 9226 case INPUT_EventTrigger: |
9120 if (pCurrentScreen == SCREEN_GAME) | 9227 if (pCurrentScreen == SCREEN_GAME) |
9121 { | 9228 { |
9122 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 9229 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
9123 break; | 9230 break; |
9124 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Game_Action; | 9231 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Game_Action; |
9125 //goto _send_message; | 9232 //goto _send_message; |
9126 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9233 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9127 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9234 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9128 ++pMessageQueue_50CBD0->uNumMessages; | 9235 ++pMessageQueue_50CBD0->uNumMessages; |
9236 break;*/ | |
9237 pMessageQueue_50CBD0->AddMessage(UIMSG_Game_Action, 0, 0); | |
9129 break; | 9238 break; |
9130 } | 9239 } |
9131 if ( pCurrentScreen == SCREEN_NPC_DIALOGUE ) | 9240 if ( pCurrentScreen == SCREEN_NPC_DIALOGUE ) |
9132 { | 9241 { |
9133 v11 = pMessageQueue_50CBD0->uNumMessages; | 9242 v11 = pMessageQueue_50CBD0->uNumMessages; |
9134 if ( pMessageQueue_50CBD0->uNumMessages ) | 9243 if ( pMessageQueue_50CBD0->uNumMessages ) |
9135 { | 9244 { |
9245 v11 = 0; | |
9246 pMessageQueue_50CBD0->uNumMessages = 0; | |
9136 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) | 9247 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) |
9137 { | 9248 { |
9138 v11 = 1; | 9249 v11 = 1; |
9139 pMessageQueue_50CBD0->uNumMessages = 1; | 9250 pMessageQueue_50CBD0->uNumMessages = 1; |
9140 //LABEL_132: | 9251 //LABEL_132: |
9143 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9254 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9144 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9255 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9145 ++pMessageQueue_50CBD0->uNumMessages; | 9256 ++pMessageQueue_50CBD0->uNumMessages; |
9146 break; | 9257 break; |
9147 } | 9258 } |
9148 v11 = 0; | 9259 break; |
9149 pMessageQueue_50CBD0->uNumMessages = 0; | |
9150 } | 9260 } |
9151 if ( (signed int)v11 < 40 ) | 9261 /*if ( (signed int)v11 < 40 ) |
9152 //goto LABEL_132; | 9262 //goto LABEL_132; |
9153 { | 9263 { |
9154 pMessageQueue_50CBD0->pMessages[v11].eType = UIMSG_Escape; | 9264 pMessageQueue_50CBD0->pMessages[v11].eType = UIMSG_Escape; |
9155 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9265 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9156 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9266 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9157 ++pMessageQueue_50CBD0->uNumMessages; | 9267 ++pMessageQueue_50CBD0->uNumMessages; |
9158 break; | 9268 break; |
9159 } | 9269 }*/ |
9270 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | |
9160 } | 9271 } |
9161 break; | 9272 break; |
9162 case INPUT_CharCycle: | 9273 case INPUT_CharCycle: |
9163 //__debugbreak(); | 9274 //__debugbreak(); |
9164 if ( pCurrentScreen == SCREEN_SPELL_BOOK | 9275 if ( pCurrentScreen == SCREEN_SPELL_BOOK |
9165 || dword_50C9E8 >= 40 ) | 9276 || dword_50C9E8 >= 40 ) |
9166 break; | 9277 break; |
9167 dword_50C9EC[3 * dword_50C9E8] = 176; | 9278 dword_50C9EC[3 * dword_50C9E8] = 176; |
9168 //goto LABEL_155; | 9279 //goto LABEL_155; |
9169 dword_50C9F0[3 * dword_50C9E8] = 0; | 9280 dword_50C9EC[3 * dword_50C9E8 + 1] = 0; |
9170 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | 9281 dword_50C9EC[3 * dword_50C9E8 + 2] = 0; |
9171 ++dword_50C9E8; | 9282 ++dword_50C9E8; |
9172 break; | 9283 break; |
9173 case INPUT_LookUp: | 9284 case INPUT_LookUp: |
9174 //__debugbreak(); | 9285 //__debugbreak(); |
9175 if ( pEventTimer->bPaused ) | 9286 if ( pEventTimer->bPaused ) |
9233 //__debugbreak(); | 9344 //__debugbreak(); |
9234 if ( dword_50C9E8 >= 40 ) | 9345 if ( dword_50C9E8 >= 40 ) |
9235 break; | 9346 break; |
9236 dword_50C9EC[3 * dword_50C9E8] = 367; | 9347 dword_50C9EC[3 * dword_50C9E8] = 367; |
9237 //goto LABEL_155; | 9348 //goto LABEL_155; |
9238 dword_50C9F0[3 * dword_50C9E8] = 0; | 9349 dword_50C9EC[3 * dword_50C9E8 + 1] = 0; |
9239 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | 9350 dword_50C9EC[3 * dword_50C9E8 + 2] = 0; |
9240 ++dword_50C9E8; | 9351 ++dword_50C9E8; |
9241 break; | 9352 break; |
9242 case INPUT_ZoomOut: | 9353 case INPUT_ZoomOut: |
9243 //__debugbreak(); | 9354 //__debugbreak(); |
9244 if ( dword_50C9E8 < 40 ) | 9355 if ( dword_50C9E8 < 40 ) |
9245 { | 9356 { |
9246 dword_50C9EC[3 * dword_50C9E8] = 368; | 9357 dword_50C9EC[3 * dword_50C9E8] = 368; |
9247 //LABEL_155: | 9358 //LABEL_155: |
9248 dword_50C9F0[3 * dword_50C9E8] = 0; | 9359 dword_50C9EC[3 * dword_50C9E8 + 1] = 0; |
9249 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | 9360 dword_50C9EC[3 * dword_50C9E8 + 2] = 0; |
9250 ++dword_50C9E8; | 9361 ++dword_50C9E8; |
9251 } | 9362 } |
9252 break; | 9363 break; |
9253 case INPUT_AlwaysRun: | 9364 case INPUT_AlwaysRun: |
9254 bAlwaysRun = bAlwaysRun == 0; | 9365 bAlwaysRun = bAlwaysRun == 0; |
9274 v14 = v13->IsKeyBeingHeld(v22); | 9385 v14 = v13->IsKeyBeingHeld(v22); |
9275 if ( v14 && v12 == 9 ) | 9386 if ( v14 && v12 == 9 ) |
9276 { | 9387 { |
9277 if ( !pCurrentScreen ) | 9388 if ( !pCurrentScreen ) |
9278 { | 9389 { |
9279 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 9390 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
9280 goto LABEL_175; | 9391 goto LABEL_175; |
9281 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; | 9392 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; |
9282 //goto LABEL_174; | 9393 //goto LABEL_174; |
9283 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9394 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9284 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9395 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9285 ++pMessageQueue_50CBD0->uNumMessages; | 9396 ++pMessageQueue_50CBD0->uNumMessages;*/ |
9397 pMessageQueue_50CBD0->AddMessage(UIMSG_Game_Action, 0, 0); | |
9286 goto LABEL_175; | 9398 goto LABEL_175; |
9287 } | 9399 } |
9288 if ( pCurrentScreen == SCREEN_NPC_DIALOGUE | 9400 if ( pCurrentScreen == SCREEN_NPC_DIALOGUE |
9289 || pCurrentScreen == SCREEN_BRANCHLESS_NPC_DIALOG ) | 9401 || pCurrentScreen == SCREEN_BRANCHLESS_NPC_DIALOG ) |
9290 { | 9402 { |
9293 { | 9405 { |
9294 v15 = 0; | 9406 v15 = 0; |
9295 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) | 9407 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) |
9296 { | 9408 { |
9297 v15 = 1; | 9409 v15 = 1; |
9298 pMessageQueue_50CBD0->uNumMessages = 1; | 9410 pMessageQueue_50CBD0->uNumMessages = 0; |
9299 //goto LABEL_173; | 9411 //goto LABEL_173; |
9300 pMessageQueue_50CBD0->pMessages[v15].eType = (UIMessageType)113; | 9412 pMessageQueue_50CBD0->pMessages[v15].eType = UIMSG_Escape; |
9301 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9413 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9302 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9414 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9303 ++pMessageQueue_50CBD0->uNumMessages; | 9415 ++pMessageQueue_50CBD0->uNumMessages; |
9304 goto LABEL_175; | 9416 goto LABEL_175; |
9305 } | 9417 } |
9306 pMessageQueue_50CBD0->uNumMessages = 0; | 9418 pMessageQueue_50CBD0->uNumMessages = 0; |
9307 } | 9419 } |
9308 if ( (signed int)v15 >= 40 ) | 9420 /*if ( (signed int)v15 >= 40 ) |
9309 goto LABEL_175; | 9421 goto LABEL_175; |
9310 //LABEL_173: | 9422 //LABEL_173: |
9311 pMessageQueue_50CBD0->pMessages[v15].eType = (UIMessageType)113; | 9423 pMessageQueue_50CBD0->pMessages[v15].eType = (UIMessageType)113; |
9312 //LABEL_174: | 9424 //LABEL_174: |
9313 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9425 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9314 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9426 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9315 ++pMessageQueue_50CBD0->uNumMessages; | 9427 ++pMessageQueue_50CBD0->uNumMessages;*/ |
9428 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | |
9316 goto LABEL_175; | 9429 goto LABEL_175; |
9317 } | 9430 } |
9318 } | 9431 } |
9319 LABEL_175: | 9432 LABEL_175: |
9320 ++v12; | 9433 ++v12; |