From c9c59dc34323a5e0b1886db5f845c8d41620826e Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 3 Jul 2020 12:44:47 -0400 Subject: Reorganize constants/ To do: add comments associating constants with data and code --- constants/sprite_data_constants.asm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 constants/sprite_data_constants.asm (limited to 'constants/sprite_data_constants.asm') diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm new file mode 100644 index 00000000..d5788cb1 --- /dev/null +++ b/constants/sprite_data_constants.asm @@ -0,0 +1,28 @@ +; different kinds of people events +ITEM EQU $80 +TRAINER EQU $40 + +BOULDER_MOVEMENT_BYTE_2 EQU $10 + +; sprite facing directions +SPRITE_FACING_DOWN EQU $00 +SPRITE_FACING_UP EQU $04 +SPRITE_FACING_LEFT EQU $08 +SPRITE_FACING_RIGHT EQU $0C + +NPC_MOVEMENT_DOWN EQU $00 +NPC_MOVEMENT_UP EQU $40 +NPC_MOVEMENT_LEFT EQU $80 +NPC_MOVEMENT_RIGHT EQU $C0 + +; player direction constants + +PLAYER_DIR_BIT_RIGHT EQU 0 +PLAYER_DIR_BIT_LEFT EQU 1 +PLAYER_DIR_BIT_DOWN EQU 2 +PLAYER_DIR_BIT_UP EQU 3 + +PLAYER_DIR_RIGHT EQU (1 << PLAYER_DIR_BIT_RIGHT) +PLAYER_DIR_LEFT EQU (1 << PLAYER_DIR_BIT_LEFT) +PLAYER_DIR_DOWN EQU (1 << PLAYER_DIR_BIT_DOWN) +PLAYER_DIR_UP EQU (1 << PLAYER_DIR_BIT_UP) -- cgit v1.2.3 From 9878f01e29b1443d6c894c1332cbf381fa12646e Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 3 Jul 2020 16:37:47 -0400 Subject: Organize macros/ like pokecrystal While doing so I replaced the StopAllMusic macro with a SFX_STOP_ALL_MUSIC constant and applied it throughout the code. --- constants/sprite_data_constants.asm | 6 ------ 1 file changed, 6 deletions(-) (limited to 'constants/sprite_data_constants.asm') diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm index d5788cb1..48a34446 100644 --- a/constants/sprite_data_constants.asm +++ b/constants/sprite_data_constants.asm @@ -1,9 +1,3 @@ -; different kinds of people events -ITEM EQU $80 -TRAINER EQU $40 - -BOULDER_MOVEMENT_BYTE_2 EQU $10 - ; sprite facing directions SPRITE_FACING_DOWN EQU $00 SPRITE_FACING_UP EQU $04 -- cgit v1.2.3