diff --git a/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy b/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy index 36aebee4..409d15d6 100644 --- a/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy +++ b/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy @@ -1924,8 +1924,8 @@ class A2PackPartitions def day = cal.get(Calendar.DAY_OF_MONTH) def hour = cal.get(Calendar.HOUR_OF_DAY) - def yearCode = (year-2010 < 10) ? (char) (48+year-2010) : // 0=2010, 1=2011, etc. - (char) (65+year-2020) // A=2020, B=2021, etc. + def yearCode = (year-2020 < 10) ? (char) (48+year-2020) : // 0=2020, 1=2021, etc. + (char) (65+year-2030) // A=2030, B=2031, etc. def monthCode = (month < 9) ? (char) (48+month+1) : // 1=Jan, 2=Feb... month == 9 ? 'o' : // o=Oct month == 10 ? 'n' : // n=Nov @@ -2605,7 +2605,7 @@ class A2PackPartitions flagSet.sort().each { flg -> gameFlags[flg] = gameFlags.size() } } else if (name == "{outlaw}block" && - (data.@type == "interaction_get_flag" || data.@type == "interaction_set_flag")) + (data.@type == "interaction_get_flag" || data.@type == "interaction_set_flag" || data.@type == "interaction_clr_flag" )) { def els = data.field assert els.size() == 1 diff --git a/Platform/Apple/virtual/src/plasma/diskops.pla b/Platform/Apple/virtual/src/plasma/diskops.pla index 70a82b43..5e2ab757 100644 --- a/Platform/Apple/virtual/src/plasma/diskops.pla +++ b/Platform/Apple/virtual/src/plasma/diskops.pla @@ -660,7 +660,9 @@ def printVersion(windowWidth)#0 puts(p) // And print in graphics mode too - rightJustifyStr(p, windowWidth) + if windowWidth + rightJustifyStr(p, windowWidth) + fin end /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -727,6 +729,7 @@ def _newOrLoadGame(ask)#1 loop // Brand future text screens with the version (adjust window to protect it) + printVersion(0) // not on graphics ^$23 = 23 textHome diff --git a/Platform/Apple/virtual/src/plasma/gamelib.plh b/Platform/Apple/virtual/src/plasma/gamelib.plh index e89919fa..e8458dfb 100644 --- a/Platform/Apple/virtual/src/plasma/gamelib.plh +++ b/Platform/Apple/virtual/src/plasma/gamelib.plh @@ -41,6 +41,7 @@ import gamelib predef createItem(itemNum)#1 predef createStruct(moduleID, creationFuncNum)#1 predef crout()#0 + predef diskLimitChk(is3d, mapNum)#1 predef displayChar(chr)#0 predef displayf1(fmt, arg1)#0 predef displayf2(fmt, arg1, arg2)#0 diff --git a/Platform/Apple/virtual/src/plasma/gameloop.pla b/Platform/Apple/virtual/src/plasma/gameloop.pla index d6833014..9e0c4ea5 100644 --- a/Platform/Apple/virtual/src/plasma/gameloop.pla +++ b/Platform/Apple/virtual/src/plasma/gameloop.pla @@ -120,7 +120,7 @@ export word typeHash = 0 export byte curHeapPct = 0 byte lastMoveDir = $FF -// Queue setMap / teleport / start_encounter, since otherwise script might be replaced while executing +// Queue setMap / teleport, since otherwise script might be replaced while executing byte q_mapIs3D = 0 byte q_mapNum = 1 word q_x = 0 @@ -2362,8 +2362,40 @@ export def setMap(is3D, num, x, y, dir)#0 //NO:scriptEvent(S_ENTER, NULL) end +/////////////////////////////////////////////////////////////////////////////////////////////////// +export def callGlobalFunc(moduleNum, arg1, arg2, arg3)#1 + word pModule, pFunc, ret + + // First load the module + if renderLoaded; flipToPage1(); fin + mmgr(START_LOAD, 1) // code is in partition 1 + pModule = mmgr(QUEUE_LOAD, moduleNum<<8 | RES_TYPE_MODULE) + mmgr(FINISH_LOAD, 0) + + // Call the function, passing it the number of args it expects + pFunc = pModule() + when getArgCount(pFunc) + is 0; ret = pFunc(); break + is 1; ret = pFunc(arg1); break + is 2; ret = pFunc(arg1, arg2); break + is 3; ret = pFunc(arg1, arg2, arg3); break + otherwise fatal("maxGlobParams") + wend + + // Unload the module and we're done. + mmgr(FREE_MEMORY, pModule) + return ret +end + /////////////////////////////////////////////////////////////////////////////////////////////////// export def queue_setMap(is3D, num, x, y, dir)#0 + byte part + part = lookupResourcePart(is3d+1, num) + if part > diskLimit + clearWindow + callGlobalFunc(GS_DISK_LIMIT, 1, 0, 0) + return + fin q_mapIs3D = is3D q_mapNum = num q_x = x @@ -2692,31 +2724,6 @@ def returnFromEngine(render)#0 fin end -/////////////////////////////////////////////////////////////////////////////////////////////////// -export def callGlobalFunc(moduleNum, arg1, arg2, arg3)#1 - word pModule, pFunc, ret - - // First load the module - if renderLoaded; flipToPage1(); fin - mmgr(START_LOAD, 1) // code is in partition 1 - pModule = mmgr(QUEUE_LOAD, moduleNum<<8 | RES_TYPE_MODULE) - mmgr(FINISH_LOAD, 0) - - // Call the function, passing it the number of args it expects - pFunc = pModule() - when getArgCount(pFunc) - is 0; ret = pFunc(); break - is 1; ret = pFunc(arg1); break - is 2; ret = pFunc(arg1, arg2); break - is 3; ret = pFunc(arg1, arg2, arg3); break - otherwise fatal("maxGlobParams") - wend - - // Unload the module and we're done. - mmgr(FREE_MEMORY, pModule) - return ret -end - /////////////////////////////////////////////////////////////////////////////////////////////////// // Load the automap engine and display the map def showAutomap()#1