Skip to content

Commit

Permalink
document RoomVars struct
Browse files Browse the repository at this point in the history
  • Loading branch information
hytopoulos committed Dec 30, 2023
1 parent c2f0816 commit 37723f5
Show file tree
Hide file tree
Showing 27 changed files with 817 additions and 809 deletions.
36 changes: 19 additions & 17 deletions asm/macros/entity.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.ifndef GUARD_ASM_MACROS_ENTITY_INC
.set GUARD_ASM_MACROS_ENTITY_INC, 1

.set DEFAULT_POOL, 0xF

.set ENTITY_TYPE_ENEMY, 0x3
.set ENTITY_TYPE_SIGN, 0x5
.set ENTITY_TYPE_OBJECT, 0x6
Expand All @@ -14,7 +16,7 @@

.macro object_minish_lilypad x, y, room_property, collision=0
.byte ENTITY_TYPE_OBJECT | ((\collision) << 4)
.byte 0x0F
.byte DEFAULT_POOL
.byte OBJECT_MINISH_LILYPAD
.byte 0x00
.byte \room_property
Expand All @@ -25,7 +27,7 @@

.macro object_item x, y, item, flag, collision=0
.byte ENTITY_TYPE_OBJECT | ((\collision) << 4)
.byte 0x0F
.byte DEFAULT_POOL
.byte OBJECT_ITEM
.byte \item
.byte 0x00
Expand All @@ -37,7 +39,7 @@

.macro enemy_octorok x, y, bound_x, bound_y, bound_tile_width, bound_tile_height, collision=0
.byte ENTITY_TYPE_ENEMY | ((\collision) << 4)
.byte 0x0F
.byte DEFAULT_POOL
.byte ENEMY_OCTOROK
.byte 0x00, 0x00, 0x00
.byte \bound_tile_width, \bound_tile_height
Expand All @@ -47,7 +49,7 @@

.macro enemy_chuchu x, y, bound_x, bound_y, bound_tile_width, bound_tile_height, collision=0
.byte ENTITY_TYPE_ENEMY | ((\collision) << 4)
.byte 0x0F
.byte DEFAULT_POOL
.byte ENEMY_CHUCHU
.byte 0x00, 0x00, 0x00
.byte \bound_tile_width, \bound_tile_height
Expand All @@ -57,16 +59,16 @@

.macro enemy_tree_item x, y, unknown, collision=0
.byte ENTITY_TYPE_ENEMY | ((\collision) << 4)
.byte 0x0F
.byte DEFAULT_POOL
.byte ENEMY_TREE_ITEM
.byte \unknown, 0x00, 0x00, 0x00, 0x00
.2byte \x, \y
.2byte 0x00, 0x00
.endm

.macro entity_raw type:req, subtype:req, collision=0, unknown:req, paramA=0, paramB=0, x=0, y=0, paramC=0
.macro entity_raw type:req, subtype:req, collision=0, pool:req, paramA=0, paramB=0, x=0, y=0, paramC=0
.byte \type | ((\collision) << 4)
.byte \unknown
.byte \pool
.byte \subtype
.byte \paramA
.4byte \paramB
Expand All @@ -91,24 +93,24 @@
.2byte \flag2
.endm

.macro manager subtype:req, collision=0, unknown=0xf, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=9, subtype=\subtype, collision=\collision, unknown=\unknown, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.macro manager subtype:req, collision=0, pool=DEFAULT_POOL, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=9, subtype=\subtype, collision=\collision, pool=\pool, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.endm

.macro object_raw subtype:req, collision=0, unknown=0xf, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=6, subtype=\subtype, collision=\collision, unknown=\unknown, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.macro object_raw subtype:req, collision=0, pool=DEFAULT_POOL, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=6, subtype=\subtype, collision=\collision, pool=\pool, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.endm

.macro enemy_raw subtype:req, collision=0, unknown=0xf, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=3, subtype=\subtype, collision=\collision, unknown=\unknown, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.macro enemy_raw subtype:req, collision=0, pool=DEFAULT_POOL, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=3, subtype=\subtype, collision=\collision, pool=\pool, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.endm

.macro npc_raw subtype:req, collision=0, unknown=0x4f, paramA=0, paramB=0, x=0, y=0, script:req
entity_raw type=7, subtype=\subtype, collision=\collision, unknown=\unknown, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\script
.macro npc_raw subtype:req, collision=0, pool=0x4f, paramA=0, paramB=0, x=0, y=0, script:req
entity_raw type=7, subtype=\subtype, collision=\collision, pool=\pool, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\script
.endm

.macro projectile_raw subtype:req, collision=0, unknown=0xf, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=4, subtype=\subtype, collision=\collision, unknown=\unknown, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.macro projectile_raw subtype:req, collision=0, pool=DEFAULT_POOL, paramA=0, paramB=0, x=0, y=0, paramC=0
entity_raw type=4, subtype=\subtype, collision=\collision, pool=\pool, paramA=\paramA, paramB=\paramB, x=\x, y=\y, paramC=\paramC
.endm

.macro entity_list_end
Expand Down
2 changes: 1 addition & 1 deletion data/const/game_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ gUnk_080FED58:: @ 080FED58
.incbin "data_080FC8A4/gUnk_080FED58.bin"

@ kinstone.c
gUnk_080FED98:: @ 080FED98
gLilypadRails:: @ 080FED98
.4byte gUnk_080FEDA4
.4byte gUnk_080FEDDA
.4byte gUnk_080FEDF8
Expand Down
Loading

0 comments on commit 37723f5

Please sign in to comment.