aboutsummaryrefslogtreecommitdiff
path: root/sword2/events.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-11-13 19:29:32 +0000
committerTorbjörn Andersson2005-11-13 19:29:32 +0000
commit267fc7e2f652feaf6168d65ccf2916e09fe12edb (patch)
treed21682b10737fa5969374c7c59418b9502243000 /sword2/events.cpp
parentc4ad2ecb49e4b11a2f71b96b32d6ae17036e4d68 (diff)
downloadscummvm-rg350-267fc7e2f652feaf6168d65ccf2916e09fe12edb.tar.gz
scummvm-rg350-267fc7e2f652feaf6168d65ccf2916e09fe12edb.tar.bz2
scummvm-rg350-267fc7e2f652feaf6168d65ccf2916e09fe12edb.zip
Cleanup
svn-id: r19587
Diffstat (limited to 'sword2/events.cpp')
-rw-r--r--sword2/events.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/sword2/events.cpp b/sword2/events.cpp
index 289c60b5cc..49b6222438 100644
--- a/sword2/events.cpp
+++ b/sword2/events.cpp
@@ -26,7 +26,7 @@
namespace Sword2 {
void Logic::sendEvent(uint32 id, uint32 interact_id) {
- for (int i = 0; i < MAX_events; i++) {
+ for (int i = 0; i < ARRAYSIZE(_eventList); i++) {
if (_eventList[i].id == id || !_eventList[i].id) {
_eventList[i].id = id;
_eventList[i].interact_id = interact_id;
@@ -43,7 +43,7 @@ void Logic::setPlayerActionEvent(uint32 id, uint32 interact_id) {
}
int Logic::checkEventWaiting() {
- for (int i = 0; i < MAX_events; i++) {
+ for (int i = 0; i < ARRAYSIZE(_eventList); i++) {
if (_eventList[i].id == readVar(ID))
return 1;
}
@@ -55,7 +55,7 @@ void Logic::startEvent() {
// call this from stuff like fnWalk
// you must follow with a return IR_TERMINATE
- for (int i = 0; i < MAX_events; i++) {
+ for (int i = 0; i < ARRAYSIZE(_eventList); i++) {
if (_eventList[i].id == readVar(ID)) {
logicOne(_eventList[i].interact_id);
_eventList[i].id = 0;
@@ -67,7 +67,7 @@ void Logic::startEvent() {
}
void Logic::clearEvent(uint32 id) {
- for (int i = 0; i < MAX_events; i++) {
+ for (int i = 0; i < ARRAYSIZE(_eventList); i++) {
if (_eventList[i].id == id) {
_eventList[i].id = 0;
return;
@@ -76,7 +76,7 @@ void Logic::clearEvent(uint32 id) {
}
void Logic::killAllIdsEvents(uint32 id) {
- for (int i = 0; i < MAX_events; i++) {
+ for (int i = 0; i < ARRAYSIZE(_eventList); i++) {
if (_eventList[i].id == id)
_eventList[i].id = 0;
}
@@ -87,7 +87,7 @@ void Logic::killAllIdsEvents(uint32 id) {
uint32 Logic::countEvents() {
uint32 count = 0;
- for (int i = 0; i < MAX_events; i++) {
+ for (int i = 0; i < ARRAYSIZE(_eventList); i++) {
if (_eventList[i].id)
count++;
}