You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vram.asm defines labels generic to the GBC, with no information specific to pokecrystal.
These labels are offset by the tile string, + LEN_2BPP_TILE *. This allows tile offsets to be written as tile coords—for example, vTiles0 tile $73 is seven tiles "down" & three tiles "right" from the start of the first part of the tilemap.
This rabbit hole potentially goes much deeper, since the same principles used to label VRAM could label offsets into (for example) WRAM's TileMap, which itself is referenced by the coord macro.
However, in many cases, hardcoded [tile] coords are either a) single-use, or b) more intuitive as numbers than labels/constants defined elsewhere. As a result, the scope of this issue is hard to pin down.
The text was updated successfully, but these errors were encountered:
The tile "operator" is hard to replace as our tools stand right now; it will become cleaner when this is implemented: gbdev/rgbds#201
The same applies to anything coordinate-related. As for hardcoded tile number constants, it's rather hard to give useful names to one-offs. At some point, code comments are just clearer.
Filling vram.asm with feature-specific labels would be more cumbersome than the current solution, offsets to six main labels. When or if rednex/rgbds#201is resolved, we can replace the tile macro (not to mention other improvements, like replacing coord, maskbits, etc.)
vram.asm
defines labels generic to the GBC, with no information specific to pokecrystal.These labels are offset by the
tile
string,+ LEN_2BPP_TILE *
. This allows tile offsets to be written as tile coords—for example,vTiles0 tile $73
is seven tiles "down" & three tiles "right" from the start of the first part of the tilemap.VRAM is also offset by the
bgcoord
macro.This rabbit hole potentially goes much deeper, since the same principles used to label VRAM could label offsets into (for example) WRAM's
TileMap
, which itself is referenced by thecoord
macro.However, in many cases, hardcoded [tile] coords are either a) single-use, or b) more intuitive as numbers than labels/constants defined elsewhere. As a result, the scope of this issue is hard to pin down.
The text was updated successfully, but these errors were encountered: