mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
parent
222b46896c
commit
fc2e757c57
@ -1,6 +1,10 @@
|
|||||||
; Landmarks indexes (see data/maps/landmarks.asm)
|
; Landmarks indexes (see data/maps/landmarks.asm)
|
||||||
const_def
|
const_def
|
||||||
const LANDMARK_LEVEL_1 ; 00
|
const LANDMARK_LEVEL_1 ; 00
|
||||||
|
const LANDMARK_LEVEL_2 ; 01
|
||||||
|
const LANDMARK_LEVEL_3 ; 02
|
||||||
|
const LANDMARK_LEVEL_4 ; 03
|
||||||
|
const LANDMARK_LEVEL_5 ; 04
|
||||||
DEF NUM_LANDMARKS EQU const_value
|
DEF NUM_LANDMARKS EQU const_value
|
||||||
|
|
||||||
; used in CaughtData
|
; used in CaughtData
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
; TILE_WIDTH represents the top/left border tile, $8/$10 represent the OAM screen position offsets, and 10 are custom offsets
|
; TILE_WIDTH represents the top/left border tile, $8/$10 represent the OAM screen position offsets, and 4 are custom offsets
|
||||||
DEF LEVELSELECTIONMENU_LANDMARK_OFFSET_X EQU TILE_WIDTH + $8 + 10
|
DEF LEVELSELECTIONMENU_LANDMARK_OFFSET_X EQU TILE_WIDTH + $8 + 4
|
||||||
DEF LEVELSELECTIONMENU_LANDMARK_OFFSET_Y EQU TILE_WIDTH + $10 + 10
|
DEF LEVELSELECTIONMENU_LANDMARK_OFFSET_Y EQU TILE_WIDTH + $10 + 4
|
||||||
|
|
||||||
MACRO level_selection_menu_landmark
|
MACRO level_selection_menu_landmark
|
||||||
; page number, xcoord (in tiles), ycoord (in tiles), ptr to name, spawn point (SPAWN_*)
|
; page number, xcoord (in tiles), ycoord (in tiles), ptr to name, spawn point (SPAWN_*)
|
||||||
@ -13,12 +13,18 @@ ENDM
|
|||||||
|
|
||||||
LevelSelectionMenu_Landmarks:
|
LevelSelectionMenu_Landmarks:
|
||||||
.landmark1
|
.landmark1
|
||||||
level_selection_menu_landmark 0, 16, 11, DefaultLandmarkName, SPAWN_LEVEL_1
|
level_selection_menu_landmark 0, 16, 11, .Level1LandmarkName, SPAWN_LEVEL_1
|
||||||
.landmark2
|
.landmark2
|
||||||
level_selection_menu_landmark 0, 11, 9, DefaultLandmarkName, SPAWN_LEVEL_1
|
level_selection_menu_landmark 0, 11, 9, .Level2LandmarkName, SPAWN_LEVEL_1
|
||||||
level_selection_menu_landmark 0, 9, 11, DefaultLandmarkName, SPAWN_LEVEL_1
|
level_selection_menu_landmark 0, 9, 11, .Level3LandmarkName, SPAWN_LEVEL_1
|
||||||
level_selection_menu_landmark 1, 16, 11, DefaultLandmarkName, SPAWN_LEVEL_1
|
level_selection_menu_landmark 1, 16, 11, .Level4LandmarkName, SPAWN_LEVEL_1
|
||||||
level_selection_menu_landmark 2, 9, 5, DefaultLandmarkName, SPAWN_LEVEL_1
|
level_selection_menu_landmark 2, 9, 5, .Level5LandmarkName, SPAWN_LEVEL_1
|
||||||
|
|
||||||
|
.Level1LandmarkName: db "LEVEL 1@"
|
||||||
|
.Level2LandmarkName: db "LEVEL 2@"
|
||||||
|
.Level3LandmarkName: db "LEVEL 3@"
|
||||||
|
.Level4LandmarkName: db "LEVEL 4@"
|
||||||
|
.Level5LandmarkName: db "LEVEL 5@"
|
||||||
|
|
||||||
LevelSelectionMenu_PageGrid:
|
LevelSelectionMenu_PageGrid:
|
||||||
db -1, -1, -1, -1
|
db -1, -1, -1, -1
|
||||||
@ -27,5 +33,3 @@ LevelSelectionMenu_PageGrid:
|
|||||||
db -1, -1, -1, -1
|
db -1, -1, -1, -1
|
||||||
|
|
||||||
DEF LEVELSELECTIONMENU_PAGE_GRID_WIDTH EQU 4
|
DEF LEVELSELECTIONMENU_PAGE_GRID_WIDTH EQU 4
|
||||||
|
|
||||||
DefaultLandmarkName: db "LANDMARK NAME@"
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
MACRO landmark
|
|
||||||
; x, y, name
|
|
||||||
db \1 + 8, \2 + 16
|
|
||||||
dw \3
|
|
||||||
ENDM
|
|
||||||
|
|
||||||
Landmarks:
|
|
||||||
; entries correspond to constants/landmark_constants.asm
|
|
||||||
table_width 4, Landmarks
|
|
||||||
landmark 140, 100, Level1LandmarkName
|
|
||||||
assert_table_length NUM_LANDMARKS
|
|
||||||
|
|
||||||
Level1LandmarkName: db "LEVEL 1@"
|
|
@ -218,7 +218,7 @@ GetCaughtLocation:
|
|||||||
cp LANDMARK_GIFT
|
cp LANDMARK_GIFT
|
||||||
jr z, .fail
|
jr z, .fail
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wSeerCaughtLocation
|
ld de, wSeerCaughtLocation
|
||||||
ld bc, 17
|
ld bc, 17
|
||||||
|
@ -86,7 +86,7 @@ LevelSelectionMenu_GetLandmarkPage:
|
|||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LevelSelectionMenu_GetLandmarkCoords:
|
LevelSelectionMenu_GetLandmarkCoords::
|
||||||
; Return coordinates (d, e) of landmark e.
|
; Return coordinates (d, e) of landmark e.
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
@ -101,6 +101,35 @@ LevelSelectionMenu_GetLandmarkCoords:
|
|||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
LevelSelectionMenu_GetLandmarkName::
|
||||||
|
; Copy the name of landmark e to wStringBuffer1.
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
push bc
|
||||||
|
|
||||||
|
ld hl, LevelSelectionMenu_Landmarks + $3
|
||||||
|
ld bc, LevelSelectionMenu_Landmarks.landmark2 - LevelSelectionMenu_Landmarks.landmark1
|
||||||
|
ld a, e
|
||||||
|
call AddNTimes
|
||||||
|
ld a, [hli]
|
||||||
|
ld h, [hl]
|
||||||
|
ld l, a
|
||||||
|
|
||||||
|
ld de, wStringBuffer1
|
||||||
|
ld c, 18
|
||||||
|
.copy
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
inc de
|
||||||
|
dec c
|
||||||
|
jr nz, .copy
|
||||||
|
|
||||||
|
pop bc
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
INCLUDE "data/level_selection_menu.asm"
|
INCLUDE "data/level_selection_menu.asm"
|
||||||
|
|
||||||
LevelSelectionMenuGFX:
|
LevelSelectionMenuGFX:
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
GetLandmarkCoords:
|
|
||||||
; Return coordinates (d, e) of landmark e.
|
|
||||||
push hl
|
|
||||||
ld l, e
|
|
||||||
ld h, 0
|
|
||||||
add hl, hl
|
|
||||||
add hl, hl
|
|
||||||
ld de, Landmarks
|
|
||||||
add hl, de
|
|
||||||
ld a, [hli]
|
|
||||||
ld e, a
|
|
||||||
ld d, [hl]
|
|
||||||
pop hl
|
|
||||||
ret
|
|
||||||
|
|
||||||
GetLandmarkName::
|
|
||||||
; Copy the name of landmark e to wStringBuffer1.
|
|
||||||
push hl
|
|
||||||
push de
|
|
||||||
push bc
|
|
||||||
|
|
||||||
ld l, e
|
|
||||||
ld h, 0
|
|
||||||
add hl, hl
|
|
||||||
add hl, hl
|
|
||||||
ld de, Landmarks + 2
|
|
||||||
add hl, de
|
|
||||||
ld a, [hli]
|
|
||||||
ld h, [hl]
|
|
||||||
ld l, a
|
|
||||||
|
|
||||||
ld de, wStringBuffer1
|
|
||||||
ld c, 18
|
|
||||||
.copy
|
|
||||||
ld a, [hli]
|
|
||||||
ld [de], a
|
|
||||||
inc de
|
|
||||||
dec c
|
|
||||||
jr nz, .copy
|
|
||||||
|
|
||||||
pop bc
|
|
||||||
pop de
|
|
||||||
pop hl
|
|
||||||
ret
|
|
||||||
|
|
||||||
INCLUDE "data/maps/landmarks.asm"
|
|
@ -1623,7 +1623,7 @@ Script_getcurlandmarkname:
|
|||||||
|
|
||||||
ConvertLandmarkToText:
|
ConvertLandmarkToText:
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
jp GetStringBuffer
|
jp GetStringBuffer
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ GetCallerLocation:
|
|||||||
push bc
|
push bc
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
|
@ -574,7 +574,7 @@ PokegearMap_InitPlayerIcon:
|
|||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
push bc
|
push bc
|
||||||
farcall GetLandmarkCoords
|
farcall LevelSelectionMenu_GetLandmarkCoords
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -609,7 +609,7 @@ PokegearMap_UpdateLandmarkName:
|
|||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
push de
|
push de
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
pop de
|
pop de
|
||||||
farcall TownMap_ConvertLineBreakCharacters
|
farcall TownMap_ConvertLineBreakCharacters
|
||||||
hlcoord 8, 0
|
hlcoord 8, 0
|
||||||
@ -619,7 +619,7 @@ PokegearMap_UpdateLandmarkName:
|
|||||||
PokegearMap_UpdateCursorPosition:
|
PokegearMap_UpdateCursorPosition:
|
||||||
push bc
|
push bc
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkCoords
|
farcall LevelSelectionMenu_GetLandmarkCoords
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1986,7 +1986,7 @@ TownMapBubble:
|
|||||||
ld de, Flypoints
|
ld de, Flypoints
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
hlcoord 2, 1
|
hlcoord 2, 1
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -2000,7 +2000,7 @@ GetMapCursorCoordinates:
|
|||||||
ld de, Flypoints
|
ld de, Flypoints
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
farcall GetLandmarkCoords
|
farcall LevelSelectionMenu_GetLandmarkCoords
|
||||||
ld a, [wTownMapCursorCoordinates]
|
ld a, [wTownMapCursorCoordinates]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wTownMapCursorCoordinates + 1]
|
ld a, [wTownMapCursorCoordinates + 1]
|
||||||
@ -2231,7 +2231,7 @@ Pokedex_GetArea:
|
|||||||
push de
|
push de
|
||||||
ld e, a
|
ld e, a
|
||||||
push hl
|
push hl
|
||||||
farcall GetLandmarkCoords
|
farcall LevelSelectionMenu_GetLandmarkCoords
|
||||||
pop hl
|
pop hl
|
||||||
; load into OAM
|
; load into OAM
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -2261,7 +2261,7 @@ Pokedex_GetArea:
|
|||||||
ret c
|
ret c
|
||||||
ld a, [wTownMapPlayerIconLandmark]
|
ld a, [wTownMapPlayerIconLandmark]
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkCoords
|
farcall LevelSelectionMenu_GetLandmarkCoords
|
||||||
ld c, e
|
ld c, e
|
||||||
ld b, d
|
ld b, d
|
||||||
ld de, .PlayerOAM
|
ld de, .PlayerOAM
|
||||||
@ -2472,7 +2472,7 @@ TownMapPlayerIcon:
|
|||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
push bc
|
push bc
|
||||||
farcall GetLandmarkCoords
|
farcall LevelSelectionMenu_GetLandmarkCoords
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -266,7 +266,7 @@ endr
|
|||||||
pop bc
|
pop bc
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
ld hl, OPT_OakText1
|
ld hl, OPT_OakText1
|
||||||
call CopyRadioTextToRAM
|
call CopyRadioTextToRAM
|
||||||
ld a, OAKS_POKEMON_TALK_5
|
ld a, OAKS_POKEMON_TALK_5
|
||||||
@ -1249,7 +1249,7 @@ PeoplePlaces6: ; Places
|
|||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
ld e, a
|
ld e, a
|
||||||
farcall GetLandmarkName
|
farcall LevelSelectionMenu_GetLandmarkName
|
||||||
ld hl, PnP_Text5
|
ld hl, PnP_Text5
|
||||||
ld a, PLACES_AND_PEOPLE_7
|
ld a, PLACES_AND_PEOPLE_7
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
|
1
main.asm
1
main.asm
@ -430,7 +430,6 @@ SECTION "Miscellaneous Text", ROMX
|
|||||||
INCLUDE "data/items/names.asm"
|
INCLUDE "data/items/names.asm"
|
||||||
INCLUDE "engine/items/print_item_description.asm"
|
INCLUDE "engine/items/print_item_description.asm"
|
||||||
INCLUDE "data/moves/names.asm"
|
INCLUDE "data/moves/names.asm"
|
||||||
INCLUDE "engine/overworld/landmarks.asm"
|
|
||||||
|
|
||||||
|
|
||||||
SECTION "Print Party", ROMX
|
SECTION "Print Party", ROMX
|
||||||
|
Loading…
Reference in New Issue
Block a user