summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2016-03-28 15:59:19 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2016-03-28 15:59:19 -0400
commit9ca431b4f9706a3bbbbcfb03e2bab3360a5258a2 (patch)
treeeb8b05c448eb6a0b00ad344e65fb1b708c89c2aa
parent817729c36ac6d43129731290f3feed9db9ff65a4 (diff)
Complete documentation of bank1e
Todo: address comments for data/animations.asm
-rwxr-xr-xdata/animations.asm7
-rwxr-xr-xengine/overworld/cut2.asm8
-rwxr-xr-xengine/overworld/ssanne.asm14
-rwxr-xr-xyellow/main.asm25
4 files changed, 26 insertions, 28 deletions
diff --git a/data/animations.asm b/data/animations.asm
index cf6dc150..786f7e72 100755
--- a/data/animations.asm
+++ b/data/animations.asm
@@ -1,4 +1,4 @@
-AttackAnimationPointers: ; 7a07d (1e:607d)
+AttackAnimationPointers: ; 7a22a (1e:622a)
dw PoundAnim
dw KarateChopAnim
dw DoubleSlapAnim
@@ -201,7 +201,6 @@ AttackAnimationPointers: ; 7a07d (1e:607d)
dw HidePicAnim
dw ThrowRockAnim
dw ThrowBaitAnim
- dw ZigZagScreenAnim
; each animation is a list of subanimations and special effects
; if first byte < $56
@@ -209,10 +208,6 @@ AttackAnimationPointers: ; 7a07d (1e:607d)
; if first byte >= $D8
; db special_effect_id, sound_id
; $FF terminated
-ZigZagScreenAnim: ; 7a213 (1e:6213)
- db SE_WAVY_SCREEN, $FF
- db $FF
-
PoundAnim: ; 7a216 (1e:6216)
StruggleAnim: ; 7a216 (1e:6216)
db $08,$00,$01
diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm
index 1cf832b5..9bb4ee2c 100755
--- a/engine/overworld/cut2.asm
+++ b/engine/overworld/cut2.asm
@@ -1,4 +1,4 @@
-AnimCut: ; 79e96 (1e:5e96)
+AnimCut: ; 7a037 (1e:6037)
ld a, [wCutTile]
cp $52
jr z, .grass
@@ -18,6 +18,7 @@ AnimCut: ; 79e96 (1e:5e96)
ld a, [rOBP1]
xor $64
ld [rOBP1], a
+ call UpdateGBCPal_OBP1
call DelayFrame
pop bc
dec c
@@ -43,7 +44,7 @@ AnimCut: ; 79e96 (1e:5e96)
jr nz, .cutGrassLoop
ret
-AnimCutGrass_UpdateOAMEntries: ; 79eed (1e:5eed)
+AnimCutGrass_UpdateOAMEntries: ; 7a091 (1e:6091)
push bc
ld hl, wOAMBuffer + $91
ld a, 1
@@ -68,13 +69,14 @@ AnimCutGrass_UpdateOAMEntries: ; 79eed (1e:5eed)
ld a, [rOBP1]
xor $64
ld [rOBP1], a
+ call UpdateGBCPal_OBP1
call DelayFrame
pop bc
dec c
jr nz, AnimCutGrass_UpdateOAMEntries
ret
-AnimCutGrass_SwapOAMEntries: ; 79f30 (1e:5f30)
+AnimCutGrass_SwapOAMEntries: ; 7a0d7 (1e:60d7)
ld hl, wOAMBuffer + $90
ld de, wBuffer
ld bc, $8
diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm
index e631bbfa..ece4446d 100755
--- a/engine/overworld/ssanne.asm
+++ b/engine/overworld/ssanne.asm
@@ -1,4 +1,4 @@
-AnimateBoulderDust: ; 79f54 (1e:5f54)
+AnimateBoulderDust: ; 7a0fb (1e:60fb)
ld a, $1
ld [wWhichAnimationOffsets], a ; select the boulder dust offsets
ld a, [wUpdateSpritesEnabled]
@@ -7,6 +7,7 @@ AnimateBoulderDust: ; 79f54 (1e:5f54)
ld [wUpdateSpritesEnabled], a
ld a, %11100100
ld [rOBP1], a
+ call UpdateGBCPal_OBP1
call LoadSmokeTileFourTimes
callba WriteCutOrBoulderDustAnimationOAMBlock
ld c, 8 ; number of steps in animation
@@ -21,6 +22,7 @@ AnimateBoulderDust: ; 79f54 (1e:5f54)
ld a, [rOBP1]
xor %01100100
ld [rOBP1], a
+ call UpdateGBCPal_OBP1
call Delay3
pop bc
dec c
@@ -29,7 +31,7 @@ AnimateBoulderDust: ; 79f54 (1e:5f54)
ld [wUpdateSpritesEnabled], a
jp LoadPlayerSpriteGraphics
-GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
+GetMoveBoulderDustFunctionPointer: ; 7913f (1e:613f)
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
ld hl, MoveBoulderDustFunctionPointerTable
ld c, a
@@ -51,7 +53,7 @@ GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
pop hl
ret
-MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
+MoveBoulderDustFunctionPointerTable: ; 7a15d (1e:615d)
; facing down
db $FF,$00
dw AdjustOAMBlockYPos
@@ -68,7 +70,7 @@ MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
db $FF,$01
dw AdjustOAMBlockXPos
-LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
+LoadSmokeTileFourTimes: ; 7916d (1e:616d)
ld hl, vChars1 + $7c0
ld c, $4
.loop
@@ -83,11 +85,11 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
jr nz, .loop
ret
-LoadSmokeTile: ; 79fd4 (1e:5fd4)
+LoadSmokeTile: ; 7a181 (1e:6181)
ld de, SSAnneSmokePuffTile
lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10
jp CopyVideoData
-SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)
+SSAnneSmokePuffTile: ; 7a18a (1e:618a)
INCBIN "gfx/ss_anne_smoke_puff.2bpp"
SSAnneSmokePuffTileEnd:
diff --git a/yellow/main.asm b/yellow/main.asm
index 1f5492f4..e9064d2b 100755
--- a/yellow/main.asm
+++ b/yellow/main.asm
@@ -811,25 +811,24 @@ SECTION "bank1E",ROMX,BANK[$1E]
INCLUDE "engine/battle/animations.asm"
-AnimCut: ; 7a037 (1e:6037)
- dr $7a037,$7a0fb
-AnimateBoulderDust: ; 7a0fb (1e:60fb)
- dr $7a0fb,$7a19a
+INCLUDE "engine/overworld/cut2.asm"
+
+INCLUDE "engine/overworld/ssanne.asm"
RedFishingTilesFront: INCBIN "gfx/red_fishing_tile_front.2bpp"
RedFishingTilesBack: INCBIN "gfx/red_fishing_tile_back.2bpp"
RedFishingTilesSide: INCBIN "gfx/red_fishing_tile_side.2bpp"
RedFishingRodTiles: INCBIN "gfx/red_fishingrod_tiles.2bpp"
-;INCLUDE "data/animations.asm"
-AttackAnimationPointers: ; 7a22a (1e:622a)
- dr $7a22a,$7a915
-SubanimationPointers: ; 7a915 (1e:6915)
- dr $7a915,$7b11c
-FrameBlockPointers: ; 7b11c (1e:711c)
- dr $7b11c,$7be2d
-FrameBlockBaseCoords: ; 7be2d (1e:7e2d)
- dr $7be2d,$7c000
+INCLUDE "data/animations.asm"
+;AttackAnimationPointers: ; 7a22a (1e:622a)
+; dr $7a22a,$7a915
+;SubanimationPointers: ; 7a915 (1e:6915)
+; dr $7a915,$7b11c
+;FrameBlockPointers: ; 7b11c (1e:711c)
+; dr $7b11c,$7be2d
+;FrameBlockBaseCoords: ; 7be2d (1e:7e2d)
+; dr $7be2d,$7c000
SECTION "bank2f",ROMX[$5000],BANK[$2F]