aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-08-10 14:11:22 +0000
committerEugene Sandulenko2005-08-10 14:11:22 +0000
commit00d676c3d226d3d4430d7faf294138de895f39d4 (patch)
tree66b8958b1e48bbe90f56e09fbe3afc68281a8744
parent67b4b2c0d44b5b84cb1912b9e2c906fc59e97d2c (diff)
downloadscummvm-rg350-00d676c3d226d3d4430d7faf294138de895f39d4.tar.gz
scummvm-rg350-00d676c3d226d3d4430d7faf294138de895f39d4.tar.bz2
scummvm-rg350-00d676c3d226d3d4430d7faf294138de895f39d4.zip
EVENT -> Event
svn-id: r18644
-rw-r--r--saga/actor.cpp4
-rw-r--r--saga/animation.cpp2
-rw-r--r--saga/events.cpp50
-rw-r--r--saga/events.h22
-rw-r--r--saga/ihnm_introproc.cpp16
-rw-r--r--saga/interface.cpp2
-rw-r--r--saga/ite_introproc.cpp48
-rw-r--r--saga/palanim.cpp4
-rw-r--r--saga/scene.cpp6
-rw-r--r--saga/scene.h6
-rw-r--r--saga/script.cpp2
-rw-r--r--saga/sfuncs.cpp10
12 files changed, 86 insertions, 86 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp
index 0037f0dd01..f09fc04996 100644
--- a/saga/actor.cpp
+++ b/saga/actor.cpp
@@ -598,7 +598,7 @@ void Actor::takeExit(uint16 actorId, const HitZone *hitZone) {
}
void Actor::stepZoneAction(ActorData *actor, const HitZone *hitZone, bool exit, bool stopped) {
- EVENT event;
+ Event event;
if (actor != _protagonist) {
return;
@@ -2093,7 +2093,7 @@ void Actor::abortSpeech() {
void Actor::moveDragon(ActorData *actor) {
int16 dir0, dir1, dir2, dir3;
int16 moveType;
- EVENT event;
+ Event event;
const DragonMove *dragonMove;
if ((actor->actionCycle < 0) ||
diff --git a/saga/animation.cpp b/saga/animation.cpp
index 81d80ebeb2..3c43aacdbf 100644
--- a/saga/animation.cpp
+++ b/saga/animation.cpp
@@ -125,7 +125,7 @@ void Anim::setCycles(uint16 animId, int cycles) {
}
void Anim::play(uint16 animId, int vectorTime, bool playing) {
- EVENT event;
+ Event event;
Surface *backGroundSurface;
byte *displayBuffer;
diff --git a/saga/events.cpp b/saga/events.cpp
index b59c8aa1b5..e3dfc5f23d 100644
--- a/saga/events.cpp
+++ b/saga/events.cpp
@@ -56,7 +56,7 @@ Events::~Events(void) {
// First advances event times, then processes each event with the appropriate
// handler depending on the type of event.
int Events::handleEvents(long msec) {
- EVENT *event_p;
+ Event *event_p;
long delta_time;
int result;
@@ -66,7 +66,7 @@ int Events::handleEvents(long msec) {
// Process each event in list
for (EventList::iterator eventi = _eventList.begin(); eventi != _eventList.end(); ++eventi) {
- event_p = (EVENT *)eventi.operator->();
+ event_p = (Event *)eventi.operator->();
// Call the appropriate event handler for the specific event type
switch (event_p->type) {
@@ -98,14 +98,14 @@ int Events::handleEvents(long msec) {
if ((result == EVENT_DELETE) || (result == EVENT_INVALIDCODE)) {
// If there is no event chain, delete the base event.
if (event_p->chain == NULL) {
- eventi=_eventList.eraseAndPrev(eventi);
+ eventi = _eventList.eraseAndPrev(eventi);
} else {
// If there is an event chain present, move the next event
// in the chain up, adjust it by the previous delta time,
// and reprocess the event */
delta_time = event_p->time;
- EVENT *from_chain=event_p->chain;
- memcpy(event_p, from_chain,sizeof(*event_p));
+ Event *from_chain = event_p->chain;
+ memcpy(event_p, from_chain, sizeof(*event_p));
free(from_chain);
event_p->time += delta_time;
@@ -119,7 +119,7 @@ int Events::handleEvents(long msec) {
return SUCCESS;
}
-int Events::handleContinuous(EVENT *event) {
+int Events::handleContinuous(Event *event) {
double event_pc = 0.0; // Event completion percentage
int event_done = 0;
@@ -203,7 +203,7 @@ int Events::handleContinuous(EVENT *event) {
return EVENT_CONTINUE;
}
-int Events::handleImmediate(EVENT *event) {
+int Events::handleImmediate(Event *event) {
double event_pc = 0.0; // Event completion percentage
bool event_done = false;
@@ -262,7 +262,7 @@ int Events::handleImmediate(EVENT *event) {
return EVENT_BREAK;
}
-int Events::handleOneShot(EVENT *event) {
+int Events::handleOneShot(Event *event) {
Surface *backBuffer;
ScriptThread *sthread;
Rect rect;
@@ -468,14 +468,14 @@ int Events::handleOneShot(EVENT *event) {
return EVENT_DELETE;
}
-int Events::handleInterval(EVENT *event) {
+int Events::handleInterval(Event *event) {
return EVENT_DELETE;
}
// Schedules an event in the event list; returns a pointer to the scheduled
// event suitable for chaining if desired.
-EVENT *Events::queue(EVENT *event) {
- EVENT *queuedEvent;
+Event *Events::queue(Event *event) {
+ Event *queuedEvent;
queuedEvent = _eventList.pushBack(*event).operator->();
initializeEvent(queuedEvent);
@@ -485,24 +485,24 @@ EVENT *Events::queue(EVENT *event) {
// Places a 'add_event' on the end of an event chain given by 'head_event'
// (head_event may be in any position in the event chain)
-EVENT *Events::chain(EVENT *headEvent, EVENT *addEvent) {
+Event *Events::chain(Event *headEvent, Event *addEvent) {
if (headEvent == NULL) {
return queue(addEvent);
}
- EVENT *walkEvent;
+ Event *walkEvent;
for (walkEvent = headEvent; walkEvent->chain != NULL; walkEvent = walkEvent->chain) {
continue;
}
- walkEvent->chain = (EVENT *)malloc(sizeof(*walkEvent->chain));
+ walkEvent->chain = (Event *)malloc(sizeof(*walkEvent->chain));
*walkEvent->chain = *addEvent;
initializeEvent(walkEvent->chain);
return walkEvent->chain;
}
-int Events::initializeEvent(EVENT *event) {
+int Events::initializeEvent(Event *event) {
event->chain = NULL;
switch (event->type) {
case ONESHOT_EVENT:
@@ -522,13 +522,13 @@ int Events::initializeEvent(EVENT *event) {
}
int Events::clearList() {
- EVENT *chain_walk;
- EVENT *next_chain;
- EVENT *event_p;
+ Event *chain_walk;
+ Event *next_chain;
+ Event *event_p;
// Walk down event list
for (EventList::iterator eventi = _eventList.begin(); eventi != _eventList.end(); ++eventi) {
- event_p = (EVENT *)eventi.operator->();
+ event_p = (Event *)eventi.operator->();
// Only remove events not marked NODESTROY (engine events)
if (!(event_p->code & NODESTROY)) {
@@ -546,14 +546,14 @@ int Events::clearList() {
// Removes all events from the list (even NODESTROY)
int Events::freeList() {
- EVENT *chain_walk;
- EVENT *next_chain;
- EVENT *event_p;
+ Event *chain_walk;
+ Event *next_chain;
+ Event *event_p;
// Walk down event list
EventList::iterator eventi = _eventList.begin();
while (eventi != _eventList.end()) {
- event_p = (EVENT *)eventi.operator->();
+ event_p = (Event *)eventi.operator->();
// Remove any events chained off this one */
for (chain_walk = event_p->chain; chain_walk != NULL; chain_walk = next_chain) {
@@ -568,11 +568,11 @@ int Events::freeList() {
// Walks down the event list, updating event times by 'msec'.
int Events::processEventTime(long msec) {
- EVENT *event_p;
+ Event *event_p;
uint16 event_count = 0;
for (EventList::iterator eventi = _eventList.begin(); eventi != _eventList.end(); ++eventi) {
- event_p = (EVENT *)eventi.operator->();
+ event_p = (Event *)eventi.operator->();
event_p->time -= msec;
event_count++;
diff --git a/saga/events.h b/saga/events.h
index d2ef62e78e..65787fabdf 100644
--- a/saga/events.h
+++ b/saga/events.h
@@ -115,7 +115,7 @@ enum EVENT_PARAMS {
SET_PALETTE
};
-struct EVENT {
+struct Event {
unsigned int type;
unsigned int code; // Event operation category & flags
int op; // Event operation
@@ -130,13 +130,13 @@ struct EVENT {
long duration; // Duration of event
long d_reserved;
- EVENT *chain; // Event chain (For consecutive events)
- EVENT() {
+ Event *chain; // Event chain (For consecutive events)
+ Event() {
memset(this, 0, sizeof(*this));
}
};
-typedef SortedList<EVENT> EventList;
+typedef SortedList<Event> EventList;
#define EVENT_WARNINGCOUNT 1000
#define EVENT_MASK 0x00FF
@@ -155,16 +155,16 @@ class Events {
int handleEvents(long msec);
int clearList();
int freeList();
- EVENT *queue(EVENT *event);
- EVENT *chain(EVENT *headEvent, EVENT *addEvent);
+ Event *queue(Event *event);
+ Event *chain(Event *headEvent, Event *addEvent);
private:
- int handleContinuous(EVENT * event);
- int handleOneShot(EVENT * event);
- int handleInterval(EVENT * event);
- int handleImmediate(EVENT *event);
+ int handleContinuous(Event * event);
+ int handleOneShot(Event * event);
+ int handleInterval(Event * event);
+ int handleImmediate(Event *event);
int processEventTime(long msec);
- int initializeEvent(EVENT * event);
+ int initializeEvent(Event * event);
private:
SagaEngine *_vm;
diff --git a/saga/ihnm_introproc.cpp b/saga/ihnm_introproc.cpp
index 89837d9bf2..81ae4fde6d 100644
--- a/saga/ihnm_introproc.cpp
+++ b/saga/ihnm_introproc.cpp
@@ -117,8 +117,8 @@ int Scene::SC_IHNMIntroMovieProc1(int param, void *refCon) {
}
int Scene::IHNMIntroMovieProc1(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
switch (param) {
case SCENE_BEGIN:
@@ -155,8 +155,8 @@ int Scene::SC_IHNMIntroMovieProc2(int param, void *refCon) {
}
int Scene::IHNMIntroMovieProc2(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
PalEntry *pal;
static PalEntry current_pal[PAL_ENTRIES];
@@ -241,8 +241,8 @@ int Scene::SC_IHNMIntroMovieProc3(int param, void *refCon) {
}
int Scene::IHNMIntroMovieProc3(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
PalEntry *pal;
static PalEntry current_pal[PAL_ENTRIES];
@@ -327,8 +327,8 @@ int Scene::SC_IHNMHateProc(int param, void *refCon) {
}
int Scene::IHNMHateProc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
switch (param) {
case SCENE_BEGIN:
diff --git a/saga/interface.cpp b/saga/interface.cpp
index ec4f8690bd..3bf66224da 100644
--- a/saga/interface.cpp
+++ b/saga/interface.cpp
@@ -1186,7 +1186,7 @@ void Interface::handleChapterSelectionClick(const Point& mousePoint) {
HitZone *hitZone;
ActorData *a;
ObjectData *o;
- EVENT event;
+ Event event;
switch (objectTypeId(obj)) {
case kGameObjectHitZone:
diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp
index d0ae95bc56..8d497d3790 100644
--- a/saga/ite_introproc.cpp
+++ b/saga/ite_introproc.cpp
@@ -86,10 +86,10 @@ int Scene::ITEStartProc() {
return SUCCESS;
}
-EVENT *Scene::ITEQueueDialogue(EVENT *q_event, int n_dialogues, const INTRO_DIALOGUE dialogue[]) {
+Event *Scene::ITEQueueDialogue(Event *q_event, int n_dialogues, const INTRO_DIALOGUE dialogue[]) {
TextListEntry textEntry;
TextListEntry *entry;
- EVENT event;
+ Event event;
int voice_len;
int i;
@@ -161,7 +161,7 @@ enum {
// Queue a page of credits text. The original interpreter did word-wrapping
// automatically. We currently don't.
-EVENT *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const INTRO_CREDIT credits[]) {
+Event *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const INTRO_CREDIT credits[]) {
int game;
Common::Language lang;
@@ -225,8 +225,8 @@ EVENT *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const
TextListEntry textEntry;
TextListEntry *entry;
- EVENT event;
- EVENT *q_event = NULL;
+ Event event;
+ Event *q_event = NULL;
textEntry.color = 255;
textEntry.effectColor = 0;
@@ -292,8 +292,8 @@ int Scene::SC_ITEIntroAnimProc(int param, void *refCon) {
// Handles the introductory Dreamer's Guild / NWC logo animation scene.
int Scene::ITEIntroAnimProc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
switch (param) {
case SCENE_BEGIN:{
@@ -373,8 +373,8 @@ int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) {
// Handles first introductory cave painting scene
int Scene::ITEIntroCave1Proc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0;
static const INTRO_DIALOGUE dialogue[][4] = {
@@ -461,8 +461,8 @@ int Scene::SC_ITEIntroCave2Proc(int param, void *refCon) {
// Handles second introductory cave painting scene
int Scene::ITEIntroCave2Proc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0;
static const INTRO_DIALOGUE dialogue[][3] = {
@@ -545,8 +545,8 @@ int Scene::SC_ITEIntroCave3Proc(int param, void *refCon) {
// Handles third introductory cave painting scene
int Scene::ITEIntroCave3Proc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0;
static const INTRO_DIALOGUE dialogue[][3] = {
@@ -629,8 +629,8 @@ int Scene::SC_ITEIntroCave4Proc(int param, void *refCon) {
// Handles fourth introductory cave painting scene
int Scene::ITEIntroCave4Proc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0;
static const INTRO_DIALOGUE dialogue[][4] = {
@@ -722,8 +722,8 @@ int Scene::SC_ITEIntroValleyProc(int param, void *refCon) {
// Handles intro title scene (valley overlook)
int Scene::ITEIntroValleyProc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
static const INTRO_CREDIT credits[] = {
{EN_USA, kITEAny, kCHeader, "Producer"},
@@ -828,8 +828,8 @@ int Scene::SC_ITEIntroTreeHouseProc(int param, void *refCon) {
// Handles second intro credit screen (treehouse view)
int Scene::ITEIntroTreeHouseProc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
static const INTRO_CREDIT credits1[] = {
{EN_USA, kITEAny, kCHeader, "Game Design"},
@@ -917,8 +917,8 @@ int Scene::SC_ITEIntroFairePathProc(int param, void *refCon) {
// Handles third intro credit screen (path to puzzle tent)
int Scene::ITEIntroFairePathProc(int param) {
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
static const INTRO_CREDIT credits1[] = {
{EN_USA, kITEAny, kCHeader, "Programming"},
@@ -995,9 +995,9 @@ int Scene::SC_ITEIntroFaireTentProc(int param, void *refCon) {
// Handles fourth intro credit screen (treehouse view)
int Scene::ITEIntroFaireTentProc(int param) {
- EVENT event;
- EVENT *q_event;
- EVENT *q_event_start;
+ Event event;
+ Event *q_event;
+ Event *q_event_start;
switch (param) {
case SCENE_BEGIN:
diff --git a/saga/palanim.cpp b/saga/palanim.cpp
index 96bde81987..a81a31ac0a 100644
--- a/saga/palanim.cpp
+++ b/saga/palanim.cpp
@@ -119,7 +119,7 @@ int PalAnim::loadPalAnim(const byte *resdata, size_t resdata_len) {
}
int PalAnim::cycleStart() {
- EVENT event;
+ Event event;
if (!_loaded) {
return FAILURE;
@@ -144,7 +144,7 @@ int PalAnim::cycleStep(int vectortime) {
uint16 cycle;
uint16 cycle_limit;
- EVENT event;
+ Event event;
if (!_loaded) {
return FAILURE;
diff --git a/saga/scene.cpp b/saga/scene.cpp
index a10748d5d1..27ecb1d9fb 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -251,7 +251,7 @@ void Scene::drawTextList(Surface *ds) {
void Scene::startScene() {
SceneQueueList::iterator queueIterator;
LoadSceneParams *sceneQueue;
- EVENT event;
+ Event event;
if (_sceneLoaded) {
error("Scene::start(): Error: Can't start game...scene already loaded");
@@ -596,8 +596,8 @@ void Scene::initDoorsState() {
void Scene::loadScene(LoadSceneParams *loadSceneParams) {
size_t i;
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
static PalEntry current_pal[PAL_ENTRIES];
if ((_vm->getGameType() == GType_IHNM) && (loadSceneParams->chapter != NO_CHAPTER_CHANGE)) {
diff --git a/saga/scene.h b/saga/scene.h
index 901d977683..0a92dfbd50 100644
--- a/saga/scene.h
+++ b/saga/scene.h
@@ -38,7 +38,7 @@ namespace Saga {
class ObjectMap;
-struct EVENT;
+struct Event;
enum SceneFlags {
kSceneFlagISO = 1,
@@ -334,8 +334,8 @@ class Scene {
static int SC_ITEIntroFaireTentProc(int param, void *refCon);
private:
- EVENT *ITEQueueDialogue(EVENT *q_event, int n_dialogues, const INTRO_DIALOGUE dialogue[]);
- EVENT *ITEQueueCredits(int delta_time, int duration, int n_credits, const INTRO_CREDIT credits[]);
+ Event *ITEQueueDialogue(Event *q_event, int n_dialogues, const INTRO_DIALOGUE dialogue[]);
+ Event *ITEQueueCredits(int delta_time, int duration, int n_credits, const INTRO_CREDIT credits[]);
int ITEIntroAnimProc(int param);
int ITEIntroCave1Proc(int param);
int ITEIntroCave2Proc(int param);
diff --git a/saga/script.cpp b/saga/script.cpp
index 75180c787f..9d24584b14 100644
--- a/saga/script.cpp
+++ b/saga/script.cpp
@@ -373,7 +373,7 @@ void Script::doVerb() {
int scriptEntrypointNumber = 0;
int scriptModuleNumber = 0;
int objectType;
- EVENT event;
+ Event event;
const char *excuseText;
int excuseSampleResourceId;
const HitZone *hitZone;
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 2bbc00d20f..e8b6e35ac0 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -354,7 +354,7 @@ void Script::sfScriptDoAction(SCRIPTFUNC_PARAMS) {
ActorData *actor;
ObjectData *obj;
const HitZone *hitZone;
- EVENT event;
+ Event event;
objectId = thread->pop();
action = thread->pop();
@@ -1234,8 +1234,8 @@ void Script::sfPlacard(SCRIPTFUNC_PARAMS) {
Surface *backBuffer = _vm->_gfx->getBackBuffer();
static PalEntry cur_pal[PAL_ENTRIES];
PalEntry *pal;
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
if (_vm->getGameType() == GType_IHNM) {
warning("Psychic profile is not implemented");
@@ -1340,8 +1340,8 @@ void Script::sfPlacard(SCRIPTFUNC_PARAMS) {
void Script::sfPlacardOff(SCRIPTFUNC_PARAMS) {
static PalEntry cur_pal[PAL_ENTRIES];
PalEntry *pal;
- EVENT event;
- EVENT *q_event;
+ Event event;
+ Event *q_event;
thread->wait(kWaitTypePlacard);