summaryrefslogtreecommitdiff
path: root/engine/overworld/ssanne.asm
diff options
context:
space:
mode:
authorU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-05-22 18:13:20 -0400
committerU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-05-22 18:13:20 -0400
commit15427f532085846ab6b51719be687951a094cb6c (patch)
treeedea9b189e91641a12dd521756894df84aeeace7 /engine/overworld/ssanne.asm
parentea3ba4cde3706b7c77efb705555ec0c86321cbe2 (diff)
Pull a lot of engine out of main.asm
Diffstat (limited to 'engine/overworld/ssanne.asm')
-rwxr-xr-xengine/overworld/ssanne.asm88
1 files changed, 88 insertions, 0 deletions
diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm
new file mode 100755
index 00000000..e8060810
--- /dev/null
+++ b/engine/overworld/ssanne.asm
@@ -0,0 +1,88 @@
+Func_79f54: ; 79f54 (1e:5f54)
+ ld a, $1
+ ld [$cd50], a
+ ld a, [$cfcb]
+ push af
+ ld a, $ff
+ ld [$cfcb], a
+ ld a, $e4
+ ld [rOBP1], a ; $ff49
+ call LoadSmokeTileFourTimes
+ callba asm_f055
+ ld c, $8
+.asm_79f73
+ push bc
+ call Func_79f92
+ ld bc, .asm_79f7e
+ push bc
+ ld c, $4
+ jp [hl]
+.asm_79f7e
+ ld a, [rOBP1] ; $ff49
+ xor $64
+ ld [rOBP1], a ; $ff49
+ call Delay3
+ pop bc
+ dec c
+ jr nz, .asm_79f73
+ pop af
+ ld [$cfcb], a
+ jp LoadPlayerSpriteGraphics
+
+Func_79f92: ; 79f92 (1e:5f92)
+ ld a, [$c109]
+ ld hl, PointerTable_79fb0 ; $5fb0
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ ld [$d08a], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push hl
+ ld hl, $c390
+ ld d, $0
+ add hl, de
+ ld e, l
+ ld d, h
+ pop hl
+ ret
+
+PointerTable_79fb0: ; 79fb0 (1e:5fb0)
+ db $FF,$00
+ dw Func_79350
+
+ db $01,$00
+ dw Func_79350
+
+ db $01,$01
+ dw Func_79337
+
+ db $FF,$01
+ dw Func_79337
+
+LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
+ ld hl, $8fc0
+ ld c, $4
+.loop
+ push bc
+ push hl
+ call LoadSmokeTile
+ pop hl
+ ld bc, $10
+ add hl, bc
+ pop bc
+ dec c
+ jr nz, .loop
+ ret
+
+LoadSmokeTile: ; 79fd4 (1e:5fd4)
+ ld de, SSAnneSmokePuffTile ; $5fdd
+ ld bc, (BANK(SSAnneSmokePuffTile) << 8) + $01
+ jp CopyVideoData
+
+SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)
+ INCBIN "gfx/ss_anne_smoke_puff.2bpp"