mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Logical spacing in data/sgb/sgb_palettes.asm
This commit is contained in:
parent
6137f5accb
commit
a77999f7f1
|
@ -1,15 +1,20 @@
|
||||||
|
TILE_WIDTH EQU 8 ; pixels
|
||||||
|
LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes
|
||||||
|
LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes
|
||||||
|
|
||||||
|
NUM_PAL_COLORS EQU 4
|
||||||
|
PAL_COLOR_SIZE EQU 2
|
||||||
|
PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE
|
||||||
|
|
||||||
SCREEN_WIDTH EQU 20
|
SCREEN_WIDTH EQU 20
|
||||||
SCREEN_HEIGHT EQU 18
|
SCREEN_HEIGHT EQU 18
|
||||||
|
SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
|
||||||
|
SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels
|
||||||
|
|
||||||
SCREEN_WIDTH_PIXELS EQU SCREEN_WIDTH * 8
|
BG_MAP_WIDTH EQU 32 ; tiles
|
||||||
SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * 8
|
BG_MAP_HEIGHT EQU 32 ; tiles
|
||||||
|
|
||||||
BYTES_PER_TILE EQU 16
|
SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE
|
||||||
|
|
||||||
BG_MAP_WIDTH EQU 32
|
|
||||||
BG_MAP_HEIGHT EQU 32
|
|
||||||
|
|
||||||
SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile)
|
|
||||||
|
|
||||||
; HP bar
|
; HP bar
|
||||||
HP_BAR_GREEN EQU 0
|
HP_BAR_GREEN EQU 0
|
||||||
|
|
|
@ -1,174 +1,50 @@
|
||||||
; palettes for overworlds, title screen, monsters
|
|
||||||
SuperPalettes:
|
SuperPalettes:
|
||||||
RGB 31,29,31 ; PAL_ROUTE
|
RGB 31,29,31, 21,28,11, 20,26,31, 03,02,02 ; PAL_ROUTE
|
||||||
RGB 21,28,11
|
RGB 31,29,31, 25,28,27, 20,26,31, 03,02,02 ; PAL_PALLET
|
||||||
RGB 20,26,31
|
RGB 31,29,31, 17,26,03, 20,26,31, 03,02,02 ; PAL_VIRIDIAN
|
||||||
RGB 3,2,2
|
RGB 31,29,31, 23,25,16, 20,26,31, 03,02,02 ; PAL_PEWTER
|
||||||
RGB 31,29,31 ; PAL_PALLET
|
RGB 31,29,31, 17,20,30, 20,26,31, 03,02,02 ; PAL_CERULEAN
|
||||||
RGB 25,28,27
|
RGB 31,29,31, 27,20,27, 20,26,31, 03,02,02 ; PAL_LAVENDER
|
||||||
RGB 20,26,31
|
RGB 31,29,31, 30,18,00, 20,26,31, 03,02,02 ; PAL_VERMILION
|
||||||
RGB 3,2,2
|
RGB 31,29,31, 16,30,22, 20,26,31, 03,02,02 ; PAL_CELADON
|
||||||
RGB 31,29,31 ; PAL_VIRIDIAN
|
RGB 31,29,31, 31,15,22, 20,26,31, 03,02,02 ; PAL_FUCHSIA
|
||||||
RGB 17,26,3
|
RGB 31,29,31, 26,10,06, 20,26,31, 03,02,02 ; PAL_CINNABAR
|
||||||
RGB 20,26,31
|
RGB 31,29,31, 22,14,24, 20,26,31, 03,02,02 ; PAL_INDIGO
|
||||||
RGB 3,2,2
|
RGB 31,29,31, 27,27,03, 20,26,31, 03,02,02 ; PAL_SAFFRON
|
||||||
RGB 31,29,31 ; PAL_PEWTER
|
RGB 31,29,31, 20,26,31, 17,23,10, 03,02,02 ; PAL_TOWNMAP
|
||||||
RGB 23,25,16
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_CERULEAN
|
|
||||||
RGB 17,20,30
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_LAVENDER
|
|
||||||
RGB 27,20,27
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_VERMILION
|
|
||||||
RGB 30,18,0
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_CELADON
|
|
||||||
RGB 16,30,22
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_FUCHSIA
|
|
||||||
RGB 31,15,22
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_CINNABAR
|
|
||||||
RGB 26,10,6
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_INDIGO
|
|
||||||
RGB 22,14,24
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_SAFFRON
|
|
||||||
RGB 27,27,3
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_TOWNMAP
|
|
||||||
RGB 20,26,31
|
|
||||||
RGB 17,23,10
|
|
||||||
RGB 3,2,2
|
|
||||||
IF DEF(_RED)
|
IF DEF(_RED)
|
||||||
RGB 31,29,31 ; PAL_LOGO1
|
RGB 31,29,31, 30,30,17, 17,23,10, 21,00,04 ; PAL_LOGO1
|
||||||
RGB 30,30,17
|
|
||||||
RGB 17,23,10
|
|
||||||
RGB 21,0,4
|
|
||||||
ENDC
|
ENDC
|
||||||
IF DEF(_BLUE)
|
IF DEF(_BLUE)
|
||||||
RGB 31,29,31 ; PAL_LOGO1
|
RGB 31,29,31, 30,30,17, 21,00,04, 14,19,29 ; PAL_LOGO1
|
||||||
RGB 30,30,17
|
|
||||||
RGB 21,0,4
|
|
||||||
RGB 14,19,29
|
|
||||||
ENDC
|
ENDC
|
||||||
RGB 31,29,31 ; PAL_LOGO2
|
RGB 31,29,31, 30,30,17, 18,18,24, 07,07,16 ; PAL_LOGO2
|
||||||
RGB 30,30,17
|
RGB 31,29,31, 24,20,30, 11,20,30, 03,02,02 ; PAL_0F
|
||||||
RGB 18,18,24
|
RGB 31,29,31, 30,22,17, 16,14,19, 03,02,02 ; PAL_MEWMON
|
||||||
RGB 7,7,16
|
RGB 31,29,31, 18,20,27, 11,15,23, 03,02,02 ; PAL_BLUEMON
|
||||||
RGB 31,29,31 ; PAL_0F
|
RGB 31,29,31, 31,20,10, 26,10,06, 03,02,02 ; PAL_REDMON
|
||||||
RGB 24,20,30
|
RGB 31,29,31, 21,25,29, 14,19,25, 03,02,02 ; PAL_CYANMON
|
||||||
RGB 11,20,30
|
RGB 31,29,31, 27,22,24, 21,15,23, 03,02,02 ; PAL_PURPLEMON
|
||||||
RGB 3,2,2
|
RGB 31,29,31, 28,20,15, 21,14,09, 03,02,02 ; PAL_BROWNMON
|
||||||
RGB 31,29,31 ; PAL_MEWMON
|
RGB 31,29,31, 20,26,16, 09,20,11, 03,02,02 ; PAL_GREENMON
|
||||||
RGB 30,22,17
|
RGB 31,29,31, 30,22,24, 28,15,21, 03,02,02 ; PAL_PINKMON
|
||||||
RGB 16,14,19
|
RGB 31,29,31, 31,28,14, 26,20,00, 03,02,02 ; PAL_YELLOWMON
|
||||||
RGB 3,2,2
|
RGB 31,29,31, 26,21,22, 15,15,18, 03,02,02 ; PAL_GREYMON
|
||||||
RGB 31,29,31 ; PAL_BLUEMON
|
RGB 31,29,31, 26,21,22, 27,20,06, 03,02,02 ; PAL_SLOTS1
|
||||||
RGB 18,20,27
|
|
||||||
RGB 11,15,23
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_REDMON
|
|
||||||
RGB 31,20,10
|
|
||||||
RGB 26,10,6
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_CYANMON
|
|
||||||
RGB 21,25,29
|
|
||||||
RGB 14,19,25
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_PURPLEMON
|
|
||||||
RGB 27,22,24
|
|
||||||
RGB 21,15,23
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_BROWNMON
|
|
||||||
RGB 28,20,15
|
|
||||||
RGB 21,14,9
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_GREENMON
|
|
||||||
RGB 20,26,16
|
|
||||||
RGB 9,20,11
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_PINKMON
|
|
||||||
RGB 30,22,24
|
|
||||||
RGB 28,15,21
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_YELLOWMON
|
|
||||||
RGB 31,28,14
|
|
||||||
RGB 26,20,0
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_GREYMON
|
|
||||||
RGB 26,21,22
|
|
||||||
RGB 15,15,18
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_SLOTS1
|
|
||||||
RGB 26,21,22
|
|
||||||
RGB 27,20,6
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_SLOTS2
|
|
||||||
RGB 31,31,17
|
|
||||||
IF DEF(_RED)
|
IF DEF(_RED)
|
||||||
RGB 25,17,21
|
RGB 31,29,31, 31,31,17, 25,17,21, 03,02,02 ; PAL_SLOTS2
|
||||||
|
RGB 31,29,31, 22,31,16, 25,17,21, 03,02,02 ; PAL_SLOTS3
|
||||||
|
RGB 31,29,31, 16,19,29, 25,17,21, 03,02,02 ; PAL_SLOTS4
|
||||||
ENDC
|
ENDC
|
||||||
IF DEF(_BLUE)
|
IF DEF(_BLUE)
|
||||||
RGB 16,19,29
|
RGB 31,29,31, 31,31,17, 16,19,29, 03,02,02 ; PAL_SLOTS2
|
||||||
|
RGB 31,29,31, 22,31,16, 16,19,29, 03,02,02 ; PAL_SLOTS3
|
||||||
|
RGB 31,29,31, 25,17,21, 16,19,29, 03,02,02 ; PAL_SLOTS4
|
||||||
ENDC
|
ENDC
|
||||||
RGB 3,2,2
|
RGB 31,29,31, 07,07,07, 02,03,03, 03,02,02 ; PAL_BLACK
|
||||||
RGB 31,29,31 ; PAL_SLOTS3
|
RGB 31,29,31, 30,26,15, 09,20,11, 03,02,02 ; PAL_GREENBAR
|
||||||
RGB 22,31,16
|
RGB 31,29,31, 30,26,15, 26,20,00, 03,02,02 ; PAL_YELLOWBAR
|
||||||
IF DEF(_RED)
|
RGB 31,29,31, 30,26,15, 26,10,06, 03,02,02 ; PAL_REDBAR
|
||||||
RGB 25,17,21
|
RGB 31,29,31, 30,22,17, 11,15,23, 03,02,02 ; PAL_BADGE
|
||||||
ENDC
|
RGB 31,29,31, 21,14,09, 18,24,22, 03,02,02 ; PAL_CAVE
|
||||||
IF DEF(_BLUE)
|
RGB 31,29,31, 31,28,14, 24,20,10, 03,02,02 ; PAL_GAMEFREAK
|
||||||
RGB 16,19,29
|
|
||||||
ENDC
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_SLOTS4
|
|
||||||
IF DEF(_RED)
|
|
||||||
RGB 16,19,29
|
|
||||||
RGB 25,17,21
|
|
||||||
ENDC
|
|
||||||
IF DEF(_BLUE)
|
|
||||||
RGB 25,17,21
|
|
||||||
RGB 16,19,29
|
|
||||||
ENDC
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_BLACK
|
|
||||||
RGB 7,7,7
|
|
||||||
RGB 2,3,3
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_GREENBAR
|
|
||||||
RGB 30,26,15
|
|
||||||
RGB 9,20,11
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_YELLOWBAR
|
|
||||||
RGB 30,26,15
|
|
||||||
RGB 26,20,0
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_REDBAR
|
|
||||||
RGB 30,26,15
|
|
||||||
RGB 26,10,6
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_BADGE
|
|
||||||
RGB 30,22,17
|
|
||||||
RGB 11,15,23
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_CAVE
|
|
||||||
RGB 21,14,9
|
|
||||||
RGB 18,24,22
|
|
||||||
RGB 3,2,2
|
|
||||||
RGB 31,29,31 ; PAL_GAMEFREAK
|
|
||||||
RGB 31,28,14
|
|
||||||
RGB 24,20,10
|
|
||||||
RGB 3,2,2
|
|
||||||
|
|
|
@ -1838,10 +1838,10 @@ AnimationWavyScreen:
|
||||||
call Delay3
|
call Delay3
|
||||||
xor a
|
xor a
|
||||||
ld [hAutoBGTransferEnabled], a
|
ld [hAutoBGTransferEnabled], a
|
||||||
ld a, SCREEN_HEIGHT_PIXELS
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
ld d, $80 ; terminator
|
ld d, $80 ; terminator
|
||||||
ld e, SCREEN_HEIGHT_PIXELS - 1
|
ld e, SCREEN_HEIGHT_PX - 1
|
||||||
ld c, $ff
|
ld c, $ff
|
||||||
ld hl, WavyScreenLineOffsets
|
ld hl, WavyScreenLineOffsets
|
||||||
.loop
|
.loop
|
||||||
|
@ -2538,7 +2538,7 @@ AnimationShakeEnemyHUD:
|
||||||
|
|
||||||
; Now that the regular BG is showing the same thing the window was, move the
|
; Now that the regular BG is showing the same thing the window was, move the
|
||||||
; window off the screen so that we can modify its contents below.
|
; window off the screen so that we can modify its contents below.
|
||||||
ld a, SCREEN_HEIGHT_PIXELS
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
|
|
||||||
; Copy wTileMap to VRAM such that the row below the enemy HUD (in wTileMap) is
|
; Copy wTileMap to VRAM such that the row below the enemy HUD (in wTileMap) is
|
||||||
|
@ -2575,7 +2575,7 @@ AnimationShakeEnemyHUD:
|
||||||
; Restore the original graphics.
|
; Restore the original graphics.
|
||||||
call AnimationShowMonPic
|
call AnimationShowMonPic
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
ld a, SCREEN_HEIGHT_PIXELS
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
ld hl, vBGMap1
|
ld hl, vBGMap1
|
||||||
call BattleAnimCopyTileMapToVRAM
|
call BattleAnimCopyTileMapToVRAM
|
||||||
|
|
|
@ -97,7 +97,7 @@ PlayIntroScene:
|
||||||
; hip
|
; hip
|
||||||
ld a, SFX_INTRO_HIP
|
ld a, SFX_INTRO_HIP
|
||||||
call PlaySound
|
call PlaySound
|
||||||
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE
|
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / LEN_2BPP_TILE
|
||||||
ld [wIntroNidorinoBaseTile], a
|
ld [wIntroNidorinoBaseTile], a
|
||||||
ld de, IntroNidorinoAnimation3
|
ld de, IntroNidorinoAnimation3
|
||||||
call AnimateIntroNidorino
|
call AnimateIntroNidorino
|
||||||
|
@ -129,7 +129,7 @@ PlayIntroScene:
|
||||||
call CheckForUserInterruption
|
call CheckForUserInterruption
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE
|
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / LEN_2BPP_TILE
|
||||||
ld [wIntroNidorinoBaseTile], a
|
ld [wIntroNidorinoBaseTile], a
|
||||||
ld de, IntroNidorinoAnimation6
|
ld de, IntroNidorinoAnimation6
|
||||||
call AnimateIntroNidorino
|
call AnimateIntroNidorino
|
||||||
|
@ -140,7 +140,7 @@ PlayIntroScene:
|
||||||
; lunge
|
; lunge
|
||||||
ld a, SFX_INTRO_LUNGE
|
ld a, SFX_INTRO_LUNGE
|
||||||
call PlaySound
|
call PlaySound
|
||||||
ld a, (FightIntroFrontMon3 - FightIntroFrontMon) / BYTES_PER_TILE
|
ld a, (FightIntroFrontMon3 - FightIntroFrontMon) / LEN_2BPP_TILE
|
||||||
ld [wIntroNidorinoBaseTile], a
|
ld [wIntroNidorinoBaseTile], a
|
||||||
ld de, IntroNidorinoAnimation7
|
ld de, IntroNidorinoAnimation7
|
||||||
jp AnimateIntroNidorino
|
jp AnimateIntroNidorino
|
||||||
|
|
|
@ -189,7 +189,7 @@ ENDC
|
||||||
|
|
||||||
; scroll game version in from the right
|
; scroll game version in from the right
|
||||||
call PrintGameVersionOnTitleScreen
|
call PrintGameVersionOnTitleScreen
|
||||||
ld a, SCREEN_HEIGHT_PIXELS
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
ld d, 144
|
ld d, 144
|
||||||
.scrollTitleScreenGameVersionLoop
|
.scrollTitleScreenGameVersionLoop
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
ClearVariablesOnEnterMap::
|
ClearVariablesOnEnterMap::
|
||||||
ld a, SCREEN_HEIGHT_PIXELS
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
ld [rWY], a
|
ld [rWY], a
|
||||||
xor a
|
xor a
|
||||||
|
|
|
@ -37,7 +37,7 @@ UsedCut:
|
||||||
call GBPalWhiteOutWithDelay3
|
call GBPalWhiteOutWithDelay3
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call RestoreScreenTilesAndReloadTilePatterns
|
call RestoreScreenTilesAndReloadTilePatterns
|
||||||
ld a, SCREEN_HEIGHT_PIXELS
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
call Delay3
|
call Delay3
|
||||||
call LoadGBPal
|
call LoadGBPal
|
||||||
|
|
|
@ -3,6 +3,7 @@ INCLUDE "macros/predef.asm"
|
||||||
INCLUDE "macros/farcall.asm"
|
INCLUDE "macros/farcall.asm"
|
||||||
INCLUDE "macros/data.asm"
|
INCLUDE "macros/data.asm"
|
||||||
INCLUDE "macros/code.asm"
|
INCLUDE "macros/code.asm"
|
||||||
|
INCLUDE "macros/gfx.asm"
|
||||||
INCLUDE "macros/coords.asm"
|
INCLUDE "macros/coords.asm"
|
||||||
|
|
||||||
INCLUDE "macros/scripts/audio.asm"
|
INCLUDE "macros/scripts/audio.asm"
|
||||||
|
|
|
@ -16,10 +16,6 @@ ENDM
|
||||||
coins equs "bcd2"
|
coins equs "bcd2"
|
||||||
money equs "bcd3"
|
money equs "bcd3"
|
||||||
|
|
||||||
RGB: MACRO
|
|
||||||
dw (\3 << 10 | \2 << 5 | \1)
|
|
||||||
ENDM
|
|
||||||
|
|
||||||
tmlearn: MACRO
|
tmlearn: MACRO
|
||||||
x = 0
|
x = 0
|
||||||
REPT _NARG
|
REPT _NARG
|
||||||
|
|
17
macros/gfx.asm
Normal file
17
macros/gfx.asm
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
RGB: MACRO
|
||||||
|
rept _NARG / 3
|
||||||
|
dw palred (\1) + palgreen (\2) + palblue (\3)
|
||||||
|
shift 3
|
||||||
|
endr
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
palred EQUS "(1 << 0) *"
|
||||||
|
palgreen EQUS "(1 << 5) *"
|
||||||
|
palblue EQUS "(1 << 10) *"
|
||||||
|
|
||||||
|
palettes EQUS "* PALETTE_SIZE"
|
||||||
|
palette EQUS "+ PALETTE_SIZE *"
|
||||||
|
color EQUS "+ PAL_COLOR_SIZE *"
|
||||||
|
|
||||||
|
tiles EQUS "* LEN_2BPP_TILE"
|
||||||
|
tile EQUS "+ LEN_2BPP_TILE *"
|
Loading…
Reference in a new issue