diff options
| -rw-r--r-- | constants/palette_constants.asm | 4 | ||||
| -rw-r--r-- | engine/gfx/palettes.asm | 16 | ||||
| -rw-r--r-- | engine/minigame/surfing_pikachu.asm | 6 | ||||
| -rw-r--r-- | engine/movie/intro_yellow.asm | 6 | ||||
| -rw-r--r-- | engine/printer/printer.asm | 4 | ||||
| -rw-r--r-- | macros/gfx.asm | 6 | ||||
| -rw-r--r-- | ram/wram.asm | 6 |
7 files changed, 22 insertions, 26 deletions
diff --git a/constants/palette_constants.asm b/constants/palette_constants.asm index 58b2201e..1b549b34 100644 --- a/constants/palette_constants.asm +++ b/constants/palette_constants.asm @@ -4,10 +4,6 @@ const SHADE_LIGHT ; %01 const SHADE_DARK ; %10 const SHADE_BLACK ; %11 -DEF NUM_PAL_COLORS EQU const_value - -DEF PAL_COLOR_SIZE EQU 2 -DEF PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE DEF NUM_ACTIVE_PALS EQU 4 diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index 16869869..e2924c91 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -817,7 +817,7 @@ DMGPalToCGBPal:: ldh a, [rOBP1] ld [wLastOBP1], a .convert - FOR color_index, NUM_PAL_COLORS + FOR color_index, PAL_COLORS ld b, a and %11 call .GetColorAddress @@ -826,7 +826,7 @@ DMGPalToCGBPal:: ld a, [hl] ld [wCGBPal + color_index * 2 + 1], a - IF color_index < NUM_PAL_COLORS - 1 + IF color_index < PAL_COLORS - 1 ld a, b rrca rrca @@ -855,12 +855,12 @@ TransferCurBGPData:: ldh a, [rLCDC] and LCDC_ON jr nz, .lcdEnabled - REPT NUM_PAL_COLORS + REPT PAL_COLORS call TransferPalColorLCDDisabled ENDR jr .done .lcdEnabled - REPT NUM_PAL_COLORS + REPT PAL_COLORS call TransferPalColorLCDEnabled ENDR .done @@ -879,7 +879,7 @@ BufferBGPPal:: ld de, wBGPPalsBuffer add hl, de ld de, wCGBPal - ld c, PALETTE_SIZE + ld c, PAL_SIZE .loop ld a, [de] ld [hli], a @@ -910,7 +910,7 @@ TransferBGPPals:: ldh [rBGPI], a ld de, rBGPD ld hl, wBGPPalsBuffer - ld c, 4 * PALETTE_SIZE + ld c, 4 * PAL_SIZE .loop ld a, [hli] ld [de], a @@ -931,12 +931,12 @@ TransferCurOBPData: ldh a, [rLCDC] and LCDC_ON jr nz, .lcdEnabled - REPT NUM_PAL_COLORS + REPT PAL_COLORS call TransferPalColorLCDDisabled ENDR jr .done .lcdEnabled - REPT NUM_PAL_COLORS + REPT PAL_COLORS call TransferPalColorLCDEnabled ENDR .done diff --git a/engine/minigame/surfing_pikachu.asm b/engine/minigame/surfing_pikachu.asm index 79e5bc3e..65e4f5e5 100644 --- a/engine/minigame/surfing_pikachu.asm +++ b/engine/minigame/surfing_pikachu.asm @@ -1453,7 +1453,7 @@ SurfingMinigame_DrawHP: SurfingMinigame_DrawResultsScreen: ld hl, wTileMap - ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld bc, SCREEN_AREA xor a call FillMemory ld hl, .BeachTilemap @@ -2396,7 +2396,7 @@ SurfingPikachuMinigameIntro: DrawSurfingPikachuMinigameIntroBackground: ld hl, wTileMap - ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld bc, SCREEN_AREA ld a, $ff call FillMemory ld hl, Tilemap_f90bc @@ -2536,7 +2536,7 @@ SurfingPikachuMinigame_NormalPals: SurfingPikachu_ClearTileMap: ld hl, wTileMap - ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld bc, SCREEN_AREA xor a call FillMemory ret diff --git a/engine/movie/intro_yellow.asm b/engine/movie/intro_yellow.asm index 47203580..37eee6f8 100644 --- a/engine/movie/intro_yellow.asm +++ b/engine/movie/intro_yellow.asm @@ -43,7 +43,7 @@ PlayIntroScene: ldh [hWY], a call ClearObjectAnimationBuffers ld hl, wTileMap - ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld bc, SCREEN_AREA xor a call Bank3E_FillMemory call YellowIntro_BlankOAMBuffer @@ -823,7 +823,7 @@ InitYellowIntroGFXAndMusic: ldh [hAutoBGTransferDest + 1], a call YellowIntro_BlankTileMap ld hl, wTileMap - ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld bc, SCREEN_AREA ld a, $1 call Bank3E_FillMemory hlcoord 0, 4 @@ -881,7 +881,7 @@ LoadYellowIntroObjectAnimationDataPointers: YellowIntro_BlankTileMap: ld hl, wTileMap - ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld bc, SCREEN_AREA ld a, $7f call Bank3E_FillMemory ret diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index f0d2cb34..18161e6a 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -466,14 +466,14 @@ Printer_CheckPressingB: Printer_CopyTileMapToPrinterTileBuffer: hlcoord 0, 0 decoord 0, 0, wPrinterTileBuffer - ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld bc, SCREEN_AREA call CopyData ret Printer_CopyTileMapFromPrinterTileBuffer: hlcoord 0, 0, wPrinterTileBuffer decoord 0, 0 - ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld bc, SCREEN_AREA call CopyData ret diff --git a/macros/gfx.asm b/macros/gfx.asm index 7b8fcf5d..d50d64cf 100644 --- a/macros/gfx.asm +++ b/macros/gfx.asm @@ -9,9 +9,9 @@ DEF palred EQUS "(1 << B_COLOR_RED) *" DEF palgreen EQUS "(1 << B_COLOR_GREEN) *" DEF palblue EQUS "(1 << B_COLOR_BLUE) *" -DEF palettes EQUS "* PALETTE_SIZE" -DEF palette EQUS "+ PALETTE_SIZE *" -DEF color EQUS "+ PAL_COLOR_SIZE *" +DEF palettes EQUS "* PAL_SIZE" +DEF palette EQUS "+ PAL_SIZE *" +DEF color EQUS "+ COLOR_SIZE *" DEF tiles EQUS "* TILE_SIZE" DEF tile EQUS "+ TILE_SIZE *" diff --git a/ram/wram.asm b/ram/wram.asm index 7b03c846..3778c137 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -316,7 +316,7 @@ wHandshakeFrameDelay:: db wPrinterSerialFrameDelay:: db wPrinterSendByteOffset:: dw wPrinterDataSize:: dw -wPrinterTileBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH +wPrinterTileBuffer:: ds SCREEN_AREA wPrinterStatusIndicator:: dw wcae2:: db wPrinterSettingsTempCopy:: db @@ -2503,12 +2503,12 @@ wBoxDataEnd:: SECTION "CGB Palette Data", WRAM0 wCGBBasePalPointers:: ds NUM_ACTIVE_PALS * 2 -wCGBPal:: ds PALETTE_SIZE +wCGBPal:: ds PAL_SIZE wLastBGP:: db wLastOBP0:: db wLastOBP1:: db wdef4:: db -wBGPPalsBuffer:: ds NUM_ACTIVE_PALS * PALETTE_SIZE +wBGPPalsBuffer:: ds NUM_ACTIVE_PALS * PAL_SIZE SECTION "Stack", WRAM0 |
