From be6fb14d6ae7bd301830caeba43e91d91ada8ae8 Mon Sep 17 00:00:00 2001 From: Martin Haye Date: Sat, 17 Mar 2018 08:52:29 -0700 Subject: [PATCH] Added emulator signals so Jace can intelligently decolorize text. Fixed clock on return from engines. --- Platform/Apple/virtual/src/plasma/automap.pla | 1 + Platform/Apple/virtual/src/plasma/gameloop.pla | 10 +++++++++- Platform/Apple/virtual/src/plasma/globalDefs.plh | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Platform/Apple/virtual/src/plasma/automap.pla b/Platform/Apple/virtual/src/plasma/automap.pla index 91fb217a..b4ab7293 100644 --- a/Platform/Apple/virtual/src/plasma/automap.pla +++ b/Platform/Apple/virtual/src/plasma/automap.pla @@ -470,6 +470,7 @@ def _automap_show()#1 memset(@blankTile, 0, 9) // Setup phase + ^EMUSIG_AUTOMAP if mapIs3D; setup3D; else setup2D; fin centerScreen setBigWindow diff --git a/Platform/Apple/virtual/src/plasma/gameloop.pla b/Platform/Apple/virtual/src/plasma/gameloop.pla index e412d6d2..87e30198 100644 --- a/Platform/Apple/virtual/src/plasma/gameloop.pla +++ b/Platform/Apple/virtual/src/plasma/gameloop.pla @@ -1859,6 +1859,7 @@ export def loadFrameImg(img)#0 resetAnimPause() // And show the first frame of the screen image + ^EMUSIG_FULL_COLOR showAnimFrame() // Brand the image with the version number @@ -1945,6 +1946,7 @@ export def setBigWindow()#0 frameLoaded = 0 // since we just destroyed it textDrawn = FALSE textClearCountdown = 0 + ^EMUSIG_FULL_TEXT fin setWindow(BIGWIN_TOP, BIGWIN_BOTTOM, BIGWIN_LEFT, BIGWIN_RIGHT) end @@ -2070,6 +2072,7 @@ export def loadMainFrameImg()#0 curFullscreenImg = NULL fin loadFrameImg(mapIs3D+2) + if mapIs3D; ^EMUSIG_3D_MAP; else ^EMUSIG_2D_MAP; fin if curFullscreenImg auxMmgr(FREE_MEMORY, curFullscreenImg) // we don't allow animated main frames, so save memory curFullscreenImg = NULL @@ -2938,7 +2941,11 @@ def returnFromEngine(render)#0 else needRender = TRUE fin - if mapIs3D; showCompassDir(getDir()); fin + if mapIs3D + showCompassDir(getDir()) + prevClockColor = 99 + showClock() + fin showParty() setWindow2() // in case we're mid-script fin @@ -3274,6 +3281,7 @@ def loadTitle()#0 // unless we do this. *HUGE* thanks to Brendan Robert for the fix! ^$C07E=0 // disable double-hi-res ^$C05F // disable double-hi-res + ^EMUSIG_FULL_COLOR // While we're loading, let's get the expander into aux RAM. auxMmgr(SET_MEM_TARGET, expandVec) diff --git a/Platform/Apple/virtual/src/plasma/globalDefs.plh b/Platform/Apple/virtual/src/plasma/globalDefs.plh index 3ff38306..958204b1 100644 --- a/Platform/Apple/virtual/src/plasma/globalDefs.plh +++ b/Platform/Apple/virtual/src/plasma/globalDefs.plh @@ -82,3 +82,10 @@ const MAX_PARTY = 3 // Combat speed const DEFAULT_COMBAT_PAUSE_CT = 800 + +// Signals to Jace, if present. +const EMUSIG_FULL_COLOR = $C020 // e.g. title screen +const EMUSIG_FULL_TEXT = $C021 // e.g. inventory - big text window w/ graphics border +const EMUSIG_2D_MAP = $C022 // e.g. wilderness +const EMUSIG_3D_MAP = $C023 // e.g. in town +const EMUSIG_AUTOMAP = $C024 // all color except the map title