mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
Reorganize some macros
* tileset data macros go atop their related files, like all the ones in data/ * charmaps are not macros
This commit is contained in:
parent
bdd3a55333
commit
6c20ff9e20
@ -1,3 +1,5 @@
|
|||||||
|
INCLUDE "charmap.asm"
|
||||||
|
|
||||||
INCLUDE "macros.asm"
|
INCLUDE "macros.asm"
|
||||||
|
|
||||||
INCLUDE "hram.asm"
|
INCLUDE "hram.asm"
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
INCLUDE "macros/enum.asm"
|
INCLUDE "macros/enum.asm"
|
||||||
INCLUDE "macros/charmap.asm"
|
|
||||||
INCLUDE "macros/predef.asm"
|
INCLUDE "macros/predef.asm"
|
||||||
INCLUDE "macros/rst.asm"
|
INCLUDE "macros/rst.asm"
|
||||||
INCLUDE "macros/data.asm"
|
INCLUDE "macros/data.asm"
|
||||||
INCLUDE "macros/code.asm"
|
INCLUDE "macros/code.asm"
|
||||||
INCLUDE "macros/coords.asm"
|
INCLUDE "macros/coords.asm"
|
||||||
INCLUDE "macros/color.asm"
|
INCLUDE "macros/color.asm"
|
||||||
INCLUDE "macros/base_stats.asm"
|
INCLUDE "macros/tmhm.asm"
|
||||||
INCLUDE "macros/tilesets.asm"
|
|
||||||
|
|
||||||
INCLUDE "macros/scripts/audio.asm"
|
INCLUDE "macros/scripts/audio.asm"
|
||||||
INCLUDE "macros/scripts/maps.asm"
|
INCLUDE "macros/scripts/maps.asm"
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
RGB: MACRO
|
RGB: MACRO
|
||||||
rept _NARG / 3
|
rept _NARG / 3
|
||||||
dw ((\3) << 10) + ((\2) << 5) + (\1)
|
dw palred (\1) + palgreen (\2) + palblue (\3)
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
endr
|
endr
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
palred EQUS "(1 << 0) *"
|
||||||
|
palgreen EQUS "(1 << 5) *"
|
||||||
|
palblue EQUS "(1 << 10) *"
|
||||||
|
|
||||||
palettes EQUS "* 8"
|
palettes EQUS "* 8"
|
||||||
palette EQUS "+ 8 *"
|
palette EQUS "+ 8 *"
|
||||||
|
|
||||||
palred EQUS "$0001 *"
|
|
||||||
palgreen EQUS "$0020 *"
|
|
||||||
palblue EQUS "$0400 *"
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
; Used in tilesets/*.asm
|
|
||||||
|
|
||||||
tilepal: MACRO
|
|
||||||
; vram bank, pals
|
|
||||||
x = \1 << OAM_TILE_BANK
|
|
||||||
rept (_NARG +- 1) / 2
|
|
||||||
dn (x | PAL_BG_\3), (x | PAL_BG_\2)
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
endr
|
|
||||||
ENDM
|
|
||||||
|
|
||||||
tilecoll: MACRO
|
|
||||||
db COLL_\1, COLL_\2, COLL_\3, COLL_\4
|
|
||||||
ENDM
|
|
@ -1,11 +1,12 @@
|
|||||||
; Used in data/pokemon/base_stats/*.asm
|
|
||||||
|
|
||||||
define: MACRO
|
define: MACRO
|
||||||
if !DEF(\1)
|
if !DEF(\1)
|
||||||
\1 EQUS \2
|
\1 EQUS \2
|
||||||
endc
|
endc
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
|
||||||
|
; Used in constants/item_constants.asm
|
||||||
|
|
||||||
const_value = 0
|
const_value = 0
|
||||||
|
|
||||||
add_tm: MACRO
|
add_tm: MACRO
|
||||||
@ -31,6 +32,9 @@ add_mt: MACRO
|
|||||||
enum \1_TMNUM
|
enum \1_TMNUM
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
|
||||||
|
; Used in data/pokemon/base_stats/*.asm
|
||||||
|
|
||||||
; N TMs/HMs need (N+7)/8 bytes for their bit flags.
|
; N TMs/HMs need (N+7)/8 bytes for their bit flags.
|
||||||
; The rgbasm integers tms1, tms2, tms3 each hold 3 bytes, or 24 bits.
|
; The rgbasm integers tms1, tms2, tms3 each hold 3 bytes, or 24 bits.
|
||||||
tmhm: MACRO
|
tmhm: MACRO
|
@ -1,3 +1,9 @@
|
|||||||
|
tilecoll: MACRO
|
||||||
|
; used in tilesets/*_collision.asm
|
||||||
|
db COLL_\1, COLL_\2, COLL_\3, COLL_\4
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
|
||||||
SECTION "Tileset Data 1", ROMX
|
SECTION "Tileset Data 1", ROMX
|
||||||
|
|
||||||
TilesetKantoGFX: ; 0x18000
|
TilesetKantoGFX: ; 0x18000
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
tilepal: MACRO
|
||||||
|
; vram bank, pals
|
||||||
|
x = \1 << OAM_TILE_BANK
|
||||||
|
rept (_NARG +- 1) / 2
|
||||||
|
dn (x | PAL_BG_\3), (x | PAL_BG_\2)
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
endr
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
|
||||||
TilesetKantoPalMap: ; 0x4c075
|
TilesetKantoPalMap: ; 0x4c075
|
||||||
INCLUDE "tilesets/kanto_palette_map.asm"
|
INCLUDE "tilesets/kanto_palette_map.asm"
|
||||||
; 0x4c0e5
|
; 0x4c0e5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user