Use DEF before EQU syntax

This commit is contained in:
xCrystal 2024-01-04 21:47:44 +01:00
parent 16e7328439
commit 3e952c0b0f
5 changed files with 23 additions and 23 deletions

View File

@ -14,13 +14,13 @@
const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_8
if (const_value % 8) != 0
const_value = const_value + 8 - (const_value % 8)
DEF const_value = const_value + 8 - (const_value % 8)
endc
EVENT_TEMPORARY_UNTIL_MAP_RELOAD_FLAGS_END EQU const_value
DEF EVENT_TEMPORARY_UNTIL_MAP_RELOAD_FLAGS_END EQU const_value
;; The next flags are reset upon entering a new level (for e.g. trainers)
EVENT_LEVEL_SCOPED_FLAGS_START EQU EVENT_TEMPORARY_UNTIL_MAP_RELOAD_FLAGS_END
DEF EVENT_LEVEL_SCOPED_FLAGS_START EQU EVENT_TEMPORARY_UNTIL_MAP_RELOAD_FLAGS_END
const EVENT_LEVEL_SCOPED_1
const EVENT_LEVEL_SCOPED_2
@ -44,13 +44,13 @@ EVENT_LEVEL_SCOPED_FLAGS_START EQU EVENT_TEMPORARY_UNTIL_MAP_RELOAD_FLAGS_END
const EVENT_LEVEL_SCOPED_20
if (const_value % 8) != 0
const_value = const_value + 8 - (const_value % 8)
DEF const_value = const_value + 8 - (const_value % 8)
endc
EVENT_LEVEL_SCOPED_FLAGS_END EQU const_value
DEF EVENT_LEVEL_SCOPED_FLAGS_END EQU const_value
;; The next flags are reset upon taking a step (for e.g. talker)
EVENT_TURN_SCOPED_FLAGS_START EQU EVENT_LEVEL_SCOPED_FLAGS_END
DEF EVENT_TURN_SCOPED_FLAGS_START EQU EVENT_LEVEL_SCOPED_FLAGS_END
const EVENT_TURN_SCOPED_1
const EVENT_TURN_SCOPED_2
@ -74,13 +74,13 @@ EVENT_TURN_SCOPED_FLAGS_START EQU EVENT_LEVEL_SCOPED_FLAGS_END
const EVENT_TURN_SCOPED_20
if (const_value % 8) != 0
const_value = const_value + 8 - (const_value % 8)
DEF const_value = const_value + 8 - (const_value % 8)
endc
EVENT_TURN_SCOPED_FLAGS_END EQU const_value
DEF EVENT_TURN_SCOPED_FLAGS_END EQU const_value
;; The remaining flags are only reset explicitly
EVENT_REGULAR_FLAGS_START EQU EVENT_TURN_SCOPED_FLAGS_END
DEF EVENT_REGULAR_FLAGS_START EQU EVENT_TURN_SCOPED_FLAGS_END
const EVENT_INITIALIZED_EVENTS

View File

@ -65,15 +65,15 @@ DEF SPRITE_GFX_LIST_CAPACITY EQU 1 + WALKING_SPRITE_GFX_LIST_CAPACITY + STILL_SP
DEF NUM_HUD_TYPES EQU const_value - 1
; board menu graphics
BOARD_MENU_ITEM_WIDTH EQU 3
BOARD_MENU_ITEM_HEIGHT EQU 3
BOARD_MENU_ITEM_SIZE EQU BOARD_MENU_ITEM_WIDTH * BOARD_MENU_ITEM_HEIGHT
DIE_WIDTH EQU 2
DIE_HEIGHT EQU 2
DIE_SIZE EQU DIE_WIDTH * DIE_HEIGHT
DIE_NUMBER_WIDTH EQU 2
DIE_NUMBER_HEIGHT EQU 2
DIE_NUMBER_SIZE EQU DIE_NUMBER_WIDTH * DIE_NUMBER_HEIGHT
DEF BOARD_MENU_ITEM_WIDTH EQU 3
DEF BOARD_MENU_ITEM_HEIGHT EQU 3
DEF BOARD_MENU_ITEM_SIZE EQU BOARD_MENU_ITEM_WIDTH * BOARD_MENU_ITEM_HEIGHT
DEF DIE_WIDTH EQU 2
DEF DIE_HEIGHT EQU 2
DEF DIE_SIZE EQU DIE_WIDTH * DIE_HEIGHT
DEF DIE_NUMBER_WIDTH EQU 2
DEF DIE_NUMBER_HEIGHT EQU 2
DEF DIE_NUMBER_SIZE EQU DIE_NUMBER_WIDTH * DIE_NUMBER_HEIGHT
; PAL_OW_MISC groups (high nybble of wCurOverworldMiscPal)
const_def 0, $10
@ -82,4 +82,4 @@ DIE_NUMBER_SIZE EQU DIE_NUMBER_WIDTH * DIE_NUMBER_HEIGHT
const PAL_OW_MISC_BOARD_COINS
DEF NUM_PAL_OW_MISC_PAL_GROUPS EQU const_value / $10
PAL_OW_MISC_PAL_GROUP_MASK EQU %11110000
DEF PAL_OW_MISC_PAL_GROUP_MASK EQU %11110000

View File

@ -41,8 +41,8 @@ DEF NUM_ENVIRONMENTS EQU const_value
const PALETTE_EVE
DEF NUM_MAP_PALETTES EQU const_value
IN_DARKNESS_F EQU 3
IN_DARKNESS EQU 1 << IN_DARKNESS_F ; masked with a PALETTE_* constant
DEF IN_DARKNESS_F EQU 3
DEF IN_DARKNESS EQU 1 << IN_DARKNESS_F ; masked with a PALETTE_* constant
; FishGroups indexes (see data/wild/fish.asm)
const_def

View File

@ -264,7 +264,7 @@ GetBoardMenuSelection:
ret ; nc
BoardMenu_Die:
DIE_MAX_NUMBER EQU 6
DEF DIE_MAX_NUMBER EQU 6
ld hl, wDisplaySecondarySprites
set SECONDARYSPRITES_DIE_ROLL_F, [hl]
ld a, 1

View File

@ -1,4 +1,4 @@
OVERWORLD_HUD_HEIGHT EQU 8
DEF OVERWORLD_HUD_HEIGHT EQU 8
EnableOverworldHUD::
ld a, HUD_OVERWORLD