Rename wVramState to wStateFlags and use flag constants (#1078)
This commit is contained in:
@@ -143,12 +143,12 @@ Function891fe:
|
||||
ret
|
||||
|
||||
Mobile_EnableSpriteUpdates:
|
||||
ld a, 1
|
||||
ld a, TRUE
|
||||
ld [wSpriteUpdatesEnabled], a
|
||||
ret
|
||||
|
||||
Mobile_DisableSpriteUpdates:
|
||||
ld a, 0
|
||||
ld a, FALSE
|
||||
ld [wSpriteUpdatesEnabled], a
|
||||
ret
|
||||
|
||||
|
@@ -40,15 +40,15 @@ Function100022:
|
||||
farcall Stubbed_Function106462
|
||||
farcall Function106464 ; load broken gfx
|
||||
farcall Function11615a ; init RAM
|
||||
ld hl, wVramState
|
||||
set 1, [hl]
|
||||
ld hl, wStateFlags
|
||||
set LAST_12_SPRITE_OAM_STRUCTS_RESERVED_F, [hl]
|
||||
ret
|
||||
|
||||
Function100057:
|
||||
call DisableMobile
|
||||
call ReturnToMapFromSubmenu
|
||||
ld hl, wVramState
|
||||
res 1, [hl]
|
||||
ld hl, wStateFlags
|
||||
res LAST_12_SPRITE_OAM_STRUCTS_RESERVED_F, [hl]
|
||||
ret
|
||||
|
||||
SetRAMStateForMobile:
|
||||
|
@@ -95,10 +95,10 @@ RunMobileTradeAnim_Frontpics:
|
||||
push af
|
||||
xor a
|
||||
ldh [hMapAnims], a
|
||||
ld hl, wVramState
|
||||
ld hl, wStateFlags
|
||||
ld a, [hl]
|
||||
push af
|
||||
res 0, [hl]
|
||||
res SPRITE_UPDATES_DISABLED_F, [hl]
|
||||
ld hl, wOptions
|
||||
ld a, [hl]
|
||||
push af
|
||||
@@ -110,7 +110,7 @@ RunMobileTradeAnim_Frontpics:
|
||||
pop af
|
||||
ld [wOptions], a
|
||||
pop af
|
||||
ld [wVramState], a
|
||||
ld [wStateFlags], a
|
||||
pop af
|
||||
ldh [hMapAnims], a
|
||||
ret
|
||||
@@ -124,7 +124,7 @@ RunMobileTradeAnim_NoFrontpics:
|
||||
push af
|
||||
xor a
|
||||
ldh [hMapAnims], a
|
||||
ld hl, wVramState
|
||||
ld hl, wStateFlags
|
||||
ld a, [hl]
|
||||
push af
|
||||
res 0, [hl]
|
||||
@@ -139,7 +139,7 @@ RunMobileTradeAnim_NoFrontpics:
|
||||
pop af
|
||||
ld [wOptions], a
|
||||
pop af
|
||||
ld [wVramState], a
|
||||
ld [wStateFlags], a
|
||||
pop af
|
||||
ldh [hMapAnims], a
|
||||
ret
|
||||
|
@@ -463,10 +463,10 @@ BattleTowerRoomMenu_InitRAM:
|
||||
ld [wc3ed], a
|
||||
ld [wc3ee], a
|
||||
ld [wc3ef], a
|
||||
ld hl, wVramState
|
||||
ld hl, wStateFlags
|
||||
ld a, [hl]
|
||||
ld [wcd7f], a
|
||||
set 1, [hl]
|
||||
set LAST_12_SPRITE_OAM_STRUCTS_RESERVED_F, [hl]
|
||||
ld a, (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
|
||||
ldh [rIE], a
|
||||
ld a, $1
|
||||
@@ -508,7 +508,7 @@ BattleTowerRoomMenu_Cleanup:
|
||||
ldh [rIE], a
|
||||
ei
|
||||
ld a, [wcd7f]
|
||||
ld [wVramState], a
|
||||
ld [wStateFlags], a
|
||||
ld a, [wMobileErrorCodeBuffer]
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
@@ -5535,10 +5535,10 @@ Function11ac51:
|
||||
ld a, [hl]
|
||||
push af
|
||||
set 4, [hl]
|
||||
ld a, [wVramState]
|
||||
ld a, [wStateFlags]
|
||||
push af
|
||||
xor a
|
||||
ld [wVramState], a
|
||||
ld [wStateFlags], a
|
||||
ldh a, [hInMenu]
|
||||
push af
|
||||
ld a, $1
|
||||
@@ -5571,7 +5571,7 @@ Function11ac51:
|
||||
pop af
|
||||
ldh [hInMenu], a
|
||||
pop af
|
||||
ld [wVramState], a
|
||||
ld [wStateFlags], a
|
||||
pop af
|
||||
ld [wOptions], a
|
||||
ret
|
||||
|
Reference in New Issue
Block a user