Skip to content

Commit

Permalink
Fix game time labels
Browse files Browse the repository at this point in the history
  • Loading branch information
PikalaxALT committed Jan 3, 2016
1 parent 1a5a108 commit 28dc568
Show file tree
Hide file tree
Showing 50 changed files with 80 additions and 78 deletions.
4 changes: 2 additions & 2 deletions engine/hall_of_fame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
ld de, HoFPlayTimeText
call PlaceString
coord hl, 5, 7
ld de, wPlayTimeHours + 1
ld de, wPlayTimeHours
lb bc, 1, 3
call PrintNumber
ld [hl], $6d
inc hl
ld de, wPlayTimeMinutes + 1
ld de, wPlayTimeMinutes
lb bc, LEADING_ZEROES | 1, 2
call PrintNumber
coord hl, 1, 9
Expand Down
2 changes: 1 addition & 1 deletion engine/hidden_object_functions17.asm
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.openSecondLock
; Completed the trash can puzzle.
SetEvent EVENT_2ND_LOCK_OPENED
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 6, [hl]

tx_pre_id VermilionGymTrashSuccesText3
Expand Down
2 changes: 1 addition & 1 deletion engine/hidden_object_functions7.asm
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld a, [wCurrentMenuItem]
cp c
jr nz, .wrongAnswer
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, [hGymGateIndex]
ld [$ffe0], a
Expand Down
6 changes: 3 additions & 3 deletions engine/menu/main_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ MainMenu: ; 5af2 (1:5af2)
jp .mainMenuLoop
.choseContinue
call DisplayContinueGameInfo
ld hl,wd126
ld hl,wCurrentMapScriptFlags
set 5,[hl]
.inputLoop
xor a
Expand Down Expand Up @@ -411,12 +411,12 @@ PrintNumOwnedMons: ; 5e42 (1:5e42)
jp PrintNumber

PrintPlayTime: ; 5e55 (1:5e55)
ld de, wPlayTimeHours + 1
ld de, wPlayTimeHours
lb bc, 1, 3
call PrintNumber
ld [hl], $6d
inc hl
ld de, wPlayTimeMinutes + 1
ld de, wPlayTimeMinutes
lb bc, LEADING_ZEROES | 1, 2
jp PrintNumber

Expand Down
4 changes: 2 additions & 2 deletions engine/menu/start_sub_menus.asm
Original file line number Diff line number Diff line change
Expand Up @@ -601,12 +601,12 @@ DrawTrainerInfo: ; 1349a (4:749a)
ld c,$e3
call PrintBCDNumber
coord hl, 9, 6
ld de,wPlayTimeHours + 1 ; hours
ld de,wPlayTimeHours ; hours
lb bc, LEFT_ALIGN | 1, 3
call PrintNumber
ld [hl],$d6 ; colon tile ID
inc hl
ld de,wPlayTimeMinutes + 1 ; minutes
ld de,wPlayTimeMinutes ; minutes
lb bc, LEADING_ZEROES | 1, 2
jp PrintNumber

Expand Down
2 changes: 1 addition & 1 deletion engine/overworld/card_key.asm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PrintCardKeyText: ; 52673 (14:6673)
.replaceCardKeyDoorTileBlock
ld [wNewTileBlockID], a
predef ReplaceTileBlock
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, SFX_GO_INSIDE
jp PlaySound
Expand Down
14 changes: 7 additions & 7 deletions engine/play_time.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TrackPlayTime: ; 18dee (6:4dee)
ld a, [wd732]
bit 0, a
ret z
ld a, [wPlayTimeMinutes]
ld a, [wPlayTimeMaxed]
and a
ret nz
ld a, [wPlayTimeFrames]
Expand All @@ -20,20 +20,20 @@ TrackPlayTime: ; 18dee (6:4dee)
ret nz
xor a
ld [wPlayTimeSeconds], a
ld a, [wPlayTimeMinutes + 1]
ld a, [wPlayTimeMinutes]
inc a
ld [wPlayTimeMinutes + 1], a
ld [wPlayTimeMinutes], a
cp 60
ret nz
xor a
ld [wPlayTimeMinutes + 1], a
ld a, [wPlayTimeHours + 1]
ld [wPlayTimeMinutes], a
ld a, [wPlayTimeHours]
inc a
ld [wPlayTimeHours + 1], a
ld [wPlayTimeHours], a
cp $ff
ret nz
ld a, $ff
ld [wPlayTimeMinutes], a
ld [wPlayTimeMaxed], a
ret

CountDownIgnoreInputBitReset: ; 18e36 (6:4e36)
Expand Down
2 changes: 1 addition & 1 deletion engine/predefs7.asm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DisplayElevatorFloorMenu: ; 1c9c6 (7:49c6)
ld a, b
ld [wListScrollOffset], a
ret c
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 7, [hl]
ld hl, wElevatorWarpMaps
ld a, [wWhichPokemon]
Expand Down
2 changes: 1 addition & 1 deletion home.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,7 @@ StartTrainerBattle:: ; 325d (0:325d)
ret

EndTrainerBattle:: ; 3275 (0:3275)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
ld hl, wd72d
Expand Down
4 changes: 2 additions & 2 deletions home/overworld.asm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ EnterMap::
ld hl, wd72d
res 5, [hl]
call UpdateSprites
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
xor a
Expand Down Expand Up @@ -317,7 +317,7 @@ OverworldLoopLessDelay::
res 6,[hl]
ld hl,wFlags_D733
res 3,[hl]
ld hl,wd126
ld hl,wCurrentMapScriptFlags
set 5,[hl]
set 6,[hl]
xor a
Expand Down
2 changes: 1 addition & 1 deletion scripts/agatha.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AgathaScript: ; 7642d (1d:642d)

AgathaShowOrHideExitBlock: ; 76443 (1d:6443)
; Blocks or clears the exit to the next room.
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down
2 changes: 1 addition & 1 deletion scripts/bruno.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BrunoScript: ; 762d6 (1d:62d6)

BrunoShowOrHideExitBlock: ; 762ec (1d:62ec)
; Blocks or clears the exit to the next room.
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down
6 changes: 3 additions & 3 deletions scripts/celadongamecorner.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CeladonGameCornerScript: ; 48bbd (12:4bbd)
jp CallFunctionInTable

CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
Expand All @@ -24,7 +24,7 @@ CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf)
ret

CeladonGameCornerScript_48bec: ; 48bec (12:4bec)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down Expand Up @@ -109,7 +109,7 @@ CeladonGameCornerScript2: ; 48c69 (12:4c69)
ld a, HS_GAME_CORNER_ROCKET
ld [wMissableObjectIndex], a
predef HideObject
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
ld a, $0
Expand Down
2 changes: 1 addition & 1 deletion scripts/celadongym.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CeladonGymScript: ; 4890a (12:490a)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, CeladonGymScript_48927
Expand Down
2 changes: 1 addition & 1 deletion scripts/celadonmartelevator.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CeladonMartElevatorScript: ; 48600 (12:4600)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
Expand Down
2 changes: 1 addition & 1 deletion scripts/ceruleangym.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CeruleanGymScript: ; 5c6b3 (17:46b3)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, CeruleanGymScript_5c6d0
Expand Down
4 changes: 2 additions & 2 deletions scripts/cinnabargym.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CinnabarGymScript: ; 7574a (1d:574a)
jp CallFunctionInTable

CinnabarGymScript_75759: ; 75759 (1d:5759)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
push hl
Expand Down Expand Up @@ -165,7 +165,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
; deactivate gym trainers
SetEventRange EVENT_BEAT_CINNABAR_GYM_TRAINER_0, EVENT_BEAT_CINNABAR_GYM_TRAINER_6

ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]

jp CinnabarGymScript_75792
Expand Down
2 changes: 1 addition & 1 deletion scripts/cinnabarisland.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CinnabarIslandScript: ; 1ca19 (7:4a19)
call EnableAutoTextBoxDrawing
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ResetEvent EVENT_MANSION_SWITCH_ON
ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL
Expand Down
2 changes: 1 addition & 1 deletion scripts/fuchsiagym.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FuchsiaGymScript: ; 7543d (1d:543d)
ret

FuchsiaGymScript_75453: ; 75453 (1d:5453)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
Expand Down
2 changes: 1 addition & 1 deletion scripts/indigoplateaulobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IndigoPlateauLobbyScript: ; 19c5b (6:5c5b)
call Serial_TryEstablishingExternallyClockedConnection
call EnableAutoTextBoxDrawing
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
Expand Down
4 changes: 2 additions & 2 deletions scripts/lance.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LanceScript: ; 5a2ae (16:62ae)
ret

LanceShowOrHideEntranceBlocks: ; 5a2c4 (16:62c4)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down Expand Up @@ -71,7 +71,7 @@ LanceScript0: ; 5a305 (16:6305)
jr z, WalkToLance
CheckAndSetEvent EVENT_LANCES_ROOM_LOCK_DOOR
ret nz
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, SFX_GO_INSIDE
call PlaySound
Expand Down
2 changes: 1 addition & 1 deletion scripts/lorelei.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LoreleiScript: ; 7617b (1d:617b)

LoreleiShowOrHideExitBlock: ; 76191 (1d:6191)
; Blocks or clears the exit to the next room.
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down
4 changes: 2 additions & 2 deletions scripts/mansion1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mansion1Script: ; 442af (11:42af)
ret

Mansion1Subscript1: ; 442c5 (11:42c5)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down Expand Up @@ -106,7 +106,7 @@ Mansion1Text4: ; 4435a (11:435a)
jr nz, .asm_4438c
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld hl, MansionSwitchPressedText
call PrintText
Expand Down
4 changes: 2 additions & 2 deletions scripts/mansion2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mansion2Script: ; 51fd8 (14:5fd8)
ret

Mansion2Script_51fee: ; 51fee (14:5fee)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down Expand Up @@ -112,7 +112,7 @@ Mansion2Text5: ; 52087 (14:6087)
jr nz, .asm_520b9
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld hl, Mansion2Text_520c7
call PrintText
Expand Down
2 changes: 1 addition & 1 deletion scripts/mansion3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mansion3Script: ; 521ee (14:61ee)
ret

Mansion3Script_52204: ; 52204 (14:6204)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down
2 changes: 1 addition & 1 deletion scripts/mansion4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mansion4Script: ; 523b9 (14:63b9)
ret

Mansion4Script_523cf: ; 523cf (14:63cf)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down
2 changes: 1 addition & 1 deletion scripts/pewtergym.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PewterGymScript: ; 5c387 (17:4387)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, PewterGymScript_5c3a4
Expand Down
2 changes: 1 addition & 1 deletion scripts/rockethideout1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RocketHideout1Script: ; 44bca (11:4bca)
ret

RocketHideout1Script_44be0: ; 44be0 (11:4be0)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down
4 changes: 2 additions & 2 deletions scripts/rockethideout4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RocketHideout4Script: ; 4545d (11:545d)
ret

RocketHideout4Script_45473: ; 45473 (11:5473)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
Expand Down Expand Up @@ -65,7 +65,7 @@ RocketHideout4Script3: ; 454b6 (11:54b6)
call GBFadeInFromBlack
xor a
ld [wJoyIgnore], a
ld hl, wd126
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, $0
ld [wRocketHideout4CurScript], a
Expand Down
2 changes: 1 addition & 1 deletion scripts/rockethideoutelevator.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RocketHideoutElevatorScript: ; 45710 (11:5710)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
Expand Down
2 changes: 1 addition & 1 deletion scripts/route23.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Route23Script: ; 511da (14:51da)
jp CallFunctionInTable

Route23Script_511e9: ; 511e9 (14:51e9)
ld hl, wd126
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
Expand Down
Loading

0 comments on commit 28dc568

Please sign in to comment.