comparison Outdoor.cpp @ 813:d37b03507b3b

Merge
author Nomad
date Tue, 26 Mar 2013 06:40:04 +0200
parents 9d2b911ef526 f5156b8c61ad
children 0f56abdcce94
comparison
equal deleted inserted replaced
812:9d2b911ef526 813:d37b03507b3b
314 if ( !Load(pFilename, (ODMFace *)File, uRespawnInterval, thisa) ) 314 if ( !Load(pFilename, (ODMFace *)File, uRespawnInterval, thisa) )
315 { 315 {
316 MessageBoxA(0, "Error!", "Couldn't Load Map!", 0); 316 MessageBoxA(0, "Error!", "Couldn't Load Map!", 0);
317 CreateDebugLocation(); 317 CreateDebugLocation();
318 } 318 }
319 ::day_attrib = v5->day_attrib; 319 ::day_attrib = v5->loc_time.day_attrib;
320 ::day_fogrange_1 = v5->day_fogrange_1; 320 ::day_fogrange_1 = v5->loc_time.day_fogrange_1;
321 ::day_fogrange_2 = v5->day_fogrange_2; 321 ::day_fogrange_2 = v5->loc_time.day_fogrange_2;
322 if ( Is_out15odm_underwater() ) 322 if ( Is_out15odm_underwater() )
323 SetUnderwaterFog(); 323 SetUnderwaterFog();
324 _6BE134_odm_main_tile_group = v5->pTileTypes[0].tileset; 324 _6BE134_odm_main_tile_group = v5->pTileTypes[0].tileset;
325 result = 1; 325 result = 1;
326 } 326 }
677 else 677 else
678 ::day_attrib &= ~DAY_ATTRIB_FOG; 678 ::day_attrib &= ~DAY_ATTRIB_FOG;
679 679
680 if ( Is_out15odm_underwater() ) 680 if ( Is_out15odm_underwater() )
681 SetUnderwaterFog(); 681 SetUnderwaterFog();
682 pOutdoor->day_fogrange_1 = ::day_fogrange_1; 682 pOutdoor->loc_time.day_fogrange_1 = ::day_fogrange_1;
683 pOutdoor->day_fogrange_2 = ::day_fogrange_2; 683 pOutdoor->loc_time.day_fogrange_2 = ::day_fogrange_2;
684 pOutdoor->day_attrib = ::day_attrib; 684 pOutdoor->loc_time.day_attrib = ::day_attrib;
685 } 685 }
686 686
687 //----- (00482170) -------------------------------------------------------- 687 //----- (00482170) --------------------------------------------------------
688 bool ODMFace::IsBackfaceCulled(ODMFace *a1, RenderVertexSoft *a2, stru148 *a3) 688 bool ODMFace::IsBackfaceCulled(ODMFace *a1, RenderVertexSoft *a2, stru148 *a3)
689 { 689 {
2322 2322
2323 memcpy(&stru_5E4C90, pSrc, 0xC8); 2323 memcpy(&stru_5E4C90, pSrc, 0xC8);
2324 pSrc += 0xC8; 2324 pSrc += 0xC8;
2325 2325
2326 pGameLoadingUI_ProgressBar->Progress(); 2326 pGameLoadingUI_ProgressBar->Progress();
2327 memcpy(&uLastVisitDay, pSrc, 0x38u); 2327 memcpy(&loc_time, pSrc, 0x38u);
2328 2328
2329 free(pSrcMem); 2329 free(pSrcMem);
2330 2330
2331 pTileTable->InitializeTileset(Tileset_Dirt); 2331 pTileTable->InitializeTileset(Tileset_Dirt);
2332 pTileTable->InitializeTileset(Tileset_Snow); 2332 pTileTable->InitializeTileset(Tileset_Snow);
2351 2351
2352 LABEL_150: 2352 LABEL_150:
2353 //v100 = HIDWORD(uLastVisitDay); 2353 //v100 = HIDWORD(uLastVisitDay);
2354 //LODWORD(v142) = LODWORD(uLastVisitDay); 2354 //LODWORD(v142) = LODWORD(uLastVisitDay);
2355 //HIDWORD(v142) = v100; 2355 //HIDWORD(v142) = v100;
2356 if (uLastVisitDay) 2356 if (loc_time.uLastVisitDay)
2357 { 2357 {
2358 if ( (signed int)((signed int)(signed __int64)((double)uLastVisitDay * 0.234375) / 60 / 60 / 24) % 28 != pParty->uDaysPlayed ) 2358 if ( (signed int)((signed int)(signed __int64)((double)loc_time.uLastVisitDay * 0.234375) / 60 / 60 / 24) % 28 != pParty->uDaysPlayed )
2359 { 2359 {
2360 if ( rand() % 100 >= 20 ) 2360 if ( rand() % 100 >= 20 )
2361 v108 = dword_4EC268[rand() % dword_4EC2A8]; 2361 v108 = dword_4EC268[rand() % dword_4EC2A8];
2362 else 2362 else
2363 v108 = dword_4EC28C[rand() % dword_4EC2AC]; 2363 v108 = dword_4EC28C[rand() % dword_4EC2AC];
2364 sprintf(sky_texture_name, "plansky%d", v108); 2364 sprintf(loc_time.sky_texture_name, "plansky%d", v108);
2365 } 2365 }
2366 } 2366 }
2367 else 2367 else
2368 { 2368 {
2369 strcpy(sky_texture_name, "plansky3"); 2369 strcpy(loc_time.sky_texture_name, "plansky3");
2370 } 2370 }
2371 //v101 = pBitmaps_LOD->LoadTexture(field_4F8); 2371 //v101 = pBitmaps_LOD->LoadTexture(field_4F8);
2372 uSky_TextureID = pBitmaps_LOD->LoadTexture(sky_texture_name); 2372 uSky_TextureID = pBitmaps_LOD->LoadTexture(loc_time.sky_texture_name);
2373 if (uSky_TextureID != -1) 2373 if (uSky_TextureID != -1)
2374 pBitmaps_LOD->pTextures[uSky_TextureID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[uSky_TextureID].palette_id1); 2374 pBitmaps_LOD->pTextures[uSky_TextureID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[uSky_TextureID].palette_id1);
2375 2375
2376 pPaletteManager->RecalculateAll(); 2376 pPaletteManager->RecalculateAll();
2377 pSoundList->LoadSound(53, 0); 2377 pSoundList->LoadSound(53, 0);