Mercurial > mm7
comparison mm7_5.cpp @ 916:897b10712a1a
UIShop_Buy_Identify_Repair little clean and rename
author | Ritor1 |
---|---|
date | Thu, 25 Apr 2013 17:37:00 +0600 |
parents | 8cd0b155bebe |
children | 34ed2d5e7cfb |
comparison
equal
deleted
inserted
replaced
915:9efbe4bff7ac | 916:897b10712a1a |
---|---|
54 Actor *pActor; // ecx@13 | 54 Actor *pActor; // ecx@13 |
55 int v4; // ecx@18 | 55 int v4; // ecx@18 |
56 //NPCData *pNPCData0; // eax@18 | 56 //NPCData *pNPCData0; // eax@18 |
57 //int v6; // edx@20 | 57 //int v6; // edx@20 |
58 //int v7; // ecx@29 | 58 //int v7; // ecx@29 |
59 unsigned int v8; // edx@59 | 59 //unsigned int v8; // edx@59 |
60 unsigned int v9; // ecx@60 | 60 //unsigned int v9; // ecx@60 |
61 unsigned int v10; // ecx@73 | 61 unsigned int v10; // ecx@73 |
62 //unsigned int v11; // eax@75 | 62 //unsigned int v11; // eax@75 |
63 unsigned __int8 v12; // sf@75 | 63 unsigned __int8 v12; // sf@75 |
64 unsigned __int8 v13; // of@75 | 64 unsigned __int8 v13; // of@75 |
65 int v14; // eax@98 | 65 int v14; // eax@98 |
125 signed int v74; // edi@535 | 125 signed int v74; // edi@535 |
126 int v75; // eax@535 | 126 int v75; // eax@535 |
127 int v76; // esi@535 | 127 int v76; // esi@535 |
128 int v77; // eax@537 | 128 int v77; // eax@537 |
129 Player *pPlayer2; // ecx@549 | 129 Player *pPlayer2; // ecx@549 |
130 int v79; // ecx@550 | 130 //int v79; // ecx@550 |
131 unsigned int v80; // edx@550 | 131 //unsigned int v80; // edx@550 |
132 signed int v81; // eax@552 | 132 signed int v81; // eax@552 |
133 POINT *pPoint2; // eax@553 | 133 POINT *pPoint2; // eax@553 |
134 signed int v83; // ecx@554 | 134 signed int v83; // ecx@554 |
135 signed int v84; // ecx@554 | 135 signed int v84; // ecx@554 |
136 GUIButton *pButton; // eax@578 | 136 GUIButton *pButton; // eax@578 |
137 unsigned int v86; // eax@583 | 137 unsigned int v86; // eax@583 |
138 const char *v87; // ecx@595 | 138 const char *v87; // ecx@595 |
139 const char *v88; // ecx@596 | 139 const char *v88; // ecx@596 |
140 unsigned int v89; // eax@598 | 140 //unsigned int v89; // eax@598 |
141 unsigned int v90; // eax@602 | 141 unsigned int v90; // eax@602 |
142 int v91; // edx@605 | 142 int v91; // edx@605 |
143 int v92; // eax@605 | 143 int v92; // eax@605 |
144 int v93; // edx@605 | 144 int v93; // edx@605 |
145 int pPlayerNum; // edx@611 | 145 int pPlayerNum; // edx@611 |
146 int v95; // eax@611 | 146 int v95; // eax@611 |
147 const char *v96; // ecx@621 | 147 //const char *v96; // ecx@621 |
148 unsigned int v97; // eax@624 | 148 unsigned int v97; // eax@624 |
149 int v98; // eax@636 | 149 int v98; // eax@636 |
150 unsigned __int8 v99; // al@643 | 150 unsigned __int8 v99; // al@643 |
151 Player *pPlayer3; // eax@648 | 151 Player *pPlayer3; // eax@648 |
152 int v101; // ecx@648 | 152 int v101; // ecx@648 |
176 unsigned int v125; // [sp-20h] [bp-61Ch]@711 | 176 unsigned int v125; // [sp-20h] [bp-61Ch]@711 |
177 unsigned int v126; // [sp-1Ch] [bp-618h]@86 | 177 unsigned int v126; // [sp-1Ch] [bp-618h]@86 |
178 int v127; // [sp-1Ch] [bp-618h]@107 | 178 int v127; // [sp-1Ch] [bp-618h]@107 |
179 unsigned int v128; // [sp-1Ch] [bp-618h]@711 | 179 unsigned int v128; // [sp-1Ch] [bp-618h]@711 |
180 int v129; // [sp-18h] [bp-614h]@86 | 180 int v129; // [sp-18h] [bp-614h]@86 |
181 signed int v130; // [sp-18h] [bp-614h]@107 | 181 //signed int v130; // [sp-18h] [bp-614h]@107 |
182 int v131; // [sp-14h] [bp-610h]@86 | 182 int v131; // [sp-14h] [bp-610h]@86 |
183 unsigned int v132; // [sp-14h] [bp-610h]@107 | 183 //unsigned int v132; // [sp-14h] [bp-610h]@107 |
184 unsigned int v133; // [sp-10h] [bp-60Ch]@60 | 184 //unsigned int v133; // [sp-10h] [bp-60Ch]@60 |
185 unsigned int v134; // [sp-10h] [bp-60Ch]@86 | 185 unsigned int v134; // [sp-10h] [bp-60Ch]@86 |
186 signed int v135; // [sp-10h] [bp-60Ch]@107 | 186 //signed int v135; // [sp-10h] [bp-60Ch]@107 |
187 unsigned int v136; // [sp-10h] [bp-60Ch]@121 | 187 unsigned int v136; // [sp-10h] [bp-60Ch]@121 |
188 unsigned int v137; // [sp-Ch] [bp-608h]@60 | 188 //unsigned int v137; // [sp-Ch] [bp-608h]@60 |
189 unsigned int v138; // [sp-Ch] [bp-608h]@86 | 189 unsigned int v138; // [sp-Ch] [bp-608h]@86 |
190 signed int v139; // [sp-Ch] [bp-608h]@107 | 190 //signed int v139; // [sp-Ch] [bp-608h]@107 |
191 unsigned int v140; // [sp-Ch] [bp-608h]@121 | 191 unsigned int v140; // [sp-Ch] [bp-608h]@121 |
192 enum WindowType pWindowType; // [sp-8h] [bp-604h]@56 | 192 enum WindowType pWindowType; // [sp-8h] [bp-604h]@56 |
193 enum WindowType pWindowType1; // [sp-8h] [bp-604h]@60 | 193 //enum WindowType pWindowType1; // [sp-8h] [bp-604h]@60 |
194 unsigned __int8 v143; // [sp-8h] [bp-604h]@86 | 194 unsigned __int8 v143; // [sp-8h] [bp-604h]@86 |
195 int v144; // [sp-8h] [bp-604h]@107 | 195 //int v144; // [sp-8h] [bp-604h]@107 |
196 enum WindowType pWindowType2; // [sp-8h] [bp-604h]@121 | 196 enum WindowType pWindowType2; // [sp-8h] [bp-604h]@121 |
197 const char *v146; // [sp-8h] [bp-604h]@449 | 197 //const char *v146; // [sp-8h] [bp-604h]@449 |
198 unsigned int v147; // [sp-8h] [bp-604h]@550 | 198 //unsigned int v147; // [sp-8h] [bp-604h]@550 |
199 //int v148; // [sp-4h] [bp-600h]@56 | 199 //int v148; // [sp-4h] [bp-600h]@56 |
200 GUIButton *pButton2; // [sp-4h] [bp-600h]@59 | 200 GUIButton *pButton2; // [sp-4h] [bp-600h]@59 |
201 const char *v150; // [sp-4h] [bp-600h]@86 | 201 const char *v150; // [sp-4h] [bp-600h]@86 |
202 unsigned int v151; // [sp-4h] [bp-600h]@107 | 202 //unsigned int v151; // [sp-4h] [bp-600h]@107 |
203 int v152; // [sp-4h] [bp-600h]@121 | 203 int v152; // [sp-4h] [bp-600h]@121 |
204 int v153; // [sp-4h] [bp-600h]@135 | 204 int v153; // [sp-4h] [bp-600h]@135 |
205 int v154; // [sp-4h] [bp-600h]@149 | 205 int v154; // [sp-4h] [bp-600h]@149 |
206 int v155; // [sp-4h] [bp-600h]@165 | 206 int v155; // [sp-4h] [bp-600h]@165 |
207 int v156; // [sp-4h] [bp-600h]@204 | 207 int v156; // [sp-4h] [bp-600h]@204 |
208 const char *v157; // [sp-4h] [bp-600h]@444 | 208 //const char *v157; // [sp-4h] [bp-600h]@444 |
209 unsigned int v158; // [sp-4h] [bp-600h]@449 | 209 unsigned int v158; // [sp-4h] [bp-600h]@449 |
210 __int16 v159; // [sp-4h] [bp-600h]@550 | 210 //__int16 v159; // [sp-4h] [bp-600h]@550 |
211 int v160; // [sp-4h] [bp-600h]@599 | 211 int v160; // [sp-4h] [bp-600h]@599 |
212 const char *v161; // [sp-4h] [bp-600h]@637 | 212 const char *v161; // [sp-4h] [bp-600h]@637 |
213 //int v162; // [sp+0h] [bp-5FCh]@56 | 213 //int v162; // [sp+0h] [bp-5FCh]@56 |
214 int v163; // [sp+0h] [bp-5FCh]@59 | 214 //int v163; // [sp+0h] [bp-5FCh]@59 |
215 Texture *pTexture; // [sp+0h] [bp-5FCh]@86 | 215 Texture *pTexture; // [sp+0h] [bp-5FCh]@86 |
216 int v165; // [sp+0h] [bp-5FCh]@107 | 216 //int v165; // [sp+0h] [bp-5FCh]@107 |
217 int v166; // [sp+0h] [bp-5FCh]@121 | 217 int v166; // [sp+0h] [bp-5FCh]@121 |
218 int v167; // [sp+0h] [bp-5FCh]@135 | 218 int v167; // [sp+0h] [bp-5FCh]@135 |
219 int v168; // [sp+0h] [bp-5FCh]@149 | 219 int v168; // [sp+0h] [bp-5FCh]@149 |
220 int v169; // [sp+0h] [bp-5FCh]@165 | 220 int v169; // [sp+0h] [bp-5FCh]@165 |
221 int v170; // [sp+0h] [bp-5FCh]@204 | 221 int v170; // [sp+0h] [bp-5FCh]@204 |
222 signed int v171; // [sp+0h] [bp-5FCh]@259 | 222 signed int v171; // [sp+0h] [bp-5FCh]@259 |
223 KeyToggleType pKeyToggleType; // [sp+0h] [bp-5FCh]@287 | 223 KeyToggleType pKeyToggleType; // [sp+0h] [bp-5FCh]@287 |
224 char *v173; // [sp+0h] [bp-5FCh]@444 | 224 char *v173; // [sp+0h] [bp-5FCh]@444 |
225 char *v174; // [sp+0h] [bp-5FCh]@449 | 225 char *v174; // [sp+0h] [bp-5FCh]@449 |
226 int v175; // [sp+0h] [bp-5FCh]@550 | 226 //int v175; // [sp+0h] [bp-5FCh]@550 |
227 int v176; // [sp+0h] [bp-5FCh]@599 | 227 int v176; // [sp+0h] [bp-5FCh]@599 |
228 const char *v177; // [sp+0h] [bp-5FCh]@629 | 228 const char *v177; // [sp+0h] [bp-5FCh]@629 |
229 char *v178; // [sp+0h] [bp-5FCh]@637 | 229 char *v178; // [sp+0h] [bp-5FCh]@637 |
230 int v179; // [sp+4h] [bp-5F8h]@0 | 230 int v179; // [sp+4h] [bp-5F8h]@0 |
231 //signed int _this; // [sp+14h] [bp-5E8h]@22 | 231 //signed int _this; // [sp+14h] [bp-5E8h]@22 |
1246 stru_506E40.Release(); | 1246 stru_506E40.Release(); |
1247 break; | 1247 break; |
1248 } | 1248 } |
1249 } | 1249 } |
1250 break; | 1250 break; |
1251 case SCREEN_REST: | 1251 case SCREEN_REST://close rest screen |
1252 if ( dword_506F14 ) | 1252 if ( dword_506F14 ) |
1253 { | 1253 { |
1254 Rest(_506F18_num_hours_to_sleep); | 1254 Rest(_506F18_num_hours_to_sleep); |
1255 pParty->pPlayers[3].pConditions[2] = 0i64; | 1255 pParty->pPlayers[3].pConditions[2] = 0i64; |
1256 pParty->pPlayers[2].pConditions[2] = 0i64; | 1256 pParty->pPlayers[2].pConditions[2] = 0i64; |
1747 uNumSeconds = v44; | 1747 uNumSeconds = v44; |
1748 v46 = PID_ID(v44); | 1748 v46 = PID_ID(v44); |
1749 if ( v45 == 3 ) | 1749 if ( v45 == 3 ) |
1750 { | 1750 { |
1751 v47 = pActors[v46].uAIState == Dead; | 1751 v47 = pActors[v46].uAIState == Dead; |
1752 //goto LABEL_400; | |
1753 if ( !v47 ) | 1752 if ( !v47 ) |
1754 continue; | 1753 continue; |
1755 //goto LABEL_415; | |
1756 v51 = pGUIWindow_Settings->ptr_1C; | 1754 v51 = pGUIWindow_Settings->ptr_1C; |
1757 *((char *)v51 + 8) &= 0xBFu; | 1755 *((char *)v51 + 8) &= 0xBFu; |
1758 *((short *)v51 + 2) = uMessageParam; | 1756 *((short *)v51 + 2) = uMessageParam; |
1759 *((int *)v51 + 3) = v44; | 1757 *((int *)v51 + 3) = v44; |
1760 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); | 1758 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); |
1768 continue; | 1766 continue; |
1769 } | 1767 } |
1770 if ( v45 == 2 ) | 1768 if ( v45 == 2 ) |
1771 { | 1769 { |
1772 v47 = (pObjectList->pObjects[pSpriteObjects[v46].uObjectDescID].uFlags & 0x10) == 0; | 1770 v47 = (pObjectList->pObjects[pSpriteObjects[v46].uObjectDescID].uFlags & 0x10) == 0; |
1773 //LABEL_400: | |
1774 if ( !v47 ) | 1771 if ( !v47 ) |
1775 continue; | 1772 continue; |
1776 //goto LABEL_415; | |
1777 v51 = pGUIWindow_Settings->ptr_1C; | 1773 v51 = pGUIWindow_Settings->ptr_1C; |
1778 *((char *)v51 + 8) &= 0xBFu; | 1774 *((char *)v51 + 8) &= 0xBFu; |
1779 *((short *)v51 + 2) = uMessageParam; | 1775 *((short *)v51 + 2) = uMessageParam; |
1780 *((int *)v51 + 3) = v44; | 1776 *((int *)v51 + 3) = v44; |
1781 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); | 1777 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); |
1922 pAudioPlayer->StopChannels(-1, -1); | 1918 pAudioPlayer->StopChannels(-1, -1); |
1923 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, 117, 0); | 1919 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, 117, 0); |
1924 continue; | 1920 continue; |
1925 | 1921 |
1926 case UIMSG_B2: | 1922 case UIMSG_B2: |
1927 v165 = 0; | 1923 __debugbreak;//UIMSG_B2 -??? |
1928 v151 = 0; | |
1929 v144 = 0; | |
1930 v139 = 0; | |
1931 bRecallingBeacon = uMessageParam; | 1924 bRecallingBeacon = uMessageParam; |
1932 v135 = -1; | |
1933 v132 = 0; | |
1934 v130 = 0; | |
1935 v127 = uMessageParam + 204; | 1925 v127 = uMessageParam + 204; |
1936 goto _play_sound_and_continue; | 1926 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); |
1927 continue; | |
1937 case UIMSG_B4: | 1928 case UIMSG_B4: |
1938 if ( !pGUIWindow_CurrentMenu ) | 1929 if ( !pGUIWindow_CurrentMenu ) |
1939 continue; | 1930 continue; |
1940 pPlayer = pPlayers[_506348_current_lloyd_playerid + 1]; | 1931 pPlayer = pPlayers[_506348_current_lloyd_playerid + 1]; |
1941 uNumSeconds = (unsigned int)&pPlayer->pInstalledBeacons[uMessageParam]; | 1932 uNumSeconds = (unsigned int)&pPlayer->pInstalledBeacons[uMessageParam]; |
1942 if ( bRecallingBeacon ) | 1933 if ( bRecallingBeacon ) |
1943 { | 1934 { |
1944 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) ) | 1935 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) ) |
1945 continue; | 1936 continue; |
1946 v173 = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(pPlayer->pInstalledBeacons[uMessageParam].field_18))].pName; | 1937 v173 = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(pPlayer->pInstalledBeacons[uMessageParam].field_18))].pName; |
1947 v157 = pGlobalTXT_LocalizationStrings[474];// "Recall to %s" | 1938 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[474], v173);// "Recall to %s" |
1948 goto _sprintex_2args_draw_status_and_continue; | 1939 sub_41C0B8_set_status_string(pTmpBuf); |
1940 continue; | |
1949 } | 1941 } |
1950 v59 = pMapStats->GetMapInfo(pCurrentMapName); | 1942 v59 = pMapStats->GetMapInfo(pCurrentMapName); |
1951 thise = "Not in Map Stats"; | 1943 thise = "Not in Map Stats"; |
1952 if ( v59 ) | 1944 if ( v59 ) |
1953 thise = pMapStats->pInfos[v59].pName; | 1945 thise = pMapStats->pInfos[v59].pName; |
1954 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) || !v59 ) | 1946 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) || !v59 ) |
1955 { | 1947 { |
1956 v173 = thise; | 1948 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[476], thise);// "Set to %s" |
1957 v157 = pGlobalTXT_LocalizationStrings[476];// "Set to %s" | 1949 sub_41C0B8_set_status_string(pTmpBuf); |
1958 goto _sprintex_2args_draw_status_and_continue; | 1950 continue; |
1959 } | 1951 } |
1960 v174 = pMapStats->pInfos[sub_410D99_get_map_index(*(short *)(uNumSeconds + 26))].pName; | 1952 v174 = pMapStats->pInfos[sub_410D99_get_map_index(*(short *)(uNumSeconds + 26))].pName; |
1961 v158 = (unsigned int)thise; | 1953 v158 = (unsigned int)thise; |
1962 v146 = pGlobalTXT_LocalizationStrings[475];// "Set %s over %s" | 1954 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[475], v158, v174);// "Set %s over %s" |
1963 //_sprintex_draw_status_and_continue: | |
1964 sprintf(pTmpBuf, v146, v158, v174); | |
1965 sub_41C0B8_set_status_string(pTmpBuf); | 1955 sub_41C0B8_set_status_string(pTmpBuf); |
1966 continue; | 1956 continue; |
1967 case UIMSG_B5: | 1957 case UIMSG_B5: |
1958 __debugbreak;//UIMSG_B5 - ??? | |
1968 dword_50CDC8 = v0; | 1959 dword_50CDC8 = v0; |
1969 //goto LABEL_453; | 1960 //goto LABEL_453; |
1970 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 1961 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
1971 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 1962 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
1972 continue; | 1963 continue; |
2177 v69 = pMapStats->pInfos[7].pName; | 2168 v69 = pMapStats->pInfos[7].pName; |
2178 break; | 2169 break; |
2179 default: | 2170 default: |
2180 if ( uMessageParam != 5 ) | 2171 if ( uMessageParam != 5 ) |
2181 { | 2172 { |
2182 v173 = v200; | 2173 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[35], v200); |
2183 v157 = pGlobalTXT_LocalizationStrings[35]; | 2174 sub_41C0B8_set_status_string(pTmpBuf); |
2184 goto _sprintex_2args_draw_status_and_continue; | 2175 continue; |
2185 } | 2176 } |
2186 v69 = pMapStats->pInfos[8].pName; | 2177 v69 = pMapStats->pInfos[8].pName; |
2187 break; | 2178 break; |
2188 } | 2179 } |
2189 } | 2180 } |
2190 else | 2181 else |
2191 { | 2182 { |
2192 v69 = pMapStats->pInfos[21].pName; | 2183 v69 = pMapStats->pInfos[21].pName; |
2193 } | 2184 } |
2194 v200 = v69; | 2185 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[35], v69); |
2195 v173 = v200; | 2186 sub_41C0B8_set_status_string(pTmpBuf); |
2196 v157 = pGlobalTXT_LocalizationStrings[35]; | 2187 continue; |
2197 goto _sprintex_2args_draw_status_and_continue; | |
2198 } | 2188 } |
2199 v68 = 210; | 2189 v68 = 210; |
2200 break; | 2190 break; |
2201 } | 2191 } |
2202 } | 2192 } |
2228 break; | 2218 break; |
2229 default: | 2219 default: |
2230 if ( uMessageParam != 5 ) | 2220 if ( uMessageParam != 5 ) |
2231 //goto LABEL_519; | 2221 //goto LABEL_519; |
2232 { | 2222 { |
2233 v173 = v200; | 2223 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[35], v200); |
2234 v157 = pGlobalTXT_LocalizationStrings[35]; | 2224 sub_41C0B8_set_status_string(pTmpBuf); |
2235 goto _sprintex_2args_draw_status_and_continue; | 2225 continue; |
2236 } | 2226 } |
2237 v69 = pMapStats->pInfos[8].pName; | 2227 v69 = pMapStats->pInfos[8].pName; |
2238 break; | 2228 break; |
2239 } | 2229 } |
2240 } | 2230 } |
2241 else | 2231 else |
2242 { | 2232 { |
2243 v69 = pMapStats->pInfos[21].pName; | 2233 v69 = pMapStats->pInfos[21].pName; |
2244 } | 2234 } |
2245 v200 = v69; | 2235 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[35], v69); |
2246 //LABEL_519: | 2236 sub_41C0B8_set_status_string(pTmpBuf); |
2247 v173 = v200; | 2237 continue; |
2248 v157 = pGlobalTXT_LocalizationStrings[35]; | |
2249 goto _sprintex_2args_draw_status_and_continue; | |
2250 case UIMSG_ShowFinalWindow: | 2238 case UIMSG_ShowFinalWindow: |
2251 sprintf(pFinalMessage, "%s\n \n%s\n \n%s", pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer." | 2239 sprintf(pFinalMessage, "%s\n \n%s\n \n%s", pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer." |
2252 pGlobalTXT_LocalizationStrings[118],// "We hope that you've enjoyed playing Might and Magic VII as much as we did making it. We have saved this screen as MM7_WIN.PCX in your MM7 directory. You can print it out as proof of your accomplishment." | 2240 pGlobalTXT_LocalizationStrings[118],// "We hope that you've enjoyed playing Might and Magic VII as much as we did making it. We have saved this screen as MM7_WIN.PCX in your MM7 directory. You can print it out as proof of your accomplishment." |
2253 pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team." | 2241 pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team." |
2254 ModalWindow(pFinalMessage, 196); | 2242 ModalWindow(pFinalMessage, 196); |
2255 uGameState = GAME_STATE_FINAL_WINDOW; | 2243 uGameState = GAME_STATE_FINAL_WINDOW; |
2256 continue; | 2244 continue; |
2257 case UIMSG_C4: | 2245 case UIMSG_C4: |
2246 __debugbreak; | |
2258 uGameState = 0; | 2247 uGameState = 0; |
2259 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); | 2248 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); |
2260 goto LABEL_524; | 2249 goto LABEL_524; |
2261 case UIMSG_DD: | 2250 case UIMSG_DD: |
2251 __debugbreak; | |
2262 LABEL_524: | 2252 LABEL_524: |
2263 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); | 2253 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); |
2264 memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); | 2254 memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); |
2265 if ( v216.uPropCount == 1 ) | 2255 if ( v216.uPropCount == 1 ) |
2266 { | 2256 { |
2497 if ( !(pTurnEngine->field_18 & 2) ) | 2487 if ( !(pTurnEngine->field_18 & 2) ) |
2498 //LABEL_577: | 2488 //LABEL_577: |
2499 _42ECB5_PlayerAttacksActor(); | 2489 _42ECB5_PlayerAttacksActor(); |
2500 continue; | 2490 continue; |
2501 case UIMSG_ExitRest: | 2491 case UIMSG_ExitRest: |
2502 v163 = (int)pGlobalTXT_LocalizationStrings[81];// "Exit Rest" | 2492 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, (WindowType)96, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]);// "Exit Rest" |
2503 pButton = pButton_RestUI_Exit; | |
2504 pButton2 = pButton_RestUI_Exit; | |
2505 pWindowType1 = (WindowType)96; | |
2506 //goto LABEL_731; | |
2507 v8 = pButton->uY; | |
2508 v9 = pButton->uX; | |
2509 //goto LABEL_732; | |
2510 v137 = 0; | |
2511 v133 = 0; | |
2512 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | |
2513 continue; | 2493 continue; |
2514 case UIMSG_Wait5Minutes: | 2494 case UIMSG_Wait5Minutes: |
2515 if ( dword_506F14 == 2 ) | 2495 if ( dword_506F14 == 2 ) |
2516 //goto LABEL_621; | 2496 { |
2517 { | 2497 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" |
2518 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | |
2519 ShowStatusBarString(v96, 2); | |
2520 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2498 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2521 continue; | 2499 continue; |
2522 } | 2500 } |
2523 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, WINDOW_5A, | 2501 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, WINDOW_5A, |
2524 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" | 2502 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" |
2525 dword_506F14 = v0; | 2503 dword_506F14 = v0; |
2526 _506F18_num_hours_to_sleep = 5; | 2504 _506F18_num_hours_to_sleep = 5; |
2527 continue; | 2505 continue; |
2528 case UIMSG_Wait1Hour: | 2506 case UIMSG_Wait1Hour: |
2529 if ( dword_506F14 == 2 ) | 2507 if ( dword_506F14 == 2 ) |
2530 //goto LABEL_621; | 2508 { |
2531 { | 2509 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" |
2532 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | |
2533 ShowStatusBarString(v96, 2); | |
2534 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2510 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2535 continue; | 2511 continue; |
2536 } | 2512 } |
2537 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, WINDOW_5A, | 2513 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, WINDOW_5A, |
2538 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" | 2514 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" |
2544 RestUI_Initialize(); | 2520 RestUI_Initialize(); |
2545 v86 = 60 * (_494820_training_time(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute; | 2521 v86 = 60 * (_494820_training_time(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute; |
2546 _506F18_num_hours_to_sleep = v86; | 2522 _506F18_num_hours_to_sleep = v86; |
2547 if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 ) | 2523 if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 ) |
2548 _506F18_num_hours_to_sleep = v86 + 720; | 2524 _506F18_num_hours_to_sleep = v86 + 720; |
2549 //goto LABEL_615; | |
2550 dword_506F14 = 2; | 2525 dword_506F14 = 2; |
2551 pParty->RestAndHeal(); | 2526 pParty->RestAndHeal(); |
2552 pParty->days_played_without_rest = 0; | 2527 pParty->days_played_without_rest = 0; |
2553 pParty->pPlayers[3].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; | 2528 pParty->pPlayers[3].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; |
2554 pParty->pPlayers[2].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; | 2529 pParty->pPlayers[2].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; |
2559 if ( pMessageQueue_50CBD0->uNumMessages ) | 2534 if ( pMessageQueue_50CBD0->uNumMessages ) |
2560 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2535 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2561 if ( pCurrentScreen ) | 2536 if ( pCurrentScreen ) |
2562 continue; | 2537 continue; |
2563 if ( sub_42F4DA() ) | 2538 if ( sub_42F4DA() ) |
2564 //goto LABEL_594; | |
2565 { | 2539 { |
2566 if ( pParty->bTurnBasedModeOn == v0 ) | 2540 if ( pParty->bTurnBasedModeOn == v0 ) |
2567 { | 2541 { |
2568 v87 = pGlobalTXT_LocalizationStrings[478];// "You can't rest in turn-based mode!" | 2542 ShowStatusBarString(pGlobalTXT_LocalizationStrings[478], 2);// "You can't rest in turn-based mode!" |
2569 ShowStatusBarString(v87, 2u); | |
2570 continue; | 2543 continue; |
2571 } | 2544 } |
2572 v88 = pGlobalTXT_LocalizationStrings[480];// "There are hostile enemies near!" | 2545 v88 = pGlobalTXT_LocalizationStrings[480];// "There are hostile enemies near!" |
2573 if ( pParty->uFlags & 0x88 ) | 2546 if ( pParty->uFlags & 0x88 ) |
2574 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" | 2547 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" |
2575 ShowStatusBarString(v88, 2u); | 2548 ShowStatusBarString(v88, 2); |
2576 v89 = uActiveCharacter; | |
2577 if ( !uActiveCharacter ) | 2549 if ( !uActiveCharacter ) |
2578 { | 2550 { |
2579 v1 = ""; | 2551 v1 = ""; |
2580 v0 = 1; | 2552 v0 = 1; |
2581 continue; | 2553 continue; |
2582 } | 2554 } |
2583 v176 = 0; | 2555 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0); |
2584 v160 = 13; | 2556 continue; |
2585 goto LABEL_619; | |
2586 } | 2557 } |
2587 if ( pParty->bTurnBasedModeOn == v0 ) | 2558 if ( pParty->bTurnBasedModeOn == v0 ) |
2588 //goto LABEL_595; | 2559 { |
2589 { | 2560 ShowStatusBarString(pGlobalTXT_LocalizationStrings[478], 2);// "You can't rest in turn-based mode!" |
2590 v87 = pGlobalTXT_LocalizationStrings[478];// "You can't rest in turn-based mode!" | |
2591 ShowStatusBarString(v87, 2u); | |
2592 continue; | 2561 continue; |
2593 } | 2562 } |
2594 if ( !(pParty->uFlags & 0x88) ) | 2563 if ( !(pParty->uFlags & 0x88) ) |
2595 { | 2564 { |
2596 RestUI_Initialize(); | 2565 RestUI_Initialize(); |
2597 continue; | 2566 continue; |
2598 } | 2567 } |
2599 //LABEL_594: | |
2600 if ( pParty->bTurnBasedModeOn == v0 ) | 2568 if ( pParty->bTurnBasedModeOn == v0 ) |
2601 { | 2569 { |
2602 //LABEL_595: | 2570 ShowStatusBarString(pGlobalTXT_LocalizationStrings[478], 2);// "You can't rest in turn-based mode!" |
2603 v87 = pGlobalTXT_LocalizationStrings[478];// "You can't rest in turn-based mode!" | |
2604 //goto _draw_status_string_and_continue; | |
2605 ShowStatusBarString(v87, 2u); | |
2606 continue; | 2571 continue; |
2607 } | 2572 } |
2608 v88 = pGlobalTXT_LocalizationStrings[480];// "There are hostile enemies near!" | 2573 v88 = pGlobalTXT_LocalizationStrings[480];// "There are hostile enemies near!" |
2609 if ( pParty->uFlags & 0x88 ) | 2574 if ( pParty->uFlags & 0x88 ) |
2610 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" | 2575 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!" |
2611 ShowStatusBarString(v88, 2u); | 2576 ShowStatusBarString(v88, 2u); |
2612 v89 = uActiveCharacter; | |
2613 if ( !uActiveCharacter ) | 2577 if ( !uActiveCharacter ) |
2614 //goto LABEL_90; | |
2615 { | 2578 { |
2616 v1 = ""; | 2579 v1 = ""; |
2617 v0 = 1; | 2580 v0 = 1; |
2618 continue; | 2581 continue; |
2619 } | 2582 } |
2620 v176 = 0; | 2583 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)13, 0); |
2621 v160 = 13; | 2584 continue; |
2622 goto LABEL_619; | |
2623 case UIMSG_Rest8Hour: | 2585 case UIMSG_Rest8Hour: |
2624 if ( dword_506F14 ) | 2586 if ( dword_506F14 ) |
2625 //goto LABEL_621; | 2587 { |
2626 { | 2588 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" |
2627 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | |
2628 ShowStatusBarString(v96, 2); | |
2629 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2589 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2630 continue; | 2590 continue; |
2631 } | 2591 } |
2632 if ( pParty->uNumFoodRations < uRestUI_FoodRequiredToRest ) | 2592 if ( pParty->uNumFoodRations < uRestUI_FoodRequiredToRest ) |
2633 { | 2593 { |
2634 ShowStatusBarString(pGlobalTXT_LocalizationStrings[482], 2u);// "You don't have enough food to rest" | 2594 ShowStatusBarString(pGlobalTXT_LocalizationStrings[482], 2u);// "You don't have enough food to rest" |
2635 if ( uActiveCharacter && pPlayers[uActiveCharacter]->CanAct() ) | 2595 if ( uActiveCharacter && pPlayers[uActiveCharacter]->CanAct() ) |
2636 { | 2596 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)SPEECH_108, 0); |
2637 v89 = uActiveCharacter; | |
2638 v176 = 0; | |
2639 v160 = SPEECH_108; | |
2640 LABEL_619: | |
2641 pPlayers[v89]->PlaySound((PlayerSpeech)v160, v176); | |
2642 } | |
2643 } | 2597 } |
2644 else | 2598 else |
2645 { | 2599 { |
2646 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed; | 2600 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed; |
2647 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed; | 2601 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed; |
2677 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 2631 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
2678 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2632 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
2679 ++pMessageQueue_50CBD0->uNumMessages; | 2633 ++pMessageQueue_50CBD0->uNumMessages; |
2680 }*/ | 2634 }*/ |
2681 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 2635 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
2682 ShowStatusBarString(pGlobalTXT_LocalizationStrings[481], 2u);// "Encounter!" | 2636 ShowStatusBarString(pGlobalTXT_LocalizationStrings[481], 2);// "Encounter!" |
2683 v165 = 0; | 2637 pAudioPlayer->PlaySound((SoundID)227, 0, 0, -1, 0, 0, 0, 0); |
2684 v151 = 0; | 2638 continue; |
2685 v144 = 0; | |
2686 v139 = 0; | |
2687 v135 = -1; | |
2688 v132 = 0; | |
2689 v130 = 0; | |
2690 v127 = 227; | |
2691 goto _play_sound_and_continue; | |
2692 } | 2639 } |
2693 } | 2640 } |
2694 Party::TakeFood(uRestUI_FoodRequiredToRest); | 2641 Party::TakeFood(uRestUI_FoodRequiredToRest); |
2695 _506F18_num_hours_to_sleep = 480; | 2642 _506F18_num_hours_to_sleep = 480; |
2696 //LABEL_615: | |
2697 dword_506F14 = 2; | 2643 dword_506F14 = 2; |
2698 pParty->RestAndHeal(); | 2644 pParty->RestAndHeal(); |
2699 pParty->days_played_without_rest = 0; | 2645 pParty->days_played_without_rest = 0; |
2700 pParty->pPlayers[3].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; | 2646 pParty->pPlayers[3].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; |
2701 pParty->pPlayers[2].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; | 2647 pParty->pPlayers[2].pConditions[Player::Condition_Sleep] = pParty->uTimePlayed; |
2704 } | 2650 } |
2705 continue; | 2651 continue; |
2706 case UIMSG_AlreadyResting: | 2652 case UIMSG_AlreadyResting: |
2707 if ( dword_506F14 == 2 ) | 2653 if ( dword_506F14 == 2 ) |
2708 { | 2654 { |
2709 //LABEL_621: | 2655 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" |
2710 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!" | |
2711 ShowStatusBarString(v96, 2); | |
2712 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); | 2656 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2713 continue; | 2657 continue; |
2714 } | 2658 } |
2715 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, WINDOW_5A, | 2659 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, WINDOW_5A, |
2716 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" | 2660 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" |
2717 v97 = _494820_training_time(pParty->uCurrentHour); | 2661 v97 = _494820_training_time(pParty->uCurrentHour); |
2718 dword_506F14 = v0; | 2662 dword_506F14 = v0; |
2719 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; | 2663 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; |
2720 continue; | 2664 continue; |
2721 case UIMSG_4E: | 2665 case UIMSG_4E: |
2666 __debugbreak;//UIMSG_4E -??? | |
2722 if ( quick_spell_at_page && byte_506550 ) | 2667 if ( quick_spell_at_page && byte_506550 ) |
2723 { | 2668 { |
2724 v173 = pSpellStats->pInfos[quick_spell_at_page + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage].pName; | 2669 v173 = pSpellStats->pInfos[quick_spell_at_page + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage].pName; |
2725 v157 = pGlobalTXT_LocalizationStrings[483]; | 2670 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[483], v173); |
2726 _sprintex_2args_draw_status_and_continue: | |
2727 sprintfex(pTmpBuf, v157, v173); | |
2728 } | 2671 } |
2729 else | 2672 else |
2730 { | 2673 { |
2731 if ( pPlayers[uActiveCharacter]->uQuickSpell ) | 2674 if ( pPlayers[uActiveCharacter]->uQuickSpell ) |
2732 v177 = pGlobalTXT_LocalizationStrings[584];// "Click here to remove your Quick Spell" | 2675 v177 = pGlobalTXT_LocalizationStrings[584];// "Click here to remove your Quick Spell" |
2733 else | 2676 else |
2734 v177 = pGlobalTXT_LocalizationStrings[484];// "Select a spell then click here to set a QuickSpell" | 2677 v177 = pGlobalTXT_LocalizationStrings[484];// "Select a spell then click here to set a QuickSpell" |
2735 strcpy(pTmpBuf, v177); | 2678 strcpy(pTmpBuf, v177); |
2736 } | 2679 } |
2737 //_set_status_string_pTmpBuf_and_continue: | |
2738 sub_41C0B8_set_status_string(pTmpBuf); | 2680 sub_41C0B8_set_status_string(pTmpBuf); |
2739 continue; | 2681 continue; |
2740 case UIMSG_SPellbook_ShowHightlightedSpellInfo: | 2682 case UIMSG_SPellbook_ShowHightlightedSpellInfo: |
2741 if ( !uActiveCharacter || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter], | 2683 if ( !uActiveCharacter || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter], |
2742 !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) ) | 2684 !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) ) |
2754 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName; | 2696 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName; |
2755 v161 = pGlobalTXT_LocalizationStrings[486]; | 2697 v161 = pGlobalTXT_LocalizationStrings[486]; |
2756 } | 2698 } |
2757 sprintfex(pTmpBuf, v161, v178); | 2699 sprintfex(pTmpBuf, v161, v178); |
2758 sub_41C0B8_set_status_string(pTmpBuf); | 2700 sub_41C0B8_set_status_string(pTmpBuf); |
2759 //goto LABEL_91; | |
2760 v0 = 1; | 2701 v0 = 1; |
2761 continue; | 2702 continue; |
2762 case UIMSG_58: | 2703 case UIMSG_58: |
2704 __debugbreak;//UIMSG_58 - ??? | |
2763 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, WINDOW_5A, (int)pBtn_InstallRemoveSpell, 0); | 2705 GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, WINDOW_5A, (int)pBtn_InstallRemoveSpell, 0); |
2764 if ( !uActiveCharacter ) | 2706 if ( !uActiveCharacter ) |
2765 continue; | 2707 continue; |
2766 pPlayer10 = pPlayers[uActiveCharacter]; | 2708 pPlayer10 = pPlayers[uActiveCharacter]; |
2767 if ( !byte_506550 || !quick_spell_at_page ) | 2709 if ( !byte_506550 || !quick_spell_at_page ) |
2768 { | 2710 { |
2769 v165 = 0; | |
2770 v151 = 0; | |
2771 v144 = 0; | |
2772 v139 = 0; | |
2773 v135 = -1; | |
2774 v132 = 0; | |
2775 pPlayer10->uQuickSpell = 0; | 2711 pPlayer10->uQuickSpell = 0; |
2776 v130 = 0; | |
2777 quick_spell_at_page = 0; | 2712 quick_spell_at_page = 0; |
2778 v127 = 203; | 2713 pAudioPlayer->PlaySound((SoundID)203, 0, 0, -1, 0, 0, 0, 0); |
2779 goto _play_sound_and_continue; | 2714 continue; |
2780 } | 2715 } |
2781 v99 = quick_spell_at_page + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage; | 2716 v99 = quick_spell_at_page + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage; |
2782 pPlayers[uActiveCharacter]->uQuickSpell = v99; | 2717 pPlayers[uActiveCharacter]->uQuickSpell = v99; |
2783 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter); | 2718 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter); |
2784 if ( uActiveCharacter ) | 2719 if ( uActiveCharacter ) |
2785 pPlayer10->PlaySound(SPEECH_12, 0); | 2720 pPlayer10->PlaySound(SPEECH_12, 0); |
2786 byte_506550 = 0; | 2721 byte_506550 = 0; |
2787 continue; | 2722 continue; |
2788 case UIMSG_33: | 2723 case UIMSG_33: |
2724 __debugbreak;//UIMSG_33 - ??? | |
2789 if ( !uActiveCharacter ) | 2725 if ( !uActiveCharacter ) |
2790 continue; | 2726 continue; |
2791 pPlayer3 = pPlayers[uActiveCharacter]; | 2727 pPlayer3 = pPlayers[uActiveCharacter]; |
2792 pNPCData4 = 0; | 2728 pNPCData4 = 0; |
2793 uAction = 0; | 2729 uAction = 0; |
2807 ++v101; | 2743 ++v101; |
2808 } | 2744 } |
2809 while ( v101 < 9 ); | 2745 while ( v101 < 9 ); |
2810 if ( !pNPCData4 ) | 2746 if ( !pNPCData4 ) |
2811 { | 2747 { |
2812 v165 = 0; | |
2813 v151 = 0; | |
2814 v144 = 0; | |
2815 v139 = 0; | |
2816 v135 = -1; | |
2817 v132 = 0; | |
2818 v130 = 0; | |
2819 v127 = rand() % 2 + 204; | 2748 v127 = rand() % 2 + 204; |
2820 goto _play_sound_and_continue; | 2749 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); |
2750 continue; | |
2821 } | 2751 } |
2822 if ( GetAsyncKeyState(16) ) | 2752 if ( GetAsyncKeyState(16) ) |
2823 { | 2753 { |
2824 --uAction; | 2754 --uAction; |
2825 if ( uAction < 0 ) | 2755 if ( uAction < 0 ) |
2832 uAction = 0; | 2762 uAction = 0; |
2833 } | 2763 } |
2834 sub_41140B(); | 2764 sub_41140B(); |
2835 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = LOBYTE(v217[uAction]); | 2765 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = LOBYTE(v217[uAction]); |
2836 pGUIWindow_CurrentMenu->OpenSpellBook(); | 2766 pGUIWindow_CurrentMenu->OpenSpellBook(); |
2837 v165 = 0; | |
2838 v151 = 0; | |
2839 v144 = 0; | |
2840 v139 = 0; | |
2841 v135 = -1; | |
2842 v132 = 0; | |
2843 v130 = 0; | |
2844 v127 = rand() % 2 + 204; | 2767 v127 = rand() % 2 + 204; |
2845 goto _play_sound_and_continue; | 2768 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); |
2769 continue; | |
2846 case UIMSG_OpenSpellbookPage: | 2770 case UIMSG_OpenSpellbookPage: |
2847 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->lastOpenedSpellbookPage ) | 2771 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->lastOpenedSpellbookPage ) |
2848 continue; | 2772 continue; |
2849 sub_41140B(); | 2773 sub_41140B(); |
2850 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = uMessageParam; | 2774 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = uMessageParam; |
2851 pGUIWindow_CurrentMenu->OpenSpellBook(); | 2775 pGUIWindow_CurrentMenu->OpenSpellBook(); |
2852 v165 = 0; | |
2853 v151 = 0; | |
2854 v144 = 0; | |
2855 v139 = 0; | |
2856 v135 = -1; | |
2857 v132 = 0; | |
2858 v130 = 0; | |
2859 v127 = rand() % 2 + 204; | 2776 v127 = rand() % 2 + 204; |
2860 goto _play_sound_and_continue; | 2777 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); |
2778 continue; | |
2861 case UIMSG_SelectSpell: | 2779 case UIMSG_SelectSpell: |
2862 { | 2780 { |
2863 if (pTurnEngine->field_4 == 3) | 2781 if (pTurnEngine->field_4 == 3) |
2864 continue; | 2782 continue; |
2865 if (!uActiveCharacter) | 2783 if (!uActiveCharacter) |
2899 if ( pTurnEngine->field_4 != 3 ) | 2817 if ( pTurnEngine->field_4 != 3 ) |
2900 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 0, 0, 0); | 2818 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 0, 0, 0); |
2901 continue; | 2819 continue; |
2902 | 2820 |
2903 case UIMSG_92: | 2821 case UIMSG_92: |
2822 __debugbreak;//UIMSG_92 - ??? | |
2904 if ( pTurnEngine->field_4 != 3 ) | 2823 if ( pTurnEngine->field_4 != 3 ) |
2905 { | 2824 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 133, v0, 0); |
2906 v175 = 0; | |
2907 v159 = v0; | |
2908 v147 = 133; | |
2909 //LABEL_678: | |
2910 v80 = v199; | |
2911 v79 = uMessageParam; | |
2912 //LABEL_679: | |
2913 _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); | |
2914 } | |
2915 continue; | 2825 continue; |
2916 case UIMSG_SpellBookWindow: | 2826 case UIMSG_SpellBookWindow: |
2917 if ( pTurnEngine->field_4 == 3 ) | 2827 if ( pTurnEngine->field_4 == 3 ) |
2918 continue; | 2828 continue; |
2919 if ( bUnderwater == 1 ) | 2829 if ( bUnderwater == 1 ) |
2920 { | 2830 { |
2921 ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" | 2831 ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" |
2922 v165 = 0; | 2832 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); |
2923 v151 = 0; | |
2924 v144 = 0; | |
2925 v139 = 0; | |
2926 v135 = -1; | |
2927 v132 = 0; | |
2928 v130 = 0; | |
2929 v127 = 27; | |
2930 _play_sound_and_continue: | |
2931 pAudioPlayer->PlaySound((SoundID)v127, v130, v132, v135, v139, v144, v151, v165); | |
2932 } | 2833 } |
2933 else | 2834 else |
2934 { | 2835 { |
2935 if ( pMessageQueue_50CBD0->uNumMessages ) | 2836 if ( pMessageQueue_50CBD0->uNumMessages ) |
2936 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2837 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2951 && pCurrentScreen != SCREEN_CHARACTERS | 2852 && pCurrentScreen != SCREEN_CHARACTERS |
2952 && (pCurrentScreen <= SCREEN_63 | 2853 && (pCurrentScreen <= SCREEN_63 |
2953 || pCurrentScreen > SCREEN_67) ) | 2854 || pCurrentScreen > SCREEN_67) ) |
2954 { | 2855 { |
2955 pGUIWindow_CurrentMenu->Release(); | 2856 pGUIWindow_CurrentMenu->Release(); |
2956 //LABEL_693: | |
2957 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_CastSpell, 0); | 2857 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, WINDOW_5A, (int)pBtn_CastSpell, 0); |
2958 pCurrentScreen = SCREEN_SPELL_BOOK; | 2858 pCurrentScreen = SCREEN_SPELL_BOOK; |
2959 pEventTimer->Pause(); | 2859 pEventTimer->Pause(); |
2960 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); | 2860 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); |
2961 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 2861 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
3008 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 2908 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
3009 ++pMessageQueue_50CBD0->uNumMessages;*/ | 2909 ++pMessageQueue_50CBD0->uNumMessages;*/ |
3010 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 2910 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
3011 continue; | 2911 continue; |
3012 case UIMSG_C0: | 2912 case UIMSG_C0: |
2913 __debugbreak;//UIMSG_C0 - ??? | |
3013 dword_50651C = v0; | 2914 dword_50651C = v0; |
3014 if ( pMouse->GetCursorPos(&v211)->y > 178 ) | 2915 if ( pMouse->GetCursorPos(&v211)->y > 178 ) |
3015 dword_50651C = -1; | 2916 dword_50651C = -1; |
3016 continue; | 2917 continue; |
3017 case UIMSG_A9: | 2918 case UIMSG_A9: |
2919 __debugbreak; | |
3018 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, WINDOW_5B, (int)pBtn_Up, 0); | 2920 GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, WINDOW_5B, (int)pBtn_Up, 0); |
3019 //LABEL_707: | |
3020 dword_506548 = v0; | 2921 dword_506548 = v0; |
3021 continue; | 2922 continue; |
3022 case UIMSG_AA: | 2923 case UIMSG_AA: |
2924 __debugbreak; | |
3023 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, WINDOW_5B, (int)pBtn_Down, 0); | 2925 GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, WINDOW_5B, (int)pBtn_Down, 0); |
3024 //LABEL_709: | |
3025 dword_506544 = v0; | 2926 dword_506544 = v0; |
3026 continue; | 2927 continue; |
3027 case UIMSG_ChangeDetaliz: | 2928 case UIMSG_ChangeDetaliz: |
3028 bRingsShownInCharScreen ^= v0; | 2929 bRingsShownInCharScreen ^= v0; |
3029 pCharacterScreen_DetalizBtn->Release(); | 2930 pCharacterScreen_DetalizBtn->Release(); |
3050 continue; | 2951 continue; |
3051 case UIMSG_ClickPaperdoll: | 2952 case UIMSG_ClickPaperdoll: |
3052 OnPaperdollLeftClick(); | 2953 OnPaperdollLeftClick(); |
3053 continue; | 2954 continue; |
3054 case UIMSG_73: | 2955 case UIMSG_73: |
2956 __debugbreak; | |
3055 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; | 2957 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; |
3056 sub_4196A0(); | 2958 sub_4196A0(); |
3057 sub_419379(); | 2959 sub_419379(); |
3058 pButton = pCharacterScreen_StatsBtn; | 2960 GUIWindow::Create(pCharacterScreen_StatsBtn->uX, pCharacterScreen_StatsBtn->uY, 0, 0, (WindowType)91, (int)pCharacterScreen_StatsBtn, 0); |
3059 //goto LABEL_716; | |
3060 v163 = 0; | |
3061 pButton2 = pButton; | |
3062 pWindowType1 = (WindowType)91; | |
3063 v8 = pButton->uY; | |
3064 v9 = pButton->uX; | |
3065 //goto LABEL_732; | |
3066 v137 = 0; | |
3067 v133 = 0; | |
3068 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | |
3069 continue; | 2961 continue; |
3070 case UIMSG_72: | 2962 case UIMSG_72: |
2963 __debugbreak; | |
3071 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101; | 2964 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101; |
3072 sub_4196A0(); | 2965 sub_4196A0(); |
3073 sub_419379(); | 2966 sub_419379(); |
3074 CharacterUI_SkillScreen_Draw(); | 2967 CharacterUI_SkillScreen_Draw(); |
3075 pButton = pCharacterScreen_SkillsBtn; | 2968 GUIWindow::Create(pCharacterScreen_SkillsBtn->uX, pCharacterScreen_SkillsBtn->uY, 0, 0, (WindowType)91, (int)pCharacterScreen_SkillsBtn, 0); |
3076 //goto LABEL_716; | |
3077 v163 = 0; | |
3078 pButton2 = pButton; | |
3079 pWindowType1 = (WindowType)91; | |
3080 v8 = pButton->uY; | |
3081 v9 = pButton->uX; | |
3082 //goto LABEL_732; | |
3083 v137 = 0; | |
3084 v133 = 0; | |
3085 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | |
3086 continue; | 2969 continue; |
3087 case UIMSG_SkillUp: | 2970 case UIMSG_SkillUp: |
3088 pPlayer4 = pPlayers[uActiveCharacter]; | 2971 pPlayer4 = pPlayers[uActiveCharacter]; |
3089 v105 = (int)&pPlayer4->pActiveSkills[uMessageParam]; | 2972 v105 = (int)&pPlayer4->pActiveSkills[uMessageParam]; |
3090 LOWORD(v2) = *(short *)v105; | 2973 LOWORD(v2) = *(short *)v105; |
3098 if ( (uNumSeconds & 0x3F) < 0x3C ) | 2981 if ( (uNumSeconds & 0x3F) < 0x3C ) |
3099 { | 2982 { |
3100 *(short *)v105 = uNumSeconds + 1; | 2983 *(short *)v105 = uNumSeconds + 1; |
3101 pPlayer4->uSkillPoints -= pPlayer4->pActiveSkills[uMessageParam] & 0x3F; | 2984 pPlayer4->uSkillPoints -= pPlayer4->pActiveSkills[uMessageParam] & 0x3F; |
3102 pPlayer4->PlaySound(SPEECH_14, 0); | 2985 pPlayer4->PlaySound(SPEECH_14, 0); |
3103 v165 = 0; | 2986 pAudioPlayer->PlaySound((SoundID)20001, 0, 0, -1, 0, 0, 0, 0); |
3104 v151 = 0; | 2987 continue; |
3105 v144 = 0; | |
3106 v139 = 0; | |
3107 v135 = -1; | |
3108 v132 = 0; | |
3109 v130 = 0; | |
3110 v127 = 20001; | |
3111 goto _play_sound_and_continue; | |
3112 } | 2988 } |
3113 v87 = pGlobalTXT_LocalizationStrings[487];// "You have already mastered this skill!" | 2989 v87 = pGlobalTXT_LocalizationStrings[487];// "You have already mastered this skill!" |
3114 } | 2990 } |
3115 //_draw_status_string_and_continue: | 2991 ShowStatusBarString(v87, 2); |
3116 ShowStatusBarString(v87, 2u); | |
3117 continue; | 2992 continue; |
3118 case UIMSG_74: | 2993 case UIMSG_74: |
2994 __debugbreak; | |
3119 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; | 2995 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; |
3120 sub_419379(); | 2996 sub_419379(); |
3121 sub_4196A0(); | 2997 sub_4196A0(); |
3122 pButton = pCharacterScreen_InventoryBtn; | 2998 GUIWindow::Create(pCharacterScreen_InventoryBtn->uX, pCharacterScreen_InventoryBtn->uY, 0, 0, (WindowType)91, (int)pCharacterScreen_InventoryBtn, 0); |
3123 //LABEL_716: | |
3124 v163 = 0; | |
3125 pButton2 = pButton; | |
3126 pWindowType1 = (WindowType)91; | |
3127 //goto LABEL_731; | |
3128 v8 = pButton->uY; | |
3129 v9 = pButton->uX; | |
3130 //goto LABEL_732; | |
3131 v137 = 0; | |
3132 v133 = 0; | |
3133 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | |
3134 continue; | 2999 continue; |
3135 case UIMSG_A8: | 3000 case UIMSG_A8: |
3136 pButton = pCharacterScreen_ExitBtn; | 3001 __debugbreak; |
3137 v163 = 0; | 3002 GUIWindow::Create(pCharacterScreen_ExitBtn->uX, pCharacterScreen_ExitBtn->uY, 0, 0, (WindowType)97, (int)pCharacterScreen_ExitBtn, 0); |
3138 pButton2 = pCharacterScreen_ExitBtn; | |
3139 pWindowType1 = (WindowType)97; | |
3140 //goto LABEL_731; | |
3141 v8 = pButton->uY; | |
3142 v9 = pButton->uX; | |
3143 //goto LABEL_732; | |
3144 v137 = 0; | |
3145 v133 = 0; | |
3146 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | |
3147 continue; | 3003 continue; |
3148 case UIMSG_75: | 3004 case UIMSG_75: |
3005 __debugbreak; | |
3149 sub_419379(); | 3006 sub_419379(); |
3150 sub_4196A0(); | 3007 sub_4196A0(); |
3151 sub_419220(); | 3008 sub_419220(); |
3152 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; | 3009 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; |
3153 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), | 3010 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), |
3158 switch ( uMessageParam ) | 3015 switch ( uMessageParam ) |
3159 { | 3016 { |
3160 default: | 3017 default: |
3161 continue; | 3018 continue; |
3162 case 11: | 3019 case 11: |
3163 //goto LABEL_707; | |
3164 dword_506548 = v0; | 3020 dword_506548 = v0; |
3165 continue; | 3021 continue; |
3166 case 10: | 3022 case 10: |
3167 //goto LABEL_709; | |
3168 dword_506544 = v0; | 3023 dword_506544 = v0; |
3169 continue; | 3024 continue; |
3170 case 0: | 3025 case 0: |
3171 pButton = pBtn_Book_1; | 3026 pButton = pBtn_Book_1; |
3172 dword_506544 = v0; | 3027 dword_506544 = v0; |
3206 case 7: | 3061 case 7: |
3207 pButton = pBtn_Autonotes_Instructors; | 3062 pButton = pBtn_Autonotes_Instructors; |
3208 dword_50652C = v0; | 3063 dword_50652C = v0; |
3209 break; | 3064 break; |
3210 } | 3065 } |
3211 v163 = v0; | 3066 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, (WindowType)92, (int)pButton, v0); |
3212 pButton2 = pButton; | |
3213 pWindowType1 = (WindowType)92; | |
3214 //LABEL_731: | |
3215 v8 = pButton->uY; | |
3216 v9 = pButton->uX; | |
3217 //goto LABEL_732; | |
3218 v137 = 0; | |
3219 v133 = 0; | |
3220 GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); | |
3221 continue; | 3067 continue; |
3222 case UIMSG_SelectCharacter: | 3068 case UIMSG_SelectCharacter: |
3223 if ( pMessageQueue_50CBD0->uNumMessages ) | 3069 if ( pMessageQueue_50CBD0->uNumMessages ) |
3224 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3070 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3225 GameUI_OnPlayerPortraitLeftClick(uMessageParam); | 3071 GameUI_OnPlayerPortraitLeftClick(uMessageParam); |
3226 continue; | 3072 continue; |
3227 case UIMSG_ShowStatus_Funds: | 3073 case UIMSG_ShowStatus_Funds: |
3228 v174 = (char *)pParty->uNumGoldInBank; | 3074 v174 = (char *)pParty->uNumGoldInBank; |
3229 v158 = pParty->uNumGold + pParty->uNumGoldInBank; | 3075 v158 = pParty->uNumGold + pParty->uNumGoldInBank; |
3230 v146 = pGlobalTXT_LocalizationStrings[489];// "You have %d total gold, %d in the Bank"" | 3076 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[489], v158, v174);// "You have %d total gold, %d in the Bank" |
3231 //goto _sprintex_draw_status_and_continue; | |
3232 sprintfex(pTmpBuf, v146, v158, v174); | |
3233 sub_41C0B8_set_status_string(pTmpBuf); | 3077 sub_41C0B8_set_status_string(pTmpBuf); |
3234 continue; | 3078 continue; |
3235 case UIMSG_ShowStatus_DateTime: | 3079 case UIMSG_ShowStatus_DateTime: |
3236 pNPCData4 = (NPCData *)pParty->uCurrentHour; | 3080 pNPCData4 = (NPCData *)pParty->uCurrentHour; |
3237 if ( (signed int)pParty->uCurrentHour <= 12 ) | 3081 if ( (signed int)pParty->uCurrentHour <= 12 ) |
3273 v114 = v110->GetMaxHealth(); | 3117 v114 = v110->GetMaxHealth(); |
3274 sprintf(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109); | 3118 sprintf(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109); |
3275 sub_41C0B8_set_status_string(pTmpBuf); | 3119 sub_41C0B8_set_status_string(pTmpBuf); |
3276 continue; | 3120 continue; |
3277 case UIMSG_C: | 3121 case UIMSG_C: |
3122 __debugbreak; | |
3278 if ( pCurrentScreen == SCREEN_F ) | 3123 if ( pCurrentScreen == SCREEN_F ) |
3279 { | 3124 { |
3280 sub_421EA6_OnInventoryLeftClick(); | 3125 sub_421EA6_OnInventoryLeftClick(); |
3281 continue; | 3126 continue; |
3282 } | 3127 } |
3284 continue; | 3129 continue; |
3285 case UIMSG_InventoryLeftClick: | 3130 case UIMSG_InventoryLeftClick: |
3286 sub_421EA6_OnInventoryLeftClick(); | 3131 sub_421EA6_OnInventoryLeftClick(); |
3287 continue; | 3132 continue; |
3288 case UIMSG_A: | 3133 case UIMSG_A: |
3134 __debugbreak; | |
3289 if ( !pRenderer->pRenderD3D ) | 3135 if ( !pRenderer->pRenderD3D ) |
3290 //goto LABEL_772; | |
3291 { | 3136 { |
3292 if ( pMessageQueue_50CBD0->uNumMessages ) | 3137 if ( pMessageQueue_50CBD0->uNumMessages ) |
3293 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3138 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3294 OnGameViewportClick(); | 3139 OnGameViewportClick(); |
3295 continue; | 3140 continue; |
3335 ++pMessageQueue_50CBD0->uNumMessages; | 3180 ++pMessageQueue_50CBD0->uNumMessages; |
3336 continue; | 3181 continue; |
3337 }*/ | 3182 }*/ |
3338 continue; | 3183 continue; |
3339 case UIMSG_E: | 3184 case UIMSG_E: |
3185 __debugbreak; | |
3340 if ( pMessageQueue_50CBD0->uNumMessages ) | 3186 if ( pMessageQueue_50CBD0->uNumMessages ) |
3341 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3187 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3342 OnGameViewportClick(); | 3188 OnGameViewportClick(); |
3343 continue; | 3189 continue; |
3344 case UIMSG_F: | 3190 case UIMSG_F: |
3191 __debugbreak; | |
3345 if ( pRenderer->pRenderD3D ) | 3192 if ( pRenderer->pRenderD3D ) |
3346 { | 3193 { |
3347 LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val(); | 3194 LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val(); |
3348 } | 3195 } |
3349 else | 3196 else |
3354 } | 3201 } |
3355 pButton2 = (GUIButton *)(unsigned __int16)v116; | 3202 pButton2 = (GUIButton *)(unsigned __int16)v116; |
3356 GUIWindow::Create(0, 0, 0, 0, (WindowType)15, (int)pButton2, 0); | 3203 GUIWindow::Create(0, 0, 0, 0, (WindowType)15, (int)pButton2, 0); |
3357 continue; | 3204 continue; |
3358 case UIMSG_54: | 3205 case UIMSG_54: |
3206 __debugbreak; | |
3359 pButton2 = (GUIButton *)uMessageParam; | 3207 pButton2 = (GUIButton *)uMessageParam; |
3360 GUIWindow::Create(0, 0, 0, 0, (WindowType)22, (int)pButton2, 0); | 3208 GUIWindow::Create(0, 0, 0, 0, (WindowType)22, (int)pButton2, 0); |
3361 continue; | 3209 continue; |
3362 case UIMSG_Game_Action: | 3210 case UIMSG_Game_Action: |
3363 if ( pMessageQueue_50CBD0->uNumMessages ) | 3211 if ( pMessageQueue_50CBD0->uNumMessages ) |
3364 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 3212 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
3365 OnPressSpace(); | 3213 OnPressSpace(); |
3366 continue; | 3214 continue; |
3367 case UIMSG_16F: | 3215 case UIMSG_16F: |
3216 __debugbreak; | |
3368 if ( pCurrentScreen ) | 3217 if ( pCurrentScreen ) |
3369 continue; | 3218 continue; |
3370 pParty->uFlags |= 2u; | 3219 pParty->uFlags |= 2u; |
3371 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomOut, 0); | 3220 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomOut, 0); |
3372 uNumSeconds = 131072; | 3221 uNumSeconds = 131072; |
3386 if ( (signed int)v118 <= 2048 ) | 3235 if ( (signed int)v118 <= 2048 ) |
3387 goto LABEL_789; | 3236 goto LABEL_789; |
3388 viewparams->field_28 = 11; | 3237 viewparams->field_28 = 11; |
3389 goto LABEL_788; | 3238 goto LABEL_788; |
3390 case UIMSG_170: | 3239 case UIMSG_170: |
3240 __debugbreak; | |
3391 if ( pCurrentScreen ) | 3241 if ( pCurrentScreen ) |
3392 continue; | 3242 continue; |
3393 pParty->uFlags |= 2u; | 3243 pParty->uFlags |= 2u; |
3394 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomIn, 0); | 3244 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomIn, 0); |
3395 uNumSeconds = 32768; | 3245 uNumSeconds = 32768; |