pokegold-spaceworld/engine/debug/field/toggle_npc_movement.asm
Narishma-gb e88fe24e15
Use the same Makefile build system as Gen 1+2 repos (#163)
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>
2026-07-05 15:36:09 -04:00

39 lines
533 B
NASM

FieldDebug_ToggleNPCMovement:
call .ToggleNPCMovement
jr nc, .close
ld a, FIELDDEBUG_RETURN_REOPEN
ret
.close
ld a, FIELDDEBUG_RETURN_CLOSE
ret
.ToggleNPCMovement:
ld hl, .MenuHeader
call GetMenu2
ret c
ld a, [wMenuCursorY]
cp 1
jr nz, .move
; stop NPCs
ld a, PLAYER_OBJECT
call FreezeAllOtherObjects
jr .done
.move
call UnfreezeAllObjects
.done
and a
ret
.MenuHeader:
db MENU_BACKUP_TILES
menu_coords 0, 0, 7, 6
dw .MenuData
db 1
.MenuData:
db STATICMENU_CURSOR
db 2
db "とめる@"
db "うごかす@"