Mercurial > mm7
diff Outdoor.cpp @ 810:f5156b8c61ad
savegame refactoring
author | Gloval |
---|---|
date | Tue, 26 Mar 2013 00:57:54 +0400 |
parents | 346f7069676a |
children | d37b03507b3b |
line wrap: on
line diff
--- a/Outdoor.cpp Mon Mar 25 14:56:50 2013 +0200 +++ b/Outdoor.cpp Tue Mar 26 00:57:54 2013 +0400 @@ -316,9 +316,9 @@ MessageBoxA(0, "Error!", "Couldn't Load Map!", 0); CreateDebugLocation(); } - ::day_attrib = v5->day_attrib; - ::day_fogrange_1 = v5->day_fogrange_1; - ::day_fogrange_2 = v5->day_fogrange_2; + ::day_attrib = v5->loc_time.day_attrib; + ::day_fogrange_1 = v5->loc_time.day_fogrange_1; + ::day_fogrange_2 = v5->loc_time.day_fogrange_2; if ( Is_out15odm_underwater() ) SetUnderwaterFog(); _6BE134_odm_main_tile_group = v5->pTileTypes[0].tileset; @@ -679,9 +679,9 @@ if ( Is_out15odm_underwater() ) SetUnderwaterFog(); - pOutdoor->day_fogrange_1 = ::day_fogrange_1; - pOutdoor->day_fogrange_2 = ::day_fogrange_2; - pOutdoor->day_attrib = ::day_attrib; + pOutdoor->loc_time.day_fogrange_1 = ::day_fogrange_1; + pOutdoor->loc_time.day_fogrange_2 = ::day_fogrange_2; + pOutdoor->loc_time.day_attrib = ::day_attrib; } //----- (00482170) -------------------------------------------------------- @@ -2324,7 +2324,7 @@ pSrc += 0xC8; pGameLoadingUI_ProgressBar->Progress(); - memcpy(&uLastVisitDay, pSrc, 0x38u); + memcpy(&loc_time, pSrc, 0x38u); free(pSrcMem); @@ -2353,23 +2353,23 @@ //v100 = HIDWORD(uLastVisitDay); //LODWORD(v142) = LODWORD(uLastVisitDay); //HIDWORD(v142) = v100; - if (uLastVisitDay) + if (loc_time.uLastVisitDay) { - if ( (signed int)((signed int)(signed __int64)((double)uLastVisitDay * 0.234375) / 60 / 60 / 24) % 28 != pParty->uDaysPlayed ) + if ( (signed int)((signed int)(signed __int64)((double)loc_time.uLastVisitDay * 0.234375) / 60 / 60 / 24) % 28 != pParty->uDaysPlayed ) { if ( rand() % 100 >= 20 ) v108 = dword_4EC268[rand() % dword_4EC2A8]; else v108 = dword_4EC28C[rand() % dword_4EC2AC]; - sprintf(sky_texture_name, "plansky%d", v108); + sprintf(loc_time.sky_texture_name, "plansky%d", v108); } } else { - strcpy(sky_texture_name, "plansky3"); + strcpy(loc_time.sky_texture_name, "plansky3"); } //v101 = pBitmaps_LOD->LoadTexture(field_4F8); - uSky_TextureID = pBitmaps_LOD->LoadTexture(sky_texture_name); + uSky_TextureID = pBitmaps_LOD->LoadTexture(loc_time.sky_texture_name); if (uSky_TextureID != -1) pBitmaps_LOD->pTextures[uSky_TextureID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[uSky_TextureID].palette_id1);