From a0ea7c365a0a19a9b5a2a279b9c93b823e08220b Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 17 Aug 2013 18:59:03 -0400 Subject: [PATCH] RM::Native::SetResLoad --- toolbox/rm.cpp | 12 ++++++++++++ toolbox/rm.h | 1 + 2 files changed, 13 insertions(+) diff --git a/toolbox/rm.cpp b/toolbox/rm.cpp index a181747..afd1a04 100644 --- a/toolbox/rm.cpp +++ b/toolbox/rm.cpp @@ -182,6 +182,7 @@ namespace RM // used by GetString (utility.h) + // used by Loader. uint16_t GetResource(uint32_t type, uint16_t id, uint32_t &theHandle) { return LoadResource(type, theHandle, @@ -190,6 +191,17 @@ namespace RM }); } + uint16_t SetResLoad(bool load) + { + + ResLoad = load; + ::SetResLoad(load); + + memoryWriteByte(load ? 0xff : 0x00, MacOS::ResLoad); // word or byte? + return SetResError(0); + } + + } uint16_t CloseResFile(uint16_t trap) diff --git a/toolbox/rm.h b/toolbox/rm.h index d588c42..34ec1cd 100644 --- a/toolbox/rm.h +++ b/toolbox/rm.h @@ -8,6 +8,7 @@ namespace RM namespace Native { + uint16_t SetResLoad(bool tf); uint16_t GetResource(uint32_t type, uint16_t id, uint32_t &theHandle); }