[Scummvm-git-logs] scummvm master -> 4f04ead64d29ee70625370edbef8d2e30cfdbef9
Strangerke
noreply at scummvm.org
Fri Jan 17 08:09:24 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4f04ead64d GOT: Rename Actor class, remove padding fields
Commit: 4f04ead64d29ee70625370edbef8d2e30cfdbef9
https://github.com/scummvm/scummvm/commit/4f04ead64d29ee70625370edbef8d2e30cfdbef9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-17T09:09:18+01:00
Commit Message:
GOT: Rename Actor class, remove padding fields
Changed paths:
engines/got/data/actor.cpp
engines/got/data/actor.h
engines/got/game/back.cpp
engines/got/game/back.h
engines/got/game/boss1.cpp
engines/got/game/boss1.h
engines/got/game/boss2.cpp
engines/got/game/boss2.h
engines/got/game/boss3.cpp
engines/got/game/boss3.h
engines/got/game/move.cpp
engines/got/game/move.h
engines/got/game/move_patterns.cpp
engines/got/game/move_patterns.h
engines/got/game/object.cpp
engines/got/game/object.h
engines/got/game/shot_movement.cpp
engines/got/game/shot_movement.h
engines/got/game/shot_pattern.cpp
engines/got/game/shot_pattern.h
engines/got/game/special_tile.cpp
engines/got/game/special_tile.h
engines/got/gfx/image.cpp
engines/got/gfx/image.h
engines/got/vars.h
engines/got/views/game_content.cpp
diff --git a/engines/got/data/actor.cpp b/engines/got/data/actor.cpp
index 682d5db939f..0fddab2a1f1 100644
--- a/engines/got/data/actor.cpp
+++ b/engines/got/data/actor.cpp
@@ -25,7 +25,7 @@
namespace Got {
-void ACTOR::loadFixed(Common::SeekableReadStream *src) {
+void Actor::loadFixed(Common::SeekableReadStream *src) {
_moveType = src->readByte();
_width = src->readByte();
_height = src->readByte();
@@ -50,15 +50,15 @@ void ACTOR::loadFixed(Common::SeekableReadStream *src) {
_funcNum = src->readByte();
_funcPass = src->readByte();
_magicHurts = src->readSint16LE();
- src->read(_future1, 4);
+ src->skip(4);
}
-void ACTOR::loadFixed(const byte *src) {
+void Actor::loadFixed(const byte *src) {
Common::MemoryReadStream stream(src, 40);
loadFixed(&stream);
}
-void ACTOR::copyFixedAndPics(const ACTOR &src) {
+void Actor::copyFixedAndPics(const Actor &src) {
_moveType = src._moveType;
_width = src._width;
_height = src._height;
@@ -83,7 +83,6 @@ void ACTOR::copyFixedAndPics(const ACTOR &src) {
_funcNum = src._funcNum;
_funcPass = src._funcPass;
_magicHurts = src._magicHurts;
- Common::copy(src._future1, src._future1 + 4, _future1);
// Copy all the surfaces for all the directions over
for (int d = 0; d < DIRECTION_COUNT; ++d) {
@@ -92,7 +91,7 @@ void ACTOR::copyFixedAndPics(const ACTOR &src) {
}
}
-ACTOR &ACTOR::operator=(const ACTOR &src) {
+Actor &Actor::operator=(const Actor &src) {
// First copy the fixed portion and the pics
copyFixedAndPics(src);
@@ -144,7 +143,6 @@ ACTOR &ACTOR::operator=(const ACTOR &src) {
_initHealth = src._initHealth;
_talkCounter = src._talkCounter;
_eType = src._eType;
- Common::copy(src._future2, src._future2 + 25, _future2);
return *this;
}
diff --git a/engines/got/data/actor.h b/engines/got/data/actor.h
index 1614c1b43ac..a6ad2832e69 100644
--- a/engines/got/data/actor.h
+++ b/engines/got/data/actor.h
@@ -30,8 +30,8 @@ namespace Got {
#define DIRECTION_COUNT 4
#define FRAME_COUNT 4
-struct ACTOR { // Size=256
- // First part loaded from disk (size=40)
+struct Actor {
+ // First part loaded from disk
byte _moveType = 0; // Movement pattern (0=none)
byte _width = 0; // Physical width
byte _height = 0; // Physical height
@@ -56,7 +56,6 @@ struct ACTOR { // Size=256
byte _funcNum = 0; // Special function when thor touches
byte _funcPass = 0; // Value to pass to func
uint16 _magicHurts = 0; // Bitwise magic hurts flags
- byte _future1[4] = {}; // Padding
// The rest is dynamic //size=216
// Direction/frame surfaces
@@ -104,7 +103,6 @@ struct ACTOR { // Size=256
byte _initHealth = 0;
byte _talkCounter = 0;
byte _eType = 0; // unused
- byte _future2[25] = {}; // padding
void loadFixed(Common::SeekableReadStream *src);
void loadFixed(const byte *src);
@@ -112,9 +110,9 @@ struct ACTOR { // Size=256
/**
* Copies the fixed portion and pics from a source actor.
*/
- void copyFixedAndPics(const ACTOR &src);
+ void copyFixedAndPics(const Actor &src);
- ACTOR &operator=(const ACTOR &src);
+ Actor &operator=(const Actor &src);
int getPos() const {
return ((_x + 7) / 16) + (((_y + 8) / 16) * 20);
diff --git a/engines/got/game/back.cpp b/engines/got/game/back.cpp
index b9609fcab06..43ff91a8513 100644
--- a/engines/got/game/back.cpp
+++ b/engines/got/game/back.cpp
@@ -306,7 +306,7 @@ void select_item() {
}
}
-int actor_speaks(ACTOR *actr, int index, int item) {
+int actor_speaks(Actor *actr, int index, int item) {
if (actr->_type != 4)
return 0;
diff --git a/engines/got/game/back.h b/engines/got/game/back.h
index a86b57e01ea..290b5f4d341 100644
--- a/engines/got/game/back.h
+++ b/engines/got/game/back.h
@@ -45,7 +45,7 @@ extern void remove_objects(int y, int x);
extern void place_tile(int x, int y, int tile);
extern int bgtile(int x, int y);
extern void select_item();
-extern int actor_speaks(ACTOR *actr, int index, int item);
+extern int actor_speaks(Actor *actr, int index, int item);
} // namespace Got
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index adcb3fc1bf6..4f8f2635e5e 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -34,7 +34,7 @@ namespace Got {
static int boss1_dead();
-int boss1_movement(ACTOR *actr) {
+int boss1_movement(Actor *actr) {
int x1, y1;
bool f = false;
@@ -180,7 +180,7 @@ done1:
return d;
}
-void check_boss1_hit(ACTOR *actr, int x1, int y1, int x2, int y2, int act_num) {
+void check_boss1_hit(Actor *actr, int x1, int y1, int x2, int y2, int act_num) {
if (actr->_moveType == 15 && act_num == 4) {
if ((!_G(actor[3])._vulnerableCountdown) && (_G(actor[3])._nextFrame != 3) &&
overlap(x1, y1, x2, y2, actr->_x + 6, actr->_y + 4, actr->_x + 14, actr->_y + 20)) {
diff --git a/engines/got/game/boss1.h b/engines/got/game/boss1.h
index 0274e92c202..dc1d0c58f86 100644
--- a/engines/got/game/boss1.h
+++ b/engines/got/game/boss1.h
@@ -27,8 +27,8 @@
namespace Got {
// Boss 1 - Snake (Jormangund)
-extern int boss1_movement(ACTOR *actr);
-extern void check_boss1_hit(ACTOR *actr, int x1, int y1, int x2, int y2, int act_num);
+extern int boss1_movement(Actor *actr);
+extern void check_boss1_hit(Actor *actr, int x1, int y1, int x2, int y2, int act_num);
extern void boss_level1();
extern void closing_sequence1();
extern void closing_sequence1_2();
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index 172e3fd359c..2c105a95952 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -46,12 +46,12 @@ static byte num_spikes;
static bool drop_flag;
static byte su[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-static int boss2a_movement(ACTOR *actr);
-static int boss2b_movement(ACTOR *actr);
+static int boss2a_movement(Actor *actr);
+static int boss2b_movement(Actor *actr);
static int boss2_die();
static void boss_set(int d, int x, int y);
-int boss2_movement(ACTOR *actr) {
+int boss2_movement(Actor *actr) {
switch (_G(setup).skill) {
case 0:
num_skulls = 3;
@@ -163,7 +163,7 @@ static void boss_set(int d, int x, int y) {
_G(actor[6])._y = y + 16;
}
-void check_boss2_hit(ACTOR *actr, int x1, int y1, int x2, int y2, int act_num) {
+void check_boss2_hit(Actor *actr, int x1, int y1, int x2, int y2, int act_num) {
if ((!_G(actor[3])._vulnerableCountdown)) {
int rep;
@@ -257,7 +257,7 @@ static int boss2_die() {
}
// Boss - skull (explode)
-static int boss2a_movement(ACTOR *actr) {
+static int boss2a_movement(Actor *actr) {
next_frame(actr);
_G(actor[4])._nextFrame = actr->_nextFrame;
_G(actor[5])._nextFrame = actr->_nextFrame;
@@ -297,7 +297,7 @@ static int boss2a_movement(ACTOR *actr) {
}
// Boss - skull - shake
-static int boss2b_movement(ACTOR *actr) {
+static int boss2b_movement(Actor *actr) {
int rep, an, hx;
if (_G(hammer)->_active && _G(hammer)->_moveType != 5) {
diff --git a/engines/got/game/boss2.h b/engines/got/game/boss2.h
index db6731726cf..66a75702d3d 100644
--- a/engines/got/game/boss2.h
+++ b/engines/got/game/boss2.h
@@ -27,8 +27,8 @@
namespace Got {
// Boss 2 - Skull (Nognir)
-extern int boss2_movement(ACTOR *actr);
-extern void check_boss2_hit(ACTOR *actr, int x1, int y1, int x2, int y2, int act_num);
+extern int boss2_movement(Actor *actr);
+extern void check_boss2_hit(Actor *actr, int x1, int y1, int x2, int y2, int act_num);
extern void boss_level2();
extern void closing_sequence2();
extern void closing_sequence2_2();
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index 6fca30e1bc1..38678a707ce 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -49,7 +49,7 @@ static int boss_die();
static void check_boss_hit();
static void boss_change_mode();
-static void set_boss(ACTOR *actr) {
+static void set_boss(Actor *actr) {
_G(actor[4])._nextFrame = actr->_nextFrame;
_G(actor[5])._nextFrame = actr->_nextFrame;
_G(actor[6])._nextFrame = actr->_nextFrame;
@@ -70,7 +70,7 @@ static void set_boss(ACTOR *actr) {
}
// Boss - Loki-2
-static int boss_movement_one(ACTOR *actr) {
+static int boss_movement_one(Actor *actr) {
int rx, ry, i, numPods = 0;
int fcount;
@@ -212,7 +212,7 @@ done1:
}
// Boss - Loki-1
-int boss3_movement(ACTOR *actr) {
+int boss3_movement(Actor *actr) {
int x1, y1, ox, oy;
int fcount;
diff --git a/engines/got/game/boss3.h b/engines/got/game/boss3.h
index 58594c69e53..844055bd692 100644
--- a/engines/got/game/boss3.h
+++ b/engines/got/game/boss3.h
@@ -27,7 +27,7 @@
namespace Got {
// Boss 3 - Loki
-extern int boss3_movement(ACTOR *actr);
+extern int boss3_movement(Actor *actr);
extern void boss_level3();
extern void ending_screen();
extern void closing_sequence3();
diff --git a/engines/got/game/move.cpp b/engines/got/game/move.cpp
index 4e70e4a2d94..4700bc2ec63 100644
--- a/engines/got/game/move.cpp
+++ b/engines/got/game/move.cpp
@@ -30,7 +30,7 @@
namespace Got {
-void next_frame(ACTOR *actr) {
+void next_frame(Actor *actr) {
const int fcount = actr->_frameCount - 1;
if (fcount <= 0) {
@@ -68,7 +68,7 @@ bool overlap(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
return false;
}
-int reverse_direction(ACTOR *actr) {
+int reverse_direction(Actor *actr) {
if (actr->_dir == 1)
return 0;
if (actr->_dir == 2)
@@ -106,7 +106,7 @@ int kill_good_guy(void) {
return 0;
}
-void actor_damaged(ACTOR *actr, int damage) {
+void actor_damaged(Actor *actr, int damage) {
if (!_G(setup).skill)
damage *= 2;
else if (_G(setup).skill == 2)
@@ -140,7 +140,7 @@ void actor_damaged(ACTOR *actr, int damage) {
}
}
-void thor_damaged(ACTOR *actr) {
+void thor_damaged(Actor *actr) {
actr->_hitThor = 1;
// If we're invincible, ignore any damage
@@ -184,7 +184,7 @@ void thor_damaged(ACTOR *actr) {
}
}
-void actor_destroyed(ACTOR *actr) {
+void actor_destroyed(Actor *actr) {
if (actr->_actorNum > 2) {
int pge = _G(pge);
@@ -220,11 +220,11 @@ void actor_destroyed(ACTOR *actr) {
}
}
-int _actor_shoots(ACTOR *actr, int dir) {
+int _actor_shoots(Actor *actr, int dir) {
int t = actr->_shotType - 1;
for (int i = MAX_ENEMIES + 3; i < MAX_ACTORS; i++) {
if ((!_G(actor[i])._active) && (!_G(actor[i])._dead)) {
- ACTOR *act = &_G(actor[i]);
+ Actor *act = &_G(actor[i]);
*act = _G(shot[t]);
int cx, cy;
@@ -277,11 +277,11 @@ int _actor_shoots(ACTOR *actr, int dir) {
return 0;
}
-void actor_always_shoots(ACTOR *actr, int dir) {
+void actor_always_shoots(Actor *actr, int dir) {
_actor_shoots(actr, dir);
}
-int actor_shoots(ACTOR *actr, int dir) {
+int actor_shoots(Actor *actr, int dir) {
int i;
int cx = (actr->_x + (actr->_sizeX / 2)) >> 4;
@@ -324,7 +324,7 @@ int actor_shoots(ACTOR *actr, int dir) {
return _actor_shoots(actr, dir);
}
-void move_actor(ACTOR *actr) {
+void move_actor(Actor *actr) {
if (actr->_vulnerableCountdown != 0)
actr->_vulnerableCountdown--;
if (actr->_shotCountdown != 0)
diff --git a/engines/got/game/move.h b/engines/got/game/move.h
index 8624e0f44fc..c1f9aff45b3 100644
--- a/engines/got/game/move.h
+++ b/engines/got/game/move.h
@@ -26,17 +26,17 @@
namespace Got {
-extern void next_frame(ACTOR *actr);
+extern void next_frame(Actor *actr);
extern bool point_within(int x, int y, int x1, int y1, int x2, int y2);
extern bool overlap(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
-extern int reverse_direction(ACTOR *actr);
+extern int reverse_direction(Actor *actr);
extern void thor_shoots();
-extern void thor_damaged(ACTOR *actr);
-extern void actor_destroyed(ACTOR *actr);
-extern int actor_shoots(ACTOR *actr, int dir);
-extern void actor_always_shoots(ACTOR *actr, int dir);
-extern void actor_damaged(ACTOR *actr, int damage);
-extern void move_actor(ACTOR *actr);
+extern void thor_damaged(Actor *actr);
+extern void actor_destroyed(Actor *actr);
+extern int actor_shoots(Actor *actr, int dir);
+extern void actor_always_shoots(Actor *actr, int dir);
+extern void actor_damaged(Actor *actr, int damage);
+extern void move_actor(Actor *actr);
} // namespace Got
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 3fdd8f0a53a..6598e8c400f 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -37,57 +37,57 @@ namespace Got {
#define TILE_FLY 140
#define TILE_SPECIAL 200
-int check_special_move1(int x, int y, ACTOR *actr);
-
-int check_move0(int x, int y, ACTOR *actr);
-int check_move1(int x, int y, ACTOR *actr);
-//int check_move2(int x, int y, ACTOR *actr);
-//int check_move3(int x, int y, ACTOR *actr);
-//int check_move4(int x, int y, ACTOR *actr);
-
-int movement_zero(ACTOR *actr);
-int movement_one(ACTOR *actr);
-int movement_two(ACTOR *actr);
-int movement_three(ACTOR *actr);
-int movement_four(ACTOR *actr);
-int movement_five(ACTOR *actr);
-int movement_six(ACTOR *actr);
-int movement_seven(ACTOR *actr);
-int movement_eight(ACTOR *actr);
-int movement_nine(ACTOR *actr);
-int movement_ten(ACTOR *actr);
-int movement_eleven(ACTOR *actr);
-int movement_twelve(ACTOR *actr); // Horz straight until bump
-int movement_thirteen(ACTOR *actr); // Pause-seek (mushroom)
-int movement_fourteen(ACTOR *actr); // Move-bump-stop (boulder)
-int movement_fifteen(ACTOR *actr); // No move, no frame cycle
-int movement_sixteen(ACTOR *actr); // Tornado 1
-int movement_seventeen(ACTOR *actr); // Tornado 2
-int movement_eighteen(ACTOR *actr); // Random-seek-bite-run
-int movement_nineteen(ACTOR *actr); // Tornado 2
-int movement_twenty(ACTOR *actr); // Tornado 2
-int movement_twentyone(ACTOR *actr); // Eyeball
-int movement_twentytwo(ACTOR *actr); // Spear
-int movement_twentythree(ACTOR *actr); // Spinball cw
-int movement_twentyfour(ACTOR *actr); // Spinball ccw
-int movement_twentyfive(ACTOR *actr); //
-int movement_twentysix(ACTOR *actr); //
-int movement_twentyseven(ACTOR *actr); //
-int movement_twentyeight(ACTOR *actr); // Tree boss
-int movement_twentynine(ACTOR *actr); // Horz or vert (pass_val)
-int movement_thirty(ACTOR *actr); // Vert straight
-int movement_thirtyone(ACTOR *actr); // Drop (stalagtite)
-int movement_thirtytwo(ACTOR *actr); // Bomb 1
-int movement_thirtythree(ACTOR *actr); // Bomb 2
-int movement_thirtyfour(ACTOR *actr); // Gun (4-dir)
-int movement_thirtyfive(ACTOR *actr); // Gun (4-dir)
-int movement_thirtysix(ACTOR *actr); // Acid drop
-int movement_thirtyseven(ACTOR *actr); // 4-way rnd,rnd len
-int movement_thirtyeight(ACTOR *actr); // Timed darting
-int movement_thirtynine(ACTOR *actr); // Troll 1
-int movement_forty(ACTOR *actr); // Troll 2
-
-int (*const movement_func[])(ACTOR *actr) = {
+int check_special_move1(int x, int y, Actor *actr);
+
+int check_move0(int x, int y, Actor *actr);
+int check_move1(int x, int y, Actor *actr);
+//int check_move2(int x, int y, Actor *actr);
+//int check_move3(int x, int y, Actor *actr);
+//int check_move4(int x, int y, Actor *actr);
+
+int movement_zero(Actor *actr);
+int movement_one(Actor *actr);
+int movement_two(Actor *actr);
+int movement_three(Actor *actr);
+int movement_four(Actor *actr);
+int movement_five(Actor *actr);
+int movement_six(Actor *actr);
+int movement_seven(Actor *actr);
+int movement_eight(Actor *actr);
+int movement_nine(Actor *actr);
+int movement_ten(Actor *actr);
+int movement_eleven(Actor *actr);
+int movement_twelve(Actor *actr); // Horz straight until bump
+int movement_thirteen(Actor *actr); // Pause-seek (mushroom)
+int movement_fourteen(Actor *actr); // Move-bump-stop (boulder)
+int movement_fifteen(Actor *actr); // No move, no frame cycle
+int movement_sixteen(Actor *actr); // Tornado 1
+int movement_seventeen(Actor *actr); // Tornado 2
+int movement_eighteen(Actor *actr); // Random-seek-bite-run
+int movement_nineteen(Actor *actr); // Tornado 2
+int movement_twenty(Actor *actr); // Tornado 2
+int movement_twentyone(Actor *actr); // Eyeball
+int movement_twentytwo(Actor *actr); // Spear
+int movement_twentythree(Actor *actr); // Spinball cw
+int movement_twentyfour(Actor *actr); // Spinball ccw
+int movement_twentyfive(Actor *actr); //
+int movement_twentysix(Actor *actr); //
+int movement_twentyseven(Actor *actr); //
+int movement_twentyeight(Actor *actr); // Tree boss
+int movement_twentynine(Actor *actr); // Horz or vert (pass_val)
+int movement_thirty(Actor *actr); // Vert straight
+int movement_thirtyone(Actor *actr); // Drop (stalagtite)
+int movement_thirtytwo(Actor *actr); // Bomb 1
+int movement_thirtythree(Actor *actr); // Bomb 2
+int movement_thirtyfour(Actor *actr); // Gun (4-dir)
+int movement_thirtyfive(Actor *actr); // Gun (4-dir)
+int movement_thirtysix(Actor *actr); // Acid drop
+int movement_thirtyseven(Actor *actr); // 4-way rnd,rnd len
+int movement_thirtyeight(Actor *actr); // Timed darting
+int movement_thirtynine(Actor *actr); // Troll 1
+int movement_forty(Actor *actr); // Troll 2
+
+int (*const movement_func[])(Actor *actr) = {
movement_zero,
movement_one,
movement_two,
@@ -130,19 +130,19 @@ int (*const movement_func[])(ACTOR *actr) = {
movement_thirtynine,
movement_forty};
-int special_movement_one(ACTOR *actr);
-int special_movement_two(ACTOR *actr);
-int special_movement_three(ACTOR *actr);
-int special_movement_four(ACTOR *actr);
-int special_movement_five(ACTOR *actr);
-int special_movement_six(ACTOR *actr);
-int special_movement_seven(ACTOR *actr);
-int special_movement_eight(ACTOR *actr);
-int special_movement_nine(ACTOR *actr);
-int special_movement_ten(ACTOR *actr);
-int special_movement_eleven(ACTOR *actr);
-
-int (*special_movement_func[])(ACTOR *actr) = {
+int special_movement_one(Actor *actr);
+int special_movement_two(Actor *actr);
+int special_movement_three(Actor *actr);
+int special_movement_four(Actor *actr);
+int special_movement_five(Actor *actr);
+int special_movement_six(Actor *actr);
+int special_movement_seven(Actor *actr);
+int special_movement_eight(Actor *actr);
+int special_movement_nine(Actor *actr);
+int special_movement_ten(Actor *actr);
+int special_movement_eleven(Actor *actr);
+
+int (*special_movement_func[])(Actor *actr) = {
nullptr,
special_movement_one,
special_movement_two,
@@ -157,7 +157,7 @@ int (*special_movement_func[])(ACTOR *actr) = {
special_movement_eleven};
// Check Thor move
-int check_move0(int x, int y, ACTOR *actr) {
+int check_move0(int x, int y, Actor *actr) {
_G(thor_icon1) = 0;
_G(thor_icon2) = 0;
_G(thor_icon3) = 0;
@@ -307,7 +307,7 @@ int check_move0(int x, int y, ACTOR *actr) {
_G(thor_special_flag) = false;
for (int i = 3; i < MAX_ACTORS; i++) {
- ACTOR *act = &_G(actor[i]);
+ Actor *act = &_G(actor[i]);
if ((act->_solid & 128) || !act->_active)
continue;
@@ -350,7 +350,7 @@ int check_move0(int x, int y, ACTOR *actr) {
}
// Check hammer move
-int check_move1(int x, int y, ACTOR *actr) {
+int check_move1(int x, int y, Actor *actr) {
if (x < 0 || x > 306 || y < 0 || y > 177)
return 0;
@@ -394,7 +394,7 @@ int check_move1(int x, int y, ACTOR *actr) {
int f = 0;
for (int i = 3; i < MAX_ACTORS; i++) {
- ACTOR *act = &_G(actor[i]);
+ Actor *act = &_G(actor[i]);
if (!act->_active || act->_type == 3)
continue;
@@ -437,7 +437,7 @@ int check_move1(int x, int y, ACTOR *actr) {
}
// Check enemy move
-int check_move2(int x, int y, ACTOR *actr) {
+int check_move2(int x, int y, Actor *actr) {
if (actr->_actorNum < 3)
return check_move1(x, y, actr);
@@ -486,7 +486,7 @@ int check_move2(int x, int y, ACTOR *actr) {
y2 = (y + actr->_sizeY) - 1;
for (int i = 0; i < MAX_ACTORS; i++) {
- ACTOR *act = &_G(actor[i]);
+ Actor *act = &_G(actor[i]);
if (act->_actorNum == actr->_actorNum || act->_actorNum == 1 || !act->_active)
continue;
if (act->_type == 3)
@@ -523,7 +523,7 @@ int check_move2(int x, int y, ACTOR *actr) {
}
// Check enemy shot move
-int check_move3(int x, int y, ACTOR *actr) {
+int check_move3(int x, int y, Actor *actr) {
if (x < 0 || x > (319 - actr->_sizeX) || y < 0 || y > 175)
return 0;
@@ -568,7 +568,7 @@ int check_move3(int x, int y, ACTOR *actr) {
if (i == actr->_actorNum)
continue;
- ACTOR *act = &_G(actor[i]);
+ Actor *act = &_G(actor[i]);
if (!act->_active)
continue;
@@ -596,7 +596,7 @@ int check_move3(int x, int y, ACTOR *actr) {
}
// Flying enemies
-int check_move4(int x, int y, ACTOR *actr) {
+int check_move4(int x, int y, Actor *actr) {
if (x < 0 || x > (319 - actr->_sizeX) || y < 0 || y > 175)
return 0;
if (overlap(x, y, x + actr->_sizeX - 1, y + actr->_sizeY - 1,
@@ -613,7 +613,7 @@ int check_move4(int x, int y, ACTOR *actr) {
#define THOR_PAD1 2
#define THOR_PAD2 4
-int check_thor_move(int x, int y, ACTOR *actr) {
+int check_thor_move(int x, int y, Actor *actr) {
if (check_move0(x, y, actr))
return 1;
if (_G(diag_flag) || _G(thor_special_flag))
@@ -679,7 +679,7 @@ int check_thor_move(int x, int y, ACTOR *actr) {
}
// Player control
-int movement_zero(ACTOR *actr) {
+int movement_zero(Actor *actr) {
int d = actr->_dir;
int od = d;
@@ -795,11 +795,11 @@ int movement_zero(ACTOR *actr) {
return d;
}
-int check_special_move1(int x, int y, ACTOR *actr) {
+int check_special_move1(int x, int y, Actor *actr) {
int i;
int x3, y3, x4, y4;
- ACTOR *act;
+ Actor *act;
if (actr->_actorNum < 3)
return check_move1(x, y, actr);
@@ -885,7 +885,7 @@ int check_special_move1(int x, int y, ACTOR *actr) {
//*==========================================================================
// Block
-int special_movement_one(ACTOR *actr) {
+int special_movement_one(Actor *actr) {
if (_G(diag_flag))
return 0;
@@ -931,14 +931,14 @@ int special_movement_one(ACTOR *actr) {
}
// Angle
-int special_movement_two(ACTOR *actr) {
+int special_movement_two(Actor *actr) {
int x1 = actr->_temp1; // Calc thor pos
int y1 = actr->_temp2;
int x2 = x1 + 13;
int y2 = y1 + 14;
for (int i = 3; i < MAX_ACTORS; i++) {
- ACTOR *act = &_G(actor[i]);
+ Actor *act = &_G(actor[i]);
if (actr->_actorNum == act->_actorNum)
continue;
if (!act->_active)
@@ -970,7 +970,7 @@ int special_movement_two(ACTOR *actr) {
}
// Yellow globe
-int special_movement_three(ACTOR *actr) {
+int special_movement_three(Actor *actr) {
if (_G(thunder_flag))
return 0;
@@ -983,7 +983,7 @@ int special_movement_three(ACTOR *actr) {
}
// Peg switch
-int special_movement_four(ACTOR *actr) {
+int special_movement_four(Actor *actr) {
if (actr->_shotCountdown != 0)
return 0;
actr->_shotCountdown = 30;
@@ -993,7 +993,7 @@ int special_movement_four(ACTOR *actr) {
}
// Boulder roll
-int special_movement_five(ACTOR *actr) {
+int special_movement_five(Actor *actr) {
int d = _G(thor)->_dir;
if (_G(diag_flag)) {
@@ -1030,12 +1030,12 @@ int special_movement_five(ACTOR *actr) {
return 0;
}
-int special_movement_six(ACTOR *actr) {
+int special_movement_six(Actor *actr) {
thor_damaged(actr);
return 0;
}
-int special_movement_seven(ACTOR *actr) {
+int special_movement_seven(Actor *actr) {
if (actr->_shotCountdown != 0)
return 0;
@@ -1045,7 +1045,7 @@ int special_movement_seven(ACTOR *actr) {
return 0;
}
-int special_movement_eight(ACTOR *actr) {
+int special_movement_eight(Actor *actr) {
if (_G(thor)->_dir < 2 || _G(diag_flag))
return 0;
@@ -1054,7 +1054,7 @@ int special_movement_eight(ACTOR *actr) {
return 0;
}
-int special_movement_nine(ACTOR *actr) {
+int special_movement_nine(Actor *actr) {
if (_G(thor)->_dir > 1 || _G(diag_flag))
return 0;
@@ -1063,7 +1063,7 @@ int special_movement_nine(ACTOR *actr) {
return 0;
}
-int special_movement_ten(ACTOR *actr) {
+int special_movement_ten(Actor *actr) {
byte &actor_ctr = GAME1 ? actr->_temp6 : actr->_talkCounter;
if (actor_ctr) {
@@ -1080,7 +1080,7 @@ int special_movement_ten(ACTOR *actr) {
}
// Red guard
-int special_movement_eleven(ACTOR *actr) {
+int special_movement_eleven(Actor *actr) {
if (actr->_talkCounter) {
actr->_talkCounter--;
return 0;
@@ -1096,13 +1096,13 @@ int special_movement_eleven(ACTOR *actr) {
}
// No movement - frame cycle
-int movement_one(ACTOR *actr) {
+int movement_one(Actor *actr) {
next_frame(actr);
return actr->_dir;
}
// Hammer only
-int movement_two(ACTOR *actr) {
+int movement_two(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -1142,7 +1142,7 @@ int movement_two(ACTOR *actr) {
}
// Walk-bump-random turn
-int movement_three(ACTOR *actr) {
+int movement_three(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -1181,7 +1181,7 @@ int movement_three(ACTOR *actr) {
}
// Simple tracking
-int movement_four(ACTOR *actr) {
+int movement_four(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
@@ -1229,7 +1229,7 @@ int movement_four(ACTOR *actr) {
return d;
}
-int movement_five(ACTOR *actr) {
+int movement_five(Actor *actr) {
int x1 = actr->_x;
int y1 = actr->_y;
int xd = 0;
@@ -1355,7 +1355,7 @@ int movement_five(ACTOR *actr) {
}
// Explosion only
-int movement_six(ACTOR *actr) {
+int movement_six(Actor *actr) {
if (actr->_currNumShots > 0) {
actr->_nextFrame++;
if (actr->_nextFrame > 2) {
@@ -1378,7 +1378,7 @@ int movement_six(ACTOR *actr) {
}
// Walk-bump-random turn (pause also)
-int movement_seven(ACTOR *actr) {
+int movement_seven(Actor *actr) {
if (actr->_nextFrame == 0 && actr->_frameCount == actr->_frameSpeed) {
actr->_moveCountdown = 12;
actr->_lastDir = g_events->getRandomNumber(3);
@@ -1387,7 +1387,7 @@ int movement_seven(ACTOR *actr) {
}
// Follow thor
-int movement_eight(ACTOR *actr) {
+int movement_eight(Actor *actr) {
if (_G(thor)->_x > 0)
actr->_x = _G(thor)->_x - 1;
else
@@ -1398,7 +1398,7 @@ int movement_eight(ACTOR *actr) {
}
// 4-way straight (random length) change
-int movement_nine(ACTOR *actr) {
+int movement_nine(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -1443,7 +1443,7 @@ int movement_nine(ACTOR *actr) {
}
// Vert straight (random length) change
-int movement_ten(ACTOR *actr) {
+int movement_ten(Actor *actr) {
int lastDir = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -1488,7 +1488,7 @@ int movement_ten(ACTOR *actr) {
}
// Horz only (bats)
-int movement_eleven(ACTOR *actr) {
+int movement_eleven(Actor *actr) {
int d = actr->_lastDir;
switch (d) {
@@ -1534,7 +1534,7 @@ int movement_eleven(ACTOR *actr) {
}
// Horz straight until bump
-int movement_twelve(ACTOR *actr) {
+int movement_twelve(Actor *actr) {
int d = actr->_lastDir;
switch (d) {
@@ -1559,7 +1559,7 @@ int movement_twelve(ACTOR *actr) {
}
// Pause-seek (mushroom)
-int movement_thirteen(ACTOR *actr) {
+int movement_thirteen(Actor *actr) {
int d = actr->_lastDir;
if (actr->_counter == 0 && actr->_unpauseCountdown == 0) {
@@ -1585,7 +1585,7 @@ int movement_thirteen(ACTOR *actr) {
}
// Move-bump-stop (boulder)
-int movement_fourteen(ACTOR *actr) {
+int movement_fourteen(Actor *actr) {
int d = actr->_lastDir;
actr->_dir = d;
int x1 = actr->_x;
@@ -1629,12 +1629,12 @@ int movement_fourteen(ACTOR *actr) {
}
// No movement - no frame cycle
-int movement_fifteen(ACTOR *actr) {
+int movement_fifteen(Actor *actr) {
return actr->_dir;
}
// Tornado 1
-int movement_sixteen(ACTOR *actr) {
+int movement_sixteen(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -1666,7 +1666,7 @@ int movement_sixteen(ACTOR *actr) {
}
// Tornado 2
-int movement_seventeen(ACTOR *actr) {
+int movement_seventeen(Actor *actr) {
int d = actr->_lastDir;
switch (d) {
@@ -1711,7 +1711,7 @@ int movement_seventeen(ACTOR *actr) {
}
// No movement - frame cycle
-int movement_eighteen(ACTOR *actr) {
+int movement_eighteen(Actor *actr) {
int d;
if (actr->_temp5) {
@@ -1754,11 +1754,11 @@ int movement_eighteen(ACTOR *actr) {
}
// No movement - frame cycle
-int movement_nineteen(ACTOR *actr) {
+int movement_nineteen(Actor *actr) {
return movement_seven(actr);
}
-int movement_twenty(ACTOR *actr) {
+int movement_twenty(Actor *actr) {
if (GAME1)
// Boss - snake
return boss1_movement(actr);
@@ -1767,12 +1767,12 @@ int movement_twenty(ACTOR *actr) {
}
// No movement - frame cycle
-int movement_twentyone(ACTOR *actr) {
+int movement_twentyone(Actor *actr) {
return movement_three(actr);
}
// Spear
-int movement_twentytwo(ACTOR *actr) {
+int movement_twentytwo(Actor *actr) {
int d = actr->_lastDir;
if (actr->_directions == 1)
d = 0;
@@ -1862,7 +1862,7 @@ redo:
}
// Spinball counter-clockwise
-int movement_twentythree(ACTOR *actr) {
+int movement_twentythree(Actor *actr) {
int d = actr->_lastDir;
next_frame(actr);
if (actr->_passValue & 2)
@@ -1958,7 +1958,7 @@ int movement_twentythree(ACTOR *actr) {
}
// Spinball clockwise
-int movement_twentyfour(ACTOR *actr) {
+int movement_twentyfour(Actor *actr) {
int d = actr->_lastDir;
next_frame(actr);
if (actr->_passValue & 2)
@@ -2054,7 +2054,7 @@ int movement_twentyfour(ACTOR *actr) {
}
// Acid puddle
-int movement_twentyfive(ACTOR *actr) {
+int movement_twentyfive(Actor *actr) {
if (actr->_temp2) {
actr->_temp2--;
return movement_one(actr);
@@ -2076,7 +2076,7 @@ int movement_twentyfive(ACTOR *actr) {
return movement_three(actr);
}
-int movement_twentysix(ACTOR *actr) {
+int movement_twentysix(Actor *actr) {
if (GAME2)
return boss2_movement(actr);
if (GAME3)
@@ -2085,7 +2085,7 @@ int movement_twentysix(ACTOR *actr) {
return movement_one(actr);
}
-int movement_twentyseven(ACTOR *actr) {
+int movement_twentyseven(Actor *actr) {
if (GAME2)
return boss2_movement(actr);
@@ -2102,7 +2102,7 @@ void set_thor_vars() {
}
// Fish
-int movement_twentyeight(ACTOR *actr) {
+int movement_twentyeight(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -2190,7 +2190,7 @@ done:
}
// Horz or vert (pass_val)
-int movement_twentynine(ACTOR *actr) {
+int movement_twentynine(Actor *actr) {
if (!actr->_passValue)
return movement_thirty(actr);
@@ -2198,7 +2198,7 @@ int movement_twentynine(ACTOR *actr) {
}
// Vert straight
-int movement_thirty(ACTOR *actr) {
+int movement_thirty(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -2222,7 +2222,7 @@ int movement_thirty(ACTOR *actr) {
}
// Drop (stalagtite)
-int movement_thirtyone(ACTOR *actr) {
+int movement_thirtyone(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -2251,28 +2251,28 @@ done:
}
// Unused
-int movement_thirtytwo(ACTOR *actr) {
+int movement_thirtytwo(Actor *actr) {
return 0;
}
// Unused
-int movement_thirtythree(ACTOR *actr) {
+int movement_thirtythree(Actor *actr) {
return 0;
}
// Unused
-int movement_thirtyfour(ACTOR *actr) {
+int movement_thirtyfour(Actor *actr) {
return 0;
}
// Gun (single)
-int movement_thirtyfive(ACTOR *actr) {
+int movement_thirtyfive(Actor *actr) {
actr->_nextFrame = actr->_lastDir;
return actr->_dir;
}
// Acid drop
-int movement_thirtysix(ACTOR *actr) {
+int movement_thirtysix(Actor *actr) {
actr->_speed = actr->_passValue;
next_frame(actr);
if (actr->_nextFrame == 0 && actr->_frameCount == actr->_frameSpeed) {
@@ -2283,7 +2283,7 @@ int movement_thirtysix(ACTOR *actr) {
}
// 4-way straight (random length) change
-int movement_thirtyseven(ACTOR *actr) {
+int movement_thirtyseven(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -2335,7 +2335,7 @@ int movement_thirtyseven(ACTOR *actr) {
#define OX actr->_i2
#define OY actr->_i3
#define CNT actr->_i4
-int movement_thirtyeight(ACTOR *actr) {
+int movement_thirtyeight(Actor *actr) {
int d = actr->_lastDir;
int x1 = actr->_x;
int y1 = actr->_y;
@@ -2420,7 +2420,7 @@ done:
}
// Troll 1
-int movement_thirtynine(ACTOR *actr) {
+int movement_thirtynine(Actor *actr) {
if (_G(setup).skill == 0) {
actr->_speed = 3;
actr->_numMoves = 1;
@@ -2463,7 +2463,7 @@ int movement_thirtynine(ACTOR *actr) {
}
// Troll 2
-int movement_forty(ACTOR *actr) {
+int movement_forty(Actor *actr) {
if (overlap(actr->_x + 1, actr->_y + 1, actr->_x + actr->_sizeX + 3,
actr->_y + actr->_sizeY - 1, _G(thor_x1), _G(thor_y1), _G(thor_x2), _G(thor_y2))) {
actr->_hitStrength = 150;
diff --git a/engines/got/game/move_patterns.h b/engines/got/game/move_patterns.h
index df7b0474815..9bb501ef4ee 100644
--- a/engines/got/game/move_patterns.h
+++ b/engines/got/game/move_patterns.h
@@ -26,10 +26,10 @@
namespace Got {
-extern int (*const movement_func[]) (ACTOR *actr);
-int check_move2(int x, int y, ACTOR *actr);
-int check_move3(int x, int y, ACTOR *actr);
-int check_move4(int x, int y, ACTOR *actr);
+extern int (*const movement_func[]) (Actor *actr);
+int check_move2(int x, int y, Actor *actr);
+int check_move3(int x, int y, Actor *actr);
+int check_move4(int x, int y, Actor *actr);
void set_thor_vars();
} // namespace Got
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index cecf9f6c538..cc9fd5b48cc 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -173,7 +173,7 @@ void pick_up_object(int p) {
_G(object_index[p]) = 0;
}
-int drop_object(ACTOR *actr) {
+int drop_object(Actor *actr) {
int o;
int rnd1 = g_events->getRandomNumber(99);
@@ -199,7 +199,7 @@ int drop_object(ACTOR *actr) {
return 1;
}
-int _drop_obj(ACTOR *actr, int o) {
+int _drop_obj(Actor *actr, int o) {
int p = (actr->_x + (actr->_sizeX / 2)) / 16 + (((actr->_y + (actr->_sizeY / 2)) / 16) * 20);
if (!_G(object_map[p]) && _G(scrn).icon[p / 20][p % 20] >= 140) { //nothing there and solid
_G(object_map[p]) = o;
diff --git a/engines/got/game/object.h b/engines/got/game/object.h
index d38de415e22..7d187c147be 100644
--- a/engines/got/game/object.h
+++ b/engines/got/game/object.h
@@ -28,8 +28,8 @@ namespace Got {
extern void show_objects();
extern void pick_up_object(int p);
-extern int drop_object(ACTOR *actr);
-extern int _drop_obj(ACTOR *actr, int o);
+extern int drop_object(Actor *actr);
+extern int _drop_obj(Actor *actr, int o);
extern void delete_object();
extern void use_item();
diff --git a/engines/got/game/shot_movement.cpp b/engines/got/game/shot_movement.cpp
index 08b032216c2..e4cdec359c1 100644
--- a/engines/got/game/shot_movement.cpp
+++ b/engines/got/game/shot_movement.cpp
@@ -28,22 +28,22 @@
namespace Got {
-int shot_movement_none(ACTOR *actr);
-int shot_movement_one(ACTOR *actr);
-int shot_movement_two(ACTOR *actr);
-int shot_movement_three(ACTOR *actr);
-int shot_movement_four(ACTOR *actr);
-int shot_movement_five(ACTOR *actr);
-int shot_movement_six(ACTOR *actr);
-int shot_movement_seven(ACTOR *actr);
-int shot_movement_eight(ACTOR *actr);
-int shot_movement_nine(ACTOR *actr);
-int shot_movement_ten(ACTOR *actr);
-int shot_movement_eleven(ACTOR *actr);
-int shot_movement_twelve(ACTOR *actr);
-int shot_movement_thirteen(ACTOR *actr);
-
-int (*const shot_movement_func[])(ACTOR *actr) = {
+int shot_movement_none(Actor *actr);
+int shot_movement_one(Actor *actr);
+int shot_movement_two(Actor *actr);
+int shot_movement_three(Actor *actr);
+int shot_movement_four(Actor *actr);
+int shot_movement_five(Actor *actr);
+int shot_movement_six(Actor *actr);
+int shot_movement_seven(Actor *actr);
+int shot_movement_eight(Actor *actr);
+int shot_movement_nine(Actor *actr);
+int shot_movement_ten(Actor *actr);
+int shot_movement_eleven(Actor *actr);
+int shot_movement_twelve(Actor *actr);
+int shot_movement_thirteen(Actor *actr);
+
+int (*const shot_movement_func[])(Actor *actr) = {
shot_movement_none,
shot_movement_one,
shot_movement_two,
@@ -59,7 +59,7 @@ int (*const shot_movement_func[])(ACTOR *actr) = {
shot_movement_twelve,
shot_movement_thirteen};
-void next_shot_frame(ACTOR *actr) {
+void next_shot_frame(Actor *actr) {
if (actr->_directions == 4 && actr->_framesPerDirection == 1) {
actr->_nextFrame = actr->_lastDir;
actr->_dir = 0;
@@ -78,7 +78,7 @@ void next_shot_frame(ACTOR *actr) {
}
// Boss - snake
-int shot_movement_none(ACTOR *actr) {
+int shot_movement_none(Actor *actr) {
actr->_temp3--;
if (!actr->_temp3) {
actor_destroyed(actr);
@@ -93,7 +93,7 @@ int shot_movement_none(ACTOR *actr) {
return actr->_lastDir;
}
-int shot_movement_one(ACTOR *actr) {
+int shot_movement_one(Actor *actr) {
int x1 = 0, y1 = 0;
int d = actr->_lastDir;
@@ -134,7 +134,7 @@ int shot_movement_one(ACTOR *actr) {
return d;
}
-int shot_movement_two(ACTOR *actr) {
+int shot_movement_two(Actor *actr) {
int x1 = 0, y1 = 0;
int d = actr->_lastDir;
@@ -173,7 +173,7 @@ int shot_movement_two(ACTOR *actr) {
}
// Serpent fire
-int shot_movement_three(ACTOR *actr) {
+int shot_movement_three(Actor *actr) {
int d = actr->_lastDir;
actr->_x -= 2;
@@ -207,7 +207,7 @@ int shot_movement_three(ACTOR *actr) {
}
// Wraith balls
-int shot_movement_four(ACTOR *actr) {
+int shot_movement_four(Actor *actr) {
if (actr->_temp1) {
actr->_temp1--;
if (!actr->_temp1) {
@@ -354,7 +354,7 @@ int shot_movement_four(ACTOR *actr) {
}
// No move, frame cycle
-int shot_movement_five(ACTOR *actr) {
+int shot_movement_five(Actor *actr) {
next_shot_frame(actr);
if (actr->_directions == 1)
return 0;
@@ -362,7 +362,7 @@ int shot_movement_five(ACTOR *actr) {
}
// Wraith spots
-int shot_movement_six(ACTOR *actr) {
+int shot_movement_six(Actor *actr) {
actr->_temp1--;
if (!actr->_temp1) {
actor_destroyed(actr);
@@ -385,7 +385,7 @@ int shot_movement_six(ACTOR *actr) {
#define IC 50
// Skull drop
-int shot_movement_seven(ACTOR *actr) {
+int shot_movement_seven(Actor *actr) {
if (actr->_temp3) {
actr->_temp3--;
goto done;
@@ -425,7 +425,7 @@ done:
}
// Skull bounce
-int shot_movement_eight(ACTOR *actr) {
+int shot_movement_eight(Actor *actr) {
int x, y;
x = actr->_x;
@@ -489,7 +489,7 @@ int shot_movement_eight(ACTOR *actr) {
}
// Skull explode
-int shot_movement_nine(ACTOR *actr) {
+int shot_movement_nine(Actor *actr) {
actr->_nextFrame++;
if (actr->_nextFrame == 3) {
_G(actor[actr->_creator])._currNumShots--;
@@ -502,7 +502,7 @@ int shot_movement_nine(ACTOR *actr) {
}
// Skull - stalagtites
-int shot_movement_ten(ACTOR *actr) {
+int shot_movement_ten(Actor *actr) {
int f = 0;
actr->_y += 2;
@@ -529,7 +529,7 @@ int shot_movement_ten(ACTOR *actr) {
#define DIR actr->_i5
#define CNT actr->_i6
-void calc_angle(int x1, int y1, int x2, int y2, ACTOR *actr) {
+void calc_angle(int x1, int y1, int x2, int y2, Actor *actr) {
if (x1 < x2) {
XA = -2;
XD = x2 - x1;
@@ -560,7 +560,7 @@ void calc_angle(int x1, int y1, int x2, int y2, ACTOR *actr) {
}
// Angle throw
-int shot_movement_eleven(ACTOR *actr) {
+int shot_movement_eleven(Actor *actr) {
int x1 = actr->_x;
int y1 = actr->_y;
@@ -598,7 +598,7 @@ int shot_movement_eleven(ACTOR *actr) {
}
// Angle throw Loki
-int shot_movement_twelve(ACTOR *actr) {
+int shot_movement_twelve(Actor *actr) {
int x1 = actr->_x;
int y1 = actr->_y;
@@ -652,7 +652,7 @@ int shot_movement_twelve(ACTOR *actr) {
}
// Angle throw Loki-2
-int shot_movement_thirteen(ACTOR *actr) {
+int shot_movement_thirteen(Actor *actr) {
int x1 = actr->_x;
int y1 = actr->_y;
diff --git a/engines/got/game/shot_movement.h b/engines/got/game/shot_movement.h
index 07a7b9b9ce3..2211f1d9ffb 100644
--- a/engines/got/game/shot_movement.h
+++ b/engines/got/game/shot_movement.h
@@ -26,7 +26,7 @@
namespace Got {
-extern int (*const shot_movement_func[]) (ACTOR *actr);
+extern int (*const shot_movement_func[]) (Actor *actr);
} // namespace Got
diff --git a/engines/got/game/shot_pattern.cpp b/engines/got/game/shot_pattern.cpp
index fed83dc8056..b3c488c1bc8 100644
--- a/engines/got/game/shot_pattern.cpp
+++ b/engines/got/game/shot_pattern.cpp
@@ -25,17 +25,17 @@
namespace Got {
-int shot_pattern_none(ACTOR *actr);
-int shot_pattern_one(ACTOR *actr);
-int shot_pattern_two(ACTOR *actr);
-int shot_pattern_three(ACTOR *actr);
-int shot_pattern_four(ACTOR *actr);
-int shot_pattern_five(ACTOR *actr);
-int shot_pattern_six(ACTOR *actr);
-int shot_pattern_seven(ACTOR *actr);
-int shot_pattern_eight(ACTOR *actr);
-
-int (*const shot_pattern_func[])(ACTOR *actr) = {
+int shot_pattern_none(Actor *actr);
+int shot_pattern_one(Actor *actr);
+int shot_pattern_two(Actor *actr);
+int shot_pattern_three(Actor *actr);
+int shot_pattern_four(Actor *actr);
+int shot_pattern_five(Actor *actr);
+int shot_pattern_six(Actor *actr);
+int shot_pattern_seven(Actor *actr);
+int shot_pattern_eight(Actor *actr);
+
+int (*const shot_pattern_func[])(Actor *actr) = {
shot_pattern_none,
shot_pattern_one,
shot_pattern_two,
@@ -48,12 +48,12 @@ int (*const shot_pattern_func[])(ACTOR *actr) = {
};
// No shooting
-int shot_pattern_none(ACTOR *actr) {
+int shot_pattern_none(Actor *actr) {
return 0;
}
// Uni-directional seek
-int shot_pattern_one(ACTOR *actr) {
+int shot_pattern_one(Actor *actr) {
switch (actr->_lastDir) {
case 0:
if (ABS(_G(thor_x1) - actr->_x) < 8) {
@@ -93,7 +93,7 @@ int shot_pattern_one(ACTOR *actr) {
}
// Omni directional
-int shot_pattern_two(ACTOR *actr) {
+int shot_pattern_two(Actor *actr) {
if (ABS(_G(thor)->_x - actr->_x) < 8) {
if (_G(thor)->_y > actr->_y)
actor_shoots(actr, 1);
@@ -114,7 +114,7 @@ int shot_pattern_two(ACTOR *actr) {
}
// Uni directional (backwards)
-int shot_pattern_three(ACTOR *actr) {
+int shot_pattern_three(Actor *actr) {
int ld = actr->_lastDir;
if (shot_pattern_one(actr)) {
actr->_lastDir = reverse_direction(actr);
@@ -129,7 +129,7 @@ int shot_pattern_three(ACTOR *actr) {
}
// Omni-directional not solid shot
-int shot_pattern_four(ACTOR *actr) {
+int shot_pattern_four(Actor *actr) {
if (ABS(_G(thor)->_x - actr->_x) < 8) {
if (_G(thor)->_y > actr->_y)
actor_always_shoots(actr, 1);
@@ -150,7 +150,7 @@ int shot_pattern_four(ACTOR *actr) {
}
// Boss - snake
-int shot_pattern_five(ACTOR *actr) {
+int shot_pattern_five(Actor *actr) {
if (_G(rand1) < 15 && (actr->_temp1 == 0) && (actr->_temp2 == 0)) {
actr->_y += 16;
actr->_numShotsAllowed = 3 + _G(setup).skill;
@@ -170,7 +170,7 @@ int shot_pattern_five(ACTOR *actr) {
}
// 4 surrounding squares
-int shot_pattern_six(ACTOR *actr) {
+int shot_pattern_six(Actor *actr) {
int pos = ((actr->_x) / 16) + (((actr->_y) / 16) * 20);
if (_G(thor_pos) == pos - 20)
@@ -190,12 +190,12 @@ int shot_pattern_six(ACTOR *actr) {
}
// none
-int shot_pattern_seven(ACTOR *actr) {
+int shot_pattern_seven(Actor *actr) {
return 0;
}
// random
-int shot_pattern_eight(ACTOR *actr) {
+int shot_pattern_eight(Actor *actr) {
if (!actr->_i2) {
actr->_i1 = actr->_funcPass;
actr->_i2 = 1;
diff --git a/engines/got/game/shot_pattern.h b/engines/got/game/shot_pattern.h
index 588fd8f6e0d..91182b867b7 100644
--- a/engines/got/game/shot_pattern.h
+++ b/engines/got/game/shot_pattern.h
@@ -26,7 +26,7 @@
namespace Got {
-extern int (*const shot_pattern_func[])(ACTOR *actr);
+extern int (*const shot_pattern_func[])(Actor *actr);
} // namespace Got
diff --git a/engines/got/game/special_tile.cpp b/engines/got/game/special_tile.cpp
index d1b80109abc..02301112171 100644
--- a/engines/got/game/special_tile.cpp
+++ b/engines/got/game/special_tile.cpp
@@ -207,7 +207,7 @@ int special_tile_thor(int x, int y, int icon) {
return 0;
}
-int special_tile(ACTOR *actr, int x, int y, int icon) {
+int special_tile(Actor *actr, int x, int y, int icon) {
switch (icon) {
case 201:
case 202:
diff --git a/engines/got/game/special_tile.h b/engines/got/game/special_tile.h
index c6a747b6424..339d247c171 100644
--- a/engines/got/game/special_tile.h
+++ b/engines/got/game/special_tile.h
@@ -27,7 +27,7 @@
namespace Got {
extern int special_tile_thor(int x, int y, int icon);
-extern int special_tile(ACTOR *actr, int x, int y, int icon);
+extern int special_tile(Actor *actr, int x, int y, int icon);
} // namespace Got
diff --git a/engines/got/gfx/image.cpp b/engines/got/gfx/image.cpp
index cf769204d70..f01047f4d60 100644
--- a/engines/got/gfx/image.cpp
+++ b/engines/got/gfx/image.cpp
@@ -40,7 +40,7 @@ static void createSurface(Graphics::ManagedSurface &s, const byte *src) {
s.setTransparentColor(0);
}
-void setup_actor(ACTOR *actr, char num, char dir, int x, int y) {
+void setup_actor(Actor *actr, char num, char dir, int x, int y) {
actr->_nextFrame = 0; // Next frame to be shown
actr->_frameCount = actr->_frameSpeed;
actr->_dir = dir; // Direction of travel
@@ -81,7 +81,7 @@ void setup_actor(ACTOR *actr, char num, char dir, int x, int y) {
actr->_initHealth = actr->_health;
}
-void make_actor_surface(ACTOR *actr) {
+void make_actor_surface(Actor *actr) {
assert(actr->_directions <= 4 && actr->_framesPerDirection <= 4);
for (int d = 0; d < actr->_directions; d++) {
for (int f = 0; f < actr->_framesPerDirection; f++) {
diff --git a/engines/got/gfx/image.h b/engines/got/gfx/image.h
index fa7af7943fc..2f4cc111e8c 100644
--- a/engines/got/gfx/image.h
+++ b/engines/got/gfx/image.h
@@ -28,8 +28,8 @@ namespace Got {
//extern uint make_mask(MASK_IMAGE *new_image, uint page_start,
// byte *Image, int image_width, int image_height);
-extern void setup_actor(ACTOR *actr, char num, char dir, int x, int y);
-extern void make_actor_mask(ACTOR *actr);
+extern void setup_actor(Actor *actr, char num, char dir, int x, int y);
+extern void make_actor_mask(Actor *actr);
extern int load_standard_actors();
extern void show_enemies();
extern int load_enemy(int type);
diff --git a/engines/got/vars.h b/engines/got/vars.h
index 31b616b663f..b9976eb5073 100644
--- a/engines/got/vars.h
+++ b/engines/got/vars.h
@@ -148,20 +148,20 @@ public:
SETUP _last_setup;
byte *_tmp_buff = nullptr;
- ACTOR _actor[MAX_ACTORS] = {}; //current actors
- ACTOR _enemy[MAX_ENEMIES] = {}; //current enemies
- ACTOR _shot[MAX_ENEMIES] = {}; //current shots
+ Actor _actor[MAX_ACTORS] = {}; //current actors
+ Actor _enemy[MAX_ENEMIES] = {}; //current enemies
+ Actor _shot[MAX_ENEMIES] = {}; //current shots
int8 _enemy_type[MAX_ENEMIES] = {};
int _etype[MAX_ENEMIES] = {};
- ACTOR _magic_item[2] = {};
+ Actor _magic_item[2] = {};
byte _magic_pic[2][1024] = {};
bool _warp_scroll = false;
- ACTOR *_thor = nullptr;
- ACTOR *_hammer = nullptr;
- ACTOR _explosion;
- ACTOR _sparkle;
+ Actor *_thor = nullptr;
+ Actor *_hammer = nullptr;
+ Actor _explosion;
+ Actor _sparkle;
THOR_INFO _thor_info;
bool _boss_dead = false;
byte _endgame = 0;
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index 046c7b3cfbb..75e10f288c5 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -249,8 +249,8 @@ void GameContent::drawObjects(GfxSurface &s) {
}
void GameContent::drawActors(GfxSurface &s) {
- ACTOR *actor_ptr = &_G(actor[MAX_ACTORS - 1]);
- ACTOR *actor2_storage = nullptr;
+ Actor *actor_ptr = &_G(actor[MAX_ACTORS - 1]);
+ Actor *actor2_storage = nullptr;
for (int actor_num = 0; actor_num <= MAX_ACTORS;) {
// Check for blinking flag
@@ -377,7 +377,7 @@ void GameContent::moveActors() {
void GameContent::updateActors() {
for (int i = 0; i < MAX_ACTORS; ++i) {
- ACTOR *actor = &_G(actor[i]);
+ Actor *actor = &_G(actor[i]);
if (!actor->_active && actor->_dead > 0)
actor->_dead--;
More information about the Scummvm-git-logs
mailing list