aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/startrek/detection.cpp3
-rw-r--r--engines/startrek/items.h2
-rw-r--r--engines/startrek/room.cpp2
-rw-r--r--engines/startrek/rooms/feather1.cpp2
-rw-r--r--engines/startrek/rooms/feather2.cpp2
-rw-r--r--engines/startrek/rooms/feather3.cpp2
-rw-r--r--engines/startrek/rooms/feather4.cpp2
-rw-r--r--engines/startrek/rooms/feather5.cpp2
-rw-r--r--engines/startrek/rooms/feather6.cpp2
-rw-r--r--engines/startrek/rooms/feather7.cpp2
-rw-r--r--engines/startrek/rooms/sins0.cpp2
-rw-r--r--engines/startrek/rooms/sins1.cpp2
-rw-r--r--engines/startrek/rooms/sins2.cpp2
-rw-r--r--engines/startrek/rooms/sins3.cpp2
-rw-r--r--engines/startrek/rooms/sins4.cpp2
-rw-r--r--engines/startrek/rooms/sins5.cpp2
-rw-r--r--engines/startrek/rooms/trial0.cpp2
-rw-r--r--engines/startrek/rooms/trial1.cpp2
-rw-r--r--engines/startrek/rooms/trial2.cpp2
-rw-r--r--engines/startrek/rooms/trial3.cpp2
-rw-r--r--engines/startrek/rooms/trial4.cpp2
-rw-r--r--engines/startrek/rooms/trial5.cpp2
22 files changed, 21 insertions, 24 deletions
diff --git a/engines/startrek/detection.cpp b/engines/startrek/detection.cpp
index 47ddcf0a3c..92c90a1db4 100644
--- a/engines/startrek/detection.cpp
+++ b/engines/startrek/detection.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm-startrek.googlecode.com/svn/trunk/detection.cpp $
- * $Id: detection.cpp 15 2010-06-27 06:13:42Z clone2727 $
- *
*/
#include "base/plugins.h"
diff --git a/engines/startrek/items.h b/engines/startrek/items.h
index 1d930e71e4..d45f601755 100644
--- a/engines/startrek/items.h
+++ b/engines/startrek/items.h
@@ -253,7 +253,7 @@ const Item g_itemList[] = {
{ false, 0x00, "", 0x00 }
};
-const int NUM_ITEMS = sizeof(g_itemList) / sizeof(struct Item) - 64; // 0x49
+const int NUM_ITEMS = ARRAYSIZE(g_itemList) - 64; // 0x49
} // End of namespace StarTrek
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 3be0783118..7e5c50f797 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -32,7 +32,7 @@
#define ADD_ROOM_OLD(ROOM) {\
if (name.equalsIgnoreCase(#ROOM)) {\
_roomActionList = ROOM##ActionList;\
- _numRoomActions = sizeof(ROOM##ActionList) / sizeof(RoomAction);\
+ _numRoomActions = ARRAYSIZE(ROOM##ActionList);\
}\
}
diff --git a/engines/startrek/rooms/feather1.cpp b/engines/startrek/rooms/feather1.cpp
index 1621ecabbd..f01bcd2bc1 100644
--- a/engines/startrek/rooms/feather1.cpp
+++ b/engines/startrek/rooms/feather1.cpp
@@ -141,7 +141,7 @@ extern const RoomAction feather1ActionList[] = {
{ {ACTION_LOOK, OBJECT_LEFT_VINE, 0, 0}, &Room::feather1LookAtLeftVine },
};
-extern const int feather1NumActions = sizeof(feather1ActionList) / sizeof(RoomAction);
+extern const int feather1NumActions = ARRAYSIZE(feather1ActionList);
void Room::feather1Tick1() {
diff --git a/engines/startrek/rooms/feather2.cpp b/engines/startrek/rooms/feather2.cpp
index 160302f000..d676490dc0 100644
--- a/engines/startrek/rooms/feather2.cpp
+++ b/engines/startrek/rooms/feather2.cpp
@@ -57,7 +57,7 @@ extern const RoomAction feather2ActionList[] = {
{ {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::feather2LookAtRedshirt },
};
-extern const int feather2NumActions = sizeof(feather2ActionList) / sizeof(RoomAction);
+extern const int feather2NumActions = ARRAYSIZE(feather2ActionList);
void Room::feather2Tick1() {
diff --git a/engines/startrek/rooms/feather3.cpp b/engines/startrek/rooms/feather3.cpp
index 0b3a1ce537..7e710908f0 100644
--- a/engines/startrek/rooms/feather3.cpp
+++ b/engines/startrek/rooms/feather3.cpp
@@ -90,7 +90,7 @@ extern const RoomAction feather3ActionList[] = {
{ {ACTION_LOOK, OBJECT_KNIFE, 0, 0}, &Room::feather3LookAtKnife },
};
-extern const int feather3NumActions = sizeof(feather3ActionList) / sizeof(RoomAction);
+extern const int feather3NumActions = ARRAYSIZE(feather3ActionList);
void Room::feather3Tick1() {
diff --git a/engines/startrek/rooms/feather4.cpp b/engines/startrek/rooms/feather4.cpp
index 2c18155403..cd05e9382e 100644
--- a/engines/startrek/rooms/feather4.cpp
+++ b/engines/startrek/rooms/feather4.cpp
@@ -64,7 +64,7 @@ extern const RoomAction feather4ActionList[] = {
{ {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::feather4LookAtRedshirt },
};
-extern const int feather4NumActions = sizeof(feather4ActionList) / sizeof(RoomAction);
+extern const int feather4NumActions = ARRAYSIZE(feather4ActionList);
void Room::feather4Tick1() {
diff --git a/engines/startrek/rooms/feather5.cpp b/engines/startrek/rooms/feather5.cpp
index f1da4633f3..2adcd43d0e 100644
--- a/engines/startrek/rooms/feather5.cpp
+++ b/engines/startrek/rooms/feather5.cpp
@@ -111,7 +111,7 @@ extern const RoomAction feather5ActionList[] = {
{ {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::feather5UseMedkitAnywhere },
};
-extern const int feather5NumActions = sizeof(feather5ActionList) / sizeof(RoomAction);
+extern const int feather5NumActions = ARRAYSIZE(feather5ActionList);
void Room::feather5Tick1() {
diff --git a/engines/startrek/rooms/feather6.cpp b/engines/startrek/rooms/feather6.cpp
index 8ae54d1353..451cef6032 100644
--- a/engines/startrek/rooms/feather6.cpp
+++ b/engines/startrek/rooms/feather6.cpp
@@ -98,7 +98,7 @@ extern const RoomAction feather6ActionList[] = {
{ {ACTION_USE, OBJECT_ISTRICOR, OBJECT_STALACTITES, 0}, &Room::feather6UseSTricorderOnStalactites },
};
-extern const int feather6NumActions = sizeof(feather6ActionList) / sizeof(RoomAction);
+extern const int feather6NumActions = ARRAYSIZE(feather6ActionList);
void Room::feather6Tick1() {
diff --git a/engines/startrek/rooms/feather7.cpp b/engines/startrek/rooms/feather7.cpp
index 1641ddfc1e..0bfa2b22c2 100644
--- a/engines/startrek/rooms/feather7.cpp
+++ b/engines/startrek/rooms/feather7.cpp
@@ -37,7 +37,7 @@ extern const RoomAction feather7ActionList[] = {
{ {ACTION_DONE_ANIM, 2, 0, 0}, &Room::feather7ReadyToBeamOut },
};
-extern const int feather7NumActions = sizeof(feather7ActionList) / sizeof(RoomAction);
+extern const int feather7NumActions = ARRAYSIZE(feather7ActionList);
void Room::feather7Tick1() {
diff --git a/engines/startrek/rooms/sins0.cpp b/engines/startrek/rooms/sins0.cpp
index fa0c3fa20d..61db8ef338 100644
--- a/engines/startrek/rooms/sins0.cpp
+++ b/engines/startrek/rooms/sins0.cpp
@@ -75,7 +75,7 @@ extern const RoomAction sins0ActionList[] = {
};
-extern const int sins0NumActions = sizeof(sins0ActionList) / sizeof(RoomAction);
+extern const int sins0NumActions = ARRAYSIZE(sins0ActionList);
void Room::sins0Tick1() {
diff --git a/engines/startrek/rooms/sins1.cpp b/engines/startrek/rooms/sins1.cpp
index 356a99c429..ac812211db 100644
--- a/engines/startrek/rooms/sins1.cpp
+++ b/engines/startrek/rooms/sins1.cpp
@@ -86,7 +86,7 @@ extern const RoomAction sins1ActionList[] = {
{ {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::sins1WalkToDoor },
};
-extern const int sins1NumActions = sizeof(sins1ActionList) / sizeof(RoomAction);
+extern const int sins1NumActions = ARRAYSIZE(sins1ActionList);
void Room::sins1Tick1() {
diff --git a/engines/startrek/rooms/sins2.cpp b/engines/startrek/rooms/sins2.cpp
index f3dc6cd93c..37e352fd6b 100644
--- a/engines/startrek/rooms/sins2.cpp
+++ b/engines/startrek/rooms/sins2.cpp
@@ -84,7 +84,7 @@ extern const RoomAction sins2ActionList[] = {
{ {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::sins2WalkToDoor },
};
-extern const int sins2NumActions = sizeof(sins2ActionList) / sizeof(RoomAction);
+extern const int sins2NumActions = ARRAYSIZE(sins2ActionList);
void Room::sins2Tick1() {
diff --git a/engines/startrek/rooms/sins3.cpp b/engines/startrek/rooms/sins3.cpp
index a88838d46f..fd831b1202 100644
--- a/engines/startrek/rooms/sins3.cpp
+++ b/engines/startrek/rooms/sins3.cpp
@@ -122,7 +122,7 @@ extern const RoomAction sins3ActionList[] = {
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_REDSHIRT, 0}, &Room::sins3UseMTricorderOnCrewman },
};
-extern const int sins3NumActions = sizeof(sins3ActionList) / sizeof(RoomAction);
+extern const int sins3NumActions = ARRAYSIZE(sins3ActionList);
void Room::sins3Tick1() {
diff --git a/engines/startrek/rooms/sins4.cpp b/engines/startrek/rooms/sins4.cpp
index 1278e6d756..7426bef3aa 100644
--- a/engines/startrek/rooms/sins4.cpp
+++ b/engines/startrek/rooms/sins4.cpp
@@ -92,7 +92,7 @@ extern const RoomAction sins4ActionList[] = {
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_REDSHIRT, 0}, &Room::sins4UseMTricorderOnCrewman },
};
-extern const int sins4NumActions = sizeof(sins4ActionList) / sizeof(RoomAction);
+extern const int sins4NumActions = ARRAYSIZE(sins4ActionList);
void Room::sins4Tick1() {
diff --git a/engines/startrek/rooms/sins5.cpp b/engines/startrek/rooms/sins5.cpp
index 525e6c1aeb..18be050d71 100644
--- a/engines/startrek/rooms/sins5.cpp
+++ b/engines/startrek/rooms/sins5.cpp
@@ -129,7 +129,7 @@ extern const RoomAction sins5ActionList[] = {
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_REDSHIRT, 0}, &Room::sins5UseMTricorderOnCrewman },
};
-extern const int sins5NumActions = sizeof(sins5ActionList) / sizeof(RoomAction);
+extern const int sins5NumActions = ARRAYSIZE(sins5ActionList);
void Room::sins5Tick1() {
diff --git a/engines/startrek/rooms/trial0.cpp b/engines/startrek/rooms/trial0.cpp
index 0508d181fe..6c6307e840 100644
--- a/engines/startrek/rooms/trial0.cpp
+++ b/engines/startrek/rooms/trial0.cpp
@@ -80,7 +80,7 @@ extern const RoomAction trial0ActionList[] = {
{ {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::trial0UseMedkitAnywhere },
};
-extern const int trial0NumActions = sizeof(trial0ActionList) / sizeof(RoomAction);
+extern const int trial0NumActions = ARRAYSIZE(trial0ActionList);
void Room::trial0Tick1() {
diff --git a/engines/startrek/rooms/trial1.cpp b/engines/startrek/rooms/trial1.cpp
index 8ff3784dac..c6462c90c3 100644
--- a/engines/startrek/rooms/trial1.cpp
+++ b/engines/startrek/rooms/trial1.cpp
@@ -166,7 +166,7 @@ extern const RoomAction trial1ActionList[] = {
{ {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::trial1WalkToDoor },
};
-extern const int trial1NumActions = sizeof(trial1ActionList) / sizeof(RoomAction);
+extern const int trial1NumActions = ARRAYSIZE(trial1ActionList);
void Room::trial1Tick1() {
diff --git a/engines/startrek/rooms/trial2.cpp b/engines/startrek/rooms/trial2.cpp
index d9fc5e2f60..642778ac75 100644
--- a/engines/startrek/rooms/trial2.cpp
+++ b/engines/startrek/rooms/trial2.cpp
@@ -120,7 +120,7 @@ extern const RoomAction trial2ActionList[] = {
{ {ACTION_USE, OBJECT_REDSHIRT, OBJECT_GLOB, 0}, &Room::trial2UseRedshirtOnGlob },
};
-extern const int trial2NumActions = sizeof(trial2ActionList) / sizeof(RoomAction);
+extern const int trial2NumActions = ARRAYSIZE(trial2ActionList);
void Room::trial2Tick1() {
diff --git a/engines/startrek/rooms/trial3.cpp b/engines/startrek/rooms/trial3.cpp
index 49ac5bd09c..47f56ccd55 100644
--- a/engines/startrek/rooms/trial3.cpp
+++ b/engines/startrek/rooms/trial3.cpp
@@ -91,7 +91,7 @@ extern const RoomAction trial3ActionList[] = {
{ {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::trial3UseMedkitAnywhere },
};
-extern const int trial3NumActions = sizeof(trial3ActionList) / sizeof(RoomAction);
+extern const int trial3NumActions = ARRAYSIZE(trial3ActionList);
void Room::trial3Tick1() {
diff --git a/engines/startrek/rooms/trial4.cpp b/engines/startrek/rooms/trial4.cpp
index b6de4d768e..bfbb516a6a 100644
--- a/engines/startrek/rooms/trial4.cpp
+++ b/engines/startrek/rooms/trial4.cpp
@@ -33,7 +33,7 @@ extern const RoomAction trial4ActionList[] = {
{ {ACTION_TICK, 60, 0, 0}, &Room::trial4Tick60 },
};
-extern const int trial4NumActions = sizeof(trial4ActionList) / sizeof(RoomAction);
+extern const int trial4NumActions = ARRAYSIZE(trial4ActionList);
void Room::trial4Tick1() {
diff --git a/engines/startrek/rooms/trial5.cpp b/engines/startrek/rooms/trial5.cpp
index ec1111da3c..8d522fdcc2 100644
--- a/engines/startrek/rooms/trial5.cpp
+++ b/engines/startrek/rooms/trial5.cpp
@@ -160,7 +160,7 @@ extern const RoomAction trial5ActionList[] = {
{ {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::trial5UseMedkitAnywhere },
};
-extern const int trial5NumActions = sizeof(trial5ActionList) / sizeof(RoomAction);
+extern const int trial5NumActions = ARRAYSIZE(trial5ActionList);
void Room::trial5Tick1() {