#include <Process.h>
Inheritance diagram for Process:
Definition at line 26 of file Process.h.
Definition at line 31 of file Process.cpp.
References Kernel::assignPID(), and Kernel::get_instance().
void Process::dumpInfo | ( | ) | [virtual] |
dump some info about this process to pout
Reimplemented in GumpNotifyProcess, DelayProcess, UCProcess, ActorAnimProcess, CombatProcess, and GravityProcess.
Definition at line 100 of file Process.cpp.
References flags, getPid(), item_num, pout, PROC_ACTIVE, PROC_FAILED, PROC_RUNPAUSED, PROC_SUSPENDED, PROC_TERM_DEFERRED, PROC_TERMINATED, type, and waiting.
Referenced by Kernel::ConCmd_processInfo(), UCProcess::dumpInfo(), GumpNotifyProcess::dumpInfo(), GravityProcess::dumpInfo(), DelayProcess::dumpInfo(), CombatProcess::dumpInfo(), and ActorAnimProcess::dumpInfo().
Process::ENABLE_CUSTOM_MEMORY_ALLOCATION | ( | ) |
Process::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented in AudioProcess, MusicProcess, StartU8Process, InverterProcess, PaletteFaderProcess, GumpNotifyProcess, MainMenuProcess, DelayProcess, JoystickCursorProcess, CompileProcess, DisasmProcess, UCProcess, ActorAnimProcess, ActorBarkNotifyProcess, AmbushProcess, AvatarDeathProcess, AvatarGravityProcess, AvatarMoverProcess, ClearFeignDeathProcess, CombatProcess, GrantPeaceProcess, HealProcess, LoiterProcess, PathfinderProcess, QuickAvatarMoverProcess, ResurrectionProcess, SchedulerProcess, TargetedAnimProcess, TeleportToEggProcess, CameraProcess, CreateItemProcess, DestroyItemProcess, EggHatcherProcess, FireballProcess, GravityProcess, MissileProcess, SplitItemProcess, and SpriteProcess.
void Process::fail | ( | ) |
terminate the process and recursively fail all processes waiting for it
Definition at line 37 of file Process.cpp.
References flags, PROC_FAILED, PROC_TERMINATED, and terminate().
ObjId Process::getItemNum | ( | ) | const [inline] |
ProcId Process::getPid | ( | ) | const [inline] |
Definition at line 72 of file Process.h.
References pid.
Referenced by dumpInfo(), GravityProcess::init(), ActorAnimProcess::init(), InverterProcess::invertScreen(), QuickAvatarMoverProcess::QuickAvatarMoverProcess(), PathfinderProcess::run(), GrantPeaceProcess::run(), GUIApp::save(), Gump::SetNotifyProcess(), SliderGump::setUsecodeNotify(), MovieGump::U8MovieViewer(), and waitFor().
uint32 Process::getProcessFlags | ( | ) | const [inline] |
uint16 Process::getType | ( | ) | const [inline] |
bool Process::is_active | ( | ) | const [inline] |
bool Process::is_suspended | ( | ) | const [inline] |
bool Process::is_terminated | ( | ) | const [inline] |
Definition at line 45 of file Process.h.
References flags, PROC_TERM_DEFERRED, and PROC_TERMINATED.
Referenced by UCMachine::execProcess(), SplitItemProcess::run(), and QuickAvatarMoverProcess::terminateMover().
bool Process::loadData | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
load Process data
Reimplemented in AudioProcess, MusicProcess, StartU8Process, InverterProcess, PaletteFaderProcess, GumpNotifyProcess, MainMenuProcess, DelayProcess, JoystickCursorProcess, UCProcess, ActorAnimProcess, ActorBarkNotifyProcess, AmbushProcess, AvatarDeathProcess, AvatarGravityProcess, AvatarMoverProcess, ClearFeignDeathProcess, CombatProcess, GrantPeaceProcess, HealProcess, LoiterProcess, PathfinderProcess, QuickAvatarMoverProcess, ResurrectionProcess, SchedulerProcess, TargetedAnimProcess, TeleportToEggProcess, CameraProcess, CreateItemProcess, DestroyItemProcess, EggHatcherProcess, FireballProcess, GravityProcess, MissileProcess, SplitItemProcess, and SpriteProcess.
Definition at line 150 of file Process.cpp.
References flags, item_num, pid, IDataSource::read2(), IDataSource::read4(), result, type, and waiting.
Referenced by UCProcess::loadData(), TeleportToEggProcess::loadData(), StartU8Process::loadData(), SpriteProcess::loadData(), SplitItemProcess::loadData(), SchedulerProcess::loadData(), ResurrectionProcess::loadData(), QuickAvatarMoverProcess::loadData(), PathfinderProcess::loadData(), PaletteFaderProcess::loadData(), MusicProcess::loadData(), MissileProcess::loadData(), MainMenuProcess::loadData(), LoiterProcess::loadData(), JoystickCursorProcess::loadData(), InverterProcess::loadData(), HealProcess::loadData(), GumpNotifyProcess::loadData(), GravityProcess::loadData(), GrantPeaceProcess::loadData(), FireballProcess::loadData(), EggHatcherProcess::loadData(), DestroyItemProcess::loadData(), DelayProcess::loadData(), CreateItemProcess::loadData(), CombatProcess::loadData(), ClearFeignDeathProcess::loadData(), CameraProcess::loadData(), AvatarMoverProcess::loadData(), AvatarDeathProcess::loadData(), AudioProcess::loadData(), AmbushProcess::loadData(), and ActorAnimProcess::loadData().
virtual bool Process::run | ( | const uint32 | framenum | ) | [pure virtual] |
Implemented in AudioProcess, MusicProcess, StartU8Process, InverterProcess, PaletteFaderProcess, GumpNotifyProcess, MainMenuProcess, DelayProcess, JoystickCursorProcess, CompileProcess, DisasmProcess, UCProcess, ActorAnimProcess, ActorBarkNotifyProcess, AmbushProcess, AvatarDeathProcess, AvatarGravityProcess, AvatarMoverProcess, ClearFeignDeathProcess, CombatProcess, GrantPeaceProcess, HealProcess, LoiterProcess, PathfinderProcess, QuickAvatarMoverProcess, ResurrectionProcess, SchedulerProcess, TeleportToEggProcess, CameraProcess, CreateItemProcess, DestroyItemProcess, EggHatcherProcess, FireballProcess, GravityProcess, MissileProcess, SplitItemProcess, and SpriteProcess.
Referenced by Kernel::addProcessExec(), and Kernel::runProcesses().
void Process::save | ( | ODataSource * | ods | ) |
save this process
Definition at line 123 of file Process.cpp.
References saveData(), and writeProcessHeader().
void Process::saveData | ( | ODataSource * | ods | ) | [protected, virtual] |
save the Process data
Reimplemented in AudioProcess, MusicProcess, StartU8Process, InverterProcess, PaletteFaderProcess, GumpNotifyProcess, MainMenuProcess, DelayProcess, JoystickCursorProcess, UCProcess, ActorAnimProcess, ActorBarkNotifyProcess, AmbushProcess, AvatarDeathProcess, AvatarGravityProcess, AvatarMoverProcess, ClearFeignDeathProcess, CombatProcess, GrantPeaceProcess, HealProcess, LoiterProcess, PathfinderProcess, QuickAvatarMoverProcess, ResurrectionProcess, SchedulerProcess, TargetedAnimProcess, TeleportToEggProcess, CameraProcess, CreateItemProcess, DestroyItemProcess, EggHatcherProcess, FireballProcess, GravityProcess, MissileProcess, SplitItemProcess, and SpriteProcess.
Definition at line 138 of file Process.cpp.
References flags, item_num, pid, result, type, waiting, ODataSource::write2(), and ODataSource::write4().
Referenced by save(), UCProcess::saveData(), TeleportToEggProcess::saveData(), StartU8Process::saveData(), SpriteProcess::saveData(), SplitItemProcess::saveData(), SchedulerProcess::saveData(), ResurrectionProcess::saveData(), QuickAvatarMoverProcess::saveData(), PathfinderProcess::saveData(), PaletteFaderProcess::saveData(), MusicProcess::saveData(), MissileProcess::saveData(), MainMenuProcess::saveData(), LoiterProcess::saveData(), JoystickCursorProcess::saveData(), InverterProcess::saveData(), HealProcess::saveData(), GumpNotifyProcess::saveData(), GravityProcess::saveData(), GrantPeaceProcess::saveData(), FireballProcess::saveData(), EggHatcherProcess::saveData(), DestroyItemProcess::saveData(), DelayProcess::saveData(), CreateItemProcess::saveData(), CombatProcess::saveData(), ClearFeignDeathProcess::saveData(), CameraProcess::saveData(), AvatarMoverProcess::saveData(), AvatarDeathProcess::saveData(), AudioProcess::saveData(), AmbushProcess::saveData(), and ActorAnimProcess::saveData().
void Process::setItemNum | ( | ObjId | it | ) | [inline] |
Definition at line 69 of file Process.h.
References item_num.
Referenced by UCMachine::execProcess(), and SpriteProcess::init().
void Process::setType | ( | uint16 | ty | ) | [inline] |
void Process::suspend | ( | ) |
void Process::terminate | ( | ) | [virtual] |
terminate the process. This wakes up all processes waiting for it.
Reimplemented in GumpNotifyProcess, UCProcess, ActorAnimProcess, CombatProcess, PathfinderProcess, QuickAvatarMoverProcess, CameraProcess, FireballProcess, and GravityProcess.
Definition at line 45 of file Process.cpp.
References flags, Kernel::get_instance(), Kernel::getProcess(), PROC_TERMINATED, result, waiting, and wakeUp().
Referenced by CurrentMap::clear(), CurrentMap::createEggHatcher(), fail(), HealProcess::feedAvatar(), JoystickCursorProcess::JoystickCursorProcess(), TeleportToEggProcess::run(), StartU8Process::run(), SpriteProcess::run(), SplitItemProcess::run(), ResurrectionProcess::run(), PaletteFaderProcess::run(), MissileProcess::run(), MainMenuProcess::run(), LoiterProcess::run(), InverterProcess::run(), HealProcess::run(), GrantPeaceProcess::run(), DestroyItemProcess::run(), DelayProcess::run(), CreateItemProcess::run(), CompileProcess::run(), ClearFeignDeathProcess::run(), AvatarDeathProcess::run(), AmbushProcess::run(), UCProcess::terminate(), QuickAvatarMoverProcess::terminate(), PathfinderProcess::terminate(), GumpNotifyProcess::terminate(), GravityProcess::terminate(), FireballProcess::terminate(), CombatProcess::terminate(), CameraProcess::terminate(), ActorAnimProcess::terminate(), and CurrentMap::writeback().
void Process::terminateDeferred | ( | ) | [inline] |
terminate next frame
Definition at line 56 of file Process.h.
References flags, and PROC_TERM_DEFERRED.
Referenced by UCMachine::execProcess(), Item::leaveFastArea(), QuickAvatarMoverProcess::loadData(), JoystickCursorProcess::loadData(), PathfinderProcess::PathfinderProcess(), GravityProcess::run(), and ActorAnimProcess::run().
void Process::waitFor | ( | Process * | proc | ) |
suspend until process returns. If proc is 0, suspend indefinitely
Definition at line 87 of file Process.cpp.
void Process::waitFor | ( | ProcId | pid | ) |
suspend until process 'pid' returns. If pid is 0, suspend indefinitely
Definition at line 73 of file Process.cpp.
References flags, Kernel::get_instance(), Kernel::getProcess(), pid, PROC_SUSPENDED, and waiting.
Referenced by AvatarMoverProcess::checkTurn(), Item::collideMove(), MainActor::die(), Actor::die(), ActorAnimProcess::doHitSpecial(), ContainerGump::DropItem(), UCMachine::execProcess(), AvatarMoverProcess::handleCombatMode(), AvatarMoverProcess::handleHangingMode(), AvatarMoverProcess::handleNormalMode(), AvatarMoverProcess::jump(), Actor::receiveHit(), StartU8Process::run(), SchedulerProcess::run(), PathfinderProcess::run(), LoiterProcess::run(), GrantPeaceProcess::run(), CombatProcess::run(), AvatarDeathProcess::run(), ActorBarkNotifyProcess::run(), Actor::setInCombat(), AvatarMoverProcess::step(), GravityProcess::terminate(), CombatProcess::turnToDirection(), AvatarMoverProcess::turnToDirection(), waitFor(), and CombatProcess::waitForTarget().
void Process::wakeUp | ( | uint32 | result | ) |
Definition at line 64 of file Process.cpp.
References flags, Kernel::get_instance(), PROC_SUSPENDED, result, and Kernel::setNextProcess().
Referenced by terminate().
void Process::writeProcessHeader | ( | ODataSource * | ods | ) | [protected] |
Definition at line 129 of file Process.cpp.
References ODataSource::write(), and ODataSource::write2().
Referenced by save().
uint32 Process::flags [protected] |
Reimplemented in CreateItemProcess.
Definition at line 94 of file Process.h.
Referenced by Kernel::addProcessExec(), dumpInfo(), UCMachine::execProcess(), fail(), getProcessFlags(), is_active(), is_suspended(), is_terminated(), JoystickCursorProcess::JoystickCursorProcess(), loadData(), MusicProcess::MusicProcess(), GumpNotifyProcess::notifyClosing(), Kernel::removeProcess(), UCProcess::run(), ResurrectionProcess::run(), QuickAvatarMoverProcess::run(), DisasmProcess::run(), CompileProcess::run(), saveData(), Kernel::setNextProcess(), suspend(), terminate(), terminateDeferred(), waitFor(), and wakeUp().
ObjId Process::item_num [protected] |
item we are assigned to
Definition at line 97 of file Process.h.
Referenced by ActorAnimProcess::ActorAnimProcess(), AmbushProcess::AmbushProcess(), AvatarDeathProcess::AvatarDeathProcess(), ClearFeignDeathProcess::ClearFeignDeathProcess(), CombatProcess::CombatProcess(), DestroyItemProcess::DestroyItemProcess(), ActorAnimProcess::doHitSpecial(), ActorAnimProcess::doSpecial(), dumpInfo(), UCMachine::execProcess(), FireballProcess::explode(), FireballProcess::FireballProcess(), getItemNum(), CombatProcess::getTargetDirection(), GrantPeaceProcess::GrantPeaceProcess(), GravityProcess::GravityProcess(), HealProcess::HealProcess(), CombatProcess::inAttackRange(), GravityProcess::init(), ActorAnimProcess::init(), CombatProcess::isEnemy(), CombatProcess::isValidTarget(), loadData(), LoiterProcess::LoiterProcess(), PathfinderProcess::PathfinderProcess(), ResurrectionProcess::ResurrectionProcess(), SpriteProcess::run(), SplitItemProcess::run(), ResurrectionProcess::run(), PathfinderProcess::run(), MissileProcess::run(), LoiterProcess::run(), GravityProcess::run(), GrantPeaceProcess::run(), FireballProcess::run(), DestroyItemProcess::run(), CombatProcess::run(), ClearFeignDeathProcess::run(), AmbushProcess::run(), ActorBarkNotifyProcess::run(), ActorAnimProcess::run(), saveData(), CombatProcess::seekTarget(), setItemNum(), SplitItemProcess::SplitItemProcess(), PathfinderProcess::terminate(), GravityProcess::terminate(), CombatProcess::terminate(), ActorAnimProcess::terminate(), CombatProcess::turnToDirection(), CombatProcess::waitForTarget(), and SpriteProcess::~SpriteProcess().
ProcId Process::pid [protected] |
process id
Definition at line 92 of file Process.h.
Referenced by Kernel::addProcess(), Kernel::addProcessExec(), Kernel::assignPID(), UCMachine::execProcess(), getPid(), UCProcess::load(), loadData(), Kernel::removeProcess(), saveData(), and waitFor().
uint32 Process::result [protected] |
process result
Definition at line 101 of file Process.h.
Referenced by UCMachine::execProcess(), GumpNotifyProcess::GumpNotifyProcess(), loadData(), GumpNotifyProcess::notifyClosing(), PathfinderProcess::PathfinderProcess(), SplitItemProcess::run(), PathfinderProcess::run(), GrantPeaceProcess::run(), DestroyItemProcess::run(), CreateItemProcess::run(), CameraProcess::run(), ActorAnimProcess::run(), saveData(), terminate(), and wakeUp().
uint16 Process::type [protected] |
Definition at line 98 of file Process.h.
Referenced by ActorAnimProcess::ActorAnimProcess(), AmbushProcess::AmbushProcess(), AudioProcess::AudioProcess(), AvatarDeathProcess::AvatarDeathProcess(), AvatarMoverProcess::AvatarMoverProcess(), ClearFeignDeathProcess::ClearFeignDeathProcess(), CombatProcess::CombatProcess(), DestroyItemProcess::DestroyItemProcess(), dumpInfo(), UCMachine::execProcess(), FireballProcess::FireballProcess(), getType(), GrantPeaceProcess::GrantPeaceProcess(), GravityProcess::GravityProcess(), GumpNotifyProcess::GumpNotifyProcess(), HealProcess::HealProcess(), JoystickCursorProcess::JoystickCursorProcess(), loadData(), LoiterProcess::LoiterProcess(), MusicProcess::MusicProcess(), PathfinderProcess::PathfinderProcess(), ResurrectionProcess::ResurrectionProcess(), saveData(), SchedulerProcess::SchedulerProcess(), setType(), TeleportToEggProcess::TeleportToEggProcess(), and UCProcess::terminate().
std::vector<ProcId> Process::waiting [protected] |
Processes waiting for this one to finish. When this process terminates, awaken them and pass them the result val.
Definition at line 105 of file Process.h.
Referenced by dumpInfo(), loadData(), saveData(), terminate(), and waitFor().