mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Level selection menu: placeholder grahpics and cgb layout (#12)
This commit is contained in:
parent
d7ce3b27ab
commit
fe4b54cece
@ -181,7 +181,7 @@ pushc
|
||||
charmap "\r", $0d
|
||||
popc
|
||||
|
||||
; Special tiles
|
||||
; Significant tile equivalences
|
||||
DEF OVERWORLD_FRAME_FIRST_TILE EQU "┌"
|
||||
DEF BOARD_MENU_BG_FIRST_TILE EQU "A"
|
||||
DEF BOARD_MENU_OAM_FIRST_TILE EQU BOARD_MENU_BG_FIRST_TILE + 18 * 3
|
||||
|
@ -13,7 +13,7 @@
|
||||
const CGB_PARTY_MENU
|
||||
const CGB_EVOLUTION
|
||||
const CGB_GS_TITLE_SCREEN
|
||||
const CGB_0D
|
||||
const CGB_LEVEL_SELECTION_MENU
|
||||
const CGB_MOVE_LIST
|
||||
const CGB_BETA_PIKACHU_MINIGAME
|
||||
const CGB_POKEDEX_SEARCH_OPTION
|
||||
|
@ -38,7 +38,7 @@ CGBLayoutJumptable:
|
||||
dw _CGB_PartyMenu
|
||||
dw _CGB_Evolution
|
||||
dw _CGB_GSTitleScreen
|
||||
dw _CGB_Unused0D
|
||||
dw _CGB_LevelSelectionMenu
|
||||
dw _CGB_MoveList
|
||||
dw _CGB_BetaPikachuMinigame
|
||||
dw _CGB_PokedexSearchOption
|
||||
@ -570,11 +570,61 @@ _CGB_GSTitleScreen:
|
||||
ldh [hCGBPalUpdate], a
|
||||
ret
|
||||
|
||||
_CGB_Unused0D:
|
||||
ld hl, FourPals_Diploma
|
||||
call CopyFourPalettes
|
||||
call WipeAttrmap
|
||||
_CGB_LevelSelectionMenu:
|
||||
; load daytime-based player sprite pals (male and female)
|
||||
ld a, [wTimeOfDay]
|
||||
maskbits NUM_DAYTIMES
|
||||
ld bc, 8 palettes
|
||||
ld hl, MapObjectPals
|
||||
call AddNTimes
|
||||
ld de, wOBPals1
|
||||
ld bc, 2 palettes
|
||||
ld a, BANK(wOBPals1)
|
||||
call FarCopyWRAM
|
||||
; load daytime and gender-based background pals
|
||||
ld a, [wPlayerGender]
|
||||
bit PLAYERGENDER_FEMALE_F, a
|
||||
jr z, .male
|
||||
ld hl, LevelSelectionMenuFemalePals
|
||||
jr .got_pals
|
||||
.male
|
||||
ld hl, LevelSelectionMenuMalePals
|
||||
.got_pals
|
||||
ld a, [wTimeOfDay]
|
||||
maskbits NUM_DAYTIMES
|
||||
ld bc, 6 palettes
|
||||
call AddNTimes
|
||||
ld de, wBGPals1
|
||||
ld bc, 6 palettes
|
||||
ld a, BANK(wBGPals1)
|
||||
call FarCopyWRAM
|
||||
; assign attrs based on tile ids according to LevelSelectionMenuAttrmap
|
||||
hlcoord 0, 0
|
||||
decoord 0, 0, wAttrmap
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
.loop
|
||||
push hl
|
||||
ld a, [hl] ; tile id
|
||||
ld hl, LevelSelectionMenuAttrmap
|
||||
add l
|
||||
ld l, a
|
||||
ld a, h
|
||||
adc 0
|
||||
ld h, a
|
||||
ld a, [hl] ; attr value
|
||||
ld [de], a
|
||||
pop hl
|
||||
inc hl
|
||||
inc de
|
||||
dec bc
|
||||
ld a, b
|
||||
or c
|
||||
jr nz, .loop
|
||||
; apply pals and attrmap
|
||||
call ApplyAttrmap
|
||||
call ApplyPals
|
||||
ld a, TRUE
|
||||
ldh [hCGBPalUpdate], a
|
||||
ret
|
||||
|
||||
_CGB_UnownPuzzle:
|
||||
|
@ -811,3 +811,16 @@ INCLUDE "gfx/beta_poker/beta_poker.pal"
|
||||
|
||||
SlotMachinePals:
|
||||
INCLUDE "gfx/slots/slots.pal"
|
||||
|
||||
LevelSelectionMenuMalePals:
|
||||
table_width PAL_COLOR_SIZE * 4 * 6, LevelSelectionMenuMalePals
|
||||
INCLUDE "gfx/level_selection_menu/background_male.pal"
|
||||
assert_table_length NUM_DAYTIMES
|
||||
|
||||
LevelSelectionMenuFemalePals:
|
||||
table_width PAL_COLOR_SIZE * 4 * 6, LevelSelectionMenuFemalePals
|
||||
INCLUDE "gfx/level_selection_menu/background_female.pal"
|
||||
assert_table_length NUM_DAYTIMES
|
||||
|
||||
LevelSelectionMenuAttrmap:
|
||||
INCLUDE "gfx/level_selection_menu/attrmap.asm"
|
||||
|
@ -376,8 +376,6 @@ FinishContinueFunction:
|
||||
ld hl, wGameTimerPaused
|
||||
set GAME_TIMER_PAUSED_F, [hl]
|
||||
res GAME_TIMER_MOBILE_F, [hl]
|
||||
ld hl, wEnteredMapFromContinue
|
||||
set 1, [hl]
|
||||
farcall OverworldLoop
|
||||
ld a, [wSpawnAfterChampion]
|
||||
cp SPAWN_LEVEL_1
|
||||
|
14
engine/menus/level_selection_menu.asm
Executable file
14
engine/menus/level_selection_menu.asm
Executable file
@ -0,0 +1,14 @@
|
||||
LevelSelectionMenuGFX:
|
||||
INCBIN "gfx/level_selection_menu/background.2bpp.lz"
|
||||
|
||||
LevelSelectionMenuPage1Tilemap:
|
||||
INCBIN "gfx/level_selection_menu/page_1.tilemap"
|
||||
|
||||
LevelSelectionMenuPage2Tilemap:
|
||||
INCBIN "gfx/level_selection_menu/page_2.tilemap"
|
||||
|
||||
LevelSelectionMenuPage3Tilemap:
|
||||
INCBIN "gfx/level_selection_menu/page_3.tilemap"
|
||||
|
||||
LevelSelectionMenuPage4Tilemap:
|
||||
INCBIN "gfx/level_selection_menu/page_4.tilemap"
|
22
gfx/level_selection_menu/attrmap.asm
Executable file
22
gfx/level_selection_menu/attrmap.asm
Executable file
@ -0,0 +1,22 @@
|
||||
DEF PAL_LEVELSELECTIONMENU_BORDER EQU 0 | 1 << OAM_PRIORITY
|
||||
const_def 1
|
||||
const PAL_LEVELSELECTIONMENU_EARTH ; 1
|
||||
const PAL_LEVELSELECTIONMENU_MOUNTAIN ; 2
|
||||
const PAL_LEVELSELECTIONMENU_CITY ; 3
|
||||
const PAL_LEVELSELECTIONMENU_POI ; 4
|
||||
const PAL_LEVELSELECTIONMENU_POI_MTN ; 5
|
||||
|
||||
MACRO levelselectionmenupals
|
||||
rept _NARG
|
||||
db PAL_LEVELSELECTIONMENU_\1
|
||||
shift
|
||||
endr
|
||||
ENDM
|
||||
|
||||
; gfx/level_selection_menu/background.png
|
||||
levelselectionmenupals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
|
||||
levelselectionmenupals EARTH, EARTH, CITY, EARTH, POI, POI_MTN, POI, POI_MTN
|
||||
levelselectionmenupals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
|
||||
levelselectionmenupals EARTH, EARTH, EARTH, EARTH, EARTH, BORDER, BORDER, BORDER
|
||||
levelselectionmenupals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
|
||||
levelselectionmenupals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
|
BIN
gfx/level_selection_menu/background.png
Executable file
BIN
gfx/level_selection_menu/background.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 885 B |
131
gfx/level_selection_menu/background_female.pal
Executable file
131
gfx/level_selection_menu/background_female.pal
Executable file
@ -0,0 +1,131 @@
|
||||
; morn
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (girl)
|
||||
RGB 28, 31, 20
|
||||
RGB 10, 18, 31
|
||||
RGB 13, 06, 31
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
||||
|
||||
; day (original)
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (girl)
|
||||
RGB 28, 31, 20
|
||||
RGB 10, 18, 31
|
||||
RGB 13, 06, 31
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
||||
|
||||
; nite
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (girl)
|
||||
RGB 28, 31, 20
|
||||
RGB 10, 18, 31
|
||||
RGB 13, 06, 31
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
||||
|
||||
; eve
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (girl)
|
||||
RGB 28, 31, 20
|
||||
RGB 10, 18, 31
|
||||
RGB 13, 06, 31
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
131
gfx/level_selection_menu/background_male.pal
Executable file
131
gfx/level_selection_menu/background_male.pal
Executable file
@ -0,0 +1,131 @@
|
||||
; morn
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (boy)
|
||||
RGB 28, 31, 20
|
||||
RGB 31, 15, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
||||
|
||||
; day (original)
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (boy)
|
||||
RGB 28, 31, 20
|
||||
RGB 31, 15, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
||||
|
||||
; nite
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (boy)
|
||||
RGB 28, 31, 20
|
||||
RGB 31, 15, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
||||
|
||||
; eve
|
||||
|
||||
; border
|
||||
RGB 28, 31, 20
|
||||
RGB 21, 21, 21
|
||||
RGB 13, 13, 13
|
||||
RGB 00, 00, 00
|
||||
; earth
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 00, 00, 00
|
||||
; mountain
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; city (boy)
|
||||
RGB 28, 31, 20
|
||||
RGB 31, 15, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 00, 00, 00
|
||||
; point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 00, 00, 31
|
||||
RGB 31, 00, 00
|
||||
; mountain point of interest
|
||||
RGB 28, 31, 20
|
||||
RGB 00, 31, 00
|
||||
RGB 15, 07, 00
|
||||
RGB 31, 00, 00
|
BIN
gfx/level_selection_menu/page_1.tilemap
Executable file
BIN
gfx/level_selection_menu/page_1.tilemap
Executable file
Binary file not shown.
BIN
gfx/level_selection_menu/page_2.tilemap
Executable file
BIN
gfx/level_selection_menu/page_2.tilemap
Executable file
Binary file not shown.
BIN
gfx/level_selection_menu/page_3.tilemap
Executable file
BIN
gfx/level_selection_menu/page_3.tilemap
Executable file
Binary file not shown.
BIN
gfx/level_selection_menu/page_4.tilemap
Executable file
BIN
gfx/level_selection_menu/page_4.tilemap
Executable file
Binary file not shown.
@ -79,6 +79,8 @@ ROMX $14
|
||||
"Unused Egg Pic"
|
||||
ROMX $15
|
||||
"Map Scripts 1"
|
||||
ROMX $1d
|
||||
"Level Selection Menu"
|
||||
ROMX $1e
|
||||
"Board 1"
|
||||
ROMX $20
|
||||
|
6
main.asm
6
main.asm
@ -232,6 +232,12 @@ INCLUDE "data/pokemon/base_stats.asm"
|
||||
INCLUDE "data/pokemon/names.asm"
|
||||
INCLUDE "data/pokemon/unused_pic_banks.asm"
|
||||
|
||||
|
||||
SECTION "Level Selection Menu", ROMX
|
||||
|
||||
INCLUDE "engine/menus/level_selection_menu.asm"
|
||||
|
||||
|
||||
SECTION "Board 1", ROMX
|
||||
|
||||
INCLUDE "engine/board/menu.asm"
|
||||
|
@ -2243,6 +2243,7 @@ wPlayerGender::
|
||||
db
|
||||
|
||||
wSavedAtLeastOnce:: db
|
||||
wSaveFileInOverworld:: db
|
||||
wSpawnAfterChampion:: db
|
||||
|
||||
; init time set at newgame
|
||||
@ -2286,8 +2287,6 @@ wObjectMasks:: ds NUM_OBJECTS
|
||||
|
||||
wVariableSprites:: ds $100 - SPRITE_VARS
|
||||
|
||||
wEnteredMapFromContinue:: db
|
||||
|
||||
wTimeOfDayPal:: db
|
||||
wTimeOfDayPalFlags:: db
|
||||
wTimeOfDayPalset:: db
|
||||
|
Loading…
Reference in New Issue
Block a user