diff options
author | rubidium <rubidium@openttd.org> | 2014-09-06 17:30:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-06 17:30:33 +0000 |
commit | 7c4e9dd71d6f02f686c52551ccdcc27b89ef8025 (patch) | |
tree | 7556a992183a12029525bf9ed3f6be8ced9d9dc8 /src/script/api/script_controller.cpp | |
parent | 3f9525ff0ecb5a12ca8635b88691154c293c4d8f (diff) | |
download | openttd-7c4e9dd71d6f02f686c52551ccdcc27b89ef8025.tar.xz |
(svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD
Diffstat (limited to 'src/script/api/script_controller.cpp')
-rw-r--r-- | src/script/api/script_controller.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/script/api/script_controller.cpp b/src/script/api/script_controller.cpp index 65e542c02..aca645c05 100644 --- a/src/script/api/script_controller.cpp +++ b/src/script/api/script_controller.cpp @@ -122,7 +122,7 @@ ScriptController::~ScriptController() if (lib == NULL) { char error[1024]; seprintf(error, lastof(error), "couldn't find library '%s' with version %d", library, version); - throw sq_throwerror(vm, OTTD2SQ(error)); + throw sq_throwerror(vm, error); } /* Get the current table/class we belong to */ @@ -142,13 +142,13 @@ ScriptController::~ScriptController() /* Load the library in a 'fake' namespace, so we can link it to the name the user requested */ sq_pushroottable(vm); - sq_pushstring(vm, OTTD2SQ(fake_class), -1); + sq_pushstring(vm, fake_class, -1); sq_newclass(vm, SQFalse); /* Load the library */ if (!engine->LoadScript(vm, lib->GetMainScript(), false)) { char error[1024]; seprintf(error, lastof(error), "there was a compile error when importing '%s' version %d", library, version); - throw sq_throwerror(vm, OTTD2SQ(error)); + throw sq_throwerror(vm, error); } /* Create the fake class */ sq_newslot(vm, -3, SQFalse); @@ -159,15 +159,15 @@ ScriptController::~ScriptController() /* Find the real class inside the fake class (like 'sets.Vector') */ sq_pushroottable(vm); - sq_pushstring(vm, OTTD2SQ(fake_class), -1); + sq_pushstring(vm, fake_class, -1); if (SQ_FAILED(sq_get(vm, -2))) { throw sq_throwerror(vm, _SC("internal error assigning library class")); } - sq_pushstring(vm, OTTD2SQ(lib->GetInstanceName()), -1); + sq_pushstring(vm, lib->GetInstanceName(), -1); if (SQ_FAILED(sq_get(vm, -2))) { char error[1024]; seprintf(error, lastof(error), "unable to find class '%s' in the library '%s' version %d", lib->GetInstanceName(), library, version); - throw sq_throwerror(vm, OTTD2SQ(error)); + throw sq_throwerror(vm, error); } HSQOBJECT obj; sq_getstackobj(vm, -1, &obj); @@ -177,7 +177,7 @@ ScriptController::~ScriptController() /* Now link the name the user wanted to our 'fake' class */ sq_pushobject(vm, parent); - sq_pushstring(vm, OTTD2SQ(class_name), -1); + sq_pushstring(vm, class_name, -1); sq_pushobject(vm, obj); sq_newclass(vm, SQTrue); sq_newslot(vm, -3, SQFalse); |