#include <UCMachine.h>
Definition at line 36 of file UCMachine.h.
UCMachine::UCMachine | ( | Intrinsic * | iset, | |
unsigned int | icount | |||
) |
Definition at line 82 of file UCMachine.cpp.
References Console::AddConsoleCommand(), con, ConCmd_getGlobal(), ConCmd_setGlobal(), ConCmd_stopTrace(), ConCmd_traceAll(), ConCmd_traceClass(), ConCmd_traceEvents(), ConCmd_traceObjID(), ConCmd_tracePID(), convuse, globals, listIDs, loadIntrinsics(), MM_INFO, Console::Print(), stringIDs, trace_all, tracing_enabled, and ucmachine.
UCMachine::~UCMachine | ( | ) |
Definition at line 114 of file UCMachine.cpp.
References con, ConCmd_getGlobal(), ConCmd_setGlobal(), ConCmd_stopTrace(), ConCmd_traceAll(), ConCmd_traceClass(), ConCmd_traceObjID(), ConCmd_tracePID(), convuse, globals, listIDs, MM_INFO, Console::Print(), Console::RemoveConsoleCommand(), stringIDs, and ucmachine.
Definition at line 1996 of file UCMachine.cpp.
References idMan::getNewID(), listHeap, and listIDs.
Referenced by execProcess().
Definition at line 2087 of file UCMachine.cpp.
References BaseUCStack::assign(), Kernel::get_instance(), Kernel::getProcess(), perr, SEG_GLOBAL, SEG_STACK_FIRST, SEG_STACK_LAST, and UCProcess::stack.
Referenced by execProcess().
uint16 UCMachine::assignString | ( | const char * | str | ) | [private] |
Definition at line 1980 of file UCMachine.cpp.
References idMan::getNewID(), stringHeap, and stringIDs.
Referenced by duplicateString(), and execProcess().
void UCMachine::ConCmd_getGlobal | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2383 of file UCMachine.cpp.
References get_instance(), BitSet::getBits(), globals, and pout.
Referenced by UCMachine(), and ~UCMachine().
void UCMachine::ConCmd_setGlobal | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2398 of file UCMachine.cpp.
References get_instance(), BitSet::getBits(), globals, pout, and BitSet::setBits().
Referenced by UCMachine(), and ~UCMachine().
void UCMachine::ConCmd_stopTrace | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2486 of file UCMachine.cpp.
References get_instance(), trace_all, trace_classes, trace_events, trace_ObjIDs, trace_PIDs, and tracing_enabled.
Referenced by UCMachine(), and ~UCMachine().
void UCMachine::ConCmd_traceAll | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2466 of file UCMachine.cpp.
References get_instance(), pout, trace_all, and tracing_enabled.
Referenced by UCMachine(), and ~UCMachine().
void UCMachine::ConCmd_traceClass | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2450 of file UCMachine.cpp.
References get_instance(), pout, trace_classes, and tracing_enabled.
Referenced by UCMachine(), and ~UCMachine().
void UCMachine::ConCmd_traceEvents | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2475 of file UCMachine.cpp.
References get_instance(), pout, trace_events, and tracing_enabled.
Referenced by UCMachine().
void UCMachine::ConCmd_traceObjID | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2434 of file UCMachine.cpp.
References get_instance(), pout, trace_ObjIDs, and tracing_enabled.
Referenced by UCMachine(), and ~UCMachine().
void UCMachine::ConCmd_tracePID | ( | const Console::ArgvType & | argv | ) | [static, private] |
Definition at line 2418 of file UCMachine.cpp.
References get_instance(), pout, trace_PIDs, and tracing_enabled.
Referenced by UCMachine(), and ~UCMachine().
Definition at line 2128 of file UCMachine.cpp.
References BaseUCStack::access(), Kernel::get_instance(), Kernel::getProcess(), perr, SEG_GLOBAL, SEG_OBJ, SEG_STACK_FIRST, SEG_STACK_LAST, and UCProcess::stack.
Referenced by execProcess().
Definition at line 1990 of file UCMachine.cpp.
References assignString(), and stringHeap.
Referenced by UCList::copyStringList(), and execProcess().
bool UCMachine::execProcess | ( | UCProcess * | proc | ) |
Definition at line 157 of file UCMachine.cpp.
References BaseUCStack::access(), BaseUCStack::access1(), BaseUCStack::access2(), BaseUCStack::access4(), Kernel::addProcessExec(), BaseUCStack::addSP(), UCList::append(), UCList::appendList(), CurrentMap::areaSearch(), UCList::assign(), BaseUCStack::assign(), BaseUCStack::assign1(), BaseUCStack::assign2(), BaseUCStack::assign4(), assignList(), assignPointer(), assignString(), UCProcess::bp, UCProcess::call(), Item::checkLoopScript(), UCProcess::classid, Container::containerSearch(), convuse, UCList::copyList(), UCList::copyStringList(), dereferencePointer(), duplicateString(), Process::flags, freeList(), UCProcess::freeOnTerminate(), freeString(), freeStringList(), Usecode::get_class(), Usecode::get_class_base_offset(), Usecode::get_class_event(), Usecode::get_class_size(), World::get_instance(), Kernel::get_instance(), BitSet::getBits(), getContainer(), World::getCurrentMap(), UCList::getElementSize(), getItem(), getList(), Kernel::getProcess(), UCList::getSize(), BaseUCStack::getSP(), getString(), UCList::getStringIndex(), globals, UCList::inList(), intrinsiccount, intrinsics, ConvertUsecode::intrinsics(), UCProcess::ip, Process::is_terminated(), Process::item_num, perr, Process::pid, BaseUCStack::pop(), BaseUCStack::pop2(), BaseUCStack::pop4(), pout, print_bp(), print_sp(), Process::PROC_SUSPENDED, BaseUCStack::push(), BaseUCStack::push0(), BaseUCStack::push1(), BaseUCStack::push2(), BaseUCStack::push4(), Process::result, UCProcess::ret(), BitSet::setBits(), Process::setItemNum(), Process::setType(), UCProcess::stack, BaseUCStack::stacksize(), stackToPtr(), stringHeap, stringToPtr(), UCList::substractList(), UCList::substractStringList(), CurrentMap::surfaceSearch(), UCProcess::temp32, Process::terminateDeferred(), trace_show(), Process::type, UCList::unionStringList(), UCProcess::usecode, and Process::waitFor().
Referenced by UCProcess::run().
void UCMachine::freeList | ( | uint16 | l | ) |
Definition at line 2020 of file UCMachine.cpp.
References idMan::clearID(), listHeap, and listIDs.
Referenced by execProcess(), and UCProcess::terminate().
void UCMachine::freeString | ( | uint16 | s | ) |
Definition at line 2007 of file UCMachine.cpp.
References idMan::clearID(), stringHeap, and stringIDs.
Referenced by UCList::assignString(), execProcess(), UCList::freeStrings(), UCProcess::terminate(), and UCList::unionStringList().
void UCMachine::freeStringList | ( | uint16 | l | ) |
Definition at line 2031 of file UCMachine.cpp.
References idMan::clearID(), listHeap, and listIDs.
Referenced by execProcess(), and UCProcess::terminate().
static UCMachine* UCMachine::get_instance | ( | ) | [inline, static] |
Definition at line 42 of file UCMachine.h.
References ucmachine.
Referenced by UCList::assignString(), Item::callUsecodeEvent(), GUIApp::ConCmd_engineStats(), ConCmd_getGlobal(), ConCmd_setGlobal(), ConCmd_stopTrace(), ConCmd_traceAll(), ConCmd_traceClass(), ConCmd_traceEvents(), ConCmd_traceObjID(), ConCmd_tracePID(), UCList::copyStringList(), UCList::freeStrings(), UCList::getString(), AskGump::InitGump(), UCProcess::load(), UCList::removeString(), UCProcess::run(), UCList::stringInList(), UCProcess::terminate(), and UCList::unionStringList().
std::string & UCMachine::getString | ( | uint16 | str | ) |
Definition at line 1956 of file UCMachine.cpp.
References stringHeap.
Referenced by execProcess(), UCList::getString(), AskGump::InitGump(), UCList::removeString(), and UCList::stringInList().
UCMachine::INTRINSIC | ( | I_getCurrentTimerTick | ) |
UCMachine::INTRINSIC | ( | I_numToStr | ) |
UCMachine::INTRINSIC | ( | I_rndRange | ) |
UCMachine::INTRINSIC | ( | I_urandom | ) |
UCMachine::INTRINSIC | ( | I_getName | ) |
UCMachine::INTRINSIC | ( | I_dummyProcess | ) |
UCMachine::INTRINSIC | ( | I_true | ) |
bool UCMachine::loadGlobals | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
Definition at line 2286 of file UCMachine.cpp.
References globals, and BitSet::load().
Referenced by GUIApp::loadGame().
void UCMachine::loadIntrinsics | ( | Intrinsic * | i, | |
unsigned int | icount | |||
) | [protected] |
Definition at line 151 of file UCMachine.cpp.
References intrinsiccount, and intrinsics.
Referenced by UCMachine().
bool UCMachine::loadLists | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
Definition at line 2314 of file UCMachine.cpp.
References listHeap, listIDs, UCList::load(), idMan::load(), IDataSource::read2(), and IDataSource::read4().
Referenced by GUIApp::loadGame().
bool UCMachine::loadStrings | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
Definition at line 2291 of file UCMachine.cpp.
References idMan::load(), IDataSource::read(), IDataSource::read2(), IDataSource::read4(), stringHeap, and stringIDs.
Referenced by GUIApp::loadGame().
Definition at line 2079 of file UCMachine.cpp.
References SEG_OBJ.
Referenced by Object::callUsecode().
Definition at line 2183 of file UCMachine.cpp.
References BaseUCStack::access2(), Kernel::get_instance(), Kernel::getProcess(), perr, SEG_GLOBAL, SEG_OBJ, SEG_STACK_FIRST, SEG_STACK_LAST, SEG_STRING, and UCProcess::stack.
void UCMachine::reset | ( | ) |
Definition at line 136 of file UCMachine.cpp.
References con, globals, listHeap, MM_INFO, Console::Print(), BitSet::setSize(), and stringHeap.
Referenced by GUIApp::resetEngine().
void UCMachine::saveGlobals | ( | ODataSource * | ods | ) |
Definition at line 2254 of file UCMachine.cpp.
References globals, and BitSet::save().
Referenced by GUIApp::saveGame().
void UCMachine::saveLists | ( | ODataSource * | ods | ) |
Definition at line 2273 of file UCMachine.cpp.
References listHeap, listIDs, idMan::save(), ODataSource::write2(), and ODataSource::write4().
Referenced by GUIApp::saveGame().
void UCMachine::saveStrings | ( | ODataSource * | ods | ) |
Definition at line 2259 of file UCMachine.cpp.
References idMan::save(), stringHeap, stringIDs, ODataSource::write(), ODataSource::write2(), and ODataSource::write4().
Referenced by GUIApp::saveGame().
Definition at line 2061 of file UCMachine.cpp.
References SEG_STACK.
Referenced by execProcess(), and UCProcess::load().
bool UCMachine::trace_event | ( | ) | [inline] |
Definition at line 131 of file UCMachine.h.
References trace_all, trace_events, and tracing_enabled.
Definition at line 121 of file UCMachine.h.
References trace_all, trace_classes, trace_ObjIDs, trace_PIDs, and tracing_enabled.
Referenced by execProcess().
void UCMachine::usecodeStats | ( | ) |
Definition at line 2221 of file UCMachine.cpp.
References listHeap, pout, and stringHeap.
Referenced by GUIApp::ConCmd_engineStats().
ConvertUsecode* UCMachine::convuse [private] |
Definition at line 91 of file UCMachine.h.
Referenced by execProcess(), UCMachine(), and ~UCMachine().
BitSet* UCMachine::globals [private] |
Definition at line 95 of file UCMachine.h.
Referenced by ConCmd_getGlobal(), ConCmd_setGlobal(), execProcess(), loadGlobals(), reset(), saveGlobals(), UCMachine(), and ~UCMachine().
unsigned int UCMachine::intrinsiccount [private] |
Intrinsic* UCMachine::intrinsics [private] |
std::map<uint16, UCList*> UCMachine::listHeap [private] |
Definition at line 97 of file UCMachine.h.
Referenced by assignList(), freeList(), freeStringList(), getList(), loadLists(), reset(), saveLists(), and usecodeStats().
idMan* UCMachine::listIDs [private] |
Definition at line 103 of file UCMachine.h.
Referenced by assignList(), freeList(), freeStringList(), loadLists(), saveLists(), UCMachine(), and ~UCMachine().
std::map<uint16, std::string> UCMachine::stringHeap [private] |
Definition at line 98 of file UCMachine.h.
Referenced by assignString(), duplicateString(), execProcess(), freeString(), getString(), loadStrings(), reset(), saveStrings(), and usecodeStats().
idMan* UCMachine::stringIDs [private] |
Definition at line 104 of file UCMachine.h.
Referenced by assignString(), freeString(), loadStrings(), saveStrings(), UCMachine(), and ~UCMachine().
bool UCMachine::trace_all [private] |
Definition at line 115 of file UCMachine.h.
Referenced by ConCmd_stopTrace(), ConCmd_traceAll(), trace_event(), trace_show(), and UCMachine().
std::set<uint16> UCMachine::trace_classes [private] |
Definition at line 119 of file UCMachine.h.
Referenced by ConCmd_stopTrace(), ConCmd_traceClass(), and trace_show().
bool UCMachine::trace_events [private] |
Definition at line 116 of file UCMachine.h.
Referenced by ConCmd_stopTrace(), ConCmd_traceEvents(), and trace_event().
std::set<ObjId> UCMachine::trace_ObjIDs [private] |
Definition at line 117 of file UCMachine.h.
Referenced by ConCmd_stopTrace(), ConCmd_traceObjID(), and trace_show().
std::set<ProcId> UCMachine::trace_PIDs [private] |
Definition at line 118 of file UCMachine.h.
Referenced by ConCmd_stopTrace(), ConCmd_tracePID(), and trace_show().
bool UCMachine::tracing_enabled [private] |
Definition at line 114 of file UCMachine.h.
Referenced by ConCmd_stopTrace(), ConCmd_traceAll(), ConCmd_traceClass(), ConCmd_traceEvents(), ConCmd_traceObjID(), ConCmd_tracePID(), trace_event(), trace_show(), and UCMachine().
UCMachine * UCMachine::ucmachine = 0 [static, private] |
Definition at line 106 of file UCMachine.h.
Referenced by get_instance(), UCMachine(), and ~UCMachine().