# HG changeset patch # User Ritor1 # Date 1360642655 -21600 # Node ID d92c78ab54feeade983c6fba404e812fd6208005 # Parent 2b0c652cc165f2536dc951df2722550863b4db1a# Parent b099dd069171928e5ca835e5b86be396737d2c46 Слияние diff -r b099dd069171 -r d92c78ab54fe AudioPlayer.cpp --- a/AudioPlayer.cpp Tue Feb 12 06:29:34 2013 +0200 +++ b/AudioPlayer.cpp Tue Feb 12 10:17:35 2013 +0600 @@ -1758,8 +1758,7 @@ signed int v2; // eax@1 v2 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->Atan2(a1 - pParty->vPosition.x, a2 - pParty->vPosition.y) - - stru_5C6E00->uIntegerHalfPi - - pParty->sRotationY); + - stru_5C6E00->uIntegerHalfPi - pParty->sRotationY); if ( v2 > (signed int)stru_5C6E00->uIntegerPi ) v2 = 2 * stru_5C6E00->uIntegerPi - v2; return (v2 >> 3) - (v2 >> 10); diff -r b099dd069171 -r d92c78ab54fe Game.cpp diff -r b099dd069171 -r d92c78ab54fe Keyboard.cpp diff -r b099dd069171 -r d92c78ab54fe Render.cpp --- a/Render.cpp Tue Feb 12 06:29:34 2013 +0200 +++ b/Render.cpp Tue Feb 12 10:17:35 2013 +0600 @@ -1763,8 +1763,8 @@ uStartX = 0, uEndX = 128; uStartZ = 64 - 16, uEndZ = 128; } -// uStartX = 0, uEndX = 128; -// uStartZ = 0, uEndZ = 128; + uStartX = 0, uEndX = 128; + uStartZ = 0, uEndZ = 128; static RenderVertexSoft pTerrainVertices[128 * 128]; for (unsigned int z = uStartZ; z < uEndZ; ++z) { diff -r b099dd069171 -r d92c78ab54fe mm7_1.cpp --- a/mm7_1.cpp Tue Feb 12 06:29:34 2013 +0200 +++ b/mm7_1.cpp Tue Feb 12 10:17:35 2013 +0600 @@ -1257,8 +1257,7 @@ //----- (0041AD6E) -------------------------------------------------------- void __cdecl GameUI_DrawRightPanelItems() { - if ( (signed int)((pParty->uTimePlayed - qword_507CC8) >> 32) <= 0 - && (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) != 0i64 ) + if ( (signed int)((pParty->uTimePlayed - qword_507CC8) >> 32) <= 0 && (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) != 0i64 ) qword_507CC8 = 0i64; if ( (((pParty->uTimePlayed - qword_507CC8) >> 32) & 0x80000000u) == 0i64 && (!(SHIDWORD(pParty->uTimePlayed) < (LODWORD(pParty->uTimePlayed) < (unsigned int)qword_507CC8) @@ -1267,24 +1266,14 @@ { qword_507CC8 = pParty->uTimePlayed; byte_50697C = byte_50697C == 0; - if ( byte_50697C - && pCurrentScreen != 5 ) + if ( byte_50697C && pCurrentScreen != 5 ) { if ( bFlashQuestBook ) - pRenderer->DrawTextureTransparent( - 493u, - 355u, - (Texture *)(uTextureID_ib_td1_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0)); + pRenderer->DrawTextureTransparent(493, 355, (Texture *)(uTextureID_ib_td1_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0)); if ( bFlashAutonotesBook ) - pRenderer->DrawTextureTransparent( - 527u, - 353u, - (Texture *)(uTextureID_ib_td2_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0)); + pRenderer->DrawTextureTransparent(527, 353, (Texture *)(uTextureID_ib_td2_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0)); if ( bFlashHistoryBook ) - pRenderer->DrawTextureTransparent( - 600u, - 361u, - (Texture *)(uTextureID_ib_td5_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0)); + pRenderer->DrawTextureTransparent(600, 361, (Texture *)(uTextureID_ib_td5_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0)); } else { diff -r b099dd069171 -r d92c78ab54fe mm7_2.cpp --- a/mm7_2.cpp Tue Feb 12 06:29:34 2013 +0200 +++ b/mm7_2.cpp Tue Feb 12 10:17:35 2013 +0600 @@ -13485,6 +13485,7 @@ pParty = new Party; + memset(&pParty->pHirelings, 0, sizeof(pParty->pHirelings)); pParty->uWalkSpeed = GetPrivateProfileIntW(L"debug", L"walkspeed", 384, pMM6IniFile); pParty->uDefaultEyelevel = GetPrivateProfileIntW(L"party", L"eyelevel", 160, pMM6IniFile); pParty->sEyelevel = pParty->uDefaultEyelevel; diff -r b099dd069171 -r d92c78ab54fe mm7_3.cpp diff -r b099dd069171 -r d92c78ab54fe mm7_4.cpp --- a/mm7_4.cpp Tue Feb 12 06:29:34 2013 +0200 +++ b/mm7_4.cpp Tue Feb 12 10:17:35 2013 +0600 @@ -3059,7 +3059,7 @@ for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) { - if (pNPCStats->pNewNPCData[i].uFlags & 0x80) + if (pNPCStats->pNewNPCData[i].uFlags == 128) { if (!pParty->pHirelings[0].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[0].pName)) { @@ -9670,7 +9670,8 @@ } Party::TakeGold(v21); } - LOBYTE(v2->uFlags) |= 0x80u; + //LOBYTE(v2->uFlags) |= 0x80u; + v2->uFlags = 128; pParty->field_709 = 0; sub_44A56A(); if ( pParty->pHirelings[0].pName ) diff -r b099dd069171 -r d92c78ab54fe mm7_5.cpp --- a/mm7_5.cpp Tue Feb 12 06:29:34 2013 +0200 +++ b/mm7_5.cpp Tue Feb 12 10:17:35 2013 +0600 @@ -6165,11 +6165,10 @@ //----- (0043AA99) -------------------------------------------------------- void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) { - int v7; // ebx@1 +/* int v7; // ebx@1 int v8; // ST14_4@1 int v9; // edi@1 int anglea; // [sp+20h] [bp+8h]@1 - v7 = sRotX; v8 = sDepth; v9 = sRotY; @@ -6179,7 +6178,17 @@ + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)anglea) >> 16); *outz = v.z - + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16); + + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16);*/ + + float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), + cosf_y = cosf(3.14159265f * sRotY / 1024.0f), + sinf_x = sinf(3.14159265f * sRotX / 1024.0f), + sinf_y = sinf(3.14159265f * sRotY / 1024.0f); + + *outx = v.x + ((unsigned __int64)((double)sDepth * cosf_y * cosf_x) >> 16); + *outy = v.y + ((unsigned __int64)((double)sDepth * sinf_y * cosf_x) >> 16); + *outz = v.z + ((unsigned __int64)((double)sDepth * sinf_x) >> 16); + } //----- (0043AB61) -------------------------------------------------------- @@ -14113,13 +14122,13 @@ viewparams->_443231(); if ( dword_506538 ) viewparams->_44323D(); - v6 = dword_506534; + //v6 = dword_506534; if ( dword_506534 ) { viewparams->_443225(); - v6 = dword_506534; - } - if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | v6 ) + //v6 = dword_506534; + } + if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | dword_506534 ) pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); dword_506548 = 0; dword_506544 = 0; @@ -14127,8 +14136,8 @@ dword_506538 = 0; dword_50653C = 0; dword_506540 = 0; - DrawSpellbook_Map_sub(0x61u, 0x31u, 0x169u, 313, 0); - pRenderer->DrawTextureTransparent(0x4Bu, 0x16u, pTexture_mapbordr); + DrawSpellbook_Map_sub(97, 49, 361, 313, 0); + pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr); v22.uFrameWidth = 460; v22.uFrameHeight = 344; v22.uFrameX = 8;