mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 16:52:45 +03:00
Compare commits
2 Commits
0b0b7927aa
...
c9aaa245c9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9aaa245c9 | ||
|
|
43dcfae6b0 |
@ -286,12 +286,10 @@ int32_t SchedulerThreadProcProcess(uint32_t a1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t v9 = (currTime - context->m_schedLastIdle);
|
float elapsedSec = (currTime - context->m_schedLastIdle) * 0.001;
|
||||||
context->m_schedLastIdle = currTime;
|
context->m_schedLastIdle = currTime;
|
||||||
double elapsedSec = v9 * 0.001;
|
|
||||||
|
|
||||||
// TODO
|
SynthesizeTick(context, currTime, elapsedSec);
|
||||||
// FrameTime::Update(currTime, elapsedSec);
|
|
||||||
|
|
||||||
IEvtTimerDispatch(context);
|
IEvtTimerDispatch(context);
|
||||||
|
|
||||||
|
|||||||
@ -91,3 +91,17 @@ void SynthesizePoll(EvtContext* context) {
|
|||||||
|
|
||||||
IEvtQueueDispatch(context, EVENT_ID_POLL, nullptr);
|
IEvtQueueDispatch(context, EVENT_ID_POLL, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SynthesizeTick(EvtContext* context, uint32_t currTime, float elapsedSec) {
|
||||||
|
context->m_critsect.Enter();
|
||||||
|
bool closed = context->m_schedState == EvtContext::SCHEDSTATE_CLOSED;
|
||||||
|
context->m_critsect.Leave();
|
||||||
|
|
||||||
|
if (closed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EVENT_DATA_TICK data = { elapsedSec, currTime };
|
||||||
|
|
||||||
|
IEvtQueueDispatch(context, EVENT_ID_TICK, &data);
|
||||||
|
}
|
||||||
|
|||||||
@ -15,4 +15,6 @@ void SynthesizePaint(EvtContext* context);
|
|||||||
|
|
||||||
void SynthesizePoll(EvtContext* context);
|
void SynthesizePoll(EvtContext* context);
|
||||||
|
|
||||||
|
void SynthesizeTick(EvtContext* context, uint32_t currTime, float elapsedSec);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -12,7 +12,7 @@ enum EVENTID {
|
|||||||
EVENT_ID_FOCUS = 2,
|
EVENT_ID_FOCUS = 2,
|
||||||
EVENT_ID_CLOSE = 3,
|
EVENT_ID_CLOSE = 3,
|
||||||
EVENT_ID_DESTROY = 4,
|
EVENT_ID_DESTROY = 4,
|
||||||
EVENT_ID_5 = 5,
|
EVENT_ID_TICK = 5,
|
||||||
EVENT_ID_IDLE = 6,
|
EVENT_ID_IDLE = 6,
|
||||||
EVENT_ID_POLL = 7,
|
EVENT_ID_POLL = 7,
|
||||||
EVENT_ID_INITIALIZE = 8,
|
EVENT_ID_INITIALIZE = 8,
|
||||||
@ -259,4 +259,9 @@ struct EVENT_DATA_SIZE {
|
|||||||
int32_t h;
|
int32_t h;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct EVENT_DATA_TICK {
|
||||||
|
float tickTimeSec;
|
||||||
|
uint32_t curTimeMs;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class ClntObjMgr {
|
|||||||
// Member variables
|
// Member variables
|
||||||
TSHashTable<CGObject_C, CHashKeyGUID> m_objects;
|
TSHashTable<CGObject_C, CHashKeyGUID> m_objects;
|
||||||
TSHashTable<CGObject_C, CHashKeyGUID> m_lazyCleanupObjects;
|
TSHashTable<CGObject_C, CHashKeyGUID> m_lazyCleanupObjects;
|
||||||
// TODO
|
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_lazyCleanupFifo[NUM_CLIENT_OBJECT_TYPES - 1];
|
||||||
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_visibleObjects;
|
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_visibleObjects;
|
||||||
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_reenabledObjects;
|
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_reenabledObjects;
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -83,8 +83,7 @@ void HandleObjectOutOfRangePass2(CGObject_C* object) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClntObjMgrGetCurrent()->m_lazyCleanupObjects.Insert(object, object->m_hashval, CHashKeyGUID(object->m_key));
|
ClntObjMgrGetCurrent()->m_lazyCleanupObjects.Insert(object, object->m_hashval, CHashKeyGUID(object->m_key));
|
||||||
|
ClntObjMgrGetCurrent()->m_lazyCleanupFifo[object->m_typeID - 1].LinkToTail(object);
|
||||||
// TODO link to type specific (disabled?) list in ClntObjMgrGetCurrent()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate) {
|
void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user