pokegold-spaceworld/engine/debug/field/teleport.inc
DrippingYellow ce247cc761
Some checks failed
CI / build (push) Has been cancelled
Adding bank14, good chunk of text transcribed and labelled in bank0d, renaming farcall to callab, and much more (#112)
* Sporadic constantifying and function naming

* Added bank 14

* Delete .DS_Store files

* Delete EOL whitespace

* Use Tab indents instead of four spaces

* Identify some routines

* Identify more stuff

* Identified party and box structs

* Identified wBattleMon and wEnemyMon structs

* Macro'd landmarks, cleaned up comments

---------

Co-authored-by: vulcandth <vulcandth@gmail.com>
2025-01-16 12:12:38 -06:00

34 lines
598 B
PHP

FieldDebug_Teleport:
call .DoTeleport
ld a, FIELDDEBUG_RETURN_REOPEN
ret
.DoTeleport:
ld a, [wMapGroup]
ld d, a
ld a, [wMapId]
ld e, a
callfar IsSpawnPoint
jr nc, .not_spawn_point
ld a, [wMapGroup]
ld [wLastSpawnMapGroup], a
ld a, [wMapId]
ld [wLastSpawnMapNumber], a
ld hl, .MapRegisteredText
call MenuTextBoxBackup
ret
.not_spawn_point
ld hl, .CannotRegisterMapText
call MenuTextBoxBackup
ret
.MapRegisteredText:
text "このばしょを とうろくしました"
para "<DONE>"
.CannotRegisterMapText:
text "ここは とうろくできません!"
para "<DONE>"