This system will allow playing simple animations e.g. when a door opens.
; pointer to new map struct
.de exit_to, 2
.de exit_size, 0
+
+ ; object animation struct
+ ; simple call in update code
+ ; with a single state
+ ; intended for use with short-term map animations
+ ; e.g. door opening
+.se 0
+.de obja_st, st_size
+.de obja_flags, 1
+.de obja_pos_y, 1
+.de obja_pos_x, 1
+.de obja_dat, 1
+.de obja_size, 0
; special text commands
; byte as a number
#define TEXT_NUMBER 0x80
- ; dice display
-
; constants
-#define DD_TIME 90
-#define DD_D0_TILE 0x90
-#define DD_CROSS_TILE 0xA0
#define DISTANCE_BGTA 1
#define DISTANCE_AGTB 0
#include "demos.s"
#include "mainmenu.s"
#include "actsave.s"
+#include "objanim.s"
; fill bank
.fill 0xFF, 0x4000 - $
ld hl, st_unit_delay_to_active
ld bc, st_size
call memcpy
-
+
+ call objanim_init
; set up default game speed
ld a, GAME_SPEED_DEFAULT
--- /dev/null
+
+ ; sets up object animation state
+objanim_init:
+ ret
; same memory as empty_unit
empty_oam: .adv oamsize
- ; ptr to actor for next UI update
-ui_draw_actor: .adv 2
; can be used for custom state transtions
; simple write state info to this location
; allows us to move scroll when needed
scroll_move_y: .adv 1
scroll_move_x: .adv 1
+
+ ; state for object animation
+objanim: .adv obja_size
; game state
; this region holds the entire game state