Mercurial > might-and-magic-trilogy
comparison mm7_6.cpp @ 166:87c503d426e0
11.12.2012
author | Ritor1 |
---|---|
date | Tue, 11 Dec 2012 17:23:17 +0600 |
parents | 8be5293b6b33 |
children | 90a9c828c2a6 |
comparison
equal
deleted
inserted
replaced
165:c778b7aead81 | 166:87c503d426e0 |
---|---|
2322 { | 2322 { |
2323 v8 = (v15->field_8 & 0x3CA) == 0; | 2323 v8 = (v15->field_8 & 0x3CA) == 0; |
2324 v15->spellnum = 0; | 2324 v15->spellnum = 0; |
2325 if ( !v8 ) | 2325 if ( !v8 ) |
2326 { | 2326 { |
2327 ptr_507BD4->Release(); | 2327 pGUIWindow_Settings->Release(); |
2328 ptr_507BD4 = 0; | 2328 pGUIWindow_Settings = 0; |
2329 pMouse->SetCursorBitmap("MICON1"); | 2329 pMouse->SetCursorBitmap("MICON1"); |
2330 GameUI_StatusBar_TimedStringTimeLeft = 0; | 2330 GameUI_StatusBar_TimedStringTimeLeft = 0; |
2331 unk_50C9A0 = 0; | 2331 unk_50C9A0 = 0; |
2332 back_to_game(); | 2332 back_to_game(); |
2333 } | 2333 } |
2338 result = pStru277->PushStru277(a2a, a3a, a4, v6, a6); | 2338 result = pStru277->PushStru277(a2a, a3a, a4, v6, a6); |
2339 if ( result != -1 ) | 2339 if ( result != -1 ) |
2340 { | 2340 { |
2341 if ( v6 & 2 ) | 2341 if ( v6 & 2 ) |
2342 { | 2342 { |
2343 if ( ptr_507BD4 ) | 2343 if ( pGUIWindow_Settings ) |
2344 return result; | 2344 return result; |
2345 ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); | 2345 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); |
2346 ptr_507BD4->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0); | 2346 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0); |
2347 ptr_507BD4->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0); | 2347 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0); |
2348 ptr_507BD4->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0); | 2348 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0); |
2349 ptr_507BD4->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0); | 2349 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0); |
2350 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2350 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2351 } | 2351 } |
2352 if ( v6 & 8 ) | 2352 if ( v6 & 8 ) |
2353 { | 2353 { |
2354 if ( ptr_507BD4 ) | 2354 if ( pGUIWindow_Settings ) |
2355 return result; | 2355 return result; |
2356 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); | 2356 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); |
2357 v29 = 0; | 2357 v29 = 0; |
2358 v28 = ""; | 2358 v28 = ""; |
2359 v27 = 0; | 2359 v27 = 0; |
2364 v23 = 1; | 2364 v23 = 1; |
2365 v22 = 344; | 2365 v22 = 344; |
2366 v21 = 460; | 2366 v21 = 460; |
2367 v20 = 8; | 2367 v20 = 8; |
2368 v19 = 8; | 2368 v19 = 8; |
2369 ptr_507BD4 = v17; | 2369 pGUIWindow_Settings = v17; |
2370 v18 = v17; | 2370 v18 = v17; |
2371 LABEL_56: | 2371 LABEL_56: |
2372 v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29); | 2372 v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29); |
2373 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2373 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2374 } | 2374 } |
2375 if ( v6 & 0x40 ) | 2375 if ( v6 & 0x40 ) |
2376 { | 2376 { |
2377 if ( ptr_507BD4 ) | 2377 if ( pGUIWindow_Settings ) |
2378 return result; | 2378 return result; |
2379 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); | 2379 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); |
2380 v29 = 0; | 2380 v29 = 0; |
2381 v28 = ""; | 2381 v28 = ""; |
2382 v27 = 0; | 2382 v27 = 0; |
2384 v25 = 190; | 2384 v25 = 190; |
2385 goto LABEL_44; | 2385 goto LABEL_44; |
2386 } | 2386 } |
2387 if ( (char)v6 < 0 ) | 2387 if ( (char)v6 < 0 ) |
2388 { | 2388 { |
2389 if ( ptr_507BD4 ) | 2389 if ( pGUIWindow_Settings ) |
2390 return result; | 2390 return result; |
2391 ++pIcons_LOD->uTexturePacksCount; | 2391 ++pIcons_LOD->uTexturePacksCount; |
2392 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 2392 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
2393 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 2393 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
2394 ptr_507BD4 = pStru277[result].sub_4219BE(); | 2394 pGUIWindow_Settings = pStru277[result].sub_4219BE(); |
2395 unk_50C9A0 = 1; | 2395 unk_50C9A0 = 1; |
2396 some_active_character = uActiveCharacter; | 2396 some_active_character = uActiveCharacter; |
2397 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); | 2397 return sub_421B2C_PlaceInInventory_or_DropPickedItem(); |
2398 } | 2398 } |
2399 if ( HIBYTE(v6) & 1 ) | 2399 if ( HIBYTE(v6) & 1 ) |
2400 { | 2400 { |
2401 if ( ptr_507BD4 ) | 2401 if ( pGUIWindow_Settings ) |
2402 return result; | 2402 return result; |
2403 ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); | 2403 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); |
2404 ptr_507BD4->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0); | 2404 pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0); |
2405 ptr_507BD4->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); | 2405 pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); |
2406 ptr_507BD4->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); | 2406 pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); |
2407 ptr_507BD4->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0); | 2407 pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0); |
2408 v29 = 0; | 2408 v29 = 0; |
2409 v28 = ""; | 2409 v28 = ""; |
2410 v27 = 0; | 2410 v27 = 0; |
2411 v26 = 0; | 2411 v26 = 0; |
2412 v25 = 140; | 2412 v25 = 140; |
2414 v23 = 1; | 2414 v23 = 1; |
2415 v22 = 344; | 2415 v22 = 344; |
2416 v21 = 460; | 2416 v21 = 460; |
2417 v20 = 8; | 2417 v20 = 8; |
2418 v19 = 8; | 2418 v19 = 8; |
2419 v18 = ptr_507BD4; | 2419 v18 = pGUIWindow_Settings; |
2420 goto LABEL_56; | 2420 goto LABEL_56; |
2421 } | 2421 } |
2422 if ( HIBYTE(v6) & 2 && !ptr_507BD4 ) | 2422 if ( HIBYTE(v6) & 2 && !pGUIWindow_Settings ) |
2423 { | 2423 { |
2424 ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); | 2424 pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); |
2425 ptr_5079EC = ptr_507BD4->CreateButton( | 2425 ptr_5079EC = pGUIWindow_Settings->CreateButton( |
2426 0x1D5u, | 2426 0x1D5u, |
2427 0xB2u, | 2427 0xB2u, |
2428 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24), | 2428 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24), |
2429 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureHeight : 26), | 2429 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureHeight : 26), |
2430 1, | 2430 1, |
2433 0, | 2433 0, |
2434 0, | 2434 0, |
2435 "", | 2435 "", |
2436 (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0), | 2436 (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0), |
2437 0); | 2437 0); |
2438 ptr_5079E8 = ptr_507BD4->CreateButton( | 2438 ptr_5079E8 = pGUIWindow_Settings->CreateButton( |
2439 0x272u, | 2439 0x272u, |
2440 0xB2u, | 2440 0xB2u, |
2441 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24), | 2441 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24), |
2442 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureHeight : 26), | 2442 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureHeight : 26), |
2443 1, | 2443 1, |
2446 1u, | 2446 1u, |
2447 0, | 2447 0, |
2448 "", | 2448 "", |
2449 (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0), | 2449 (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0), |
2450 0); | 2450 0); |
2451 ptr_507BD4->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); | 2451 pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); |
2452 result = (bool)ptr_507BD4->CreateButton( | 2452 result = (bool)pGUIWindow_Settings->CreateButton( |
2453 0x231u, | 2453 0x231u, |
2454 0x95u, | 2454 0x95u, |
2455 0x40u, | 2455 0x40u, |
2456 0x4Au, | 2456 0x4Au, |
2457 1, | 2457 1, |
2482 if ( v2->spellnum ) | 2482 if ( v2->spellnum ) |
2483 { | 2483 { |
2484 if ( v2->field_8 & 0x3CA ) | 2484 if ( v2->field_8 & 0x3CA ) |
2485 { | 2485 { |
2486 v2->spellnum = 0; | 2486 v2->spellnum = 0; |
2487 ptr_507BD4->Release(); | 2487 pGUIWindow_Settings->Release(); |
2488 ptr_507BD4 = 0; | 2488 pGUIWindow_Settings = 0; |
2489 pMouse->SetCursorBitmap("MICON1"); | 2489 pMouse->SetCursorBitmap("MICON1"); |
2490 GameUI_StatusBar_TimedStringTimeLeft = 0; | 2490 GameUI_StatusBar_TimedStringTimeLeft = 0; |
2491 unk_50C9A0 = 0; | 2491 unk_50C9A0 = 0; |
2492 back_to_game(); | 2492 back_to_game(); |
2493 } | 2493 } |