Make map environments more granular and make all map palettes except darkness depend on map environment (#7)

This commit is contained in:
xCrystal
2023-08-04 18:45:50 +02:00
parent 6e3c5fd008
commit 55a38ff2de
28 changed files with 157 additions and 531 deletions

View File

@@ -17,7 +17,6 @@ BlindingFlash:
farcall UpdateTimeOfDayPal
ld b, CGB_MAPPALS
call GetCGBLayout
farcall LoadOW_BGPal7
farcall FadeInPalettes
ret

View File

@@ -404,7 +404,7 @@ MagnetTrain_Jumptable_FirstRunThrough:
ld a, [wTimeOfDay]
maskbits NUM_DAYTIMES
ld [wTimeOfDayPal], a
ld a, TOWN
ld a, OUTDOOR_GRASSY
ld [wEnvironment], a
ld b, CGB_MAPPALS
call GetCGBLayout

View File

@@ -762,9 +762,9 @@ EscapeRopeOrDig:
.CheckCanDig:
call GetMapEnvironment
cp CAVE
cp INDOOR_CAVE
jr z, .incave
cp DUNGEON
cp INDOOR_ICE_CAVE
jr z, .incave
.fail
ld a, $2
@@ -1677,13 +1677,8 @@ BikeFunction:
.CheckEnvironment:
call GetMapEnvironment
call CheckOutdoorMap
jr z, .ok
cp CAVE
jr z, .ok
cp GATE
jr z, .ok
jr .nope
cp INDOOR_BUILDING
jr z, .nope
.ok
call GetPlayerTile

View File

@@ -30,7 +30,7 @@ SweetScentNothing:
end
SweetScentEncounter:
farcall CanUseSweetScent
farcall CanEncounterWildMonInThisTile
jr nc, .no_battle
ld hl, wStatusFlags2
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]