Mercurial > mm7
comparison mm7_6.cpp @ 961:5a12082c803d
UIMSG and WINDOW_Type(continue)
author | Ritor1 |
---|---|
date | Mon, 06 May 2013 17:33:40 +0600 |
parents | 9a5db2cf999a |
children | d982fffb8b96 |
comparison
equal
deleted
inserted
replaced
960:9a5db2cf999a | 961:5a12082c803d |
---|---|
2148 a5 |= 0x0040; | 2148 a5 |= 0x0040; |
2149 break; | 2149 break; |
2150 | 2150 |
2151 case SPELL_SPIRIT_BLESS: | 2151 case SPELL_SPIRIT_BLESS: |
2152 if (a4 && ~a4 & 0x01C0) | 2152 if (a4 && ~a4 & 0x01C0) |
2153 goto LABEL_25; | 2153 //goto LABEL_25; |
2154 { | |
2155 a5 |= 0x0002; | |
2156 break; | |
2157 } | |
2154 else if ((player->pActiveSkills[PLAYER_SKILL_SPIRIT] & 0x1C0) == 0); | 2158 else if ((player->pActiveSkills[PLAYER_SKILL_SPIRIT] & 0x1C0) == 0); |
2155 goto LABEL_25; | 2159 //goto LABEL_25; |
2160 { | |
2161 a5 |= 0x0002; | |
2162 break; | |
2163 } | |
2156 break; | 2164 break; |
2157 | 2165 |
2158 case SPELL_SPIRIT_PRESERVATION: | 2166 case SPELL_SPIRIT_PRESERVATION: |
2159 v9 = a4; | 2167 v9 = a4; |
2160 if ( !a4 ) | 2168 if ( !a4 ) |
2161 v9 = player->pActiveSkills[PLAYER_SKILL_SPIRIT]; | 2169 v9 = player->pActiveSkills[PLAYER_SKILL_SPIRIT]; |
2162 goto LABEL_18; | 2170 //goto LABEL_18; |
2171 v10 = SkillToMastery(v9); | |
2172 v12 = __OFSUB__(v10, 3); | |
2173 v11 = ((v10 - 3) & 0x80000000u) != 0; | |
2174 //goto LABEL_24; | |
2175 if ( v11 ^ v12 ) | |
2176 { | |
2177 a5 |= 0x0002; | |
2178 break; | |
2179 } | |
2180 break; | |
2163 | 2181 |
2164 case SPELL_DARK_PAIN_REFLECTION: | 2182 case SPELL_DARK_PAIN_REFLECTION: |
2165 v9 = a4; | 2183 v9 = a4; |
2166 if ( !a4 ) | 2184 if ( !a4 ) |
2167 v9 = player->pActiveSkills[PLAYER_SKILL_DARK]; | 2185 v9 = player->pActiveSkills[PLAYER_SKILL_DARK]; |
2168 LABEL_18: | 2186 //LABEL_18: |
2169 v10 = SkillToMastery(v9); | 2187 v10 = SkillToMastery(v9); |
2170 v12 = __OFSUB__(v10, 3); | 2188 v12 = __OFSUB__(v10, 3); |
2171 v11 = ((v10 - 3) & 0x80000000u) != 0; | 2189 v11 = ((v10 - 3) & 0x80000000u) != 0; |
2172 goto LABEL_24; | 2190 //goto LABEL_24; |
2191 if ( v11 ^ v12 ) | |
2192 { | |
2193 a5 |= 0x0002; | |
2194 break; | |
2195 } | |
2196 break; | |
2173 | 2197 |
2174 case SPELL_BODY_HAMMERHANDS: | 2198 case SPELL_BODY_HAMMERHANDS: |
2175 v13 = a4; | 2199 v13 = a4; |
2176 if ( !a4 ) | 2200 if ( !a4 ) |
2177 v13 = player->pActiveSkills[PLAYER_SKILL_BODY]; | 2201 v13 = player->pActiveSkills[PLAYER_SKILL_BODY]; |
2178 v14 = SkillToMastery(v13); | 2202 v14 = SkillToMastery(v13); |
2179 v12 = __OFSUB__(v14, 4); | 2203 v12 = __OFSUB__(v14, 4); |
2180 v11 = ((v14 - 4) & 0x80000000u) != 0; | 2204 v11 = ((v14 - 4) & 0x80000000u) != 0; |
2181 LABEL_24: | 2205 //LABEL_24: |
2182 if ( v11 ^ v12 ) | 2206 if ( v11 ^ v12 ) |
2183 goto LABEL_25; | 2207 //goto LABEL_25; |
2208 { | |
2209 a5 |= 0x0002; | |
2210 break; | |
2211 } | |
2184 break; | 2212 break; |
2185 | 2213 |
2186 case SPELL_EARTH_STONE_TO_FLESH: | 2214 case SPELL_EARTH_STONE_TO_FLESH: |
2187 case SPELL_SPIRIT_REMOVE_CURSE: | 2215 case SPELL_SPIRIT_REMOVE_CURSE: |
2188 case SPELL_SPIRIT_RAISE_DEAD: | 2216 case SPELL_SPIRIT_RAISE_DEAD: |
2192 case SPELL_MIND_CURE_INSANITY: | 2220 case SPELL_MIND_CURE_INSANITY: |
2193 case SPELL_BODY_CURE_WEAKNESS: | 2221 case SPELL_BODY_CURE_WEAKNESS: |
2194 case SPELL_BODY_REGENERATION: | 2222 case SPELL_BODY_REGENERATION: |
2195 case SPELL_BODY_CURE_POISON: | 2223 case SPELL_BODY_CURE_POISON: |
2196 case SPELL_BODY_CURE_DISEASE: | 2224 case SPELL_BODY_CURE_DISEASE: |
2197 LABEL_25: | 2225 //LABEL_25: |
2198 //v6 = a5 | 2; | 2226 //v6 = a5 | 2; |
2199 a5 |= 0x0002; | 2227 a5 |= 0x0002; |
2200 break; | 2228 break; |
2201 | 2229 |
2202 case SPELL_DARK_SACRIFICE: | 2230 case SPELL_DARK_SACRIFICE: |
2244 { | 2272 { |
2245 if ( a5 & 2 ) | 2273 if ( a5 & 2 ) |
2246 { | 2274 { |
2247 if ( pGUIWindow_Settings ) | 2275 if ( pGUIWindow_Settings ) |
2248 return; | 2276 return; |
2249 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_1B, (int)&pCastSpellInfo[result], 0); | 2277 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell, (int)&pCastSpellInfo[result], 0); |
2250 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_45, 0, 0x31u, "", 0); | 2278 pGUIWindow_Settings->CreateButton(52, 422, 35, 0, 2, 0, UIMSG_CastSpell_SPIRIT_Preservation, 0, 49, "", 0); |
2251 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_45, 1u, 0x32u, "", 0); | 2279 pGUIWindow_Settings->CreateButton(165, 422, 35, 0, 2, 0, UIMSG_CastSpell_SPIRIT_Preservation, 1, 50, "", 0); |
2252 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_45, 2u, 0x33u, "", 0); | 2280 pGUIWindow_Settings->CreateButton(280, 422, 35, 0, 2, 0, UIMSG_CastSpell_SPIRIT_Preservation, 2, 51, "", 0); |
2253 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_45, 3u, 0x34u, "", 0); | 2281 pGUIWindow_Settings->CreateButton(390, 422, 35, 0, 2, 0, UIMSG_CastSpell_SPIRIT_Preservation, 3, 52, "", 0); |
2254 sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2282 sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2255 return; | 2283 return; |
2256 } | 2284 } |
2257 if ( a5 & 8 ) | 2285 if ( a5 & 8 ) |
2258 { | 2286 { |
2259 if ( pGUIWindow_Settings ) | 2287 if ( pGUIWindow_Settings ) |
2260 return; | 2288 return; |
2261 | 2289 |
2262 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_1B, (int)&pCastSpellInfo[result], 0); | 2290 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell, (int)&pCastSpellInfo[result], 0); |
2263 pGUIWindow_Settings->CreateButton(game_viewport_x, game_viewport_y, game_viewport_width, game_viewport_height, 1, 0, UIMSG_46, 0, 0, "", 0); | 2291 pGUIWindow_Settings->CreateButton(game_viewport_x, game_viewport_y, game_viewport_width, game_viewport_height, 1, 0, UIMSG_CastSpell_SmallShot, 0, 0, "", 0); |
2264 sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2292 sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2265 return; | 2293 return; |
2266 } | 2294 } |
2267 if ( a5 & 0x40 ) | 2295 if ( a5 & 0x40 ) |
2268 { | 2296 { |
2269 if ( pGUIWindow_Settings ) | 2297 if ( pGUIWindow_Settings ) |
2270 return; | 2298 return; |
2271 | 2299 |
2272 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_1B, (int)&pCastSpellInfo[result], 0); | 2300 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell, (int)&pCastSpellInfo[result], 0); |
2273 pGUIWindow_Settings->CreateButton(game_viewport_x, game_viewport_y, game_viewport_width, game_viewport_height, 1, 0, UIMSG_BE, 0, 0, "", 0); | 2301 pGUIWindow_Settings->CreateButton(game_viewport_x, game_viewport_y, game_viewport_width, game_viewport_height, 1, 0, UIMSG_CastSpell_BE, 0, 0, "", 0); |
2274 sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2302 sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2275 return; | 2303 return; |
2276 } | 2304 } |
2277 if ( (char)a5 < 0 ) | 2305 if ( (char)a5 < 0 ) |
2278 { | 2306 { |
2289 } | 2317 } |
2290 if ( HIBYTE(a5) & 1 ) | 2318 if ( HIBYTE(a5) & 1 ) |
2291 { | 2319 { |
2292 if ( pGUIWindow_Settings ) | 2320 if ( pGUIWindow_Settings ) |
2293 return; | 2321 return; |
2294 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_1B, (int)&pCastSpellInfo[result], 0); | 2322 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell, (int)&pCastSpellInfo[result], 0); |
2295 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_8D, 0, 0x31u, "", 0); | 2323 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_CastSpell_8D, 0, 0x31u, "", 0); |
2296 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_8D, 1, 0x32u, "", 0); | 2324 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_CastSpell_8D, 1, 0x32u, "", 0); |
2297 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_8D, 2, 0x33u, "", 0); | 2325 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_CastSpell_8D, 2, 0x33u, "", 0); |
2298 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_8D, 3, 0x34u, "", 0); | 2326 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, UIMSG_CastSpell_8D, 3, 0x34u, "", 0); |
2299 pGUIWindow_Settings->CreateButton(8, 8, game_viewport_width, game_viewport_height, 1, 0, UIMSG_8C, 0, 0, "", NULL); | 2327 pGUIWindow_Settings->CreateButton(8, 8, game_viewport_width, game_viewport_height, 1, 0, UIMSG_CastSpell_GreatShot, 0, 0, "", NULL); |
2300 sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2328 sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2301 } | 2329 } |
2302 if ( HIBYTE(a5) & 2 && !pGUIWindow_Settings ) | 2330 if ( HIBYTE(a5) & 2 && !pGUIWindow_Settings ) |
2303 { | 2331 { |
2304 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_1B, (int)&pCastSpellInfo[result], 0); | 2332 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell, (int)&pCastSpellInfo[result], 0); |
2305 pBtn_NPCLeft = pGUIWindow_Settings->CreateButton(469, 178, | 2333 pBtn_NPCLeft = pGUIWindow_Settings->CreateButton(469, 178, |
2306 pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft)->uTextureWidth, | 2334 pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft)->uTextureWidth, |
2307 pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft)->uTextureHeight, | 2335 pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft)->uTextureHeight, |
2308 1, 0, UIMSG_ScrollNPCPanel, 0, 0, "", | 2336 1, 0, UIMSG_ScrollNPCPanel, 0, 0, "", |
2309 pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft), 0); | 2337 pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft), 0); |
5391 } | 5419 } |
5392 v319 = uRequiredMana; | 5420 v319 = uRequiredMana; |
5393 if ( pPlayer->sMana >= (signed int)uRequiredMana ) | 5421 if ( pPlayer->sMana >= (signed int)uRequiredMana ) |
5394 { | 5422 { |
5395 pEventTimer->Pause(); | 5423 pEventTimer->Pause(); |
5396 pMessageQueue_50CBD0->AddMessage(UIMSG_B1, 0, 0); | 5424 pMessageQueue_50CBD0->AddMessage(UIMSG_OnCastLloydsBeacon, 0, 0); |
5397 qword_506350 = (signed int)v733; | 5425 qword_506350 = (signed int)v733; |
5398 _506348_current_lloyd_playerid = pCastSpell->uPlayerID; | 5426 _506348_current_lloyd_playerid = pCastSpell->uPlayerID; |
5399 ::uRequiredMana = v319; | 5427 ::uRequiredMana = v319; |
5400 ::sRecoveryTime = sRecoveryTime; | 5428 ::sRecoveryTime = sRecoveryTime; |
5401 dword_50633C = pCastSpell->sound_id; | 5429 dword_50633C = pCastSpell->sound_id; |
7623 CASE(UIMSG_PlayerCreation_VoicePrev) | 7651 CASE(UIMSG_PlayerCreation_VoicePrev) |
7624 CASE(UIMSG_PlayerCreation_VoiceNext) | 7652 CASE(UIMSG_PlayerCreation_VoiceNext) |
7625 CASE(UIMSG_StartNPCDialogue) | 7653 CASE(UIMSG_StartNPCDialogue) |
7626 CASE(UIMSG_ArrowUp) | 7654 CASE(UIMSG_ArrowUp) |
7627 CASE(UIMSG_DownArrow) | 7655 CASE(UIMSG_DownArrow) |
7628 CASE(UIMSG_LoadSlot) | 7656 CASE(UIMSG_SaveLoadBtn) |
7629 CASE(UIMSG_SelectLoadSlot) | 7657 CASE(UIMSG_SelectLoadSlot) |
7630 CASE(UIMSG_Cancel) | 7658 CASE(UIMSG_Cancel) |
7631 CASE(UIMSG_ExitRest) | 7659 CASE(UIMSG_ExitRest) |
7632 CASE(UIMSG_PlayerCreation_FacePrev) | 7660 CASE(UIMSG_PlayerCreation_FacePrev) |
7633 CASE(UIMSG_PlayerCreation_FaceNext) | 7661 CASE(UIMSG_PlayerCreation_FaceNext) |