Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DoDayNightPalette()
- {
- dmapdata dm = Game->LoadDMapData(Game->GetCurDMap());
- int type = dm->Type;
- if ( type == DMT_INTERIOR )
- {
- //CLEAR PALETTE TO BASE IF NEEDED
- return;
- }
- if ( type == DMT_DUNGEON )
- {
- //CLEAR PALETTE TO BASE IF NEEDED
- return;
- }
- if ( Time[TIME_HOUR] <= 5 )
- {
- CYCLE = SUNRISE;
- Game->DMapPalette[Game->GetCurDMap()] = SUNRISE_PAL;
- return;
- }
- else if ( Time[TIME_HOUR] <= 11 )
- {
- CYCLE = DAY;
- Game->DMapPalette[Game->GetCurDMap()] = DAY_PAL;
- return;
- }
- else if ( Time[TIME_HOUR] <= 17 )
- {
- CYCLE = SUNSET;
- Game->DMapPalette[Game->GetCurDMap()] = SUNRISET_PAL;
- return;
- }
- else
- {
- CYCLE = NIGHT;
- Game->DMapPalette[Game->GetCurDMap()] = NIGHT_PAL;
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement