PRIVATE: removed old code, commented debugs and fixes
This commit is contained in:
parent
297175310f
commit
a1170b44f3
6 changed files with 9 additions and 30 deletions
|
@ -82,7 +82,7 @@ void SettingMaps::save(const char *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingMaps::load(const Common::String &name) {
|
void SettingMaps::load(const Common::String &name) {
|
||||||
debug("loading: %s", name.c_str());
|
//debug("loading: %s", name.c_str());
|
||||||
assert(_map.contains(name));
|
assert(_map.contains(name));
|
||||||
_setting = _map.getVal(name);
|
_setting = _map.getVal(name);
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
// Heavily based on code by X
|
||||||
|
|
||||||
#include "private/decompiler.h"
|
#include "private/decompiler.h"
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
// Heavily based on code by X
|
||||||
|
|
||||||
#ifndef PRIVATE_DECOMPILER_H
|
#ifndef PRIVATE_DECOMPILER_H
|
||||||
#define PRIVATE_DECOMPILER_H
|
#define PRIVATE_DECOMPILER_H
|
||||||
|
|
|
@ -255,7 +255,7 @@ static void fDossierChgSheet(ArgArray args) {
|
||||||
int y = args[3].u.val;
|
int y = args[3].u.val;
|
||||||
|
|
||||||
m.surf = g_private->loadMask(s, x, y, true);
|
m.surf = g_private->loadMask(s, x, y, true);
|
||||||
m.cursor = "kExit";
|
m.cursor = g_private->getExitCursor();
|
||||||
m.nextSetting = "";
|
m.nextSetting = "";
|
||||||
m.flag1 = NULL;
|
m.flag1 = NULL;
|
||||||
m.flag2 = NULL;
|
m.flag2 = NULL;
|
||||||
|
|
|
@ -174,7 +174,7 @@ Common::Error PrivateEngine::run() {
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
||||||
buf = (char*) decomp.getResult().c_str();
|
buf = (char*) decomp.getResult().c_str();
|
||||||
debug("%s", buf);
|
//debug("%s", buf);
|
||||||
|
|
||||||
// Initialize stuff
|
// Initialize stuff
|
||||||
Gen::g_vm = new Gen::VM();
|
Gen::g_vm = new Gen::VM();
|
||||||
|
@ -303,7 +303,7 @@ Common::Error PrivateEngine::run() {
|
||||||
|
|
||||||
if (!_nextSetting.empty()) {
|
if (!_nextSetting.empty()) {
|
||||||
removeTimer();
|
removeTimer();
|
||||||
debug("Executing %s", _nextSetting.c_str());
|
//debug("Executing %s", _nextSetting.c_str());
|
||||||
clearAreas();
|
clearAreas();
|
||||||
_currentSetting = _nextSetting;
|
_currentSetting = _nextSetting;
|
||||||
Settings::g_setts->load(_nextSetting);
|
Settings::g_setts->load(_nextSetting);
|
||||||
|
|
|
@ -112,14 +112,14 @@ static Symbol *install(const Common::String &n, int t, int d, const char *s, Com
|
||||||
|
|
||||||
/* lookup some name in some symbol table */
|
/* lookup some name in some symbol table */
|
||||||
Symbol *SymbolMaps::lookupRect(Common::String *n) {
|
Symbol *SymbolMaps::lookupRect(Common::String *n) {
|
||||||
debug("looking rect up %s", n->c_str());
|
//debug("looking rect up %s", n->c_str());
|
||||||
|
|
||||||
assert(rects.contains(*n));
|
assert(rects.contains(*n));
|
||||||
return lookup(*n, rects);
|
return lookup(*n, rects);
|
||||||
}
|
}
|
||||||
|
|
||||||
Symbol *SymbolMaps::lookupVariable(Common::String *n) {
|
Symbol *SymbolMaps::lookupVariable(Common::String *n) {
|
||||||
debug("looking variable up %s", n->c_str());
|
//debug("looking variable up %s", n->c_str());
|
||||||
|
|
||||||
assert(variables.contains(*n));
|
assert(variables.contains(*n));
|
||||||
return lookup(*n, variables);
|
return lookup(*n, variables);
|
||||||
|
@ -136,29 +136,6 @@ Symbol *SymbolMaps::lookupName(const char *n) {
|
||||||
s->u.val = 0;
|
s->u.val = 0;
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
/*debug("looking up %s", n);
|
|
||||||
Common::String s(n);
|
|
||||||
|
|
||||||
if (settings.contains(s))
|
|
||||||
return lookup(s, settings);
|
|
||||||
|
|
||||||
else if (variables.contains(s))
|
|
||||||
return lookup(s, variables);
|
|
||||||
|
|
||||||
else if (cursors.contains(s))
|
|
||||||
return lookup(s, cursors);
|
|
||||||
|
|
||||||
else if (locations.contains(s))
|
|
||||||
return lookup(s, locations);
|
|
||||||
|
|
||||||
else if (rects.contains(s))
|
|
||||||
return lookup(s, rects);
|
|
||||||
|
|
||||||
else {
|
|
||||||
debugC(1, kPrivateDebugCode, "WARNING: %s not defined", n);
|
|
||||||
return constant(STRING, 0, n);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SymbolMaps::installAll(const char *n) {
|
void SymbolMaps::installAll(const char *n) {
|
||||||
|
@ -170,7 +147,7 @@ void SymbolMaps::installAll(const char *n) {
|
||||||
|
|
||||||
//debug("name %s", s.c_str());
|
//debug("name %s", s.c_str());
|
||||||
if (strcmp(n, "settings") == 0) {
|
if (strcmp(n, "settings") == 0) {
|
||||||
debug("new setting %s", n);
|
//debug("new setting %s", n);
|
||||||
assert(r == NULL);
|
assert(r == NULL);
|
||||||
install(s, NAME, 0, s.c_str(), r, &settings);
|
install(s, NAME, 0, s.c_str(), r, &settings);
|
||||||
} else if (strcmp(n, "variables") == 0) {
|
} else if (strcmp(n, "variables") == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue