SAGA2: Fix more warnings with enumarations

This commit is contained in:
Eugene Sandulenko 2021-06-29 22:43:34 +02:00
parent 6aa642a54a
commit 725f11ca60
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
24 changed files with 83 additions and 94 deletions

View File

@ -654,7 +654,7 @@ bool ActorProto::acceptInsertionAtAction(
notInUse,
heldInLeftHand,
heldInRightHand,
worn,
worn
} inUseType;
int wornWhere;

View File

@ -59,7 +59,7 @@ enum ActorSkillID {
skillIDPilfer, // gone
skillIDFirstAid, // gone
skillIDSpotHidden, // gone
numSkills,
numSkills
};
enum ArmorObjectTypes {
@ -98,11 +98,11 @@ struct ActorAttributes {
skillBasePercent = 100,
skillFracPointsPerLevel = 5, // this being twenty and levels at 5
skillLevels = 20, // will make the advancement calc quick & easy
skillMaxLevel = skillFracPointsPerLevel * skillLevels,
skillMaxLevel = skillFracPointsPerLevel * skillLevels
};
enum vitalityInfo {
vitalityLimit = 256,
vitalityLimit = 256
};
// Automatic skills
@ -207,7 +207,7 @@ enum combatBehaviorTypes {
behaviorHungry,
behaviorCowardly,
behaviorBerserk,
behaviorSmart,
behaviorSmart
};
// This defines the additional data fields needed for actor prototypes
@ -263,7 +263,7 @@ private:
ViewableRows = 3,
ViewableCols = 3,
maxRows = 3,
maxCols = 3,
maxCols = 3
};
public:
@ -416,7 +416,7 @@ enum actionSequenceOptions {
// This flag gets set if the sprite could not be displayed
// because it's bank hasn't been loaded yet.
animateNotLoaded = (1 << 7),
animateNotLoaded = (1 << 7)
};
// Various types of action sequences
@ -497,7 +497,7 @@ enum ActorAnimationTypes {
actionSpecial5, // special Action
actionSpecial6, // special Action
actionSpecial7, // special Action
actionSpecial8, // special Action
actionSpecial8 // special Action
};
enum ActorGoalTypes {
@ -505,7 +505,7 @@ enum ActorGoalTypes {
actorGoalPreserveSelf,
actorGoalAttackEnemy,
actorGoalFollowLeader,
actorGoalAvoidEnemies,
actorGoalAvoidEnemies
};
// The actor structure will be divided into two parts. The
@ -616,7 +616,7 @@ public:
afraid = (1 << 2),
hasAssignment = (1 << 3),
specialAttack = (1 << 4),
fightStance = (1 << 5),
fightStance = (1 << 5)
};
uint8 flags;
@ -663,7 +663,7 @@ public:
int16 currentRecoveryPoints; // fraction left from last recovery
enum vitalityRecovery {
recPointsPerVitality = 10,
recPointsPerVitality = 10
};

View File

@ -78,7 +78,7 @@ class gCompImage : public gControl {
private:
enum {
textSize = 128,
textSize = 128
};
// number of image pointer allocated

View File

@ -50,8 +50,7 @@ public:
// Derived variables
framesPerHour = (framesPerDay / hoursPerDay),
framesAtNoon = (framesPerDay / 2),
framesAtNoon = (framesPerDay / 2)
};
uint16 years,

View File

@ -34,7 +34,7 @@ class Location;
enum weaponHitType {
hitMiss = 0,
hitShield,
hitTarget,
hitTarget
};
//-----------------------------------------------------------------------
@ -52,7 +52,7 @@ enum combatSound {
swordMetal,
whoosh1,
whoosh2,
whoosh3,
whoosh3
};

View File

@ -73,7 +73,7 @@ protected:
enum imageData {
selectorX = 10,
selectorY = 25,
selectorY = 25
};
public:
@ -109,7 +109,7 @@ public:
// ID of the last object the mouse was on
enum {
bufSize = 60,
accelSpeed = 8, // this tells the multi-item getting gadget how many items to grab per time unit
accelSpeed = 8 // this tells the multi-item getting gadget how many items to grab per time unit
};
static ObjectID lastPickedObjectID;
@ -443,7 +443,7 @@ public:
actionUpdate = (1 << 0), // Refresh this window
actionDelete = (1 << 1), // Delete this window
actionHide = (1 << 2), // Refresh this window
actionShow = (1 << 3), // Refresh this window
actionShow = (1 << 3) // Refresh this window
};
private:

View File

@ -39,7 +39,7 @@ class Effectron;
enum nodeType {
nodeTypeObject = 0,
nodeTypeEffect,
nodeTypeEffect
};
@ -58,7 +58,7 @@ private:
uint8 flags; // various flags
enum {
displayIndicator = (1 << 0),
displayIndicator = (1 << 0)
};
public:

View File

@ -102,7 +102,7 @@ enum effectResistTypes {
// Physiological Damage
resistStarve = kDamageStarve,
// other
resistEnergy = kDamageEnergy,
resistEnergy = kDamageEnergy
};
//
@ -130,7 +130,7 @@ enum effectImmuneTypes {
// PhysiologiDamage
immuneStarve = resistStarve,
// other
immuneEnergy = resistEnergy,
immuneEnergy = resistEnergy
};
//
@ -175,15 +175,7 @@ enum effectOthersTypes {
actorNotDefenseless = 26, // forgo defenselessness check
actorDisappearOnDeath = 27, // gets deleted on death and spews inventory
// dead or moved flags
// actorMapping =15, //
// actorLandWalk =0 , // someone else had this I have no idea what it is
// actorFloat =2 , // the creature can travel through malts shakes & sundaes
actorWaterWalk, // can walk on water (same as float ?)
// actorPanic =13, // creature takes off randomly
// actorSpotHidden =17, // can see hidden
// actorDetTraps =22, // traps glow green
// actorFlameAura =23, // has a flaming aura
// actorDead =25, // death spell
actorWaterWalk // can walk on water (same as float ?)
};
//
@ -201,7 +193,7 @@ enum effectDrainsTypes {
drainsManaViolet,
drainsLifeLevel,
drainsVitality,
drainsMoney,
drainsMoney
};
@ -211,7 +203,7 @@ enum effectDrainsTypes {
enum effectTAGTypes {
settagLocked = 1,
settagOpen = 2,
settagOpen = 2
};
@ -220,7 +212,7 @@ enum effectTAGTypes {
//
enum effectLocationTypes {
locateDummy = 1,
locateDummy = 1
};
enum objectFlags {
@ -238,7 +230,7 @@ enum objectFlags {
objectAlias = (1 << 11), // object is not real, just a copy of another object
objectTriggeringTAG = (1 << 12), // object has triggerred TAG upon which it rests
objectOnScreen = (1 << 13), // object is on display list
objectSightedByCenter = (1 << 14), // there is a line of sight to center actor
objectSightedByCenter = (1 << 14) // there is a line of sight to center actor
};
@ -258,7 +250,7 @@ enum effectSpecialTypes {
specialCreateFWisp, // calls a saga function
specialCreateWraith, // calls a saga function
specialCreateFood, // calls a saga function
specialRejoin,
specialRejoin
};
// ------------------------------------------------------------------

View File

@ -194,7 +194,7 @@ extern const ActiveItemID NoActiveItem;
enum TaskResult {
taskFailed = -1, // Task has ended in failure
taskNotDone = 0, // Task has not ended yet
taskSucceeded = 1, // Task has ended in success
taskSucceeded = 1 // Task has ended in success
};
typedef int16 TaskID;

View File

@ -37,7 +37,7 @@ enum keyQualifiers {
qualifierAlt = (1 << 2),
// special qualifiers used internally
spQualifierFunc = (1 << 7), // indicates function key
spQualifierFunc = (1 << 7) // indicates function key
};
const int homeKey = (0x47 << 8),

View File

@ -311,8 +311,7 @@ private:
bulkPieXOffset = 53,
bulkPieYOffset = 9,
pieXSize = 28,
pieYSize = 26,
pieYSize = 26
};
// xy positions of this indicator
@ -383,7 +382,7 @@ public:
star6XSize = 36,
star6YSize = 35,
star7XSize = 46,
star7YSize = 45,
star7YSize = 45
};
// sizes of the rings
@ -401,7 +400,7 @@ public:
ring6XSize = 32,
ring6YSize = 31,
ring7XSize = 40,
ring7YSize = 39,
ring7YSize = 39
};
// area of control
@ -409,7 +408,7 @@ public:
x = 475,
y = 315,
xSize = 152,
ySize = 135,
ySize = 135
};
// coordinates
@ -419,7 +418,7 @@ public:
wellXSize = 108,
wellYSize = 123,
wellX = (xSize / 2 - wellXSize / 2) + 1,
wellY = ySize / 2 - wellYSize / 2,
wellY = ySize / 2 - wellYSize / 2
};
// manas end points
@ -439,7 +438,7 @@ public:
lowerMidX = 70 + xOffset,
lowerMidY = 135 + yOffset,
lowerRightX = 122 + xOffset,
lowerRightY = 106 + yOffset,
lowerRightY = 106 + yOffset
};
enum manaEndCoords {
@ -456,18 +455,18 @@ public:
violetEndX = lowerRightX, //d
violetEndY = lowerRightY, //e
numXYCoords = 12,
numManaTypes = numXYCoords / 2,
numManaTypes = numXYCoords / 2
};
// mana star display offset from well center
enum startOffset {
startOffset = 12,
startOffset = 12
};
// mana information
enum manainfo {
maxLevel = 200,
numManaRegions = numManaTypes,
numManaRegions = numManaTypes
};
// resource data
@ -476,7 +475,7 @@ public:
numRings = 7,
starResNum = 0,
ringResNum = 0,
numManaColors = 13,
numManaColors = 13
};
// this describes a star
@ -567,7 +566,7 @@ private:
starNum = 23,
starInitial = 0,
starLevels = 24,
numControls = kNumViews,
numControls = kNumViews
};
enum {
@ -579,7 +578,7 @@ private:
frameXPos = 571,
frameYPos = 20,
frameXSize = 32,
frameYSize = 32,
frameYSize = 32
};
// resource handle

View File

@ -53,12 +53,12 @@ enum MotionThreadReturnValues {
motionStarted, // The actor started moving.
motionCompleted, // The actor motion completed
// successfully.
motionWalkBlocked, // The walk motion failed.
motionWalkBlocked // The walk motion failed.
};
enum {
moveWait = (1 << 0),
moveRun = (1 << 1),
moveRun = (1 << 1)
};
/* ===================================================================== *

View File

@ -54,7 +54,7 @@ enum ActorManaID {
manaIDBlue,
manaIDViolet,
numManas,
numManas
};
// Used to indicate if objects can be stacked or merged
@ -168,7 +168,7 @@ private:
// container info
enum {
maxRow = 20,
maxCol = 4,
maxCol = 4
};
public:
@ -1326,7 +1326,7 @@ enum MissileFacings {
missileUpRtRt,
missileUpRt,
missileUpUpRt,
missileNoFacing,
missileNoFacing
};
enum blockageType {

View File

@ -340,7 +340,7 @@ private:
ViewableRows = 6,
ViewableCols = 4,
maxRows = 8,
maxCols = 4,
maxCols = 4
};
public:
@ -360,7 +360,7 @@ public:
isSpell = (1 << 11),
isSkill = (1 << 12),
isEnchantment = (1 << 13),
isTargetable = (1 << 14),
isTargetable = (1 << 14)
};
// kludge: define earlier, incorrectly spelled names to correct spelling
@ -371,7 +371,7 @@ public:
enum spriteTypes {
objOnGround = 0,
objInContainerView,
objAsMousePtr,
objAsMousePtr
};
// Memeber functions
@ -760,7 +760,7 @@ private:
ViewableRows = 4,
ViewableCols = 4,
maxRows = 8,
maxCols = 4,
maxCols = 4
};
public:
@ -915,7 +915,7 @@ class WeaponProto : public InventoryProto {
protected:
enum {
inRangeRatingBonus = 4,
inRangeRatingBonus = 4
};
public:

View File

@ -66,18 +66,18 @@ public:
enum PlayerActorFlags {
playerAggressive = (1 << 0), // Player is in aggressive mode
playerBanded = (1 << 1), // Player is banded
playerHasCartography = (1 << 2), // Player has ability to map
playerHasCartography = (1 << 2) // Player has ability to map
};
// recovery information
enum Recovery {
baseManaRec = 1,
attribPointsPerUpdate = 1,
attribPointsPerValue = 10,
attribPointsPerValue = 10
};
enum {
vitalityLevelBump = 50,
vitalityLevelBump = 50
};
// Container node for ready containers

View File

@ -221,7 +221,7 @@ enum {
objPropIDPlayerActor,
objPropIDEnemy,
objPropIDCount,
objPropIDCount
};
extern const ObjectProperty *objPropArray[objPropIDCount];
@ -251,7 +251,7 @@ enum {
actorPropIDPlayerActor,
actorPropIDEnemy,
actorPropIDCount,
actorPropIDCount
};
extern const ActorProperty *actorPropArray[actorPropIDCount];
@ -276,7 +276,7 @@ typedef int16 TilePropertyID;
enum {
tilePropIDHasWater,
tilePropIDCount,
tilePropIDCount
};
extern const TileProperty *tilePropArray[tilePropIDCount];
@ -391,7 +391,7 @@ typedef int16 MetaTilePropertyID;
enum {
metaTilePropIDHasWater,
metaTilePropIDCount,
metaTilePropIDCount
};
extern const MetaTileProperty *metaTilePropArray[metaTilePropIDCount];

View File

@ -60,6 +60,7 @@ Saga2Engine::Saga2Engine(OSystem *syst)
_bandList = nullptr;
_smkDecoder = nullptr;
_videoX = _videoY = 0;
_loadedWeapons = 0;
SearchMan.addSubDirectoryMatching(gameDataDir, "res");

View File

@ -92,7 +92,7 @@ public:
Common::RandomSource *_rnd;
WeaponStuff _weaponRack[kMaxWeapons];
weaponID _loadedWeapons = 0;
weaponID _loadedWeapons;
Common::List<TimerList *> _timerLists;
Common::List<Timer *> _timers;
Common::List<ActorAppearance *> _appearanceLRU;

View File

@ -52,7 +52,7 @@ enum scriptResult {
scriptResultFinished,
// Script spun off as async thread; no answer available.
scriptResultAsync,
scriptResultAsync
};
// Variables specific to a thread
@ -101,7 +101,7 @@ enum {
// Code returned by script when requested action should complete
// the action
actionResultNotDone,
actionResultNotDone
};
// Method used to refer to a SAGA object
@ -118,7 +118,7 @@ enum builtinTypes {
builtinTypeObject = -1,
builtinTypeTAG = -2,
builtinAbstract = -3,
builtinTypeMission = -4,
builtinTypeMission = -4
};
/* ===================================================================== *
@ -207,7 +207,7 @@ public:
// run until it is finished or this bit
// is cleared
asleep = (waiting | finished | aborted),
asleep = (waiting | finished | aborted)
};
int16 stackSize, // allocated size of stack
@ -223,7 +223,7 @@ public:
waitDelay, // waiting for a timer
waitFrameDelay, // waiting for frame count
waitOther, // waiting for to be awoken
waitTagSemaphore, // waiting for a tag semaphore
waitTagSemaphore // waiting for a tag semaphore
// waitSpeech, // waiting for speech to finish
// waitDialogEnd, // waiting for my dialog to finish

View File

@ -143,7 +143,7 @@ enum SpellID {
spellMaelstrom,
spellDeath_Cloud,
spellVenom_Blast,
totalSpellBookPages,
totalSpellBookPages
};
#define nullSpell ((SpellID)0xFF)

View File

@ -120,7 +120,7 @@ struct ActorPose {
leftObjectInFront = (1 << 3), // left object in front of actor
rightObjectInFront = (1 << 4), // right object in front of actor
leftOverRight = (1 << 5), // left in front of right
leftOverRight = (1 << 5) // left in front of right
};
uint16 flags; // sequence element flags
@ -203,7 +203,7 @@ struct SpriteComponent {
enum spriteEffectFlags {
sprFXGhosted = (1 << 0), // semi-translucent dither
sprFXTerrainMask = (1 << 1), // mask sprite to terrain
sprFXGhostIfObscured = (1 << 2), // apply ghosted effect if
sprFXGhostIfObscured = (1 << 2) // apply ghosted effect if
// obscured by terrain
};
@ -242,7 +242,7 @@ enum spriteBankNums {
sprDnStairsBankNum,
sprSitBankNum,
sprBankCount,
sprBankCount
};
enum spriteBankBits {
@ -259,7 +259,7 @@ enum spriteBankBits {
sprPassiveBank = (1 << sprPassiveBankNum),
sprUpStairsBank = (1 << sprUpStairsBankNum),
sprDnStairsBank = (1 << sprDnStairsBankNum),
sprSitBank = (1 << sprSitBankNum),
sprSitBank = (1 << sprSitBankNum)
};
// This structure is used to contain all of the items needed

View File

@ -44,7 +44,7 @@ enum TargetType {
specificObjectTarget,
objectPropertyTarget,
specificActorTarget,
actorPropertyTarget,
actorPropertyTarget
};
/* ===================================================================== *

View File

@ -129,7 +129,7 @@ enum tile_flags {
tileWalkSense = (1 << 2),
// Indicates that tile has been recently modified
tileModified = (1 << 3),
tileModified = (1 << 3)
};
/* ===================================================================== *
@ -156,7 +156,7 @@ enum terrainTypes {
terrNumIce,
terrNumCold,
terrNumHot,
terrNumFurniture,
terrNumFurniture
};
enum terrainBits {
@ -179,7 +179,7 @@ enum terrainBits {
terrainIce = (1 << terrNumIce),
terrainCold = (1 << terrNumCold),
terrainHot = (1 << terrNumHot),
terrainFurniture = (1 << terrNumFurniture),
terrainFurniture = (1 << terrNumFurniture)
};
// A combination mask of all the terrain types which can have
@ -341,7 +341,7 @@ const int maxCycleRanges = 128; // 128 should do for now...
enum ActiveItemTypes {
activeTypeGroup = 0,
activeTypeInstance,
activeTypeInstance
};
// A pointer to the array of active item state arrays
@ -396,7 +396,7 @@ public:
enum {
activeItemLocked = (1 << 8), // The door is locked
activeItemOpen = (1 << 9), // The door is open (not used)
activeItemExclusive = (1 << 10), // Script semaphore
activeItemExclusive = (1 << 10) // Script semaphore
};
ActiveItem(ActiveItemList *parent, int ind, Common::SeekableReadStream *stream);
@ -423,7 +423,7 @@ public:
builtInNone = 0, // TAG handled by SAGA
builtInLamp, // TAG has lamp behavior
builtInDoor, // TAG has door behavior
builtInTransporter, // TAG has transporter behavior
builtInTransporter // TAG has transporter behavior
};
// Return the state number of this active item instance
@ -580,7 +580,7 @@ class TileActivityTask {
activityTypeOpen, // open door
activityTypeClose, // close door
activityTypeScript, // scriptable activity
activityTypeScript // scriptable activity
};
void remove(void); // tile activity task is finished.
@ -726,9 +726,7 @@ enum platformFlags {
plCutUPos = (1 << 13),
plCutUNeg = (1 << 13),
plCutVPos = (1 << 13),
plCutVNeg = (1 << 13),
plCutVNeg = (1 << 13)
};
#if OLDPLATFLAAGS
@ -744,7 +742,7 @@ enum platformFlags {
plCutVNeg = (1 << 4),
plVisible = (1 << 5), // platform is visible
plEnabled = (1 << 6), // enforce platform terrain.
plEnabled = (1 << 6) // enforce platform terrain.
};
#endif
@ -863,7 +861,7 @@ enum mapEdgeTypes {
edgeTypeFill0,
edgeTypeFill1,
edgeTypeRepeat,
edgeTypeWrap,
edgeTypeWrap
};
typedef MapHeader *MapPtr,

View File

@ -137,7 +137,7 @@ public:
template<int size> class FixedBitArray {
private:
enum {
lWords = ((size + 31) / 32),
lWords = ((size + 31) / 32)
};
int16 WORDNUM(int n) {