Mercurial > mm7
changeset 2180:147ee4591b76
pSavegameList->Reset()
author | Ritor1 |
---|---|
date | Wed, 22 Jan 2014 18:53:47 +0600 |
parents | f0b5ca2dfb73 |
children | 17b3e40daedc |
files | Render.cpp SaveLoad.cpp SaveLoad.h |
diffstat | 3 files changed, 20 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/Render.cpp Wed Jan 22 17:34:05 2014 +0600 +++ b/Render.cpp Wed Jan 22 18:53:47 2014 +0600 @@ -9154,19 +9154,19 @@ { for (uint x = 0; x < width; ++x) { - *v3 = pRenderer->ReadPixel16((int)(x* interval_x + 8.0), (int)(y * interval_y + 8.0));//screen_data[screen_y + (int)(x* interval_x + 8.0)]; - - /*if (ddpfPrimarySuface.dwRGBBitCount == 32) + //*v3 = pRenderer->ReadPixel16((int)(x* interval_x + 8.0), (int)(y * interval_y + 8.0));//screen_data[screen_y + (int)(x* interval_x + 8.0)]; + + if (Dst.ddpfPixelFormat.dwRGBBitCount == 32) { - auto p = (unsigned __int32 *)pRenderer->pTargetSurface + (int)(x * interval_x + 8.0) + (int)(y * interval_y + 8.0) * pRenderer->uTargetSurfacePitch; + auto p = (unsigned __int32 *)Dst.lpSurface + (int)(x * interval_x + 8.0) + y/* (int)(y * interval_y + 8.0)*/ * Dst.lPitch; *v3 = Color16((*p >> 16) & 255, (*p >> 8) & 255, *p & 255); } - else if (ddpfPrimarySuface.dwRGBBitCount == 16) + else if (Dst.ddpfPixelFormat.dwRGBBitCount == 16) { - auto p = (unsigned __int16 *)pRenderer->pTargetSurface + (int)(x * interval_x + 8.0) + y * pRenderer->uTargetSurfacePitch; + auto p = (unsigned __int16 *)Dst.lpSurface + (int)(x * interval_x + 8.0) + y * Dst.lPitch; *v3 = *p; } - else __debugbreak();*/ + else __debugbreak(); ++v3; } }
--- a/SaveLoad.cpp Wed Jan 22 17:34:05 2014 +0600 +++ b/SaveLoad.cpp Wed Jan 22 18:53:47 2014 +0600 @@ -538,9 +538,9 @@ //----- (0045E297) -------------------------------------------------------- void SavegameList::Initialize(unsigned int bHideEmptySlots) { - memset(pSavegameList, 0, sizeof(pSavegameList));//Ritor1: вызывает затирание(ведётся работа) - // Reset(); - uNumSavegameFiles = 0; + //memset(pSavegameList, 0, sizeof(pSavegameList));//Ritor1: вызывает затирание(ведётся работа) + pSavegameList->Reset(); + uNumSavegameFiles = 0; _chdir("saves"); {
--- a/SaveLoad.h Wed Jan 22 17:34:05 2014 +0600 +++ b/SaveLoad.h Wed Jan 22 18:53:47 2014 +0600 @@ -14,14 +14,18 @@ struct SavegameList { static void Initialize(unsigned int a1); + SavegameList() {Reset();} - /*inline void Reset() + inline void Reset() { - for (int i = 0; i < 20; ++i) - field_0[i] = 0; - for (int i = 0; i < 44; ++i) - pSavesNames[i][0] = 0; - }*/ + for ( int j = 0; j < 45; j++ ) + { + for (int i = 0; i < 20; ++i) + this->pFileList[j].field_0[i] = 0; + for (int i = 0; i < 260; ++i) + this->pFileList[j].pSaveFileName[i] = 0; + } + } SaveFile_ pFileList[45]; };