Mercurial > might-and-magic-trilogy
diff mm7_2.cpp @ 1:ac0fb48cd27a
Texture, hwl loading, video player
author | Nomad |
---|---|
date | Tue, 09 Oct 2012 13:09:08 +0200 |
parents | 8b8875f5b359 |
children | 2ca04ccb612a |
line wrap: on
line diff
--- a/mm7_2.cpp Fri Oct 05 16:07:14 2012 +0200 +++ b/mm7_2.cpp Tue Oct 09 13:09:08 2012 +0200 @@ -13097,7 +13097,7 @@ do { if ( pIndoor->pFaces[v12].uBitmapID != -1 ) - HIWORD(pBitmaps_LOD->pTextures[pIndoor->pFaces[v12].uBitmapID].palette) = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[pIndoor->pFaces[v12].uBitmapID].palette); + pBitmaps_LOD->pTextures[pIndoor->pFaces[v12].uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[pIndoor->pFaces[v12].uBitmapID].palette_id1); ++i; ++v12; } @@ -13863,7 +13863,7 @@ //----- (004637EB) -------------------------------------------------------- -signed int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) +int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam) { unsigned int v4; // esi@1 Render *v5; // ecx@14 @@ -14080,10 +14080,13 @@ { if ( Msg == WM_WINDOWPOSCHANGED ) { - if ( pVideoPlayer->AnyMovieLoaded() && pVideoPlayer->pBinkBuffer ) - { - BinkBufferSetOffset(pVideoPlayer->pBinkBuffer, 0, 0); - return DefWindowProcA(hWnd, Msg, wParam, v4); + if (pVideoPlayer) + { + if (pVideoPlayer->AnyMovieLoaded() && pVideoPlayer->pBinkBuffer) + { + BinkBufferSetOffset(pVideoPlayer->pBinkBuffer, 0, 0); + return DefWindowProcA(hWnd, Msg, wParam, v4); + } } goto _def_wnd_proc; } @@ -15428,7 +15431,7 @@ pVideoPlayer = new VideoPlayer; pVideoPlayer->Initialize(); - BYTE1(dword_6BE364_game_settings_1) |= 0x40u; + dword_6BE364_game_settings_1 |= 0x4000; if ( uTurnSpeed ) { @@ -15449,7 +15452,7 @@ { uTurnSpeed = (unsigned int)uCPUSpeed < 0xC7 ? 128 : 64; } - return 1; + return true; } @@ -15467,7 +15470,7 @@ int v6; // ecx@6 int v7; // edx@7 ObjectDesc *v8; // eax@7 - signed int v9; // esi@8 + //signed int v9; // esi@8 signed int v10; // ebx@14 signed int v11; // esi@15 char pContainer[32]; // [sp+10h] [bp-Ch]@9 @@ -15537,13 +15540,12 @@ flt_6BE3A0 = 0.55000001f; MainMenuUI_Create(); pGame->pStru6Instance->LoadAnimations(); - v9 = 0; - do - { - sprintf(pContainer, "HDWTR%03u", v9); - pRenderer->pHDWaterBitmapIDs[v9++] = pBitmaps_LOD->LoadTexture(pContainer); - } - while ( v9 < 7 ); + + for (uint i = 0; i < 7; ++i) + { + sprintf(pContainer, "HDWTR%03u", i); + pRenderer->pHDWaterBitmapIDs[i] = pBitmaps_LOD->LoadTexture(pContainer); + } pNPCStats = new NPCStats; pNPCStats->Initialize();