aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.cpp2
-rw-r--r--engines/agi/agi.h2
-rw-r--r--engines/agi/checks.cpp8
-rw-r--r--engines/agi/cycle.cpp2
-rw-r--r--engines/agi/keyboard.cpp2
-rw-r--r--engines/agi/motion.cpp16
-rw-r--r--engines/agi/op_cmd.cpp4
-rw-r--r--engines/agi/op_test.cpp8
-rw-r--r--engines/agi/savegame.cpp6
9 files changed, 25 insertions, 25 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index b1888e362e..16ab0511cc 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -347,7 +347,7 @@ int AgiEngine::agiInit() {
/* clear view table */
for (i = 0; i < MAX_VIEWTABLE; i++)
- memset(&_game.viewTable[i], 0, sizeof(struct VtEntry));
+ memset(&_game.viewTable[i], 0, sizeof(VtEntry));
initWords();
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 6b2f4d98c4..88d93d019e 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -392,7 +392,7 @@ struct AgiGame {
AgiSound sounds[MAX_DIRS]; /**< AGI sound resources */
/* view table */
- struct VtEntry viewTable[MAX_VIEWTABLE];
+ VtEntry viewTable[MAX_VIEWTABLE];
int32 ver; /**< detected game version */
diff --git a/engines/agi/checks.cpp b/engines/agi/checks.cpp
index 367964cd26..d77afce0d3 100644
--- a/engines/agi/checks.cpp
+++ b/engines/agi/checks.cpp
@@ -27,7 +27,7 @@
namespace Agi {
-int AgiEngine::checkPosition(struct VtEntry *v) {
+int AgiEngine::checkPosition(VtEntry *v) {
debugC(4, kDebugLevelSprites, "check position @ %d, %d", v->xPos, v->yPos);
if (v->xPos < 0 ||
@@ -52,8 +52,8 @@ int AgiEngine::checkPosition(struct VtEntry *v) {
/**
* Check if there's another object on the way
*/
-int AgiEngine::checkCollision(struct VtEntry *v) {
- struct VtEntry *u;
+int AgiEngine::checkCollision(VtEntry *v) {
+ VtEntry *u;
if (v->flags & IGNORE_OBJECTS)
return 0;
@@ -168,7 +168,7 @@ check_ego:
* rules, otherwise the previous position will be kept.
*/
void AgiEngine::updatePosition() {
- struct VtEntry *v;
+ VtEntry *v;
int x, y, oldX, oldY, border;
_game.vars[vBorderCode] = 0;
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 9a7884640d..2309f26e2b 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -186,7 +186,7 @@ void AgiEngine::oldInputMode() {
/* If main_cycle returns false, don't process more events! */
int AgiEngine::mainCycle() {
unsigned int key, kascii;
- struct VtEntry *v = &_game.viewTable[0];
+ VtEntry *v = &_game.viewTable[0];
_gfx->pollTimer(); /* msdos driver -> does nothing */
updateTimer();
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 62a11e0b83..becb6faf56 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -99,7 +99,7 @@ int AgiEngine::doPollKeyboard() {
}
int AgiEngine::handleController(int key) {
- struct VtEntry *v = &_game.viewTable[0];
+ VtEntry *v = &_game.viewTable[0];
int i;
/* The Black Cauldron needs KEY_ESCAPE to use menus */
diff --git a/engines/agi/motion.cpp b/engines/agi/motion.cpp
index 3536a73605..864953a81f 100644
--- a/engines/agi/motion.cpp
+++ b/engines/agi/motion.cpp
@@ -42,7 +42,7 @@ int AgiEngine::checkBlock(int x, int y) {
return true;
}
-void AgiEngine::changePos(struct VtEntry *v) {
+void AgiEngine::changePos(VtEntry *v) {
int b, x, y;
int dx[9] = { 0, 0, 1, 1, 1, 0, -1, -1, -1 };
int dy[9] = { 0, -1, -1, 0, 1, 1, 1, 0, -1 };
@@ -64,7 +64,7 @@ void AgiEngine::changePos(struct VtEntry *v) {
}
}
-void AgiEngine::motionWander(struct VtEntry *v) {
+void AgiEngine::motionWander(VtEntry *v) {
if (v->parm1--) {
if (~v->flags & DIDNT_MOVE)
return;
@@ -80,7 +80,7 @@ void AgiEngine::motionWander(struct VtEntry *v) {
}
}
-void AgiEngine::motionFollowEgo(struct VtEntry *v) {
+void AgiEngine::motionFollowEgo(VtEntry *v) {
int egoX, egoY;
int objX, objY;
int dir;
@@ -142,7 +142,7 @@ void AgiEngine::motionFollowEgo(struct VtEntry *v) {
}
}
-void AgiEngine::motionMoveObj(struct VtEntry *v) {
+void AgiEngine::motionMoveObj(VtEntry *v) {
v->direction = getDirection(v->xPos, v->yPos, v->parm1, v->parm2, v->stepSize);
/* Update V6 if ego */
@@ -153,7 +153,7 @@ void AgiEngine::motionMoveObj(struct VtEntry *v) {
inDestination(v);
}
-void AgiEngine::checkMotion(struct VtEntry *v) {
+void AgiEngine::checkMotion(VtEntry *v) {
switch (v->motion) {
case MOTION_WANDER:
motionWander(v);
@@ -178,7 +178,7 @@ void AgiEngine::checkMotion(struct VtEntry *v) {
*
*/
void AgiEngine::checkAllMotions() {
- struct VtEntry *v;
+ VtEntry *v;
for (v = _game.viewTable; v < &_game.viewTable[MAX_VIEWTABLE]; v++) {
if ((v->flags & (ANIMATED | UPDATE | DRAWN)) == (ANIMATED | UPDATE | DRAWN)
@@ -194,7 +194,7 @@ void AgiEngine::checkAllMotions() {
* type motion that * has reached its final destination coordinates.
* @param v Pointer to view table entry
*/
-void AgiEngine::inDestination(struct VtEntry *v) {
+void AgiEngine::inDestination(VtEntry *v) {
if (v->motion == MOTION_MOVE_OBJ) {
v->stepSize = v->parm3;
setflag(v->parm4, true);
@@ -210,7 +210,7 @@ void AgiEngine::inDestination(struct VtEntry *v) {
* after setting the motion mode to MOTION_MOVE_OBJ.
* @param v Pointer to view table entry
*/
-void AgiEngine::moveObj(struct VtEntry *v) {
+void AgiEngine::moveObj(VtEntry *v) {
motionMoveObj(v);
}
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index c3798bc4fb..3b1800abee 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1006,8 +1006,8 @@ cmd(restart_game) {
cmd(distance) {
int16 x1, y1, x2, y2, d;
- struct VtEntry *v0 = &game.viewTable[p0];
- struct VtEntry *v1 = &game.viewTable[p1];
+ VtEntry *v0 = &game.viewTable[p0];
+ VtEntry *v1 = &game.viewTable[p1];
if (v0->flags & DRAWN && v1->flags & DRAWN) {
x1 = v0->xPos + v0->xSize / 2;
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp
index 463a51e8c1..43624a1801 100644
--- a/engines/agi/op_test.cpp
+++ b/engines/agi/op_test.cpp
@@ -129,7 +129,7 @@ static uint8 testController(uint8 cont) {
}
static uint8 testPosn(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
- struct VtEntry *v = &game.viewTable[n];
+ VtEntry *v = &game.viewTable[n];
uint8 r;
r = v->xPos >= x1 && v->yPos >= y1 && v->xPos <= x2 && v->yPos <= y2;
@@ -140,7 +140,7 @@ static uint8 testPosn(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
}
static uint8 testObjInBox(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
- struct VtEntry *v = &game.viewTable[n];
+ VtEntry *v = &game.viewTable[n];
return v->xPos >= x1 &&
v->yPos >= y1 && v->xPos + v->xSize - 1 <= x2 && v->yPos <= y2;
@@ -148,7 +148,7 @@ static uint8 testObjInBox(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
/* if n is in centre of box */
static uint8 testObjCentre(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
- struct VtEntry *v = &game.viewTable[n];
+ VtEntry *v = &game.viewTable[n];
return v->xPos + v->xSize / 2 >= x1 &&
v->xPos + v->xSize / 2 <= x2 && v->yPos >= y1 && v->yPos <= y2;
@@ -156,7 +156,7 @@ static uint8 testObjCentre(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
/* if nect N is in right corner */
static uint8 testObjRight(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
- struct VtEntry *v = &game.viewTable[n];
+ VtEntry *v = &game.viewTable[n];
return v->xPos + v->xSize - 1 >= x1 &&
v->xPos + v->xSize - 1 <= x2 && v->yPos >= y1 && v->yPos <= y2;
diff --git a/engines/agi/savegame.cpp b/engines/agi/savegame.cpp
index 010ad79fdf..515fa35234 100644
--- a/engines/agi/savegame.cpp
+++ b/engines/agi/savegame.cpp
@@ -352,7 +352,7 @@ int AgiEngine::loadGame(const char *fileName) {
/* game.sounds - loaded above */
for (i = 0; i < vtEntries; i++) {
- struct VtEntry *v = &_game.viewTable[i];
+ VtEntry *v = &_game.viewTable[i];
v->stepTime = in->readByte();
v->stepTimeCount = in->readByte();
@@ -398,13 +398,13 @@ int AgiEngine::loadGame(const char *fileName) {
v->parm4 = in->readByte();
}
for (i = vtEntries; i < MAX_VIEWTABLE; i++) {
- memset(&_game.viewTable[i], 0, sizeof(struct VtEntry));
+ memset(&_game.viewTable[i], 0, sizeof(VtEntry));
}
/* Fix some pointers in viewtable */
for (i = 0; i < MAX_VIEWTABLE; i++) {
- struct VtEntry *v = &_game.viewTable[i];
+ VtEntry *v = &_game.viewTable[i];
if (_game.dirView[v->currentView].offset == _EMPTY)
continue;