Mercurial > mm7
changeset 147:c70fea5013aa
12.02.13
author | Ritor1 |
---|---|
date | Tue, 12 Feb 2013 09:11:03 +0600 |
parents | 30e731fc0f7a |
children | 77ad59c17864 |
files | AudioPlayer.cpp Game.cpp Render.cpp mm7_1.cpp mm7_2.cpp mm7_4.cpp mm7_5.cpp |
diffstat | 7 files changed, 26 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/AudioPlayer.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/AudioPlayer.cpp Tue Feb 12 09:11:03 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);
--- a/Game.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/Game.cpp Tue Feb 12 09:11:03 2013 +0600 @@ -147,8 +147,8 @@ pOtherOverlayList->field_3EC = 0; viewparams->bRedrawGameUI = v5; GameUI_DrawPartySpells(); - //if (v4 || pParty->pHirelings[0].evtc || pParty->pHirelings[1].evtc ) - //DrawHiredNPCs();//Ritor1: it's temporarily + if (v4 || pParty->pHirelings[0].evtc || pParty->pHirelings[1].evtc ) + DrawHiredNPCs();//Ritor1: it's temporarily GameUI_DrawPortraits(v4); GameUI_DrawLifeManaBars(); GameUI_DrawCharacterSelectionFrame();
--- a/Render.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/Render.cpp Tue Feb 12 09:11:03 2013 +0600 @@ -1761,8 +1761,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) {
--- a/mm7_1.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/mm7_1.cpp Tue Feb 12 09:11:03 2013 +0600 @@ -1258,8 +1258,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) @@ -1268,24 +1267,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 {
--- a/mm7_2.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/mm7_2.cpp Tue Feb 12 09:11:03 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;
--- a/mm7_4.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/mm7_4.cpp Tue Feb 12 09:11:03 2013 +0600 @@ -3097,7 +3097,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)) { @@ -9704,7 +9704,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 )
--- a/mm7_5.cpp Mon Feb 11 09:08:00 2013 +0600 +++ b/mm7_5.cpp Tue Feb 12 09:11:03 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) --------------------------------------------------------