Mercurial > mm7
changeset 101:2fb33d31ca0d
8.02.13
author | Ritor1 |
---|---|
date | Fri, 08 Feb 2013 15:59:32 +0600 |
parents | b9196a36b7c9 |
children | 8a10c9780e17 |
files | Game.cpp Game.h Outdoor.cpp Render.cpp Vis.cpp mm7_2.cpp mm7_4.cpp |
diffstat | 7 files changed, 18 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/Game.cpp Thu Feb 07 15:25:44 2013 +0600 +++ b/Game.cpp Fri Feb 08 15:59:32 2013 +0600 @@ -75,7 +75,7 @@ else { if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.y != pParty->vPrevPosition.y - | pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.z | pParty->sEyelevel != pParty->sPrevEyelevel ) + | pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.z | pParty->sEyelevel != pParty->sPrevEyelevel ) pParty->uFlags |= 2u; pParty->vPrevPosition = pParty->vPosition; pParty->vPrevPosition.y = pParty->vPosition.y; @@ -145,7 +145,7 @@ pOtherOverlayList->field_3EC = 0; viewparams->bRedrawGameUI = v5; GameUI_DrawPartySpells(); - //if (v4 || pParty->pHirelings[0].evtc || pParty->pHirelings[1].evtc ) + //if (v4 || pParty->pHirelings[0].evtc || pParty->pHirelings[1].evtc ) //DrawHiredNPCs();//Ritor1: it's temporarily GameUI_DrawPortraits(v4); GameUI_DrawLifeManaBars();
--- a/Game.h Thu Feb 07 15:25:44 2013 +0600 +++ b/Game.h Fri Feb 08 15:59:32 2013 +0600 @@ -25,7 +25,7 @@ GAME_FINISHED = 0x1, GAME_STATE_2 = 0x2, GAME_STATE_3 = 0x3, - GAME_STATE_4 = 0x4, + GAME_STATE_NEWGAME_OUT_GAMEMENU = 0x4, GAME_STATE_5 = 0x5, GAME_STATE_6 = 0x6, GAME_STATE_7 = 0x7,
--- a/Outdoor.cpp Thu Feb 07 15:25:44 2013 +0600 +++ b/Outdoor.cpp Fri Feb 08 15:59:32 2013 +0600 @@ -94,19 +94,19 @@ { pRenderer->DrawSkyD3D(); pRenderer->DrawBuildingsD3D(); - pRenderer->DrawBezierTerrain(); + pRenderer->RenderTerrainD3D();//pRenderer->DrawBezierTerrain();// Ritor1: lag } } else if ( pRenderer->pRenderD3D ) { pRenderer->DrawSkyD3D(); pRenderer->DrawBuildingsD3D(); - pRenderer->RenderTerrainD3D();//pRenderer->DrawBezierTerrain();// Ritor1: sometimes crash + pRenderer->RenderTerrainD3D();//pRenderer->DrawBezierTerrain();// Ritor1: lag } else { pRenderer->DrawBuildingsSW(); - pRenderer->DrawBezierTerrain(); + pRenderer->RenderTerrainD3D();//pRenderer->DrawBezierTerrain();// Ritor1: lag sr_sub_486F92_MessWithEdgesAndSpans(); pOutdoorCamera->_487355(); }
--- a/Render.cpp Thu Feb 07 15:25:44 2013 +0600 +++ b/Render.cpp Fri Feb 08 15:59:32 2013 +0600 @@ -11451,12 +11451,12 @@ for (uint i = pRenderer->uNumBillboardsToDraw - 1; i != (uint)-1; --i) { - auto p = pRenderer->pBillboardRenderListD3D + i; + auto p = &pRenderer->pBillboardRenderListD3D[i]; if (p->uOpacity != RenderBillboardD3D::InvalidOpacity) SetBillboardBlendOptions(p->uOpacity); - ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, p->pTexture)); + pRenderer->pRenderD3D->pDevice->SetTexture(0, p->pTexture); ErrD3D(pRenderer->pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, p->pQuards, p->uNumVertices, D3DDP_DONOTLIGHT | D3DDP_DONOTUPDATEEXTENTS)); }
--- a/Vis.cpp Thu Feb 07 15:25:44 2013 +0600 +++ b/Vis.cpp Fri Feb 08 15:59:32 2013 +0600 @@ -1417,7 +1417,7 @@ } //----- (004C288E) -------------------------------------------------------- -bool Vis::sort_objects_2(RenderVertexSoft *pArray, int sLeft, int sRight)//open chest +bool Vis::sort_objects_2(RenderVertexSoft *pArray, int sLeft, int sRight) { bool result; // eax@1 RenderVertexSoft *v5; // edx@2 @@ -1433,7 +1433,7 @@ Vis *thisa; // [sp+68h] [bp-8h]@1 RenderVertexSoft *v16; // [sp+6Ch] [bp-4h]@2 - //__debugbreak(); + __debugbreak(); result = sRight; thisa = this;
--- a/mm7_2.cpp Thu Feb 07 15:25:44 2013 +0600 +++ b/mm7_2.cpp Fri Feb 08 15:59:32 2013 +0600 @@ -14069,15 +14069,12 @@ uGameState = 0; continue; }*/ - if ( uGameState == 4 ) - __debugbreak(); - /*{ - v12 = 1; - SetCurrentMenuID((MENU_STATE)v12); - //goto LABEL_21; + if ( uGameState == GAME_STATE_NEWGAME_OUT_GAMEMENU )//press NewGame button out GameMenu window + { + SetCurrentMenuID(MENU_NEWGAME); uGameState = 0; continue; - }*/ + } if ( uGameState == 7 ) __debugbreak(); /*{
--- a/mm7_4.cpp Thu Feb 07 15:25:44 2013 +0600 +++ b/mm7_4.cpp Fri Feb 08 15:59:32 2013 +0600 @@ -3110,25 +3110,21 @@ v6 = (unsigned __int8)pParty->field_709; for ( i = (unsigned __int8)pParty->field_709; i < v22; v6 = i++ + 1 ) { - if ( v23 >= 2u ) + if ( v23 >= 2 ) break; v7 = pTmpBuf[v6]; - if ( (unsigned __int8)v7 >= 2u ) + if ( (unsigned __int8)v7 >= 2 ) { sprintf(pContainer, "NPC%03d", pNPCStats->pNPCData[(unsigned __int8)v7 + 499].uPortraitID); v15 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], - (Texture *)(v15 != -1 ? &pIcons_LOD->pTextures[v15] : 0)); + pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], (Texture *)(v15 != -1 ? &pIcons_LOD->pTextures[v15] : 0)); } else { sprintf(pContainer, "NPC%03d", pParty->pHirelings[(unsigned __int8)v7].uPortraitID); v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); v9 = v23; - pRenderer->DrawTextureIndexed( - pHiredNPCsIconsOffsetsX[v9], - pHiredNPCsIconsOffsetsY[v9], - (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0)); + pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v9], pHiredNPCsIconsOffsetsY[v9], (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0)); v10 = (unsigned __int8)pTmpBuf[i]; if ( pParty->pHirelings[v10].bDrawSomeAnim == 1 ) {