mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-10-05 07:37:48 -04:00
e88fe24e15
This uses catch-all files like main.asm to reduce the total quantity and size of build objects (from 1.1 GB to 70 MB). --------- Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
37 lines
599 B
NASM
37 lines
599 B
NASM
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
|