mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 22:51:11 +00:00
SAGA2: Fix some global constructor warnings
This commit is contained in:
parent
4048869485
commit
19c3be9104
@ -110,27 +110,27 @@ x Single
|
||||
Motion Constants
|
||||
* ===================================================================== */
|
||||
|
||||
TilePoint dirTable[8] = {
|
||||
TilePoint(2, 2, 0),
|
||||
TilePoint(0, 3, 0),
|
||||
TilePoint(-2, 2, 0),
|
||||
TilePoint(-3, 0, 0),
|
||||
TilePoint(-2, -2, 0),
|
||||
TilePoint(0, -3, 0),
|
||||
TilePoint(2, -2, 0),
|
||||
TilePoint(3, 0, 0)
|
||||
const StaticTilePoint dirTable[8] = {
|
||||
{ 2, 2, 0},
|
||||
{ 0, 3, 0},
|
||||
{-2, 2, 0},
|
||||
{-3, 0, 0},
|
||||
{-2, -2, 0},
|
||||
{ 0, -3, 0},
|
||||
{ 2, -2, 0},
|
||||
{ 3, 0, 0}
|
||||
};
|
||||
|
||||
// Incremental direction table
|
||||
TilePoint incDirTable[8] = {
|
||||
TilePoint(1, 1, 0),
|
||||
TilePoint(0, 1, 0),
|
||||
TilePoint(-1, 1, 0),
|
||||
TilePoint(-1, 0, 0),
|
||||
TilePoint(-1, -1, 0),
|
||||
TilePoint(0, -1, 0),
|
||||
TilePoint(1, -1, 0),
|
||||
TilePoint(1, 0, 0)
|
||||
const StaticTilePoint incDirTable[8] = {
|
||||
{ 1, 1, 0},
|
||||
{ 0, 1, 0},
|
||||
{-1, 1, 0},
|
||||
{-1, 0, 0},
|
||||
{-1, -1, 0},
|
||||
{ 0, -1, 0},
|
||||
{ 1, -1, 0},
|
||||
{ 1, 0, 0}
|
||||
};
|
||||
|
||||
extern uint16 uMaxMasks[4],
|
||||
|
@ -34,7 +34,8 @@ namespace Saga2 {
|
||||
class PathRequest;
|
||||
struct StandingTileInfo;
|
||||
|
||||
extern TilePoint dirTable[];
|
||||
extern const StaticTilePoint dirTable[];
|
||||
extern const StaticTilePoint incDirTable[];
|
||||
|
||||
|
||||
const int gravity = 2;
|
||||
|
@ -146,8 +146,6 @@ extern ObjectID pickedObject;
|
||||
|
||||
const uint32 imageGroupID = MKTAG('I', 'M', 'A', 'G');
|
||||
|
||||
extern TilePoint incDirTable[];
|
||||
|
||||
bool unstickObject(GameObject *obj);
|
||||
|
||||
/* ===================================================================== *
|
||||
|
@ -55,8 +55,6 @@ extern PlayerActor playerList[]; // Master list of all PlayerActors
|
||||
|
||||
extern ObjectSoundFXs *objectSoundFXTable; // the global object sound effects table
|
||||
|
||||
extern TilePoint incDirTable[];
|
||||
|
||||
#if DEBUG
|
||||
extern bool massAndBulkCount;
|
||||
#endif
|
||||
|
@ -193,7 +193,7 @@ int16 scriptActorMove(int16 *args) {
|
||||
// parameter is for actor facing, only used by actors)
|
||||
// void "c" moveRel( GameObject id baseObj, int angle, int distance, ... );
|
||||
|
||||
extern TilePoint dirTable[8];
|
||||
extern const StaticTilePoint dirTable[8];
|
||||
|
||||
int16 scriptActorMoveRel(int16 *args) {
|
||||
OBJLOG(MoveRel);
|
||||
|
@ -79,6 +79,15 @@ struct StaticTilePoint {
|
||||
return p;
|
||||
}
|
||||
|
||||
friend StaticTilePoint operator/(StaticTilePoint a, int b) {
|
||||
int16 nu = a.u / b;
|
||||
int16 nv = a.v / b;
|
||||
int16 nz = a.z / b;
|
||||
StaticTilePoint p = {nu, nv, nz};
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
void operator+=(StaticTilePoint a) {
|
||||
u += a.u;
|
||||
v += a.v;
|
||||
|
Loading…
x
Reference in New Issue
Block a user