#include <Kernel.h>
Definition at line 35 of file Kernel.h.
Kernel::Kernel | ( | ) |
Definition at line 34 of file Kernel.cpp.
References con, current_process, framebyframe, framenum, kernel, MM_INFO, paused, pIDs, Console::Print(), processes, and runningprocess.
Kernel::~Kernel | ( | ) |
Definition at line 48 of file Kernel.cpp.
References con, kernel, MM_INFO, pIDs, Console::Print(), and reset().
Definition at line 88 of file Kernel.cpp.
References perr, Process::pid, processes, and setNextProcess().
Referenced by Object::callUsecode(), CurrentMap::createEggHatcher(), Gump::CreateNotifier(), Pentagram::AudioMixer::createProcesses(), Actor::cSetActivity(), Item::destroy(), MainActor::die(), Actor::die(), Actor::doAnim(), ActorAnimProcess::doHitSpecial(), ActorAnimProcess::doSpecial(), ContainerGump::DropItem(), MainActor::ensureGravityProcess(), Item::ensureGravityProcess(), Item::explode(), InverterProcess::invertScreen(), GUIApp::newGame(), GameMapGump::OnMouseClick(), Actor::receiveHit(), GUIApp::resetEngine(), LoiterProcess::run(), GrantPeaceProcess::run(), CombatProcess::run(), AvatarDeathProcess::run(), ActorBarkNotifyProcess::run(), CameraProcess::SetCameraProcess(), Actor::setInCombat(), U8Game::startInitialUsecode(), QuickAvatarMoverProcess::startMover(), ConApp::startup(), ActorAnimProcess::terminate(), and CombatProcess::waitForTarget().
add a process and run it immediately
Definition at line 110 of file Kernel.cpp.
References Process::flags, framenum, perr, Process::pid, Process::PROC_ACTIVE, processes, Process::run(), and runningprocess.
Referenced by UCMachine::execProcess().
void Kernel::addProcessLoader | ( | std::string | classname, | |
ProcessLoadFunc | func | |||
) | [inline] |
Definition at line 77 of file Kernel.cpp.
References idMan::getNewID(), loading, Process::pid, and pIDs.
Referenced by Process::Process().
void Kernel::ConCmd_advanceFrame | ( | const Console::ArgvType & | argv | ) | [static] |
"Kernel::advanceFrame" console command
Definition at line 331 of file Kernel.cpp.
References get_instance(), isFrameByFrame(), kernel, pout, and unpause().
Referenced by GUIApp::GUIApp(), and GUIApp::~GUIApp().
void Kernel::ConCmd_listProcesses | ( | const Console::ArgvType & | argv | ) | [static] |
"Kernel::listProcesses" console command
Definition at line 275 of file Kernel.cpp.
References get_instance(), kernel, pout, and processes.
Referenced by GUIApp::GUIApp(), and GUIApp::~GUIApp().
void Kernel::ConCmd_processInfo | ( | const Console::ArgvType & | argv | ) | [static] |
"Kernel::processInfo" console command
Definition at line 300 of file Kernel.cpp.
References Process::dumpInfo(), get_instance(), getProcess(), kernel, and pout.
Referenced by GUIApp::GUIApp(), and GUIApp::~GUIApp().
void Kernel::ConCmd_processTypes | ( | const Console::ArgvType & | argv | ) | [static] |
"Kernel::processTypes" console command
Definition at line 270 of file Kernel.cpp.
References get_instance(), and processTypes().
Referenced by GUIApp::GUIApp(), and GUIApp::~GUIApp().
void Kernel::ConCmd_toggleFrameByFrame | ( | const Console::ArgvType & | argv | ) | [static] |
"Kernel::toggleFrameByFrame" console command
Definition at line 319 of file Kernel.cpp.
References get_instance(), isFrameByFrame(), kernel, pause(), pout, setFrameByFrame(), and unpause().
Referenced by GUIApp::GUIApp(), and GUIApp::~GUIApp().
find a (any) process of the given objid, processtype
Definition at line 359 of file Kernel.cpp.
References processes.
Referenced by Actor::getCombatProcess().
static Kernel* Kernel::get_instance | ( | ) | [inline, static] |
Definition at line 40 of file Kernel.h.
References kernel.
Referenced by CurrentMap::addItem(), CurrentMap::addItemToEnd(), UCMachine::assignPointer(), Object::callUsecode(), CurrentMap::clear(), Object::clearObjId(), SliderGump::Close(), ModalGump::Close(), Item::collideMove(), ConCmd_advanceFrame(), GUIApp::ConCmd_engineStats(), ConCmd_listProcesses(), ConCmd_processInfo(), ConCmd_processTypes(), ConCmd_toggleFrameByFrame(), CurrentMap::createEggHatcher(), Gump::CreateNotifier(), Pentagram::AudioMixer::createProcesses(), Actor::cSetActivity(), UCMachine::dereferencePointer(), Item::destroy(), MainActor::die(), Actor::die(), Actor::doAnim(), ActorAnimProcess::doHitSpecial(), ActorAnimProcess::doSpecial(), ContainerGump::DropItem(), MainActor::ensureGravityProcess(), Item::ensureGravityProcess(), UCMachine::execProcess(), Item::explode(), Actor::getCombatProcess(), GUIApp::getGameTimeInSeconds(), GameMapGump::GetLocationOfItem(), Gump::GetNotifyProcess(), AvatarMoverProcess::handleNormalMode(), ActorAnimProcess::init(), ModalGump::InitGump(), InverterProcess::invertScreen(), AvatarMoverProcess::jump(), Actor::killAllButCombatProcesses(), Actor::killAllButFallAnims(), Item::leaveFastArea(), GUIApp::load(), GameMapGump::OnMouseClick(), GameMapGump::PaintThis(), ContainerGump::PaintThis(), Process::Process(), UCMachine::ptrToObject(), Actor::receiveHit(), GUIApp::resetEngine(), StartU8Process::run(), LoiterProcess::run(), GrantPeaceProcess::run(), CombatProcess::run(), BarkGump::Run(), AvatarMoverProcess::run(), AvatarDeathProcess::run(), ActorBarkNotifyProcess::run(), ActorAnimProcess::run(), GUIApp::save(), CameraProcess::SetCameraProcess(), Actor::setInCombat(), GUIApp::shutdownGame(), U8Game::startInitialUsecode(), QuickAvatarMoverProcess::startMover(), World::switchMap(), Process::terminate(), GravityProcess::terminate(), ActorAnimProcess::terminate(), QuickAvatarMoverProcess::terminateMover(), CombatProcess::turnToDirection(), AvatarMoverProcess::turnToDirection(), Process::waitFor(), CombatProcess::waitForTarget(), Process::wakeUp(), and CurrentMap::writeback().
uint32 Kernel::getFrameNum | ( | ) | const [inline] |
Definition at line 97 of file Kernel.h.
References framenum.
Referenced by ActorAnimProcess::init(), GUIApp::load(), GameMapGump::PaintThis(), ContainerGump::PaintThis(), GUIApp::resetEngine(), GUIApp::run(), ActorAnimProcess::run(), GUIApp::save(), GUIApp::shutdownGame(), and ActorAnimProcess::terminate().
Definition at line 240 of file Kernel.cpp.
References processes.
Referenced by CurrentMap::addItem(), CurrentMap::addItemToEnd(), UCMachine::assignPointer(), CurrentMap::clear(), SliderGump::Close(), Item::collideMove(), ConCmd_processInfo(), CurrentMap::createEggHatcher(), UCMachine::dereferencePointer(), MainActor::die(), Actor::die(), MainActor::ensureGravityProcess(), Item::ensureGravityProcess(), UCMachine::execProcess(), AvatarMoverProcess::handleNormalMode(), Item::leaveFastArea(), GUIApp::load(), UCMachine::ptrToObject(), Actor::receiveHit(), StartU8Process::run(), LoiterProcess::run(), Process::terminate(), GravityProcess::terminate(), QuickAvatarMoverProcess::terminateMover(), CombatProcess::turnToDirection(), AvatarMoverProcess::turnToDirection(), Process::waitFor(), CombatProcess::waitForTarget(), and CurrentMap::writeback().
ProcessIter Kernel::getProcessBeginIterator | ( | ) | [inline] |
get an iterator of the process list.
Definition at line 78 of file Kernel.h.
References processes.
Referenced by Actor::killAllButCombatProcesses(), and Actor::killAllButFallAnims().
ProcessIter Kernel::getProcessEndIterator | ( | ) | [inline] |
Definition at line 79 of file Kernel.h.
References processes.
Referenced by Actor::killAllButCombatProcesses(), and Actor::killAllButFallAnims().
Process* Kernel::getRunningProcess | ( | ) | const [inline] |
Kernel::INTRINSIC | ( | I_resetRef | ) |
Kernel::INTRINSIC | ( | I_getNumProcesses | ) |
bool Kernel::isFrameByFrame | ( | ) | const [inline] |
Definition at line 92 of file Kernel.h.
References framebyframe.
Referenced by ConCmd_advanceFrame(), and ConCmd_toggleFrameByFrame().
bool Kernel::isPaused | ( | ) | const [inline] |
void Kernel::kernelStats | ( | ) |
Definition at line 250 of file Kernel.cpp.
References pout, and processes.
Referenced by GUIApp::ConCmd_engineStats().
kill (fail) processes of a certain object and/or of a certain type
objid | the object, or 0 for any object (except objid 0) | |
type | the type, or 6 for any type | |
fail | if true, fail the processes instead of terminating them |
Definition at line 379 of file Kernel.cpp.
References Process::PROC_TERM_DEFERRED, Process::PROC_TERMINATED, and processes.
Referenced by Object::clearObjId(), Actor::die(), Actor::setInCombat(), and GravityProcess::terminate().
kill (fail) processes of a certain object and not of a certain type
objid | the object, or 0 for any object (except objid 0) | |
type | the type not to kill | |
fail | if true, fail the processes instead of terminating them |
Definition at line 398 of file Kernel.cpp.
References Process::PROC_TERM_DEFERRED, Process::PROC_TERMINATED, and processes.
Referenced by Actor::killAllButFallAnims(), and World::switchMap().
bool Kernel::load | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
Definition at line 428 of file Kernel.cpp.
References framenum, idMan::load(), loadProcess(), pIDs, processes, and IDataSource::read4().
Referenced by GUIApp::loadGame().
Process * Kernel::loadProcess | ( | IDataSource * | ids, | |
uint32 | version | |||
) | [private] |
Definition at line 445 of file Kernel.cpp.
References loading, perr, processloaders, IDataSource::read(), and IDataSource::read2().
Referenced by load().
void Kernel::pause | ( | ) | [inline] |
Definition at line 87 of file Kernel.h.
References paused.
Referenced by ConCmd_toggleFrameByFrame(), ModalGump::InitGump(), runProcesses(), and GUIApp::startDragging().
void Kernel::processTypes | ( | ) |
Definition at line 256 of file Kernel.cpp.
References pout, and processes.
Referenced by ConCmd_processTypes().
void Kernel::removeProcess | ( | Process * | proc | ) |
Definition at line 136 of file Kernel.cpp.
References idMan::clearID(), Process::flags, perr, Process::pid, pIDs, and processes.
void Kernel::reset | ( | ) |
Definition at line 58 of file Kernel.cpp.
References idMan::clearAll(), con, current_process, framebyframe, MM_INFO, paused, pIDs, Console::Print(), processes, and runningprocess.
Referenced by GUIApp::resetEngine(), GUIApp::shutdownGame(), and ~Kernel().
bool Kernel::runProcesses | ( | ) |
Definition at line 163 of file Kernel.cpp.
References idMan::clearID(), current_process, framebyframe, framenum, pause(), paused, perr, pIDs, Process::PROC_RUNPAUSED, Process::PROC_TERM_DEFERRED, Process::PROC_TERMINATED, processes, Process::run(), and runningprocess.
Referenced by GUIApp::run(), and ConApp::run().
void Kernel::save | ( | ODataSource * | ods | ) |
Definition at line 417 of file Kernel.cpp.
References framenum, pIDs, processes, idMan::save(), and ODataSource::write4().
Referenced by GUIApp::saveGame().
void Kernel::setFrameByFrame | ( | bool | fbf | ) | [inline] |
Definition at line 91 of file Kernel.h.
References framebyframe.
Referenced by ConCmd_toggleFrameByFrame().
void Kernel::setNextProcess | ( | Process * | proc | ) |
Definition at line 214 of file Kernel.cpp.
References current_process, Process::flags, Process::PROC_ACTIVE, and processes.
Referenced by addProcess(), and Process::wakeUp().
void Kernel::unpause | ( | ) | [inline] |
Definition at line 88 of file Kernel.h.
References paused.
Referenced by ModalGump::Close(), ConCmd_advanceFrame(), ConCmd_toggleFrameByFrame(), and GUIApp::stopDragging().
std::list<Process*>::iterator Kernel::current_process [private] |
Definition at line 119 of file Kernel.h.
Referenced by Kernel(), reset(), runProcesses(), and setNextProcess().
bool Kernel::framebyframe [private] |
Definition at line 127 of file Kernel.h.
Referenced by isFrameByFrame(), Kernel(), reset(), runProcesses(), and setFrameByFrame().
uint32 Kernel::framenum [private] |
Definition at line 125 of file Kernel.h.
Referenced by addProcessExec(), getFrameNum(), Kernel(), load(), runProcesses(), and save().
Kernel * Kernel::kernel = 0 [static, private] |
Definition at line 131 of file Kernel.h.
Referenced by ConCmd_advanceFrame(), ConCmd_listProcesses(), ConCmd_processInfo(), ConCmd_toggleFrameByFrame(), get_instance(), Kernel(), QuickAvatarMoverProcess::terminateMover(), and ~Kernel().
bool Kernel::loading [private] |
unsigned int Kernel::paused [private] |
Definition at line 126 of file Kernel.h.
Referenced by isPaused(), Kernel(), pause(), reset(), runProcesses(), and unpause().
idMan* Kernel::pIDs [private] |
Definition at line 117 of file Kernel.h.
Referenced by assignPID(), Kernel(), load(), removeProcess(), reset(), runProcesses(), save(), and ~Kernel().
std::list<Process*> Kernel::processes [private] |
Definition at line 116 of file Kernel.h.
Referenced by addProcess(), addProcessExec(), ConCmd_listProcesses(), findProcess(), getNumProcesses(), getProcess(), getProcessBeginIterator(), getProcessEndIterator(), Kernel(), kernelStats(), killProcesses(), killProcessesNotOfType(), load(), processTypes(), removeProcess(), reset(), runProcesses(), save(), and setNextProcess().
std::map<std::string, ProcessLoadFunc> Kernel::processloaders [private] |
Process* Kernel::runningprocess [private] |
Definition at line 129 of file Kernel.h.
Referenced by addProcessExec(), getRunningProcess(), Kernel(), reset(), and runProcesses().