22 #ifndef ULTIMA8_KERNEL_KERNEL_H 23 #define ULTIMA8_KERNEL_KERNEL_H 25 #include "ultima/shared/std/containers.h" 26 #include "ultima/shared/std/string.h" 27 #include "ultima/ultima8/usecode/intrinsics.h" 47 static Kernel *get_instance() {
54 ProcId addProcess(
Process *proc,
bool dispose =
true);
61 Process *getProcess(ProcId pid);
63 ProcId assignPID(
Process *proc);
65 void setNextProcess(
Process *proc);
66 Process *getRunningProcess()
const {
67 return _runningProcess;
71 uint32 getNumProcesses(ObjId objid, uint16 processtype);
80 void killProcesses(ObjId objid, uint16 processtype,
bool fail);
96 return _processes.begin();
98 ProcessIter getProcessEndIterator() {
99 return _processes.end();
116 bool isPaused()
const {
120 void setFrameByFrame(
bool fbf) {
123 bool isFrameByFrame()
const {
124 return _frameByFrame;
127 void addProcessLoader(
Std::string classname, ProcessLoadFunc func) {
128 _processLoaders[classname] = func;
131 uint32 getFrameNum()
const {
132 return _tickNum / TICKS_PER_FRAME;
134 uint32 getTickNum()
const {
138 static const uint32 TICKS_PER_FRAME;
139 static const uint32 TICKS_PER_SECOND;
140 static const uint32 FRAMES_PER_SECOND;
143 static const uint16 PROC_TYPE_ALL;
145 INTRINSIC(I_getNumProcesses);
146 INTRINSIC(I_resetRef);
160 unsigned int _paused;
void killProcessesNotOfType(ObjId objid, uint16 processtype, bool fail)
void killProcesses(ObjId objid, uint16 processtype, bool fail)
ProcId addProcessExec(Process *proc, bool dispose=true)
void killAllProcessesNotOfTypeExcludeCurrent(uint16 processtype, bool fail)
ProcessIter getProcessBeginIterator()
get an iterator of the process list.
Definition: kernel.h:95
Definition: detection.h:27
Process * findProcess(ObjId objid, uint16 processtype)
find a (any) process of the given objid, processtype
Definition: containers.h:200
Definition: list_intern.h:48
Definition: list_intern.h:51
Definition: debugger.h:37