Labelled and commented mostly sprite-related things

This commit is contained in:
YamaArashi 2014-09-09 20:55:19 -07:00
parent daf4fc87ae
commit 91793015e5
86 changed files with 838 additions and 738 deletions

View file

@ -1,37 +1,37 @@
Func_79f54: ; 79f54 (1e:5f54)
AnimateBoulderDust: ; 79f54 (1e:5f54)
ld a, $1
ld [wcd50], a
ld [wcd50], a ; select the boulder dust offsets
ld a, [wcfcb]
push af
ld a, $ff
ld [wcfcb], a
ld a, $e4
ld [rOBP1], a ; $ff49
ld a, %11100100
ld [rOBP1], a
call LoadSmokeTileFourTimes
callba asm_f055
ld c, $8
.asm_79f73
callba WriteCutTreeBoulderDustAnimationOAMBlock
ld c, 8 ; number of steps in animation
.loop
push bc
call Func_79f92
ld bc, .asm_79f7e
call GetMoveBoulderDustFunctionPointer
ld bc, .returnAddress
push bc
ld c, $4
jp [hl]
.asm_79f7e
ld a, [rOBP1] ; $ff49
xor $64
ld [rOBP1], a ; $ff49
.returnAddress
ld a, [rOBP1]
xor %01100100
ld [rOBP1], a
call Delay3
pop bc
dec c
jr nz, .asm_79f73
jr nz, .loop
pop af
ld [wcfcb], a
jp LoadPlayerSpriteGraphics
Func_79f92: ; 79f92 (1e:5f92)
ld a, [wSpriteStateData1 + 9]
ld hl, PointerTable_79fb0 ; $5fb0
GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
ld hl, MoveBoulderDustFunctionPointerTable
ld c, a
ld b, $0
add hl, bc
@ -51,18 +51,22 @@ Func_79f92: ; 79f92 (1e:5f92)
pop hl
ret
PointerTable_79fb0: ; 79fb0 (1e:5fb0)
MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
; facing down
db $FF,$00
dw Func_79350
dw AdjustOAMBlockYPos
; facing up
db $01,$00
dw Func_79350
dw AdjustOAMBlockYPos
; facing left
db $01,$01
dw Func_79337
dw AdjustOAMBlockXPos
; facing right
db $FF,$01
dw Func_79337
dw AdjustOAMBlockXPos
LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
ld hl, vChars1 + $7c0