shithub: pokecrystal

Download patch

ref: c5cc23a35fa2c544e3fa8f5101878ba2127ca83e
parent: 682548493be7f20b8b7fb26ab0c367c3c24430ed
author: Rangi <[email protected]>
date: Tue Jan 23 07:40:29 EST 2018

wGameTimerPause bit flag constants

--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -16,6 +16,10 @@
 	const TEMPMON    ; 3
 	const WILDMON    ; 4
 
+; wGameTimerPause:: ; cfbc
+GAMETIMERPAUSE_TIMER_PAUSED_F EQU 0
+GAMETIMERPAUSE_MOBILE_7_F     EQU 7
+
 ; Options:: ; cfcc
 const_value set 4
 	const NO_TEXT_SCROLL ; 4
--- a/data/engine_flags.asm
+++ b/data/engine_flags.asm
@@ -122,10 +122,10 @@
 	engine_flag wWeeklyFlags, WEEKLYFLAGS_DAILY_MOVE_TUTOR_F
 	engine_flag wWeeklyFlags, WEEKLYFLAGS_BUENAS_PASSWORD_F
 
-	engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F
+	engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F ; $60
 	engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F
 
-	engine_flag wGameTimerPause, 7 ; $62
+	engine_flag wGameTimerPause, GAMETIMERPAUSE_MOBILE_7_F
 
 	engine_flag wPlayerGender, PLAYERGENDER_FEMALE_F
 
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -484,8 +484,8 @@
 	ld [wDontPlayMapMusicOnReload], a
 	ld [wLinkMode], a
 	ld hl, wGameTimerPause
-	set 0, [hl]
-	res 7, [hl]
+	set GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
+	res GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	ld hl, wEnteredMapFromContinue
 	set 1, [hl]
 	farcall OverworldLoop
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -10,7 +10,7 @@
 	call GetSGBLayout
 	call SetPalettes
 	ld hl, wGameTimerPause
-	res 0, [hl]
+	res GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
 	call MainMenu_GetWhichMenu
 	ld [wWhichIndexSet], a
 	call MainMenu_PrintCurrentTimeAndDay
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -2804,12 +2804,12 @@
 ; script command 0xa1
 
 	ld hl, wGameTimerPause
-	res 0, [hl]
+	res GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
 	farcall StubbedTrainerRankings_HallOfFame
 	farcall StubbedTrainerRankings_HallOfFame2
 	farcall HallOfFame
 	ld hl, wGameTimerPause
-	set 0, [hl]
+	set GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
 	jr ReturnFromCredits
 
 Script_credits:
--- a/home/game_time.asm
+++ b/home/game_time.asm
@@ -39,7 +39,7 @@
 
 ; Is the timer paused?
 	ld hl, wGameTimerPause
-	bit 0, [hl]
+	bit GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
 	ret z
 
 ; Is the timer already capped?
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -26,17 +26,17 @@
 
 Function89168: ; 89168 (22:5168)
 	ld hl, wGameTimerPause
-	set 7, [hl]
+	set GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	ret
 
 Function8916e: ; 8916e (22:516e)
 	ld hl, wGameTimerPause
-	res 7, [hl]
+	res GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	ret
 
 Function89174: ; 89174 (22:5174)
 	ld hl, wGameTimerPause
-	bit 7, [hl]
+	bit GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	ret
 
 Function8917a: ; 8917a (22:517a)
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -2812,7 +2812,7 @@
 	ld hl, wdc41
 	res 4, [hl]
 	ld hl, wGameTimerPause
-	bit 7, [hl]
+	bit GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	jr z, .skip
 	ld hl, wdc41
 	set 4, [hl]
@@ -4703,7 +4703,7 @@
 	farcall Function8adb3
 	ret c
 	ld hl, wGameTimerPause
-	set 7, [hl]
+	set GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	ld hl, wdc41
 	set 4, [hl]
 	ret
@@ -4711,7 +4711,7 @@
 
 Function101ead: ; 101ead
 	ld hl, wGameTimerPause
-	bit 7, [hl]
+	bit GAMETIMERPAUSE_MOBILE_7_F, [hl]
 	jr nz, .asm_101ec8
 	ld hl, wdc41
 	bit 2, [hl]
--- a/wram.asm
+++ b/wram.asm
@@ -1491,7 +1491,8 @@
 wcfbb:: db
 
 wGameTimerPause:: ; cfbc
-; bit 0
+; bit 0: game timer paused
+; bit 7: something mobile
 	db
 
 	ds 1