summaryrefslogtreecommitdiff
path: root/engine/gfx/loadpushoam.asm
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2018-03-25 16:18:33 +0200
committermid-kid <esteve.varela@gmail.com>2018-03-25 16:18:33 +0200
commit0d9241889fc8a2f047b9fd6db25e55de1e721877 (patch)
tree4ae588ae9d97639b456e6d2ba64a94676ddcf703 /engine/gfx/loadpushoam.asm
parent60e21a86638cad5fd25133cda1c545461304d902 (diff)
Organize the engine/ directory, take 3
Renamed `title` to `movies`. Moved some functions from `engine/routines/` to their fitting directories, and cleaned up the base `engine/` directory. Moved `engine/pokemon/tmhm.asm` back to `engine/items/`. Made a new subdirectory: * engine/tilesets: Contains all map-related graphics routines.
Diffstat (limited to 'engine/gfx/loadpushoam.asm')
-rw-r--r--engine/gfx/loadpushoam.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/engine/gfx/loadpushoam.asm b/engine/gfx/loadpushoam.asm
new file mode 100644
index 000000000..95f67ff73
--- /dev/null
+++ b/engine/gfx/loadpushoam.asm
@@ -0,0 +1,21 @@
+WriteOAMDMACodeToHRAM:: ; 4031
+ ld c, hTransferVirtualOAM - $ff00
+ ld b, .PushOAMEnd - .PushOAM
+ ld hl, .PushOAM
+.loop
+ ld a, [hli]
+ ld [$ff00+c], a
+ inc c
+ dec b
+ jr nz, .loop
+ ret
+
+.PushOAM: ; 403f
+ ld a, HIGH(wVirtualOAM)
+ ld [rDMA], a
+ ld a, NUM_SPRITE_OAM_STRUCTS
+.pushoam_loop
+ dec a
+ jr nz, .pushoam_loop
+ ret
+.PushOAMEnd