From f62e67f578037373efcfba476e4fd271dbb4ab1f Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 15 Jun 2020 18:16:50 -0400 Subject: Define wStackBottom --- engine/menus/save.asm | 2 +- layout.link | 4 ++-- wram.asm | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/engine/menus/save.asm b/engine/menus/save.asm index f8207204..93250034 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -322,7 +322,7 @@ UpdateStackTop: FindStackTop: ; Find the furthest point that sp has traversed to. ; This is distinct from the current value of sp. - ld hl, wStackTop - $fc + ld hl, wStackBottom .loop ld a, [hl] or a diff --git a/layout.link b/layout.link index bbe9185a..1991fa46 100644 --- a/layout.link +++ b/layout.link @@ -262,14 +262,14 @@ WRAM0 "Overworld Map" "Video" WRAMX 1 - org $d000 "WRAM 1" "Game Data" "Party" - org $dfff "Stack" VRAM $00 + "VRAM0" VRAM $01 + "VRAM1" SRAM $00 "Scratch" org $a600 diff --git a/wram.asm b/wram.asm index 58f7247c..2b6a23c2 100644 --- a/wram.asm +++ b/wram.asm @@ -2612,11 +2612,17 @@ ENDU ; df01 wPokemonDataEnd:: wGameDataEnd:: +; df01 SECTION "Stack", WRAMX + ds 2 +wStackBottom:: + ds $fc +wStack:: wStackTop:: + ds 1 INCLUDE "sram.asm" -- cgit v1.2.3