Some shit software I was messing with on gb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
780 B

4 years ago
if !def(_video_inc_)
_video_inc_ equ 0
bgmap_width equ 32
bgmap_height equ 32
screen_width equ 20
screen_height equ 18
tile_height equ 8
len_1bpp_tile equ 1 * tile_height
len_2bpp_tile equ 2 * tile_height
tile equs "+ len_2bpp_tile *"
tiles equs "* len_2bpp_tile"
coord: macro
4 years ago
if _NARG < 4
ld \1, (\3) * screen_width + (\2) + w_tilemap
else
ld \1, (\3) * screen_width + (\2) + (\4)
4 years ago
endc
endm
4 years ago
dcoord: macro
if _NARG < 4
dw (\2) * screen_width + (\1) + w_tilemap
else
dw (\2) * screen_width + (\1) + (\3)
endc
endm
bgcoord: macro
4 years ago
if _NARG < 4
ld \1, (\3) * bgmap_width + (\2) + v_bgmap1
else
ld \1, (\3) * bgmap_width + (\2) + (\4)
endc
endm
dbgcoord: macro
if _NARG < 3
dw (\2) * bgmap_width + (\1) + v_bgmap1
else
dw (\2) * bgmap_width + (\1) + (\3)
endc
endm
4 years ago
endc