summaryrefslogtreecommitdiff
path: root/src/eventlooper.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-16 04:59:03 +0200
committerTreeki <treeki@gmail.com>2012-09-16 04:59:03 +0200
commit7404c596e96bf18f458f10fb8f23ca6e1a25ca7d (patch)
tree4fcdf733873a6d74b13a986c98b6f845dd0ad3ca /src/eventlooper.cpp
parent8102791c2222c31d80858cd1d12b208dcd4ecbc3 (diff)
downloadkamek-7404c596e96bf18f458f10fb8f23ca6e1a25ca7d.tar.gz
kamek-7404c596e96bf18f458f10fb8f23ca6e1a25ca7d.zip
go speed! a terrible hack to make builds far faster
Diffstat (limited to '')
-rw-r--r--src/eventlooper.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/eventlooper.cpp b/src/eventlooper.cpp
index 5acb43c..4c0a232 100644
--- a/src/eventlooper.cpp
+++ b/src/eventlooper.cpp
@@ -18,13 +18,6 @@ struct EventLooper {
u8 delayCount; // 0x3D7
};
-struct EventTable_t {
- u64 events;
- // ...
-};
-
-extern EventTable_t *EventTable;
-
void EventLooper_Update(EventLooper *self);
@@ -58,10 +51,10 @@ bool EventLooper_Create(EventLooper *self) {
}
- if (EventTable->events & self->eventActive)
+ if (dFlagMgr_c::instance->flags & self->eventActive)
{
u64 evState = (u64)1 << (eventStart - 1);
- EventTable->events = EventTable->events | evState;
+ dFlagMgr_c::instance->flags |= evState;
}
EventLooper_Update(self);
@@ -77,7 +70,7 @@ bool EventLooper_Execute(EventLooper *self) {
void EventLooper_Update(EventLooper *self) {
- if ((EventTable->events & self->eventActive) == 0)
+ if ((dFlagMgr_c::instance->flags & self->eventActive) == 0)
return;
// Waiting for the right moment
@@ -92,23 +85,23 @@ void EventLooper_Update(EventLooper *self) {
self->delayCount = 0;
// Find which event(s) is/are on
- u64 evState = EventTable->events & self->eventFlag;
+ u64 evState = dFlagMgr_c::instance->flags & self->eventFlag;
// Turn off the old events
- EventTable->events = EventTable->events & (~self->eventFlag);
+ dFlagMgr_c::instance->flags = dFlagMgr_c::instance->flags & (~self->eventFlag);
// Shift them right if they can, if not, reset!
evState = evState << 1;
if (evState < self->eventFlag)
{
- EventTable->events = EventTable->events | evState;
+ dFlagMgr_c::instance->flags = dFlagMgr_c::instance->flags | evState;
}
else
{
char eventStart = (self->settings >> 24) & 0xFF;
evState = (u64)1 << (eventStart - 1);
- EventTable->events = EventTable->events | evState;
+ dFlagMgr_c::instance->flags = dFlagMgr_c::instance->flags | evState;
}