shithub: pokered

Download patch

ref: a81487e9c6ee271f0ffeaacd681b929c0b4afaf0
parent: 6866df277f7f7685ae087c9e54d537873a941575
author: yenatch <yenatch@gmail.com>
date: Tue Sep 23 11:02:03 EDT 2014

Rename hVBlank* constants to h*.

--- a/engine/HoF_room_pc.asm
+++ b/engine/HoF_room_pc.asm
@@ -92,7 +92,7 @@
 	dec c
 	jr nz,.next2
 	xor a
-	ld [hVBlankWY],a
+	ld [hWY],a
 	ld a,$C0
 	ld [$FF47],a
 	ret
--- a/engine/battle/1c.asm
+++ b/engine/battle/1c.asm
@@ -87,7 +87,7 @@
 	ld [H_AUTOBGTRANSFERENABLED], a
 	call Delay3
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	dec a
 	ld [wUpdateSpritesEnabled], a
 	call DelayFrame
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -1962,7 +1962,7 @@
 	xor a
 	ld [H_AUTOBGTRANSFERENABLED], a
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld d, $80
 	ld e, $8f
 	ld c, $ff
@@ -1984,7 +1984,7 @@
 	dec c
 	jr nz, .asm_7967f
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call SaveScreenTilesToBuffer2
 	call ClearScreen
 	ld a, $1
@@ -2744,11 +2744,11 @@
 	ld hl, vBGMap0
 	call Func_79e0d
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld hl, vBGMap0 + $320
 	call Func_79e0d
 	ld a, $38
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call Func_792fd
 	ld hl, vBGMap0
 	call Func_79e0d
@@ -2759,11 +2759,11 @@
 	call AnimationShowMonPic
 	call ClearSprites
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld hl, vBGMap1
 	call Func_79e0d
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call SaveScreenTilesToBuffer1
 	ld hl, vBGMap0
 	call Func_79e0d
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -133,11 +133,11 @@
 	jr nz, .copyRowLoop
 	call EnableLCD
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld [rWY], a
 	xor a
 	ld [hTilesetType], a
-	ld [hVBlankSCY], a
+	ld [hSCY], a
 	dec a
 	ld [wUpdateSpritesEnabled], a
 	call Delay3
@@ -146,7 +146,7 @@
 	ld b, $70
 	ld c, $90
 	ld a, c
-	ld [hVBlankSCX], a
+	ld [hSCX], a
 	call DelayFrame
 	ld a, %11100100 ; inverted palette for silhouette effect
 	ld [rBGP], a
@@ -163,7 +163,7 @@
 	call SetScrollXForSlidingPlayerBodyLeft ; end background scrolling on line $60
 	call SlidePlayerHeadLeft
 	ld a, c
-	ld [hVBlankSCX], a
+	ld [hSCX], a
 	dec c
 	dec c
 	jr nz, .slideSilhouettesLoop
@@ -174,7 +174,7 @@
 	hlCoord 1, 5
 	predef Func_3f0c6
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld [rWY], a
 	inc a
 	ld [H_AUTOBGTRANSFERENABLED], a
@@ -6283,7 +6283,7 @@
 	call ClearScreen
 	xor a
 	ld [H_AUTOBGTRANSFERENABLED], a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld [rWY], a
 	ld [hTilesetType], a
 	ld hl, wd060
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -32,7 +32,7 @@
 	inc [hl]
 .asm_701eb
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld c, BANK(Music_HallOfFame)
 	ld a, MUSIC_HALL_OF_FAME
 	call PlayMusic
@@ -86,7 +86,7 @@
 	call Func_70377
 	call Func_70423
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld hl, rLCDC ; $ff40
 	res 3, [hl]
 	ret
--- a/engine/hidden_object_functions17.asm
+++ b/engine/hidden_object_functions17.asm
@@ -64,7 +64,7 @@
 	ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
 	call Delay3
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call SaveScreenTilesToBuffer1
 	ld a, $11
 	ld [wd125], a
@@ -83,7 +83,7 @@
 	call LoadScreenTilesFromBuffer1
 	call Delay3
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ret
 
 PrintBlackboardLinkCableText: ; 5dc1a (17:5c1a)
--- a/engine/hidden_object_functions3.asm
+++ b/engine/hidden_object_functions3.asm
@@ -120,7 +120,7 @@
 	set 6, [hl]
 	call GBPalWhiteOutWithDelay3
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	inc a
 	ld [H_AUTOBGTRANSFERENABLED], a
 	call LoadFontTilePatterns
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -38,7 +38,7 @@
 	call ClearSprites
 	call RestoreScreenTilesAndReloadTilePatterns
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call Delay3
 	call LoadGBPal
 	call LoadCurrentMapView
@@ -45,7 +45,7 @@
 	call SaveScreenTilesToBuffer2
 	call Delay3
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld hl, UsedCutText
 	call PrintText
 	call LoadScreenTilesFromBuffer2
@@ -63,7 +63,7 @@
 	ld a, (SFX_02_56 - SFX_Headers_02) / 3
 	call PlaySound
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call UpdateSprites
 	jp RedrawMapView
 
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -11,7 +11,7 @@
 	ld de, W_RIVALNAME ; wd34a
 	call CopyFixedLengthText
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld [wd358], a
 	ld hl, wd732
 	ld [hli], a
@@ -31,7 +31,7 @@
 	ld a, $40
 	ld [$ffaf], a
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call ClearScreen
 	call DisableLCD
 	call LoadFontTilePatterns
@@ -127,7 +127,7 @@
 	call Func_4533
 	call SaveScreenTilesToBuffer1
 	ld a, $40
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call LoadScreenTilesFromBuffer2
 	ld a, $98
 	call Func_4533
@@ -182,7 +182,7 @@
 	call PlaySound
 	call PrintGameVersionOnTitleScreen
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld d, $90
 .asm_440a
 	ld h, d
@@ -225,7 +225,7 @@
 	call GBPalWhiteOutWithDelay3
 	call ClearSprites
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	inc a
 	ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
 	call ClearScreen
@@ -270,7 +270,7 @@
 	call Func_4524
 
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld d, 1 ; scroll out
 	callba TitleScroll
 	ret
@@ -279,7 +279,7 @@
 	ld d, 0 ; scroll in
 	callba TitleScroll
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ret
 
 Func_44cf: ; 44cf (1:44cf)
@@ -353,7 +353,7 @@
 
 LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call ClearScreen
 	call LoadTextBoxTilePatterns
 
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -175,7 +175,7 @@
 	ld a, $ab
 	ld [rLCDC], a ; $ff40
 	ld a, $50
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld a, $86
 	ld [rWX], a ; $ff4b
 	ld [$ffae], a
@@ -397,7 +397,7 @@
 	xor a
 	ld [$ffae], a
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ret
 
 Func_4142d: ; 4142d (10:542d)
@@ -655,7 +655,7 @@
 	ld a, $7
 	ld [rWX], a ; $ff4b
 	xor a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld a, $90
 	ld [$ffae], a
 	ret
--- a/home.asm
+++ b/home.asm
@@ -1162,7 +1162,7 @@
 	ld a,[W_CURMAP]
 	call SwitchToMapRomBank
 	ld a,$90
-	ld [hVBlankWY],a ; move the window off the screen
+	ld [hWY],a ; move the window off the screen
 	call DelayFrame
 	call LoadGBPal
 	xor a
--- a/home/init.asm
+++ b/home/init.asm
@@ -74,7 +74,7 @@
 	ld [rIE], a
 
 	ld a, 144 ; move the window off-screen
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld [rWY], a
 	ld a, 7
 	ld [rWX], a
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -8,15 +8,15 @@
 	ld a, [H_LOADEDROMBANK]
 	ld [wd122], a
 
-	ld a, [hVBlankSCX]
+	ld a, [hSCX]
 	ld [rSCX], a
-	ld a, [hVBlankSCY]
+	ld a, [hSCY]
 	ld [rSCY], a
 
 	ld a, [wd0a0]
 	and a
 	jr nz, .ok
-	ld a, [hVBlankWY]
+	ld a, [hWY]
 	ld [rWY], a
 .ok
 
--- a/hram.asm
+++ b/hram.asm
@@ -39,9 +39,9 @@
 H_SAVEDNUMTOPRINT   EQU $FF9C ; 3 bytes
 
 ; these values are copied to SCX, SCY, and WY during V-blank
-hVBlankSCX EQU $FFAE
-hVBlankSCY EQU $FFAF
-hVBlankWY EQU $FFB0
+hSCX EQU $FFAE
+hSCY EQU $FFAF
+hWY  EQU $FFB0
 
 hJoyHeldLast EQU $FFB1
 hJoyReleased EQU $FFB2
--- a/main.asm
+++ b/main.asm
@@ -1063,7 +1063,7 @@
 	ld b,$9c ; window background address
 	call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM
 	xor a
-	ld [hVBlankWY],a ; put the window on the screen
+	ld [hWY],a ; put the window on the screen
 	call LoadFontTilePatterns
 	ld a,$01
 	ld [H_AUTOBGTRANSFERENABLED],a ; enable continuous WRAM to VRAM transfer each V-blank
@@ -2023,7 +2023,7 @@
 
 ClearVariablesAfterLoadingMapData: ; c335 (3:4335)
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld [rWY], a
 	xor a
 	ld [H_AUTOBGTRANSFERENABLED], a
--- a/scripts/vermiliondock.asm
+++ b/scripts/vermiliondock.asm
@@ -106,10 +106,10 @@
 	jr nz, .asm_1dbfa ; 0x1dc22 $d6
 	xor a
 	ld [$ff4a], a
-	ld [hVBlankWY], a
+	ld [hWY], a
 	call VermilionDock_1dc94
 	ld a, $90
-	ld [hVBlankWY], a
+	ld [hWY], a
 	ld a, $1
 	ld [wUpdateSpritesEnabled], a
 	pop hl