mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
SCUMM: Make REDUCE_MEMORY_USAGE slightly more effecive (saving ~1kb ram)
This commit is contained in:
parent
183e018c19
commit
d020922846
@ -494,7 +494,11 @@ void ScummEngine::executeOpcode(byte i) {
|
||||
}
|
||||
|
||||
const char *ScummEngine::getOpcodeDesc(byte i) {
|
||||
#ifndef REDUCE_MEMORY_USAGE
|
||||
return _opcodes[i].desc;
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
byte ScummEngine::fetchScriptByte() {
|
||||
|
@ -27,14 +27,19 @@
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
|
||||
typedef Common::Functor0<void> Opcode;
|
||||
|
||||
struct OpcodeEntry : Common::NonCopyable {
|
||||
Opcode *proc;
|
||||
#ifndef REDUCE_MEMORY_USAGE
|
||||
const char *desc;
|
||||
#endif
|
||||
|
||||
#ifndef REDUCE_MEMORY_USAGE
|
||||
OpcodeEntry() : proc(0), desc(0) {}
|
||||
#else
|
||||
OpcodeEntry() : proc(0) {}
|
||||
#endif
|
||||
~OpcodeEntry() {
|
||||
setProc(0, 0);
|
||||
}
|
||||
@ -44,7 +49,9 @@ struct OpcodeEntry : Common::NonCopyable {
|
||||
delete proc;
|
||||
proc = p;
|
||||
}
|
||||
#ifndef REDUCE_MEMORY_USAGE
|
||||
desc = d;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user