aboutsummaryrefslogtreecommitdiffstats
path: root/engine/gamefreak.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-06-11 21:30:31 -0700
committerYamaArashi <shadow962@live.com>2016-06-11 21:33:57 -0700
commit4c5c98cb2a1bc747a0eb397cb75e48dc8a098494 (patch)
tree2872a6436075c0d6132671e98af44f0a1429e498 /engine/gamefreak.asm
parentMerge pull request #13 from YamaArashi/master (diff)
downloadpokeyellow-4c5c98cb2a1bc747a0eb397cb75e48dc8a098494.tar.gz
pokeyellow-4c5c98cb2a1bc747a0eb397cb75e48dc8a098494.tar.xz
pokeyellow-4c5c98cb2a1bc747a0eb397cb75e48dc8a098494.zip
sync engine code with pokered
Diffstat (limited to 'engine/gamefreak.asm')
-rwxr-xr-xengine/gamefreak.asm27
1 files changed, 14 insertions, 13 deletions
diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm
index 6545e216..5472a56e 100755
--- a/engine/gamefreak.asm
+++ b/engine/gamefreak.asm
@@ -2,14 +2,14 @@ LoadShootingStarGraphics:
ld a, $f9
ld [rOBP0], a
ld a, $a4
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
- ld de, AnimationTileset2 + $30 ; $4757 ; star tile (top left quadrant)
+ ld de, AnimationTileset2 + $30 ; star tile (top left quadrant)
ld hl, vChars1 + $200
lb bc, BANK(AnimationTileset2), $01
call CopyVideoData
- ld de, AnimationTileset2 + $130 ; $481e ; star tile (bottom left quadrant)
+ ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant)
ld hl, vChars1 + $210
lb bc, BANK(AnimationTileset2), $01
call CopyVideoData
@@ -39,7 +39,7 @@ AnimateShootingStar:
push bc
.bigStarInnerLoop
ld a, [hl] ; Y
- add 4 ; y
+ add 4
ld [hli], a
ld a, [hl] ; X
add -4
@@ -60,11 +60,11 @@ AnimateShootingStar:
.next
cp b
jr nz, .bigStarLoop
+
+; Clear big star OAM.
ld hl, wOAMBuffer
ld c, 4
ld de, 4
-
-; Clear big star OAM.
.clearOAMLoop
ld [hl], 160
add hl, de
@@ -74,7 +74,7 @@ AnimateShootingStar:
; Make Gamefreak logo flash.
ld b, 3
.flashLogoLoop
- ld hl, rOBP0 ; $ff48
+ ld hl, rOBP0
rrc [hl]
rrc [hl]
call UpdateGBCPal_OBP0
@@ -83,13 +83,14 @@ AnimateShootingStar:
ret c
dec b
jr nz, .flashLogoLoop
+
; Copy 24 instances of the small stars OAM data.
; Note that their coordinates put them off-screen.
ld de, wOAMBuffer
ld a, 24
.initSmallStarsOAMLoop
push af
- ld hl, SmallStarsOAM ; $40ee
+ ld hl, SmallStarsOAM
ld bc, SmallStarsOAMEnd - SmallStarsOAM
call CopyData
pop af
@@ -98,8 +99,8 @@ AnimateShootingStar:
; Animate the small stars falling from the Gamefreak logo.
xor a
- ld [wMoveDownSmallStarsOAMCount], a ; wWhichTrade
- ld hl, SmallStarsWaveCoordsPointerTable ; 1c:4105
+ ld [wMoveDownSmallStarsOAMCount], a
+ ld hl, SmallStarsWaveCoordsPointerTable
ld c, 6
.smallStarsLoop
ld a, [hli]
@@ -214,15 +215,15 @@ MoveDownSmallStars:
ld de, -4
ld c, a
.innerLoop
- inc [hl]
+ inc [hl] ; Y
add hl, de
dec c
jr nz, .innerLoop
; Toggle the palette so that the lower star in the small stars tile blinks in
; and out.
- ld a, [rOBP1] ; $ff49
+ ld a, [rOBP1]
xor %10100000
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
call UpdateGBCPal_OBP1
ld c, 3
call CheckForUserInterruption