comparison mm7_6.cpp @ 319:5a66be213cff

Actor::Die
author Nomad
date Wed, 20 Feb 2013 02:53:37 +0200
parents 2a09e1d6fc8f
children d720a13e2273
comparison
equal deleted inserted replaced
317:e41fe9cf3613 319:5a66be213cff
2168 result = 0; 2168 result = 0;
2169 return result; 2169 return result;
2170 } 2170 }
2171 2171
2172 //----- (0042777D) -------------------------------------------------------- 2172 //----- (0042777D) --------------------------------------------------------
2173 bool __fastcall _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6) 2173 void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6)
2174 { 2174 {
2175 bool result; // eax@2 2175 bool result; // eax@2
2176 __int16 v6; // bx@4 2176 __int16 v6; // bx@4
2177 Player *v7; // eax@4 2177 Player *v7; // eax@4
2178 char v8; // zf@12 2178 char v8; // zf@12
2353 if ( result != -1 ) 2353 if ( result != -1 )
2354 { 2354 {
2355 if ( v6 & 2 ) 2355 if ( v6 & 2 )
2356 { 2356 {
2357 if ( pGUIWindow_Settings ) 2357 if ( pGUIWindow_Settings )
2358 return result; 2358 return;
2359 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); 2359 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
2360 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0); 2360 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0);
2361 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0); 2361 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0);
2362 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0); 2362 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0);
2363 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0); 2363 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0);
2364 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); 2364 sub_421B2C_PlaceInInventory_or_DropPickedItem();
2365 return;
2365 } 2366 }
2366 if ( v6 & 8 ) 2367 if ( v6 & 8 )
2367 { 2368 {
2368 if ( pGUIWindow_Settings ) 2369 if ( pGUIWindow_Settings )
2369 return result; 2370 return;
2370 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); 2371 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
2371 v29 = 0; 2372 v29 = 0;
2372 v28 = ""; 2373 v28 = "";
2373 v27 = 0; 2374 v27 = 0;
2374 v26 = 0; 2375 v26 = 0;
2382 v19 = 8; 2383 v19 = 8;
2383 pGUIWindow_Settings = v17; 2384 pGUIWindow_Settings = v17;
2384 v18 = v17; 2385 v18 = v17;
2385 LABEL_56: 2386 LABEL_56:
2386 v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29); 2387 v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29);
2387 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); 2388 sub_421B2C_PlaceInInventory_or_DropPickedItem();
2389 return;
2388 } 2390 }
2389 if ( v6 & 0x40 ) 2391 if ( v6 & 0x40 )
2390 { 2392 {
2391 if ( pGUIWindow_Settings ) 2393 if ( pGUIWindow_Settings )
2392 return result; 2394 return;
2393 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); 2395 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
2394 v29 = 0; 2396 v29 = 0;
2395 v28 = ""; 2397 v28 = "";
2396 v27 = 0; 2398 v27 = 0;
2397 v26 = 0; 2399 v26 = 0;
2399 goto LABEL_44; 2401 goto LABEL_44;
2400 } 2402 }
2401 if ( (char)v6 < 0 ) 2403 if ( (char)v6 < 0 )
2402 { 2404 {
2403 if ( pGUIWindow_Settings ) 2405 if ( pGUIWindow_Settings )
2404 return result; 2406 return;
2405 ++pIcons_LOD->uTexturePacksCount; 2407 ++pIcons_LOD->uTexturePacksCount;
2406 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 2408 if ( !pIcons_LOD->uNumPrevLoadedFiles )
2407 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 2409 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
2408 pGUIWindow_Settings = pStru277[result].sub_4219BE(); 2410 pGUIWindow_Settings = pStru277[result].sub_4219BE();
2409 unk_50C9A0 = 1; 2411 unk_50C9A0 = 1;
2410 some_active_character = uActiveCharacter; 2412 some_active_character = uActiveCharacter;
2411 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); 2413 sub_421B2C_PlaceInInventory_or_DropPickedItem();
2414 return;
2412 } 2415 }
2413 if ( HIBYTE(v6) & 1 ) 2416 if ( HIBYTE(v6) & 1 )
2414 { 2417 {
2415 if ( pGUIWindow_Settings ) 2418 if ( pGUIWindow_Settings )
2416 return result; 2419 return;
2417 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); 2420 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
2418 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0); 2421 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0);
2419 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); 2422 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0);
2420 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); 2423 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0);
2421 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0); 2424 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0);
2422 v29 = 0; 2425 v29 = 0;
2433 v18 = pGUIWindow_Settings; 2436 v18 = pGUIWindow_Settings;
2434 goto LABEL_56; 2437 goto LABEL_56;
2435 } 2438 }
2436 if ( HIBYTE(v6) & 2 && !pGUIWindow_Settings ) 2439 if ( HIBYTE(v6) & 2 && !pGUIWindow_Settings )
2437 { 2440 {
2438 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); 2441 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
2439 pBtn_NPCLeft = pGUIWindow_Settings->CreateButton( 2442 pBtn_NPCLeft = pGUIWindow_Settings->CreateButton(
2440 0x1D5u, 2443 0x1D5u,
2441 0xB2u, 2444 0xB2u,
2442 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24), 2445 (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureWidth : 24),
2443 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureHeight : 26), 2446 (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureHeight : 26),
2444 1, 2447 1,
2445 0, 2448 0,
2446 0xBCu, 2449 0xBCu,
2447 0, 2450 0,
2448 0, 2451 0,
2449 "", 2452 "",
2450 (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0), 2453 (Texture *)(uTextureID_Btn_NPCLeft != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft] : 0),
2451 0); 2454 0);
2452 pBtn_NPCRight = pGUIWindow_Settings->CreateButton( 2455 pBtn_NPCRight = pGUIWindow_Settings->CreateButton(
2453 0x272u, 2456 0x272u,
2454 0xB2u, 2457 0xB2u,
2455 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24), 2458 (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureWidth : 24),
2456 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureHeight : 26), 2459 (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureHeight : 26),
2457 1, 2460 1,
2458 0, 2461 0,
2459 0xBCu, 2462 0xBCu,
2460 1u, 2463 1u,
2461 0, 2464 0,
2462 "", 2465 "",
2463 (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0), 2466 (Texture *)(uTextureID_Btn_NPCRight != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_NPCRight] : 0),
2464 0); 2467 0);
2465 pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); 2468 pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0);
2466 result = (bool)pGUIWindow_Settings->CreateButton( 2469 pGUIWindow_Settings->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 5u, 0x36u, "", 0);
2467 0x231u,
2468 0x95u,
2469 0x40u,
2470 0x4Au,
2471 1,
2472 0,
2473 0x8Fu,
2474 5u,
2475 0x36u,
2476 "",
2477 0);
2478 } 2470 }
2479 } 2471 }
2480 } 2472 }
2481 return result;
2482 } 2473 }
2483 2474
2484 2475
2485 2476
2486 //----- (00427D48) -------------------------------------------------------- 2477 //----- (00427D48) --------------------------------------------------------