mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 03:22:08 +00:00
Add support for OAM Sections
Allows sections (and labels within) to be defined that correspond to the Game Boy’s Object Attributes Memory.
This commit is contained in:
@@ -513,7 +513,7 @@ void if_skip_to_endc( void )
|
||||
%token T_POP_POPO
|
||||
%token T_POP_PUSHO
|
||||
%token T_POP_OPT
|
||||
%token T_SECT_WRAM0 T_SECT_VRAM T_SECT_ROMX T_SECT_ROM0 T_SECT_HRAM T_SECT_WRAMX T_SECT_SRAM
|
||||
%token T_SECT_WRAM0 T_SECT_VRAM T_SECT_ROMX T_SECT_ROM0 T_SECT_HRAM T_SECT_WRAMX T_SECT_SRAM T_SECT_OAM
|
||||
|
||||
%token T_Z80_ADC T_Z80_ADD T_Z80_AND
|
||||
%token T_Z80_BIT
|
||||
@@ -1146,6 +1146,7 @@ sectiontype:
|
||||
| T_SECT_HRAM { $$=SECT_HRAM; }
|
||||
| T_SECT_WRAMX { $$=SECT_WRAMX; }
|
||||
| T_SECT_SRAM { $$=SECT_SRAM; }
|
||||
| T_SECT_OAM { $$=SECT_OAM; }
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -342,6 +342,7 @@ struct sLexInitString staticstrings[] = {
|
||||
{"hram", T_SECT_HRAM},
|
||||
{"wramx", T_SECT_WRAMX},
|
||||
{"sram", T_SECT_SRAM},
|
||||
{"oam", T_SECT_OAM},
|
||||
|
||||
{NAME_RB, T_POP_RB},
|
||||
{NAME_RW, T_POP_RW},
|
||||
|
||||
@@ -491,7 +491,7 @@ out_WriteObject(void)
|
||||
struct PatchSymbol *pSym;
|
||||
struct Section *pSect;
|
||||
|
||||
fwrite("RGB3", 1, 4, f);
|
||||
fwrite("RGB4", 1, 4, f);
|
||||
fputlong(countsymbols(), f);
|
||||
fputlong(countsections(), f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user