SAGA2: Adapt some C syntax to C++

This commit is contained in:
Filippos Karapetis 2021-09-11 12:13:35 +03:00
parent e4ece2a62c
commit d3df1b09a1
129 changed files with 2106 additions and 2110 deletions

View File

@ -73,7 +73,7 @@ extern bool massAndBulkCount;
//-----------------------------------------------------------------------
// Return a bit mask indicating the properties of this object type
uint16 ActorProto::containmentSet(void) {
uint16 ActorProto::containmentSet() {
// All actors may also be weapons (indicating natural attacks)
return ProtoObj::containmentSet() | isWeapon;
}
@ -113,7 +113,7 @@ bool ActorProto::canContainAt(
|| itemPtr->possessor() == dObj);
}
weaponID ActorProto::getWeaponID(void) {
weaponID ActorProto::getWeaponID() {
return weaponDamage;
}
@ -1027,7 +1027,7 @@ void Actor::init(
//-----------------------------------------------------------------------
// Actor constructor -- copies the resource fields and simply NULL's most
// of the rest of the data members
Actor::Actor(void) {
Actor::Actor() {
prototype = nullptr;
_faction = 0;
_colorScheme = 0;
@ -1278,7 +1278,7 @@ Actor::Actor(Common::InSaveFile *in) : GameObject(in) {
//-----------------------------------------------------------------------
// Destructor
Actor::~Actor(void) {
Actor::~Actor() {
if (_appearance != NULL) ReleaseActorAppearance(_appearance);
if (getAssignment())
@ -1288,7 +1288,7 @@ Actor::~Actor(void) {
//-----------------------------------------------------------------------
// Return the number of bytes needed to archive this actor
int32 Actor::archiveSize(void) {
int32 Actor::archiveSize() {
int32 size = GameObject::archiveSize();
size += sizeof(ActorArchive);
@ -1468,7 +1468,7 @@ Actor *Actor::newActor(
//-----------------------------------------------------------------------
// Delete this actor
void Actor::deleteActor(void) {
void Actor::deleteActor() {
if (_flags & temporary) {
uint16 protoNum = getProtoNum();
@ -1518,7 +1518,7 @@ void Actor::deleteActor(void) {
//-----------------------------------------------------------------------
// Cause the actor to stop his current motion task is he is interruptable
void Actor::stopMoving(void) {
void Actor::stopMoving() {
if (_moveTask != NULL && isInterruptable())
_moveTask->remove();
}
@ -1526,7 +1526,7 @@ void Actor::stopMoving(void) {
//-----------------------------------------------------------------------
// Cause this actor to die
void Actor::die(void) {
void Actor::die() {
if (!isDead()) return;
ObjectID dObj = thisID();
@ -1567,7 +1567,7 @@ void Actor::die(void) {
//-----------------------------------------------------------------------
// Cause this actor to come back to life
void Actor::imNotQuiteDead(void) {
void Actor::imNotQuiteDead() {
if (isDead()) {
PlayerActorID pID;
@ -1582,7 +1582,7 @@ void Actor::imNotQuiteDead(void) {
//-----------------------------------------------------------------------
// Cuase the actor to re-assess his/her vitality
void Actor::vitalityUpdate(void) {
void Actor::vitalityUpdate() {
// If we're dead, don't heal
if (isDead()) return;
@ -1627,7 +1627,7 @@ void Actor::vitalityUpdate(void) {
//-----------------------------------------------------------------------
// Perform actor specific activation tasks
void Actor::activateActor(void) {
void Actor::activateActor() {
debugC(1, kDebugActors, "Actors: Activated %d (%s)", thisID() - 32768, objName());
evaluateNeeds();
@ -1636,7 +1636,7 @@ void Actor::activateActor(void) {
//-----------------------------------------------------------------------
// Perfrom actor specific deactivation tasks
void Actor::deactivateActor(void) {
void Actor::deactivateActor() {
debugC(1, kDebugActors, "Actors: De-activated %d (%s)", thisID() - 32768, objName());
// Kill task
@ -1667,7 +1667,7 @@ void Actor::deactivateActor(void) {
//-----------------------------------------------------------------------
// Delobotomize this actor
void Actor::delobotomize(void) {
void Actor::delobotomize() {
if (!(_flags & lobotomized)) return;
ObjectID dObj = thisID();
@ -1689,7 +1689,7 @@ void Actor::delobotomize(void) {
//-----------------------------------------------------------------------
// Lobotomize this actor
void Actor::lobotomize(void) {
void Actor::lobotomize() {
if (_flags & lobotomized) return;
ObjectID dObj = thisID();
@ -1723,7 +1723,7 @@ void Actor::lobotomize(void) {
// actor is a player actor, the base stats are in the PlayerActor
// structure.
ActorAttributes *Actor::getBaseStats(void) {
ActorAttributes *Actor::getBaseStats() {
if (_disposition < dispositionPlayer)
return &((ActorProto *)prototype)->baseStats;
else
@ -1734,7 +1734,7 @@ ActorAttributes *Actor::getBaseStats(void) {
// Return the racial base enchantment flags. If this actor
// is a non-player actor, the base stats are in the prototype.
uint32 Actor::getBaseEnchantmentEffects(void) {
uint32 Actor::getBaseEnchantmentEffects() {
//if ( disposition < dispositionPlayer )
return ((ActorProto *)prototype)->baseEffectFlags;
}
@ -1743,7 +1743,7 @@ uint32 Actor::getBaseEnchantmentEffects(void) {
// Return the object base resistance flags. If this actor
// is a non-player actor, the base stats are in the prototype.
uint16 Actor::getBaseResistance(void) {
uint16 Actor::getBaseResistance() {
//if ( disposition < dispositionPlayer )
return ((ActorProto *)prototype)->resistance;
}
@ -1752,7 +1752,7 @@ uint16 Actor::getBaseResistance(void) {
// Return the object base immunity flags. If this actor
// is a non-player actor, the base stats are in the prototype.
uint16 Actor::getBaseImmunity(void) {
uint16 Actor::getBaseImmunity() {
//if ( disposition < dispositionPlayer )
return ((ActorProto *)prototype)->immunity;
}
@ -1760,7 +1760,7 @@ uint16 Actor::getBaseImmunity(void) {
//-----------------------------------------------------------------------
// Return the base recovery rate
uint16 Actor::getBaseRecovery(void) {
uint16 Actor::getBaseRecovery() {
return BASE_REC_RATE;
}
@ -1783,7 +1783,7 @@ bool Actor::inUseRange(const TilePoint &tp, GameObject *obj) {
//-----------------------------------------------------------------------
// Determine if actor is immobile (i.e. can't walk)
bool Actor::isImmobile(void) {
bool Actor::isImmobile() {
return isDead()
|| hasEffect(actorImmobile)
|| hasEffect(actorAsleep)
@ -1793,7 +1793,7 @@ bool Actor::isImmobile(void) {
//-----------------------------------------------------------------------
// Return a pointer to this actor's currently readied offensive object
GameObject *Actor::offensiveObject(void) {
GameObject *Actor::offensiveObject() {
if (_rightHandObject != Nothing) {
assert(isObject(_rightHandObject));
@ -1937,7 +1937,7 @@ void Actor::stopAttack(GameObject *target) {
//-----------------------------------------------------------------------
// Determine if this actor can block an attack
bool Actor::canDefend(void) {
bool Actor::canDefend() {
if (isDead()) return false;
// Look at left hand object, generally the defensive object
@ -1961,7 +1961,7 @@ bool Actor::canDefend(void) {
// Return a numeric value which roughly estimates this actor's
// offensive strength
int16 Actor::offenseScore(void) {
int16 Actor::offenseScore() {
// REM: at this time this calculation is somewhat arbitrary
int16 score = 0;
@ -1991,7 +1991,7 @@ int16 Actor::offenseScore(void) {
// Return a numeric value which roughly estimates this actor's
// defensive strength
int16 Actor::defenseScore(void) {
int16 Actor::defenseScore() {
// REM: at this time this calculation is somewhat arbitrary
int16 score = 0;
@ -2120,7 +2120,7 @@ int16 Actor::animationFrames(int16 actionType, Direction dir) {
// Update the current animation sequence to the next frame.
// Returns true if the animation sequence has finished.
bool Actor::nextAnimationFrame(void) {
bool Actor::nextAnimationFrame() {
ActorAnimation *anim;
int16 numPoses;
@ -2212,7 +2212,7 @@ bool Actor::nextAnimationFrame(void) {
//-----------------------------------------------------------------------
// Drop the all of the actor's inventory
void Actor::dropInventory(void) {
void Actor::dropInventory() {
GameObject *obj,
*nextObj;
@ -2406,7 +2406,7 @@ void Actor::setGoal(uint8 newGoal) {
//-----------------------------------------------------------------------
// Reevaluate actor's built-in needs
void Actor::evaluateNeeds(void) {
void Actor::evaluateNeeds() {
if (!isDead()
&& isActivated()
&& !(_flags & lobotomized)) {
@ -2493,7 +2493,7 @@ void Actor::evaluateNeeds(void) {
}
}
void Actor::updateState(void) {
void Actor::updateState() {
// The actor should not be set permanently uninterruptable when
// the actor does not have a motion task
assert(isMoving() || _actionCounter != maxuint8);
@ -2989,7 +2989,7 @@ void Actor::bandWith(Actor *newLeader) {
//-----------------------------------------------------------------------
// Simply causes this actor to be removed from his current band.
void Actor::disband(void) {
void Actor::disband() {
if (_leader != NULL) {
_leader->removeFollower(this);
_leader = NULL;
@ -3114,7 +3114,7 @@ uint8 Actor::evaluateFollowerNeeds(Actor *follower) {
// Returns 0 if not moving, 1 if path being calculated,
// 2 if path being followed.
bool Actor::pathFindState(void) {
bool Actor::pathFindState() {
if (_moveTask == NULL)
return 0;
if (_moveTask->pathFindTask)
@ -3151,7 +3151,7 @@ bool Actor::removeKnowledge(uint16 kID) {
//-----------------------------------------------------------------------
// Remove all knowledge package from actor
void Actor::clearKnowledge(void) {
void Actor::clearKnowledge() {
for (int i = 0; i < ARRAYSIZE(_knowledge); i++) {
_knowledge[i] = 0;
}
@ -3354,14 +3354,14 @@ bool Actor::hasMana(ActorManaID i, int8 dMana) {
//-----------------------------------------------------------------------
// Saving throw funcion
bool Actor::makeSavingThrow(void) {
bool Actor::makeSavingThrow() {
return false;
}
//-------------------------------------------------------------------
// Determine if the actors are currently initialized
bool areActorsInitialized(void) {
bool areActorsInitialized() {
return g_vm->_act->_actorList.size() > 0;
}
@ -3369,7 +3369,7 @@ int16 GetRandomBetween(int start, int end) {
return g_vm->_rnd->getRandomNumberRng(start, end - 1);
}
void updateActorStates(void) {
void updateActorStates() {
if (g_vm->_act->_actorStatesPaused) return;
int32 actorIndex;
@ -3395,13 +3395,13 @@ void updateActorStates(void) {
//-------------------------------------------------------------------
void pauseActorStates(void) {
void pauseActorStates() {
g_vm->_act->_actorStatesPaused = true;
}
//-------------------------------------------------------------------
void resumeActorStates(void) {
void resumeActorStates() {
g_vm->_act->_actorStatesPaused = false;
}
@ -3442,7 +3442,7 @@ ResourceActor::ResourceActor(Common::SeekableReadStream *stream) : ResourceGameO
}
}
void initActors(void) {
void initActors() {
// Load actors
int i, resourceActorCount;
Common::Array<ResourceActor> resourceActorList;
@ -3542,7 +3542,7 @@ void loadActors(Common::InSaveFile *in) {
//-------------------------------------------------------------------
// Cleanup the actor list
void cleanupActors(void) {
void cleanupActors() {
if (g_vm->_act->_actorList.size() > 0) {
for (int i = 0; i < kActorCount; i++)
delete g_vm->_act->_actorList[i];
@ -3601,7 +3601,7 @@ int16 GetFactionTally(int faction, enum factionTallyTypes act) {
//-------------------------------------------------------------------
// Initialize the faction tally table
void initFactionTallies(void) {
void initFactionTallies() {
memset(&g_vm->_act->_factionTable, 0, sizeof(g_vm->_act->_factionTable));
}

View File

@ -247,7 +247,7 @@ struct ResourceActorProtoExtension {
uint32 baseEffectFlags; // special effects, see EFFECTS.H
// Default constructor -- do nothing
ResourceActorProtoExtension(void) {
ResourceActorProtoExtension() {
memset(&baseStats, 0, sizeof(baseStats));
combatBehavior = 0;
@ -304,7 +304,7 @@ public:
}
// returns the containment type flags for this object
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
// returns true if this object can contain another object
virtual bool canContain(ObjectID dObj, ObjectID item);
@ -316,7 +316,7 @@ public:
ObjectID item,
const TilePoint &where);
weaponID getWeaponID(void);
weaponID getWeaponID();
// use this actor
bool useAction(ObjectID dObj, ObjectID enactor);
@ -393,16 +393,16 @@ public:
ObjectID enactor); // person doing dropping
public:
virtual uint16 getViewableRows(void) {
virtual uint16 getViewableRows() {
return ViewableRows;
}
virtual uint16 getViewableCols(void) {
virtual uint16 getViewableCols() {
return ViewableCols;
}
virtual uint16 getMaxRows(void) {
virtual uint16 getMaxRows() {
return maxRows;
}
virtual uint16 getMaxCols(void) {
virtual uint16 getMaxCols() {
return maxCols;
}
@ -725,7 +725,7 @@ private:
public:
// Default constructor
Actor(void);
Actor();
// Constructor - initial actor construction
Actor(const ResourceActor &res);
@ -733,10 +733,10 @@ public:
Actor(Common::InSaveFile *in);
// Destructor
~Actor(void);
~Actor();
// Return the number of bytes needed to archive this actor
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
@ -750,7 +750,7 @@ public:
uint8 initFlags);
// Delete this actor
void deleteActor(void);
void deleteActor();
private:
// Turn incrementally
@ -767,31 +767,31 @@ public:
// Cause the actor to stop his current motion task is he is
// interruptable
void stopMoving(void);
void stopMoving();
// Cause this actor to die
void die(void);
void die();
// Cause this actor to return from the dead
void imNotQuiteDead(void);
void imNotQuiteDead();
// makes the actor do a vitality change test
void vitalityUpdate(void);
void vitalityUpdate();
// Perform actor specific activation tasks
void activateActor(void);
void activateActor();
// Perform actor specific deactivation tasks
void deactivateActor(void);
void deactivateActor();
// De-lobotomize this actor
void delobotomize(void);
void delobotomize();
// Lobotomize this actor
void lobotomize(void);
void lobotomize();
// Return a pointer to the actor's current assignment
ActorAssignment *getAssignment(void) {
ActorAssignment *getAssignment() {
return _flags & hasAssignment
? _assignment
: nullptr;
@ -811,16 +811,16 @@ public:
bool inUseRange(const TilePoint &tp, GameObject *obj);
// Determine if actor is dead
bool isDead(void) {
bool isDead() {
return _effectiveStats.vitality <= 0;
}
// Determine if actor is immobile (i.e. can't walk)
bool isImmobile(void);
bool isImmobile();
// Return a pointer to this actor's currently readied offensive
// object
GameObject *offensiveObject(void);
GameObject *offensiveObject();
// Returns pointers to this actor's readied primary defensive object
// and optionally their scondary defensive object
@ -844,15 +844,15 @@ public:
// Determine if this actor can block an attack with objects
// currently being held
bool canDefend(void);
bool canDefend();
// Return a numeric value which roughly estimates this actor's
// offensive strength
int16 offenseScore(void);
int16 offenseScore();
// Return a numeric value which roughly estimates this actor's
// defensive strenght
int16 defenseScore(void);
int16 defenseScore();
// Handle the effect of a successful hit on an opponent in combat
void handleSuccessfulStrike(GameObject *weapon) {
@ -860,7 +860,7 @@ public:
}
// Return the value of this actor's disposition
int16 getDisposition(void) {
int16 getDisposition() {
return _disposition;
}
@ -873,23 +873,23 @@ public:
}
// Return a pointer to the effective stats
ActorAttributes *getStats(void) {
ActorAttributes *getStats() {
return &_effectiveStats;
}
// Return a pointer to this actor's base stats
ActorAttributes *getBaseStats(void);
ActorAttributes *getBaseStats();
// Return the color remapping table
void getColorTranslation(ColorTable map);
// Determine if this actor is interruptable
bool isInterruptable(void) {
bool isInterruptable() {
return _actionCounter == 0;
}
// Determine if this actor is permanently uninterruptable
bool isPermanentlyUninterruptable(void) {
bool isPermanentlyUninterruptable() {
return _actionCounter == maxuint8;
}
@ -906,7 +906,7 @@ public:
}
// Drop the all of the actor's inventory
void dropInventory(void);
void dropInventory();
// Place an object into this actor's right or left hand
void holdInRightHand(ObjectID objID);
@ -935,11 +935,11 @@ public:
int16 animationFrames(int16 actionType, Direction dir);
// Update the current animation sequence to the next frame
bool nextAnimationFrame(void);
bool nextAnimationFrame();
// calculate which sprite frames to show. Return false if
// sprite frames are not loaded.
bool calcSpriteFrames(void);
bool calcSpriteFrames();
// Calculate the frame list entry, given the current actor's
// body state, and facing direction.
@ -947,17 +947,17 @@ public:
// Returns 0 if not moving, 1 if path being calculated,
// 2 if path being followed.
bool pathFindState(void);
bool pathFindState();
// High level actor behavior functions
private:
void setGoal(uint8 newGoal);
public:
void evaluateNeeds(void);
void evaluateNeeds();
// Called every frame to update the state of this actor
void updateState(void);
void updateState();
void handleTaskCompletion(TaskResult result);
void handleOffensiveAct(Actor *attacker);
@ -972,9 +972,9 @@ public:
// Banding related functions
void bandWith(Actor *newLeader);
void disband(void);
void disband();
bool inBandingRange(void) {
bool inBandingRange() {
assert(_leader != NULL);
return _leader->IDParent() == IDParent()
@ -993,7 +993,7 @@ public:
// Knowledge-related member functions
bool addKnowledge(uint16 kID);
bool removeKnowledge(uint16 kID);
void clearKnowledge(void);
void clearKnowledge();
void useKnowledge(scriptCallFrame &scf);
bool canSenseProtaganistIndirectly(SenseInfo &info, int16 range);
@ -1019,10 +1019,10 @@ public:
bool hasMana(ActorManaID i, int8 dMana);
uint32 getBaseEnchantmentEffects(void);
uint16 getBaseResistance(void);
uint16 getBaseImmunity(void);
uint16 getBaseRecovery(void);
uint32 getBaseEnchantmentEffects();
uint16 getBaseResistance();
uint16 getBaseImmunity();
uint16 getBaseRecovery();
bool resists(effectResistTypes r) {
return _effectiveResistance & (1 << r);
@ -1052,7 +1052,7 @@ public:
_enchantmentFlags & ~(1 << e);
}
bool makeSavingThrow(void);
bool makeSavingThrow();
void setFightStance(bool val) {
if (val)
@ -1080,15 +1080,15 @@ inline bool isEnemy(ObjectID obj) {
&& isEnemy((Actor *)GameObject::objectAddress(obj));
}
void updateActorStates(void);
void updateActorStates();
void pauseActorStates(void);
void resumeActorStates(void);
void pauseActorStates();
void resumeActorStates();
void setCombatBehavior(bool enabled);
// Determine if the actors are currently initialized
bool areActorsInitialized(void);
bool areActorsInitialized();
void clearEnchantments(Actor *a);
void addEnchantment(Actor *a, uint16 enchantmentID);
@ -1116,7 +1116,7 @@ int16 GetFactionTally(int faction, enum factionTallyTypes act);
int16 AddFactionTally(int faction, enum factionTallyTypes act, int amt);
// Initialize the faction tally table
void initFactionTallies(void);
void initFactionTallies();
// Save the faction tallies to a save file
void saveFactionTallies(Common::OutSaveFile *outS);
@ -1125,7 +1125,7 @@ void saveFactionTallies(Common::OutSaveFile *outS);
void loadFactionTallies(Common::InSaveFile *in);
// Cleanup the faction tally table
inline void cleanupFactionTallies(void) { /* Nothing to do */ }
inline void cleanupFactionTallies() { /* Nothing to do */ }
class ActorManager {
public:

View File

@ -77,14 +77,14 @@ void PlayLongSound(char IDstr[]);
//-----------------------------------------------------------------------
// general maintainence
bool initAudio(void);
void startAudio(void);
void suspendAudio(void);
void resumeAudio(void);
void cleanupAudio(void);
void writeConfig(void);
bool initAudio();
void startAudio();
void suspendAudio();
void resumeAudio();
void cleanupAudio();
void writeConfig();
void audioEventLoop(void);
void audioEventLoop();
bool stillDoingVoice(uint32 sampno);
bool stillDoingVoice(uint32 s[]);
@ -92,7 +92,7 @@ bool stillDoingVoice(uint32 s[]);
// environmental sounds
void audioEnvironmentUseSet(int16 audioSet, int32 auxID, Point32 relPos);
void audioEnvironmentCheck(void);
void audioEnvironmentCheck();
void audioEnvironmentSetAggression(bool onOff);
void audioEnvironmentSetDaytime(bool onOff);
@ -102,8 +102,8 @@ void audioEnvironmentSetWorld(int mapNum);
//-----------------------------------------------------------------------
// environmental music
void clearActiveFactions(void);
void useActiveFactions(void);
void clearActiveFactions();
void useActiveFactions();
//-----------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ ActorAssignment::ActorAssignment(Actor *ac, Common::SeekableReadStream *stream)
//----------------------------------------------------------------------
// ActorAssignment destructor
ActorAssignment::~ActorAssignment(void) {
ActorAssignment::~ActorAssignment() {
Actor *a = getActor();
debugC(2, kDebugActors, "Ending assignment for %p (%s): %p",
(void *)a, a->objName(), (void *)this);
@ -83,7 +83,7 @@ ActorAssignment::~ActorAssignment(void) {
// Return the number of bytes need to archive the data in this
// assignment
inline int32 ActorAssignment::archiveSize(void) const {
inline int32 ActorAssignment::archiveSize() const {
return sizeof(_startFrame) + sizeof(_endFrame);
}
@ -95,7 +95,7 @@ void ActorAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Determine if the time limit for this assignment has been exceeded
bool ActorAssignment::isValid(void) {
bool ActorAssignment::isValid() {
uint16 frame = g_vm->_calender->frameInDay();
return frame < _endFrame
@ -105,7 +105,7 @@ bool ActorAssignment::isValid(void) {
//----------------------------------------------------------------------
// Create a TaskStack for this actor and plug in the assignment's Task.
TaskStack *ActorAssignment::createTask(void) {
TaskStack *ActorAssignment::createTask() {
if (!taskNeeded()) return NULL;
Actor *a = getActor();
@ -125,7 +125,7 @@ TaskStack *ActorAssignment::createTask(void) {
return ts;
}
Actor *ActorAssignment::getActor(void) const {
Actor *ActorAssignment::getActor() const {
return _actor;
}
@ -142,7 +142,7 @@ void ActorAssignment::handleTaskCompletion(TaskResult) {
// Plug a new task into the actor, if the actor is currently following
// his assignment
void ActorAssignment::startTask(void) {
void ActorAssignment::startTask() {
Actor *a = getActor();
if (a->_currentGoal == actorGoalFollowAssignment)
@ -152,7 +152,7 @@ void ActorAssignment::startTask(void) {
//----------------------------------------------------------------------
// Determine if this assignment needs to create a task at this time
bool ActorAssignment::taskNeeded(void) {
bool ActorAssignment::taskNeeded() {
return true;
}
@ -199,7 +199,7 @@ PatrolRouteAssignment::PatrolRouteAssignment(Actor *a, Common::SeekableReadStrea
// Return the number of bytes need to archive the data in this
// assignment
inline int32 PatrolRouteAssignment::archiveSize(void) const {
inline int32 PatrolRouteAssignment::archiveSize() const {
return ActorAssignment::archiveSize()
+ sizeof(_routeNo)
+ sizeof(_startingWayPoint)
@ -229,7 +229,7 @@ void PatrolRouteAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
// Return an integer representing the class of this object for archival
// reasons.
int16 PatrolRouteAssignment::type(void) const {
int16 PatrolRouteAssignment::type() const {
return patrolRouteAssignment;
}
@ -244,7 +244,7 @@ void PatrolRouteAssignment::handleTaskCompletion(TaskResult result) {
//----------------------------------------------------------------------
// Determine if assignment is still valid
bool PatrolRouteAssignment::isValid(void) {
bool PatrolRouteAssignment::isValid() {
// If the route has already been completed, then the assignment is
// no longer valid
if (_flags & routeCompleted) return false;
@ -255,7 +255,7 @@ bool PatrolRouteAssignment::isValid(void) {
//----------------------------------------------------------------------
// Determine if this assignment needs to create a task at this time
bool PatrolRouteAssignment::taskNeeded(void) {
bool PatrolRouteAssignment::taskNeeded() {
// If the route has already been completed, then no task is needed
return !(_flags & routeCompleted);
}
@ -343,7 +343,7 @@ HuntToBeNearLocationAssignment::HuntToBeNearLocationAssignment(Actor *a, Common:
// Return the number of bytes need to archive the data in this
// assignment
inline int32 HuntToBeNearLocationAssignment::archiveSize(void) const {
inline int32 HuntToBeNearLocationAssignment::archiveSize() const {
return ActorAssignment::archiveSize()
+ targetArchiveSize(getTarget())
+ sizeof(_range);
@ -366,14 +366,14 @@ void HuntToBeNearLocationAssignment::write(Common::MemoryWriteStreamDynamic *out
// Return an integer representing the class of this object for archival
// reasons.
int16 HuntToBeNearLocationAssignment::type(void) const {
int16 HuntToBeNearLocationAssignment::type() const {
return huntToBeNearLocationAssignment;
}
//----------------------------------------------------------------------
// Determine if this assignment needs to create a task at this time
bool HuntToBeNearLocationAssignment::taskNeeded(void) {
bool HuntToBeNearLocationAssignment::taskNeeded() {
Actor *a = getActor();
TilePoint actorLoc = a->getLocation();
@ -445,7 +445,7 @@ HuntToBeNearActorAssignment::HuntToBeNearActorAssignment(Actor *a, Common::Seeka
// Return the number of bytes need to archive the data in this
// assignment
inline int32 HuntToBeNearActorAssignment::archiveSize(void) const {
inline int32 HuntToBeNearActorAssignment::archiveSize() const {
return ActorAssignment::archiveSize()
+ targetArchiveSize(getTarget())
+ sizeof(_range)
@ -472,14 +472,14 @@ void HuntToBeNearActorAssignment::write(Common::MemoryWriteStreamDynamic *out) c
// Return an integer representing the class of this object for archival
// reasons.
int16 HuntToBeNearActorAssignment::type(void) const {
int16 HuntToBeNearActorAssignment::type() const {
return huntToBeNearActorAssignment;
}
//----------------------------------------------------------------------
// Determine if this assignment needs to create a task at this time
bool HuntToBeNearActorAssignment::taskNeeded(void) {
bool HuntToBeNearActorAssignment::taskNeeded() {
Actor *a = getActor();
TilePoint actorLoc = a->getLocation(),
targetLoc = getTarget()->where(a->world(), actorLoc);
@ -541,7 +541,7 @@ void HuntToKillAssignment::initialize(
// Return the number of bytes need to archive the data in this
// assignment
inline int32 HuntToKillAssignment::archiveSize(void) const {
inline int32 HuntToKillAssignment::archiveSize() const {
return ActorAssignment::archiveSize()
+ targetArchiveSize(getTarget())
+ sizeof(_flags);
@ -563,7 +563,7 @@ void HuntToKillAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Determine if this assignment is still valid
bool HuntToKillAssignment::isValid(void) {
bool HuntToKillAssignment::isValid() {
// If the target actor is already dead, then this is not a valid
// assignment
if (_flags & specificActor) {
@ -581,14 +581,14 @@ bool HuntToKillAssignment::isValid(void) {
// Return an integer representing the class of this object for archival
// reasons.
int16 HuntToKillAssignment::type(void) const {
int16 HuntToKillAssignment::type() const {
return huntToKillAssignment;
}
//----------------------------------------------------------------------
// Determine if this assignment needs to create a task at this time
bool HuntToKillAssignment::taskNeeded(void) {
bool HuntToKillAssignment::taskNeeded() {
// If we're hunting a specific actor, we only need a task if that
// actor is still alive.
if (_flags & specificActor) {
@ -629,7 +629,7 @@ TetheredAssignment::TetheredAssignment(Actor *ac, Common::SeekableReadStream *st
// Return the number of bytes need to archive the data in this
// assignment
inline int32 TetheredAssignment::archiveSize(void) const {
inline int32 TetheredAssignment::archiveSize() const {
return ActorAssignment::archiveSize()
+ sizeof(_minU)
+ sizeof(_minV)
@ -668,7 +668,7 @@ TetheredWanderAssignment::TetheredWanderAssignment(
// Return an integer representing the class of this object for archival
// reasons.
int16 TetheredWanderAssignment::type(void) const {
int16 TetheredWanderAssignment::type() const {
return tetheredWanderAssignment;
}
@ -707,7 +707,7 @@ AttendAssignment::AttendAssignment(Actor *a, Common::SeekableReadStream *stream)
// Return the number of bytes need to archive the data in this
// assignment
inline int32 AttendAssignment::archiveSize(void) const {
inline int32 AttendAssignment::archiveSize() const {
return ActorAssignment::archiveSize()
+ sizeof(ObjectID);
}
@ -731,7 +731,7 @@ void AttendAssignment::write(Common::MemoryWriteStreamDynamic *out) const {
// Return an integer representing the class of this object for archival
// reasons.
int16 AttendAssignment::type(void) const {
int16 AttendAssignment::type() const {
return attendAssignment;
}

View File

@ -67,35 +67,35 @@ public:
ActorAssignment(Actor *a, Common::SeekableReadStream *stream);
// Destructor
virtual ~ActorAssignment(void);
virtual ~ActorAssignment();
// Return the number of bytes need to archive the data in this
// assignment
virtual int32 archiveSize(void) const;
virtual int32 archiveSize() const;
virtual void write(Common::MemoryWriteStreamDynamic *out) const;
// Construct a TaskStack for this assignment
TaskStack *createTask(void);
TaskStack *createTask();
// This function is called to notify the assignment of the
// completion of a task which the assignment had created.
virtual void handleTaskCompletion(TaskResult result);
// Determine if assignment's time limit is up
virtual bool isValid(void);
virtual bool isValid();
// Return a pointer to the actor to which this assignment belongs
Actor *getActor(void) const;
Actor *getActor() const;
// Return an integer representing the class of this assignment
virtual int16 type(void) const = 0;
virtual int16 type() const = 0;
protected:
void startTask(void);
void startTask();
// Determine if this assignment needs to create a task at this time
virtual bool taskNeeded(void);
virtual bool taskNeeded();
// Create a Task for this assignment
virtual Task *getTask(TaskStack *ts) = 0;
@ -132,23 +132,23 @@ public:
// Return the number of bytes need to archive the data in this
// assignment
int32 archiveSize(void) const;
int32 archiveSize() const;
void write(Common::MemoryWriteStreamDynamic *out) const;
// Return an integer representing the type of this assignment
int16 type(void) const;
int16 type() const;
// This function is called to notify the assignment of the
// completion of a task which the assignment had created.
void handleTaskCompletion(TaskResult result);
// Determine if assignment is still valid
bool isValid(void);
bool isValid();
protected:
// Determine if this assignment needs to create a task at this time
bool taskNeeded(void);
bool taskNeeded();
// Construct a Task for this assignment
Task *getTask(TaskStack *ts);
@ -200,18 +200,18 @@ public:
// Return the number of bytes need to archive the data in this
// assignment
int32 archiveSize(void) const;
int32 archiveSize() const;
void write(Common::MemoryWriteStreamDynamic *out) const;
int16 type(void) const;
int16 type() const;
protected:
bool taskNeeded(void);
bool taskNeeded();
Task *getTask(TaskStack *ts);
const Target *getTarget(void) const {
const Target *getTarget() const {
return (const Target *)_targetMem;
}
};
@ -279,18 +279,18 @@ public:
// Return the number of bytes need to archive the data in this
// assignment
int32 archiveSize(void) const;
int32 archiveSize() const;
void write(Common::MemoryWriteStreamDynamic *out) const;
int16 type(void) const;
int16 type() const;
protected:
bool taskNeeded(void);
bool taskNeeded();
Task *getTask(TaskStack *ts);
const ActorTarget *getTarget(void) const {
const ActorTarget *getTarget() const {
return (const ActorTarget *)_targetMem;
}
};
@ -350,22 +350,22 @@ public:
// Return the number of bytes need to archive the data in this
// assignment
int32 archiveSize(void) const;
int32 archiveSize() const;
void write(Common::MemoryWriteStreamDynamic *out) const;
// Determine if assignment's time limit is up or if the actor is
// already dead
bool isValid(void);
bool isValid();
int16 type(void) const;
int16 type() const;
protected:
bool taskNeeded(void);
bool taskNeeded();
Task *getTask(TaskStack *ts);
const ActorTarget *getTarget(void) const {
const ActorTarget *getTarget() const {
return (const ActorTarget *)_targetMem;
}
};
@ -396,7 +396,7 @@ public:
// Return the number of bytes need to archive the data in this
// assignment
int32 archiveSize(void) const;
int32 archiveSize() const;
void write(Common::MemoryWriteStreamDynamic *out) const;
};
@ -413,7 +413,7 @@ public:
TetheredWanderAssignment(Actor *a, Common::SeekableReadStream *stream) : TetheredAssignment(a, stream) {}
// Return an integer representing the type of this assignment
int16 type(void) const;
int16 type() const;
protected:
// Construct a Task for this assignment
@ -435,12 +435,12 @@ public:
// Return the number of bytes need to archive the data in this
// assignment
int32 archiveSize(void) const;
int32 archiveSize() const;
void write(Common::MemoryWriteStreamDynamic *out) const;
// Return an integer representing the type of this assignment
int16 type(void) const;
int16 type() const;
protected:
// Construct a Task for this assignment

View File

@ -56,12 +56,12 @@ extern hResource *voiceResFile; // script resources
hResContext *voiceRes, *musicRes, *soundRes, *loopRes, *longRes;
bool haveKillerSoundCard(void);
void writeConfig(void);
bool haveKillerSoundCard();
void writeConfig();
void disableBGLoop(bool s = true);
void enableBGLoop(void);
void audioStressTest(void);
extern GameObject *getViewCenterObject(void);
void enableBGLoop();
void audioStressTest();
extern GameObject *getViewCenterObject();
void playSoundAt(uint32 s, Location playAt);
void playSoundAt(uint32 s, Point32 playAt);
bool sayVoiceAt(uint32 s[], Location l);
@ -98,7 +98,7 @@ static byte volumeFromDist(Point32 loc, byte maxVol) {
//-----------------------------------------------------------------------
// after system initialization - startup code
void startAudio(void) {
void startAudio() {
uint32 musicID = haveKillerSoundCard() ? goodMusicID : baseMusicID;
musicRes = soundResFile->newContext(musicID, "music resource");
@ -158,7 +158,7 @@ void cleanupAudio() {
// audio event loop
void audioEventLoop(void) {
void audioEventLoop() {
if (g_vm->_audio->playFlag())
g_vm->_audio->playMe();
@ -181,7 +181,7 @@ void makeGruntSound(uint8 cs, Location l) {
//-----------------------------------------------------------------------
// check for higher quality MIDI card
bool haveKillerSoundCard(void) {
bool haveKillerSoundCard() {
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
MusicType driverType = MidiDriver::getMusicType(dev);
@ -198,7 +198,7 @@ bool haveKillerSoundCard(void) {
//-----------------------------------------------------------------------
// unwritten music toggler
void toggleMusic(void) {
void toggleMusic() {
}
/* ===================================================================== *
@ -209,25 +209,25 @@ void toggleMusic(void) {
// suspend & resume calls
void suspendLoops(void) {
void suspendLoops() {
disableBGLoop(false);
}
void resumeLoops(void) {
void resumeLoops() {
if (loopRes)
enableBGLoop();
}
void suspendMusic(void) {
void suspendMusic() {
audioEnvironmentSuspend(true);
}
void resumeMusic(void) {
void resumeMusic() {
if (musicRes)
audioEnvironmentSuspend(false);
}
void suspendAudio(void) {
void suspendAudio() {
if (g_vm->_audio) {
suspendMusic();
suspendLoops();
@ -235,7 +235,7 @@ void suspendAudio(void) {
}
}
void resumeAudio(void) {
void resumeAudio() {
if (g_vm->_audio) {
if (soundRes != NULL || voiceRes != NULL) {
g_vm->_audio->resume();
@ -248,7 +248,7 @@ void resumeAudio(void) {
//-----------------------------------------------------------------------
// UI volume change hook
void volumeChanged(void) {
void volumeChanged() {
if (g_vm->_audio->getVolume(kVolSfx))
resumeLoops();
else
@ -437,7 +437,7 @@ void playLoopAt(uint32 s, Point32 loc) {
void addAuxTheme(Location loc, uint32 lid);
void killAuxTheme(uint32 lid);
void killAllAuxThemes(void);
void killAllAuxThemes();
void playLoopAt(uint32 s, Location playAt) {
debugC(1, kDebugSound, "playLoopAt(%s, %d,%d,%d)", tag2strP(s), playAt.u, playAt.v, playAt.z);
@ -580,7 +580,7 @@ void AudioInterface::initAudioInterface(hResContext *musicContext) {
_music = new Music(musicContext);
}
bool AudioInterface::playFlag(void) {
bool AudioInterface::playFlag() {
debugC(5, kDebugSound, "AudioInterface::playFlag()");
if (_speechQueue.size() == 0 && !_mixer->isSoundHandleActive(_speechSoundHandle))
_currentSpeech.seg = 0;
@ -588,7 +588,7 @@ bool AudioInterface::playFlag(void) {
return _speechQueue.size() > 0 || _sfxQueue.size() > 0;
}
void AudioInterface::playMe(void) {
void AudioInterface::playMe() {
if (_speechQueue.size() > 0 && !_mixer->isSoundHandleActive(_speechSoundHandle)) {
SoundInstance si = _speechQueue.front();
_speechQueue.pop_front();
@ -623,7 +623,7 @@ void AudioInterface::playMusic(uint32 s, int16 loopFactor, Point32 where) {
_currentMusic.loc = where;
}
void AudioInterface::stopMusic(void) {
void AudioInterface::stopMusic() {
_music->stop();
}
@ -650,7 +650,7 @@ void AudioInterface::playLoop(uint32 s, int16 loopFactor, Point32 where) {
_mixer->playStream(Audio::Mixer::kSFXSoundType, &g_vm->_audio->_loopSoundHandle, laud, -1, vol);
}
void AudioInterface::stopLoop(void) {
void AudioInterface::stopLoop() {
_mixer->stopHandle(_loopSoundHandle);
}
@ -688,11 +688,11 @@ void AudioInterface::queueVoice(uint32 s[], Point32 where) {
}
}
void AudioInterface::stopVoice(void) {
void AudioInterface::stopVoice() {
_mixer->stopHandle(_speechSoundHandle);
}
bool AudioInterface::talking(void) {
bool AudioInterface::talking() {
return _mixer->isSoundHandleActive(_speechSoundHandle);
}
@ -722,11 +722,11 @@ byte AudioInterface::getVolume(VolumeTarget src) {
return 0;
}
void AudioInterface::suspend(void) {
void AudioInterface::suspend() {
_mixer->pauseAll(true);
}
void AudioInterface::resume(void) {
void AudioInterface::resume() {
_mixer->pauseAll(false);
}

View File

@ -83,34 +83,34 @@ public:
void initAudioInterface(hResContext *musicContext);
// event loop calls
bool playFlag(void);
void playMe(void);
bool playFlag();
void playMe();
// music calls
void playMusic(uint32 s, int16 loopFactor = 1, Point32 where = Here);
void stopMusic(void);
void stopMusic();
// sound calls
void queueSound(uint32 s, int16 loopFactor = 1, Point32 where = Here);
// loop calls
void playLoop(uint32 s, int16 loopFactor = 0, Point32 where = Here);
void stopLoop(void);
void stopLoop();
void setLoopPosition(Point32 newLoc);
uint32 currentLoop(void) {
uint32 currentLoop() {
return _currentLoop.seg;
}
// voice calls
void queueVoice(uint32 s, Point32 where = Here);
void queueVoice(uint32 s[], Point32 where = Here);
void stopVoice(void);
bool talking(void);
void stopVoice();
bool talking();
bool saying(uint32 s);
byte getVolume(VolumeTarget src);
void suspend(void);
void resume(void);
void suspend();
void resume();
};
} // end of namespace Saga2

View File

@ -192,7 +192,7 @@ AutoMap::~AutoMap() {
// ------------------------------------------------------------------------
// read map data
void AutoMap::locateRegion(void) {
void AutoMap::locateRegion() {
Common::SeekableReadStream *stream;
hResContext *areaRes; // tile resource handle
int16 regionCount;
@ -238,7 +238,7 @@ void AutoMap::locateRegion(void) {
// ------------------------------------------------------------------------
// deactivation
void AutoMap::deactivate(void) {
void AutoMap::deactivate() {
selected = 0;
gPanel::deactivate();
}
@ -435,7 +435,7 @@ void AutoMap::drawClipped(
// ------------------------------------------------------------------------
// draw
void AutoMap::draw(void) { // redraw the window
void AutoMap::draw() { // redraw the window
// draw the entire panel
drawClipped(g_vm->_mainPort, Point16(0, 0), _extent);
}
@ -444,7 +444,7 @@ void AutoMap::draw(void) { // redraw the window
// build summary
// create a summary map on the tPort gPixelMap buffer
void AutoMap::createSmallMap(void) {
void AutoMap::createSmallMap() {
WorldMapData *wMap = &mapList[currentWorld->mapNum];
uint16 *mapData = wMap->map->mapData;

View File

@ -68,10 +68,10 @@ public:
void drawClipped(gPort &port,
const Point16 &offset,
const Rect16 &clipRect);
void draw(void); // redraw the window
void draw(); // redraw the window
void createSmallMap(void);
void locateRegion(void);
void createSmallMap();
void locateRegion();
APPFUNCV(cmdAutoMapEsc);
APPFUNCV(cmdAutoMapHome);
APPFUNCV(cmdAutoMapEnd);
@ -81,7 +81,7 @@ public:
gPanel *keyTest(int16 key);
private:
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
void pointerMove(gPanelMessage &msg);
bool pointerHit(gPanelMessage &msg);

View File

@ -34,7 +34,7 @@ namespace Saga2 {
// BandList constructor -- simply place each element of the array in
// the inactive list
BandList::BandList(void) {
BandList::BandList() {
for (int i = 0; i < kNumBands; i++)
_list[i] = nullptr;
}
@ -42,7 +42,7 @@ BandList::BandList(void) {
//----------------------------------------------------------------------
// BandList destructor
BandList::~BandList(void) {
BandList::~BandList() {
for (int i = 0; i < kNumBands; i++)
delete _list[i];
}
@ -67,7 +67,7 @@ void BandList::read(Common::InSaveFile *in) {
//----------------------------------------------------------------------
// Return the number of bytes necessary to archive this TaskList
int32 BandList::archiveSize(void) {
int32 BandList::archiveSize() {
int32 size = sizeof(int16);
for (int i = 0; i < kNumBands; i++)
@ -104,7 +104,7 @@ void BandList::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Place a Band into the active list and return its address
Band *BandList::newBand(void) {
Band *BandList::newBand() {
for (int i = 0; i < kNumBands; i++) {
if (!_list[i]) {
_list[i] = new Band();
@ -168,7 +168,7 @@ void BandList::deleteBand(Band *p) {
// Call the bandList member function newBand() to get a pointer to a
// new Band
Band *newBand(void) {
Band *newBand() {
return g_vm->_bandList->newBand();
}
@ -204,7 +204,7 @@ Band *getBandAddress(BandID id) {
//----------------------------------------------------------------------
// Initialize the bandList
void initBands(void) {
void initBands() {
}
void saveBands(Common::OutSaveFile *outS) {
@ -242,7 +242,7 @@ void loadBands(Common::InSaveFile *in, int32 chunkSize) {
//----------------------------------------------------------------------
// Cleanup the bandList
void cleanupBands(void) {
void cleanupBands() {
for (int i = 0; i < BandList::kNumBands; i++) {
if (g_vm->_bandList->_list[i]) {
delete g_vm->_bandList->_list[i];
@ -300,7 +300,7 @@ Band::Band(Common::InSaveFile *in) {
// Return the number of bytes needed to archive this object in a
// buffer
int32 Band::archiveSize(void) {
int32 Band::archiveSize() {
return sizeof(ObjectID) // leader ID
+ sizeof(_memberCount)
+ sizeof(ObjectID) * _memberCount; // members' ID's

View File

@ -37,7 +37,7 @@ class Band;
* ===================================================================== */
// Allocate a new band
Band *newBand(void);
Band *newBand();
Band *newBand(BandID id);
// Delete a previously allocated band
@ -49,11 +49,11 @@ BandID getBandID(Band *b);
Band *getBandAddress(BandID id);
// Initialize the band list
void initBands(void);
void initBands();
void saveBands(Common::OutSaveFile *outS);
void loadBands(Common::InSaveFile *in, int32 chunkSize);
// Cleanup the band list
void cleanupBands(void);
void cleanupBands();
/* ===================================================================== *
BandList class
@ -70,22 +70,22 @@ public:
Band *_list[kNumBands];
// Constructor -- initial construction
BandList(void);
BandList();
// Destructor
~BandList(void);
~BandList();
void read(Common::InSaveFile *in);
// Return the number of bytes necessary to archive this task list
// in a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Place a Band from the inactive list into the active
// list.
Band *newBand(void);
Band *newBand();
Band *newBand(BandID id);
void addBand(Band *band);
@ -134,11 +134,11 @@ public:
// Return the number of bytes needed to archive this object in a
// buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
Actor *getLeader(void) {
Actor *getLeader() {
return _leader;
}
@ -176,7 +176,7 @@ public:
_members[i] = _members[i + 1];
}
int size(void) {
int size() {
return _memberCount;
}
Actor *const &operator [](int index) {

View File

@ -37,7 +37,7 @@ namespace Saga2 {
void addAuxTheme(Location loc, uint32 lid);
void killAuxTheme(uint32 lid);
void killAllAuxThemes(void);
void killAllAuxThemes();
enum audioTerrains {
@ -119,7 +119,7 @@ extern volatile int32 gameTime;
extern uint16 rippedRoofID;
extern GameObject *getViewCenterObject(void);
extern GameObject *getViewCenterObject();
#if DEBUG
extern bool debugAudioThemes;
@ -149,7 +149,7 @@ MetaTileID lookupMetaID(TilePoint coords);
//-----------------------------------------------------------------------
// init
void initAudioEnvirons(void) {
void initAudioEnvirons() {
}
/* ===================================================================== *
@ -175,7 +175,7 @@ void killAuxTheme(uint32 lid) {
}
}
void killAllAuxThemes(void) {
void killAllAuxThemes() {
for (int i = 0; i < AUXTHEMES; i++) {
g_vm->_grandMasterFTA->_aats[i].active = false;
}
@ -188,7 +188,7 @@ void disableBGLoop(bool s) {
g_vm->_grandMasterFTA->_playingExternalLoop = s;
}
void enableBGLoop(void) {
void enableBGLoop() {
uint32 cr = g_vm->_grandMasterFTA->_currentTheme;
g_vm->_grandMasterFTA->_playingExternalLoop = false;
g_vm->_grandMasterFTA->_currentTheme = 0;
@ -296,7 +296,7 @@ void audioEnvironmentUseSet(int16 audioSet, int32 auxID, Point32 relPos) {
//-----------------------------------------------------------------------
// Intermittent sound check
void audioEnvironmentCheck(void) {
void audioEnvironmentCheck() {
uint32 delta = gameTime - g_vm->_grandMasterFTA->_lastGameTime;
g_vm->_grandMasterFTA->_lastGameTime = gameTime;
@ -339,7 +339,7 @@ void audioEnvironmentCheck(void) {
//-----------------------------------------------------------------------
// Intermittent sound check
void Deejay::select(void) {
void Deejay::select() {
int choice = 0;
#if DEBUG & 0
if (1)
@ -381,7 +381,7 @@ void Deejay::select(void) {
//-----------------------------------------------------------------------
// Faction enumeration routines
void clearActiveFactions(void) {
void clearActiveFactions() {
for (int i = 0; i < kMaxFactions; i++)
g_vm->_grandMasterFTA->_activeFactions[i] = 0;
}
@ -390,7 +390,7 @@ void incrementActiveFaction(Actor *a) {
g_vm->_grandMasterFTA->_activeFactions[a->_faction]++;
}
void useActiveFactions(void) {
void useActiveFactions() {
int highCount = 0;
int highFaction = 0;
for (int i = 0; i < kMaxFactions; i++) {

View File

@ -103,7 +103,7 @@ public:
~Deejay() {}
private:
void select(void);
void select();
public:
void setEnemy(int16 enemyType = -1) {

View File

@ -387,16 +387,16 @@ void compositePixelsRvs(gPixelMap *compMap, gPixelMap *sprMap, int32 xpos, int32
}
}
bool initGraphics(void) {
bool initGraphics() {
warning("STUB: initGraphics()");
return false;
}
bool initProcessResources(void) {
bool initProcessResources() {
return true;
}
void termProcessResources(void) {
void termProcessResources() {
}
} // end of namespace Saga2

View File

@ -42,7 +42,7 @@ extern void playMemSound(uint32 s); // play click # s
Compressed image class
* ======================================================================= */
void GfxCompImage::init(void) {
void GfxCompImage::init() {
_compImages = NULL;
_max = 0;
_min = 0;
@ -168,7 +168,7 @@ GfxCompImage::GfxCompImage(gPanelList &list, const StaticRect &box, void **image
}
GfxCompImage::~GfxCompImage(void) {
GfxCompImage::~GfxCompImage() {
// delete any allocated image pointers
// for JEFFL: I took out the winklude #ifdefs becuase I belive
// I fixed the problem that was causing the crash under win32
@ -203,7 +203,7 @@ void GfxCompImage::invalidate(Rect16 *) {
window.update(_extent);
}
void GfxCompImage::draw(void) {
void GfxCompImage::draw() {
gPort &port = window.windowPort;
Rect16 rect = window.getExtent();
@ -215,7 +215,7 @@ void GfxCompImage::draw(void) {
g_vm->_pointer->show(port, _extent); // show mouse pointer
}
void *GfxCompImage::getCurrentCompImage(void) {
void *GfxCompImage::getCurrentCompImage() {
if (_compImages) {
return _compImages[_currentImage]; // return the image pointed to by compImage
} else {
@ -493,7 +493,7 @@ GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, AppFunc *cmd)
_extent = box;
}
GfxCompButton::~GfxCompButton(void) {
GfxCompButton::~GfxCompButton() {
if (_internalAlloc) {
if (_forImage) {
free(_forImage);
@ -525,7 +525,7 @@ void GfxCompButton::dim(bool enableFlag) {
}
void GfxCompButton::deactivate(void) {
void GfxCompButton::deactivate() {
selected = 0;
window.update(_extent);
gPanel::deactivate();
@ -584,7 +584,7 @@ void GfxCompButton::invalidate(Rect16 *) {
}
void GfxCompButton::draw(void) {
void GfxCompButton::draw() {
gPort &port = window.windowPort;
Rect16 rect = window.getExtent();
@ -594,7 +594,7 @@ void GfxCompButton::draw(void) {
g_vm->_pointer->show(port, _extent); // show mouse pointer
}
void *GfxCompButton::getCurrentCompImage(void) {
void *GfxCompButton::getCurrentCompImage() {
if (_dimmed) {
return _dimImage;
} else if (selected) {
@ -708,7 +708,7 @@ GfxMultCompButton::GfxMultCompButton(gPanelList &list, const Rect16 &box, void *
_extent = box;
}
GfxMultCompButton::~GfxMultCompButton(void) {
GfxMultCompButton::~GfxMultCompButton() {
int16 i;
if (_images && _internalAlloc) {
@ -744,7 +744,7 @@ bool GfxMultCompButton::pointerHit(gPanelMessage &) {
return activate(gEventMouseDown);
}
void *GfxMultCompButton::getCurrentCompImage(void) {
void *GfxMultCompButton::getCurrentCompImage() {
return _images[_current];
}
@ -772,7 +772,7 @@ GfxSlider::GfxSlider(gPanelList &list, const Rect16 &box, const Rect16 &imageBox
_extent.width - _imageRect.x);
}
void *GfxSlider::getCurrentCompImage(void) {
void *GfxSlider::getCurrentCompImage() {
int16 val;
int32 index;
@ -789,7 +789,7 @@ void *GfxSlider::getCurrentCompImage(void) {
return _images[index];
}
int16 GfxSlider::getSliderLenVal(void) {
int16 GfxSlider::getSliderLenVal() {
int16 val = 0;
if (_slValMin < 0 && _slValMax < 0) {
@ -805,7 +805,7 @@ int16 GfxSlider::getSliderLenVal(void) {
return val;
}
void GfxSlider::draw(void) {
void GfxSlider::draw() {
gPort &port = window.windowPort;
Point16 offset = Point16(0, 0);
@ -847,7 +847,7 @@ bool GfxSlider::activate(gEventType why) {
return false;
}
void GfxSlider::deactivate(void) {
void GfxSlider::deactivate() {
selected = 0;
window.update(_extent);
gPanel::deactivate();

View File

@ -108,9 +108,9 @@ protected:
gFont *_textFont; // pointer to font for this button
protected:
virtual void *getCurrentCompImage(void); // get the current image
virtual void *getCurrentCompImage(); // get the current image
void init(void);
void init();
public:
@ -142,18 +142,18 @@ public:
GfxCompImage(gPanelList &, const StaticRect &, void **, int16, int16,
const char *, textPallete &, uint16, AppFunc *cmd = NULL);
~GfxCompImage(void);
~GfxCompImage();
void pointerMove(gPanelMessage &msg);
void enable(bool);
void invalidate(Rect16 *unused = nullptr); // invalidates the drawing
int16 getCurrent(void) {
int16 getCurrent() {
return _currentImage;
}
int16 getMin(void) {
int16 getMin() {
return _min;
}
int16 getMax(void) {
int16 getMax() {
return _max;
}
void setCurrent(uint16 val) {
@ -165,7 +165,7 @@ public:
void setImages(void **images);
void setImage(void *image);
void draw(void); // redraw the panel.
void draw(); // redraw the panel.
virtual void drawClipped(gPort &,
const Point16 &,
const Rect16 &);
@ -244,16 +244,16 @@ public:
GfxCompButton(gPanelList &, const Rect16 &, AppFunc *cmd = NULL);
~GfxCompButton(void);
~GfxCompButton();
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
void enable(bool);
void invalidate(Rect16 *unused = nullptr); // invalidates the drawing
// area for this button
void draw(void); // redraw the panel.
void draw(); // redraw the panel.
void dim(bool);
void setForImage(void *image) {
if (image) _forImage = image;
@ -271,7 +271,7 @@ protected:
bool pointerHit(gPanelMessage &msg);
void pointerDrag(gPanelMessage &msg);
void pointerRelease(gPanelMessage &msg);
virtual void *getCurrentCompImage(void);
virtual void *getCurrentCompImage();
};
/************************************************************************
@ -318,15 +318,15 @@ public:
int16, int16, bool,
uint16, AppFunc *cmd = NULL);
~GfxMultCompButton(void);
~GfxMultCompButton();
int16 getCurrent(void) {
int16 getCurrent() {
return _current;
}
int16 getMin(void) {
int16 getMin() {
return _min;
}
int16 getMax(void) {
int16 getMax() {
return _max;
}
void setCurrent(int16 val) {
@ -343,7 +343,7 @@ public:
protected:
bool activate(gEventType why); // activate the control
bool pointerHit(gPanelMessage &msg);
virtual void *getCurrentCompImage(void);
virtual void *getCurrentCompImage();
};
@ -366,7 +366,7 @@ public:
private:
bool activate(gEventType why);
void deactivate(void);
void deactivate();
bool pointerHit(gPanelMessage &msg);
void pointerMove(gPanelMessage &msg);
void pointerRelease(gPanelMessage &);
@ -380,12 +380,12 @@ public:
void setSliderCurrent(int16 val) {
_slCurrent = val;
}
int16 getSliderCurrent(void) {
int16 getSliderCurrent() {
return _slCurrent;
}
int16 getSliderLenVal(void);
virtual void *getCurrentCompImage(void);
void draw(void);
int16 getSliderLenVal();
virtual void *getCurrentCompImage();
void draw();
};

View File

@ -73,7 +73,7 @@ void CalenderTime::write(Common::MemoryWriteStreamDynamic *out) {
debugC(3, kDebugSaveload, "... _frameInHour = %d", _frameInHour);
}
void CalenderTime::update(void) {
void CalenderTime::update() {
const char *text = NULL;
if (++_frameInHour >= kFramesPerHour) {
@ -173,7 +173,7 @@ void FrameAlarm::set(uint16 dur) {
_duration = dur;
}
bool FrameAlarm::check(void) {
bool FrameAlarm::check() {
uint16 frameInDay = g_vm->_calender->frameInDay();
return _baseFrame + _duration < CalenderTime::kFramesPerDay
@ -186,7 +186,7 @@ bool FrameAlarm::check(void) {
// time elapsed since alarm set
uint16 FrameAlarm::elapsed(void) {
uint16 FrameAlarm::elapsed() {
uint16 frameInDay = g_vm->_calender->frameInDay();
return _baseFrame + _duration < CalenderTime::kFramesPerDay
@ -203,21 +203,21 @@ uint16 FrameAlarm::elapsed(void) {
//-----------------------------------------------------------------------
// Pause the global calender
void pauseCalender(void) {
void pauseCalender() {
g_vm->_calender->_calenderPaused = true;
}
//-----------------------------------------------------------------------
// Restart the paused global calender
void resumeCalender(void) {
void resumeCalender() {
g_vm->_calender->_calenderPaused = false;
}
//-----------------------------------------------------------------------
// Update the global calender
void updateCalender(void) {
void updateCalender() {
if (!g_vm->_calender->_calenderPaused) g_vm->_calender->update();
}
@ -241,7 +241,7 @@ uint32 operator - (const CalenderTime &time1, const CalenderTime &time2) {
//-----------------------------------------------------------------------
// Initialize the game calender
void initCalender(void) {
void initCalender() {
g_vm->_calender->_calenderPaused = false;
g_vm->_calender->_years = 0;
g_vm->_calender->_weeks = 0;
@ -273,7 +273,7 @@ void loadCalender(Common::InSaveFile *in) {
g_vm->_calender->read(in);
}
bool isDayTime(void) {
bool isDayTime() {
return g_vm->_calender->lightLevel(MAX_LIGHT) >= (MAX_LIGHT / 2);
}

View File

@ -72,10 +72,10 @@ public:
void read(Common::InSaveFile *in);
void write(Common::MemoryWriteStreamDynamic *out);
void update(void);
void update();
int lightLevel(int maxLevel);
uint16 frameInDay(void) {
uint16 frameInDay() {
return _hour * kFramesPerHour + _frameInHour;
}
};
@ -89,8 +89,8 @@ class FrameAlarm {
_duration;
public:
void set(uint16 dur);
bool check(void);
uint16 elapsed(void);
bool check();
uint16 elapsed();
void write(Common::MemoryWriteStreamDynamic *out);
void read(Common::InSaveFile *in);
@ -100,18 +100,18 @@ public:
Calender management functions
* ===================================================================== */
void updateCalender(void);
void pauseCalender(void);
void resumeCalender(void);
void updateCalender();
void pauseCalender();
void resumeCalender();
uint32 operator - (const CalenderTime &time1, const CalenderTime &time2);
void initCalender(void);
void initCalender();
void saveCalender(Common::OutSaveFile *outS);
void loadCalender(Common::InSaveFile *in);
bool isDayTime(void);
bool isDayTime();
const int MAX_LIGHT = 12; // maximum light level

View File

@ -83,9 +83,9 @@ enum op_types {
op_call_near, // call function in same segment
op_call_far, // call function in other segment
op_ccall, // call C function
op_ccall_v, // call C function (void)
op_ccall_v, // call C function ()
op_call_member, // call member function
op_call_member_v, // call member function (void)
op_call_member_v, // call member function ()
op_enter, // enter a function
op_return, // return from function

View File

@ -65,7 +65,7 @@ extern APPFUNC(cmdWindowFunc);
// Temporary...
void grabObject(ObjectID pickedObject); // turn object into mouse ptr
void releaseObject(void); // restore mouse pointer
void releaseObject(); // restore mouse pointer
/* Reference Types
ProtoObj::isTangible
@ -306,7 +306,7 @@ bool ContainerView::isVisible(GameObject *item) {
}
// total the mass, bulk, and number of all objects in container.
void ContainerView::totalObjects(void) {
void ContainerView::totalObjects() {
ObjectID objID;
GameObject *item = nullptr;
@ -587,7 +587,7 @@ bool ContainerView::activate(gEventType why) {
return true;
}
void ContainerView::deactivate(void) {
void ContainerView::deactivate() {
}
void ContainerView::pointerMove(gPanelMessage &msg) {
@ -1173,9 +1173,9 @@ ContainerWindow::ContainerWindow(ContainerNode &nd,
}
// Virtual destructor (base does nothing)
ContainerWindow::~ContainerWindow(void) {}
ContainerWindow::~ContainerWindow() {}
ContainerView &ContainerWindow::getView(void) {
ContainerView &ContainerWindow::getView() {
return *view;
}
@ -1256,12 +1256,12 @@ TangibleContainerWindow::TangibleContainerWindow(
}
}
TangibleContainerWindow::~TangibleContainerWindow(void) {
TangibleContainerWindow::~TangibleContainerWindow() {
if (massWeightIndicator) delete massWeightIndicator;
if (containerSpriteImg) delete containerSpriteImg;
}
void TangibleContainerWindow::setContainerSprite(void) {
void TangibleContainerWindow::setContainerSprite() {
// pointer to sprite data that will be drawn
Sprite *spr;
ProtoObj *proto = view->containerObject->proto();
@ -1411,12 +1411,12 @@ ContainerNode::ContainerNode(ContainerManager &cl, ObjectID id, int typ) {
}
// Return the container window for a container node, if it is visible
ContainerWindow *ContainerNode::getWindow(void) {
ContainerWindow *ContainerNode::getWindow() {
return window;
}
// Return the container view for a container node, if it is visible
ContainerView *ContainerNode::getView(void) {
ContainerView *ContainerNode::getView() {
return window ? &window->getView() : NULL;
}
@ -1471,7 +1471,7 @@ void ContainerNode::write(Common::MemoryWriteStreamDynamic *out) {
}
// Close the container window, but leave the node.
void ContainerNode::hide(void) {
void ContainerNode::hide() {
// close the window, but don't close the object.
if (type != readyType && window != NULL) {
position = window->getExtent(); // Save old window position
@ -1482,7 +1482,7 @@ void ContainerNode::hide(void) {
}
// Open the cotainer window, given the node info.
void ContainerNode::show(void) {
void ContainerNode::show() {
ProtoObj *proto = GameObject::protoAddress(object);
assert(proto);
@ -1521,7 +1521,7 @@ void ContainerNode::show(void) {
window->open();
}
void ContainerNode::update(void) {
void ContainerNode::update() {
if (type == readyType) {
// Update ready containers if they are enabled
if (TrioCviews[owner]->getEnabled()) TrioCviews[owner]->invalidate();
@ -1611,7 +1611,7 @@ void ContainerManager::setPlayerNum(PlayerActorID playerNum) {
}
}
void ContainerManager::doDeferredActions(void) {
void ContainerManager::doDeferredActions() {
Common::List<ContainerNode *>::iterator nextIt;
Actor *a = getCenterActor();
TilePoint tp = a->getLocation();
@ -1746,14 +1746,14 @@ ContainerNode *OpenMindContainer(PlayerActorID player, int16 open, int16 type) {
Misc. functions
* ===================================================================== */
void initContainers(void) {
void initContainers() {
if (containerRes == NULL)
containerRes = resFile->newContext(MKTAG('C', 'O', 'N', 'T'), "cont.resources");
selImage = g_vm->_imageCache->requestImage(imageRes, MKTAG('A', 'M', 'N', 'T'));
}
void cleanupContainers(void) {
void cleanupContainers() {
if (selImage)
g_vm->_imageCache->releaseImage(selImage);
if (containerRes)
@ -1763,7 +1763,7 @@ void cleanupContainers(void) {
containerRes = NULL;
}
void initContainerNodes(void) {
void initContainerNodes() {
#if DEBUG
// Verify the globalContainerList only has ready ContainerNodes
@ -1843,7 +1843,7 @@ void loadContainerNodes(Common::InSaveFile *in) {
assert(tempList.empty());
}
void cleanupContainerNodes(void) {
void cleanupContainerNodes() {
if (g_vm->_cnm == nullptr)
return;
@ -1860,7 +1860,7 @@ void cleanupContainerNodes(void) {
delete deletionArray[i];
}
void updateContainerWindows(void) {
void updateContainerWindows() {
g_vm->_cnm->doDeferredActions();
}

View File

@ -160,7 +160,7 @@ public:
virtual bool isVisible(GameObject *obj);
// total the mass, bulk, and number of all objects in container.
void totalObjects(void);
void totalObjects();
// Get the Nth visible object from this container.
ObjectID getObject(int16 slotNum);
@ -206,7 +206,7 @@ protected: // actions within a container
// Event-handling functions
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
virtual void pointerMove(gPanelMessage &msg);
virtual bool pointerHit(gPanelMessage &msg);
@ -281,14 +281,14 @@ public:
const ContainerAppearanceDef &app,
const char saveas[]);
virtual ~ContainerWindow(void);
virtual ~ContainerWindow();
ContainerView &getView(void);
GameObject *containerObject(void) {
ContainerView &getView();
GameObject *containerObject() {
return getView().containerObject;
}
virtual void massBulkUpdate(void) {}
virtual void massBulkUpdate() {}
};
// Base class for all container windows with scroll control
@ -301,11 +301,11 @@ public:
const ContainerAppearanceDef &app,
const char saveas[]);
void scrollUp(void) {
void scrollUp() {
if (view->scrollPosition > 0) view->scrollPosition--;
}
void scrollDown(void) {
void scrollDown() {
if (view->scrollPosition + view->visibleRows < view->totalRows)
view->scrollPosition++;
}
@ -321,18 +321,18 @@ private:
bool deathFlag;
private:
void setContainerSprite(void);
void setContainerSprite();
public:
TangibleContainerWindow(ContainerNode &nd,
const ContainerAppearanceDef &app);
~TangibleContainerWindow(void);
~TangibleContainerWindow();
void drawClipped(gPort &port, const Point16 &offset, const Rect16 &clip);
// this sets the mass and bulk gauges for physical containers
void massBulkUpdate(void);
void massBulkUpdate();
};
class IntangibleContainerWindow : public ScrollableContainerWindow {
@ -435,7 +435,7 @@ private:
};
public:
ContainerNode(void) {
ContainerNode() {
object = 0;
type = 0;
owner = 0;
@ -446,7 +446,7 @@ public:
ContainerNode(ContainerManager &cl, ObjectID id, int type);
~ContainerNode();
static int32 archiveSize(void) {
static int32 archiveSize() {
return sizeof(Archive);
}
@ -454,41 +454,41 @@ public:
void write(Common::MemoryWriteStreamDynamic *out);
// Hide or show this container window.
void hide(void);
void show(void);
void update(void); // Update container associated with this node
void hide();
void show();
void update(); // Update container associated with this node
// Set for lazy deletion
void markForDelete(void) {
void markForDelete() {
action |= actionDelete;
}
void markForShow(void) {
void markForShow() {
action |= actionShow;
action &= ~actionHide;
}
void markForHide(void) {
void markForHide() {
action |= actionHide;
action &= ~actionShow;
}
void markForUpdate(void) {
void markForUpdate() {
action |= actionUpdate;
}
// Find the address of the window and/or view
ContainerWindow *getWindow(void);
ContainerView *getView(void);
ContainerWindow *getWindow();
ContainerView *getView();
// Access functions
uint8 getType(void) {
uint8 getType() {
return type;
}
uint8 getOwnerIndex(void) {
uint8 getOwnerIndex() {
return owner;
}
ObjectID getObject(void) {
ObjectID getObject() {
return object;
}
Rect16 &getPosition(void) {
Rect16 &getPosition() {
return position;
}
void setObject(ObjectID id) {
@ -526,7 +526,7 @@ public:
// Set which player is viewing the container windows.
void setPlayerNum(PlayerActorID playerNum);
void doDeferredActions(void);
void doDeferredActions();
void setUpdate(ObjectID id);
};
@ -538,15 +538,15 @@ ContainerNode *OpenMindContainer(PlayerActorID player, int16 open, int16 type);
Exports
* ===================================================================== */
void initContainers(void);
void cleanupContainers(void);
void initContainers();
void cleanupContainers();
void initContainerNodes(void);
void initContainerNodes();
void saveContainerNodes(Common::OutSaveFile *outS);
void loadContainerNodes(Common::InSaveFile *in);
void cleanupContainerNodes(void);
void cleanupContainerNodes();
extern void updateContainerWindows(void);
extern void updateContainerWindows();
extern APPFUNC(cmdCloseButtonFunc);
extern APPFUNC(cmdMindContainerFunc);

View File

@ -57,19 +57,19 @@ static bool paletteSuspendFlag = false;
Prototypes
* ===================================================================== */
void reDrawScreen(void);
void localCursorOn(void);
void localCursorOff(void);
void loadingScreen(void);
void resetInputDevices(void);
void reDrawScreen();
void localCursorOn();
void localCursorOff();
void loadingScreen();
void resetInputDevices();
APPFUNC(cmdWindowFunc); // main window event handler
static void switchOn(void);
static void switchOff(void);
static void switchOn();
static void switchOff();
// ------------------------------------------------------------------------
// end game (normally)
void endGame(void) {
void endGame() {
blackOut();
displayDisable(GameEnded);
g_vm->_gameRunning = false;
@ -79,12 +79,12 @@ void endGame(void) {
/* ===================================================================== *
Display initialization
* ===================================================================== */
void dayNightUpdate(void);
void fadeUp(void);
void displayUpdate(void);
void drawMainDisplay(void);
void dayNightUpdate();
void fadeUp();
void displayUpdate();
void drawMainDisplay();
void niceScreenStartup(void) {
void niceScreenStartup() {
if (ConfMan.hasKey("save_slot")) {
cleanupGameState();
loadSavedGameState(ConfMan.getInt("save_slot"));
@ -119,7 +119,7 @@ void niceScreenStartup(void) {
// ------------------------------------------------------------------------
// backbuffer startup
void initBackPanel(void) {
void initBackPanel() {
if (mainWindow)
return;
@ -159,7 +159,7 @@ bool displayEnabled(uint32 mask) {
return true;
}
bool displayOkay(void) {
bool displayOkay() {
return displayEnabled();
}
@ -167,25 +167,25 @@ bool displayOkay(void) {
// ------------------------------------------------------------------------
// Main on/off swiotch for display
void mainEnable(void) {
void mainEnable() {
displayEnable(GameNotInitialized);
}
// ------------------------------------------------------------------------
// This is a check to see if blitting is enabled
void mainDisable(void) {
void mainDisable() {
displayDisable(GameNotInitialized);
}
// ------------------------------------------------------------------------
// On/Off hooks
static void switchOn(void) {
static void switchOn() {
enableUserControls();
}
static void switchOff(void) {
static void switchOff() {
disableUserControls();
}
@ -193,16 +193,16 @@ static void switchOff(void) {
Palette disable hooks
* ===================================================================== */
void enablePaletteChanges(void) {
void enablePaletteChanges() {
paletteSuspendFlag = false;
paletteMayHaveChanged = true;
}
void disablePaletteChanges(void) {
void disablePaletteChanges() {
paletteSuspendFlag = true;
}
bool paletteChangesEnabled(void) {
bool paletteChangesEnabled() {
return !paletteSuspendFlag;
}
@ -214,21 +214,21 @@ bool paletteChangesEnabled(void) {
// ------------------------------------------------------------------------
// notice that screen may be dirty
void delayedDisplayEnable(void) {
void delayedDisplayEnable() {
delayReDraw = false;
}
// ------------------------------------------------------------------------
// notice that palette may be dirty
void externalPaletteIntrusion(void) {
void externalPaletteIntrusion() {
paletteMayHaveChanged = true;
}
// ------------------------------------------------------------------------
// force a full screen redraw
void reDrawScreen(void) {
void reDrawScreen() {
//dispMM("refresh");
Rect16 r = Rect16(0, 0, 640, 480);
if (mainWindow && displayEnabled()) {
@ -251,7 +251,7 @@ void reDrawScreen(void) {
Clear screen
* ===================================================================== */
void blackOut(void) {
void blackOut() {
g_vm->_mainPort.drawMode = drawModeReplace;
g_vm->_mainPort.setColor(0); // fill screen with color
g_vm->_mainPort.fillRect(Rect16(0, 0, 640, 480));
@ -266,7 +266,7 @@ void blackOut(void) {
// ------------------------------------------------------------------------
// enable / disable blitting
void showLoadMessage(void) {
void showLoadMessage() {
uint32 saved = displayStatus;
displayStatus = 0;
loadingScreen();
@ -278,10 +278,10 @@ void showLoadMessage(void) {
Video mode save and restore for videos
* ===================================================================== */
void pushVidState(void) {
void pushVidState() {
}
void popVidState(void) {
void popVidState() {
}
} // end of namespace Saga2

View File

@ -44,22 +44,22 @@ enum DisplayDisabledBecause {
/* ===================================================================== *
Prototypes
* ===================================================================== */
void endGame(void);
void endGame();
// ------------------------------------------------------------------------
// Display initialization
void niceScreenStartup(void);
void initBackPanel(void);
void niceScreenStartup();
void initBackPanel();
// ------------------------------------------------------------------------
// Display disable flags
void displayEnable(DisplayDisabledBecause reason, bool onOff = true);
bool displayEnabled(uint32 mask = 0xFFFFFFFF);
bool displayOkay(void);
void mainEnable(void);
void mainDisable(void);
bool displayOkay();
void mainEnable();
void mainDisable();
inline void displayDisable(DisplayDisabledBecause reason, bool onOff = false) {
displayEnable(reason, onOff);
@ -68,33 +68,33 @@ inline void displayDisable(DisplayDisabledBecause reason, bool onOff = false) {
// ------------------------------------------------------------------------
// palette changes can be disabled
void enablePaletteChanges(void);
void disablePaletteChanges(void);
bool paletteChangesEnabled(void);
void enablePaletteChanges();
void disablePaletteChanges();
bool paletteChangesEnabled();
// ------------------------------------------------------------------------
// Screen refreshes
void delayedDisplayEnable(void);
void externalPaletteIntrusion(void);
void reDrawScreen(void);
void blackOut(void);
void showLoadMessage(void);
void delayedDisplayEnable();
void externalPaletteIntrusion();
void reDrawScreen();
void blackOut();
void showLoadMessage();
// ------------------------------------------------------------------------
// Video mode save and restore for videos
void pushVidState(void);
void popVidState(void);
void pushVidState();
void popVidState();
// ------------------------------------------------------------------------
// Calls to suspend audio
void suspendAudio(void);
void resumeAudio(void);
void suspendAudio();
void resumeAudio();
// ------------------------------------------------------------------------
// The display may be disabled for several reasons these track them
void blackOut(void);
void blackOut();
} // end of namespace Saga2

View File

@ -56,7 +56,7 @@ ActorAppearance *tempAppearance; // test structure
Test spell crap
* ===================================================================== */
bool InCombatPauseKludge(void);
bool InCombatPauseKludge();
//void updateSpellPos( int32 delTime );
//-----------------------------------------------------------------------
@ -84,7 +84,7 @@ uint8 identityColors[256] = {
//-----------------------------------------------------------------------
// build the list of stuff to draw (like guns)
void buildDisplayList(void) {
void buildDisplayList() {
g_vm->_mainDisplayList->buildObjects(true);
g_vm->_activeSpells->buildList();
}
@ -103,7 +103,7 @@ void updateObjectAppearances(int32 deltaTime) {
//-----------------------------------------------------------------------
// Draw all sprites on the display list
void drawDisplayList(void) {
void drawDisplayList() {
g_vm->_mainDisplayList->draw();
}
@ -127,7 +127,7 @@ DisplayNode::DisplayNode() {
efx = nullptr;
}
TilePoint DisplayNode::SpellPos(void) {
TilePoint DisplayNode::SpellPos() {
if (efx)
return efx->current;
return Nowhere;
@ -156,7 +156,7 @@ void DisplayNodeList::updateEStates(const int32 deltaTime) {
//-----------------------------------------------------------------------
// Draw router
void DisplayNodeList::draw(void) {
void DisplayNodeList::draw() {
DisplayNode *dn;
SpriteSet *objectSet,
*spellSet;
@ -349,7 +349,7 @@ const int maxSpriteWidth = 32,
maxSpriteBaseLine = 16;
#endif
void DisplayNode::drawObject(void) {
void DisplayNode::drawObject() {
ColorTable mainColors, // colors for object
leftColors, // colors for left-hand object
rightColors; // colors for right-hand object
@ -932,7 +932,7 @@ void DisplayNodeList::buildEffects(bool) {
}
}
bool DisplayNodeList::dissipated(void) {
bool DisplayNodeList::dissipated() {
if (count) {
for (int i = 0; i < count; i++) {
if (displayList[i].efx && !displayList[i].efx->isDead())
@ -948,11 +948,11 @@ bool DisplayNodeList::dissipated(void) {
// NOTE : all spell effects currently use the center actor for their
// sprites.
void DisplayNode::drawEffect(void) {
void DisplayNode::drawEffect() {
if (efx) efx->drawEffect();
}
void Effectron::drawEffect(void) {
void Effectron::drawEffect() {
ColorTable eColors; // colors for object
bool obscured = false;
Point16 drawPos;

View File

@ -68,11 +68,11 @@ public:
DisplayNode();
void drawObject(void);
void drawEffect(void);
void drawObject();
void drawEffect();
void updateObject(const int32 deltaTime);
void updateEffect(const int32 deltaTime);
TilePoint SpellPos(void);
TilePoint SpellPos();
};
/* ============================================================================ *
@ -106,7 +106,7 @@ public:
free(displayList);
}
void reset(void) {
void reset() {
count = 0;
head = NULL;
}
@ -114,10 +114,10 @@ public:
void init(uint16 s);
void buildObjects(bool fromScratch);
void buildEffects(bool fromScratch);
void draw(void);
void draw();
void updateOStates(const int32 deltaTime);
void updateEStates(const int32 deltaTime);
bool dissipated(void);
bool dissipated();
};
/* ============================================================================ *

View File

@ -198,7 +198,7 @@ CDocument::CDocument(CDocumentAppearance &dApp,
}
CDocument::~CDocument(void) {
CDocument::~CDocument() {
int16 i;
for (i = 0; i < maxPages; i++) {
@ -223,7 +223,7 @@ CDocument::~CDocument(void) {
resFile->disposeContext(illustrationCon);
}
void CDocument::deactivate(void) {
void CDocument::deactivate() {
selected = 0;
gPanel::deactivate();
}
@ -463,7 +463,7 @@ bool CDocument::checkForImage(char *string,
}
void CDocument::makePages(void) {
void CDocument::makePages() {
// copy the original text back to the working buffer
Common::strlcpy(text, origText, textSize + 1);
@ -547,7 +547,7 @@ void CDocument::makePages(void) {
}
// This function will draw the text onto the book.
void CDocument::renderText(void) {
void CDocument::renderText() {
gPort tPort;
gPort &port = window.windowPort;
uint16 pageIndex;
@ -654,7 +654,7 @@ void CDocument::drawClipped(
g_vm->_pointer->show();
}
void CDocument::draw(void) { // redraw the window
void CDocument::draw() { // redraw the window
// draw the book image
drawClipped(g_vm->_mainPort, Point16(0, 0), _extent);

View File

@ -122,7 +122,7 @@ private:
private:
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
void pointerMove(gPanelMessage &msg);
bool pointerHit(gPanelMessage &msg);
@ -136,10 +136,10 @@ protected:
const Point16 &offset,
const Rect16 &clipRect);
void draw(void); // redraw the window
void draw(); // redraw the window
void renderText(void);
void makePages(void);
void renderText();
void makePages();
bool checkForPageBreak(char *string,
uint16 index,
int32 &offset);
@ -159,7 +159,7 @@ public:
gFont *font, // font of the text
uint16 ident, // control ID
AppFunc *cmd = NULL); // application command func
~CDocument(void);
~CDocument();
void gotoPage(int8 page);

View File

@ -34,7 +34,7 @@ namespace Saga2 {
const int16 absoluteMaximumVitality = 255;
extern void updateIndicators(void); // Kludge, put in intrface.h later (got to hurry)
extern void updateIndicators(); // Kludge, put in intrface.h later (got to hurry)
// offensiveNotification gets 2 (Actor *) items
// att is performing an offensive act on def

View File

@ -453,7 +453,7 @@ public:
void implement(GameObject *, SpellTarget *trg, int8 deltaDamage = 0);
bool canFail(void) {
bool canFail() {
return isSaveable(enchID);
}

View File

@ -37,7 +37,7 @@ extern int16 objectProtoCount; // object prototype count
int enchantmentProto = -1;
void setEnchantmentDisplay(void);
void setEnchantmentDisplay();
//-------------------------------------------------------------------
// Enchantment Creation Function

View File

@ -72,7 +72,7 @@ DecoratedWindow::DecoratedWindow(const Rect16 &r, uint16 ident, const char savea
}
// destructor for decorated windows
DecoratedWindow::~DecoratedWindow(void) {
DecoratedWindow::~DecoratedWindow() {
removeDecorations();
}
@ -227,7 +227,7 @@ void DecoratedWindow::setDecorations(
// Free the decorations from the memory pool
void DecoratedWindow::removeDecorations(void) {
void DecoratedWindow::removeDecorations() {
WindowDecoration *dec;
int16 i;
@ -246,7 +246,7 @@ void DecoratedWindow::removeDecorations(void) {
// Redraw all of the decorations, on the main port only...
void DecoratedWindow::draw(void) { // redraw the window
void DecoratedWindow::draw() { // redraw the window
g_vm->_pointer->hide();
if (displayEnabled())
drawClipped(g_vm->_mainPort, Point16(0, 0), _extent);
@ -255,7 +255,7 @@ void DecoratedWindow::draw(void) { // redraw the window
// Return true if window floats above animated are
bool DecoratedWindow::isBackdrop(void) {
bool DecoratedWindow::isBackdrop() {
return false;
}
@ -301,13 +301,13 @@ void BackWindow::invalidate(const StaticRect *area) {
// Return true if window floats above animated are
bool BackWindow::isBackdrop(void) {
bool BackWindow::isBackdrop() {
return true;
}
// A backdrop window can never go to front.
void BackWindow::toFront(void) {}
void BackWindow::toFront() {}
/* ===================================================================== *
DragBar class member functions
@ -326,7 +326,7 @@ bool DragBar::activate(gEventType) {
return true;
}
void DragBar::deactivate(void) {
void DragBar::deactivate() {
gPanel::deactivate();
}
@ -372,7 +372,7 @@ void DragBar::pointerRelease(gPanelMessage &) {
gButton class member functions
* ===================================================================== */
void gButton::deactivate(void) {
void gButton::deactivate() {
selected = 0;
draw();
gPanel::deactivate();
@ -410,7 +410,7 @@ void gButton::pointerDrag(gPanelMessage &msg) {
}
}
void gButton::draw(void) {
void gButton::draw() {
gPort &port = window.windowPort;
Rect16 rect = window.getExtent();
@ -581,7 +581,7 @@ void FloatingWindow::setExtent(const Rect16 &r) {
setPos(Point16(r.x, r.y));
}
bool FloatingWindow::open(void) {
bool FloatingWindow::open() {
db->moveToBack(*this);
g_vm->_mouseInfo->replaceObject();
@ -593,7 +593,7 @@ bool FloatingWindow::open(void) {
}
// Close this window and redraw the screen under it.
void FloatingWindow::close(void) {
void FloatingWindow::close() {
gWindow::close();
updateWindowSection(_extent);
}
@ -605,7 +605,7 @@ void FloatingWindow::close(void) {
// area, and including the scrolling animated area which might
// overlap that area.
bool checkTileAreaPort(void);
bool checkTileAreaPort();
void updateWindowSection(const Rect16 &r) {
gPixelMap tempMap;
@ -734,7 +734,7 @@ void drawFloatingWindows(gPort &port, const Point16 &offset, const Rect16 &clip)
}
}
void FloatingWindow::toFront(void) {
void FloatingWindow::toFront() {
gWindow::toFront();
draw();
}
@ -743,7 +743,7 @@ void FloatingWindow::toFront(void) {
Misc functions
* ===================================================================== */
void closeAllFloatingWindows(void) {
void closeAllFloatingWindows() {
}
extern APPFUNC(cmdWindowFunc);

View File

@ -65,7 +65,7 @@ struct WindowDecoration {
int16 imageNumber; // image resource number
// default constructor
WindowDecoration(void) {
WindowDecoration() {
extent = Rect16(0, 0, 0, 0), image = NULL;
imageNumber = 0;
}
@ -108,7 +108,7 @@ public:
private:
bool activate(gEventType);
void deactivate(void);
void deactivate();
bool pointerHit(gPanelMessage &msg);
void pointerDrag(gPanelMessage &msg);
void pointerRelease(gPanelMessage &msg);
@ -126,11 +126,11 @@ public:
gButton(gPanelList &list, const Rect16 &box, gPixelMap &img, uint16 ident, AppFunc *cmd = NULL) :
gControl(list, box, img, ident, cmd) {}
void draw(void); // redraw the panel.
void draw(); // redraw the panel.
private:
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
bool pointerHit(gPanelMessage &msg);
void pointerDrag(gPanelMessage &msg);
void pointerRelease(gPanelMessage &msg);
@ -142,7 +142,7 @@ public:
gPhantomButton(gPanelList &list,
const Rect16 &box, uint16 ident, AppFunc *cmd = NULL) :
gButton(list, box, NULL, ident, cmd) {};
virtual void draw(void) {}; // Overrides draw() member of parent, since
virtual void draw() {}; // Overrides draw() member of parent, since
// in this case there's nothing to draw.
};
@ -218,8 +218,8 @@ public:
// Rect16 animatedArea;
DecoratedWindow(const Rect16 &, uint16, const char saveAs[], AppFunc *cmd = NULL);
~DecoratedWindow(void);
void draw(void); // redraw the window
~DecoratedWindow();
void draw(); // redraw the window
// Redraw the window, but only a small clipped section,
// and perhaps drawn onto an off-screen map.
@ -239,9 +239,9 @@ public:
// Free up memory used by decorative panels
void removeDecorations(void);
void removeDecorations();
virtual bool isBackdrop(void);
virtual bool isBackdrop();
// Update a region of a window, and all floaters which
// might be above that window.
@ -256,14 +256,14 @@ public:
class BackWindow : public DecoratedWindow {
// Disable the window-to-front
void toFront(void);
void toFront();
public:
BackWindow(const Rect16 &, uint16, AppFunc *cmd = NULL);
void invalidate(Rect16 *area);
void invalidate(const StaticRect *area);
virtual bool isBackdrop(void);
virtual bool isBackdrop();
};
/* ===================================================================== *
@ -274,7 +274,7 @@ class FloatingWindow : public DecoratedWindow {
DragBar *db; // save address of drag bar
void toFront(void);
void toFront();
// original extent before movement
Point16 origPos;
@ -300,8 +300,8 @@ public:
return decOffset;
}
bool open(void);
void close(void);
bool open();
void close();
};
/* ===================================================================== *

View File

@ -87,22 +87,22 @@ public:
static GameMode *currentMode, // pointer to current mode.
*newMode; // next mode to run
void (*setup)(void); // initialize this mode
void (*cleanup)(void); // deallocate mode resources
void (*handleTask)(void); // "application task" for mode
void (*setup)(); // initialize this mode
void (*cleanup)(); // deallocate mode resources
void (*handleTask)(); // "application task" for mode
void (*handleKey)(int16 key, int16 qual); // handle keystroke from window
void (*draw)(void); // handle draw functions for window
void (*draw)(); // handle draw functions for window
static void modeUnStack(void);
static void modeUnStack();
static void modeUnStack(int StopHere);
static int getStack(GameMode **saveStackPtr);
static void SetStack(GameMode *modeFirst, ...);
static void SetStack(GameMode **newStack, int newStackSize);
static bool update(void);
static bool update();
static void modeStack(GameMode *AddThisMode);
void begin(void); // launch this mode
void end(void); // quit this mode
static void modeSwitch(void); // quit this mode
void begin(); // launch this mode
void end(); // quit this mode
static void modeSwitch(); // quit this mode
};
extern GameMode IntroMode,
@ -119,13 +119,13 @@ extern GameMode IntroMode,
* ====================================================================== */
// Initialize the timer
void initTimer(void);
void initTimer();
void saveTimer(Common::OutSaveFile *out);
void loadTimer(Common::InSaveFile *in);
void pauseTimer(void); // pause game clock
void resumeTimer(void); // resume game clock
void pauseTimer(); // pause game clock
void resumeTimer(); // resume game clock
// Alarm is a useful class for specifying time delays. It will
// work correctly even if the game counter wraps around.
@ -136,8 +136,8 @@ public:
uint32 duration; // duration of alarm
void set(uint32 duration);
bool check(void);
uint32 elapsed(void); // time elapsed since alarm set
bool check();
uint32 elapsed(); // time elapsed since alarm set
void write(Common::MemoryWriteStreamDynamic *out);
void read(Common::InSaveFile *in);
@ -163,7 +163,7 @@ Common::SeekableReadStream *loadResourceToStream(hResContext *con, uint32 id, co
// Directory control
void restoreProgramDir(void); // chdir() to program directory
void restoreProgramDir(); // chdir() to program directory
// Returns Random Number
@ -174,23 +174,23 @@ int16 GetRandomBetween(int start, int end);
int16 quickDistance(const Point16 &p);
int32 quickDistance(const Point32 &p);
void initPathFinder(void);
void cleanupPathFinder(void);
void initPathFinder();
void cleanupPathFinder();
/* ===================================================================== *
Miscellaneous globals management functions
* ===================================================================== */
void initGlobals(void);
void initGlobals();
void saveGlobals(Common::OutSaveFile *outS);
void loadGlobals(Common::InSaveFile *in);
inline void cleanupGlobals(void) {} // do nothing
inline void cleanupGlobals() {} // do nothing
/* ===================================================================== *
General redraw routine
* ===================================================================== */
void reDrawScreen(void);
void reDrawScreen();
/* ===================================================================== *
Script-related
@ -206,9 +206,9 @@ void wakeUpThread(ThreadID thread);
void wakeUpThread(ThreadID thread, int16 returnVal);
// Script system initialization and cleanup
void initScripts(void);
void cleanupScripts(void);
void dispatchScripts(void);
void initScripts();
void cleanupScripts();
void dispatchScripts();
// An extended script is running -- suspend all background processing.
extern int16 extendedThreadLevel;

View File

@ -46,7 +46,7 @@ int GameMode::modeStackCtr = 0;
int GameMode::newmodeStackCtr = 0;
int GameMode::newmodeFlag = false;
void GameMode::modeUnStack(void) {
void GameMode::modeUnStack() {
modeStackPtr[modeStackCtr] = NULL; //Always Start Cleanup At modeStackCtr
modeStackPtr[modeStackCtr--]->cleanup();
return;
@ -64,7 +64,7 @@ void GameMode::modeUnStack(int StopHere) {
return;
}
bool GameMode::update(void) {
bool GameMode::update() {
bool result = false;
int ModeCtr = 0;

View File

@ -51,7 +51,7 @@ public:
virtual ~frameCounter() {}
virtual void updateFrameCount(void) {
virtual void updateFrameCount() {
int32 frameTime = gameTime - lastTime;
lastTime = gameTime;
frames++;
@ -104,7 +104,7 @@ class frameSmoother: public frameCounter {
return 1000.0 * frameHistory[i];
}
void calculateAverages(void) {
void calculateAverages() {
// clear averages
for (int i = 0; i < 5; i++)
avg1Sec[i] = 0;
@ -126,7 +126,7 @@ class frameSmoother: public frameCounter {
avg5Sec /= (5 * desiredFPS);
}
void calculateVariance(void) {
void calculateVariance() {
// clear variances
for (int i = 0; i < 5; i++)
dif1Sec[i] = 0;
@ -161,7 +161,7 @@ public:
frameHistory = nullptr;
}
virtual void updateFrameCount(void) {
virtual void updateFrameCount() {
frameCounter::updateFrameCount();
frameHistory[frames % historySize] = instantFrameCount;
if (0 == (frames % int(desiredFPS))) {

View File

@ -64,7 +64,7 @@ public:
gPixelMap(StaticPixelMap m) : size(m.size), data(m.data) {}
// Compute the number of bytes in the pixel map
int32 bytes(void) {
int32 bytes() {
return size.x * size.y;
}
};
@ -75,7 +75,7 @@ class gStaticImage : public gPixelMap {
public:
// constructors:
gStaticImage(void) {
gStaticImage() {
size.x = size.y = 0;
data = NULL;
}
@ -200,7 +200,7 @@ public:
uint16 textStyles; // text style bits
// Constructor
gPort(void) {
gPort() {
map = nullptr;
baseRow = nullptr;
@ -278,7 +278,7 @@ public:
void setOrigin(Point16 pt) {
origin = pt;
}
Point16 getOrigin(void) {
Point16 getOrigin() {
return origin;
}
@ -302,7 +302,7 @@ public:
// Simple drawing functions
// REM: This should clip!
virtual void clear(void) {
virtual void clear() {
memset(map->data, (int)fgPen, (int)map->bytes());
}

View File

@ -52,7 +52,7 @@ gMousePointer::gMousePointer(gDisplayPort &port) {
pointerImage = NULL;
}
gMousePointer::~gMousePointer(void) {
gMousePointer::~gMousePointer() {
if (saveMap.data)
free(saveMap.data);
}
@ -63,7 +63,7 @@ bool gMousePointer::init(Point16 pointerLimits) {
}
// Private routine to draw the mouse pointer image
void gMousePointer::draw(void) {
void gMousePointer::draw() {
if (hideCount < 1) {
CursorMan.showMouse(true);
shown = 1;
@ -72,7 +72,7 @@ void gMousePointer::draw(void) {
}
// Private routine to restore the mouse pointer image
void gMousePointer::restore(void) {
void gMousePointer::restore() {
if (shown) {
// blit from the saved map to the current position.
@ -85,7 +85,7 @@ void gMousePointer::restore(void) {
}
// Makes the mouse pointer visible
void gMousePointer::show(void) {
void gMousePointer::show() {
assert(hideCount > 0);
if (--hideCount == 0) {
@ -94,7 +94,7 @@ void gMousePointer::show(void) {
}
// Makes the mouse pointer invisible
void gMousePointer::hide(void) {
void gMousePointer::hide() {
if (hideCount++ == 0) {
restore();
}
@ -116,7 +116,7 @@ void gMousePointer::show(gPort &port, Rect16 r) {
}
// Makes the mouse pointer visible
int gMousePointer::manditoryShow(void) {
int gMousePointer::manditoryShow() {
int rv = 0;
while (hideCount > 0) {
show();

View File

@ -42,8 +42,8 @@ class gMousePointer {
offsetPosition; // center of mouse image
bool shown; // mouse currently shown
void draw(void);
void restore(void);
void draw();
void restore();
public:
gMousePointer(gDisplayPort &); // constructor
~gMousePointer(); // destructor
@ -52,17 +52,17 @@ public:
bool init(uint16 xLimit, uint16 yLimit) {
return init(Point16(xLimit, yLimit));
}
void show(void); // show the pointer
void hide(void); // hide the pointer
void show(); // show the pointer
void hide(); // hide the pointer
void show(gPort &port, Rect16 r); // show the pointer
void hide(gPort &port, Rect16 r); // hide the pointer
int manditoryShow(void);
int manditoryShow();
void move(Point16 pos); // move the pointer
void setImage(gPixelMap &img, int x, int y); // set the pointer imagery
bool isShown(void) {
bool isShown() {
return shown;
}
int16 hideDepth(void) {
int16 hideDepth() {
return hideCount;
}
gPixelMap *getImage(Point16 &offset) {

View File

@ -172,7 +172,7 @@ uint8 GrabInfo::setIntent(uint8 in) {
// Make the object given into the mouse pointer
void GrabInfo::setIcon(void) {
void GrabInfo::setIcon() {
assert(
pointerMap.size.x == 0
&& pointerMap.size.y == 0
@ -214,7 +214,7 @@ void GrabInfo::setIcon(void) {
error("Unable to allocate mouse image buffer");
}
void GrabInfo::clearIcon(void) {
void GrabInfo::clearIcon() {
assert(grabObj == nullptr);
if (pointerMap.data != nullptr) {
@ -227,7 +227,7 @@ void GrabInfo::clearIcon(void) {
// Changes cursor image to reflect the current state of the cursor based
// on the intention and intentDoable data members.
void GrabInfo::setCursor(void) {
void GrabInfo::setCursor() {
if (intentDoable) {
switch (intention) {
case None:
@ -286,7 +286,7 @@ void GrabInfo::placeObject(const Location &loc) {
// this should be use to return the object to the container
// and/or remove the object from the cursor.
void GrabInfo::replaceObject(void) {
void GrabInfo::replaceObject() {
if (grabObj == nullptr)
return;
@ -345,7 +345,7 @@ void GrabInfo::setGauge(int16 numerator, int16 denominator) {
}
// clear the mouse gauge
void GrabInfo::clearGauge(void) {
void GrabInfo::clearGauge() {
displayGauge = false;
if (grabObj == nullptr) clearMouseGauge();
}

View File

@ -79,24 +79,24 @@ protected:
char textBuf[bufSize];
// internal grab commonality
void setIcon(void);
void clearIcon(void);
void setIcon();
void clearIcon();
// set cursor image based on 'intention' and 'intentDoable'
void setCursor(void);
void setCursor();
public:
// there will probably be only one GrabInfo, created globally
GrabInfo(void);
GrabInfo();
~GrabInfo(void);
~GrabInfo();
void selectImage(uint8 index);
// set the move count based on val and whether the object is
// mergeable or not.
void setMoveCount(int16 val);
int16 getMoveCount(void) {
int16 getMoveCount() {
return moveCount;
}
@ -108,10 +108,10 @@ public:
void copyObject(GameObject *obj, Intent in = Drop, int16 count = 1);
// non-destructive reads of the state
uint8 getIntent(void) {
uint8 getIntent() {
return intention;
}
bool getDoable(void) {
bool getDoable() {
return intentDoable;
}
@ -124,16 +124,16 @@ public:
}
}
GameObject *getObject(void) {
GameObject *getObject() {
return grabObj;
}
ObjectID getObjectId(void) {
ObjectID getObjectId() {
return grabId;
}
// free the cursor
void placeObject(const Location &loc);
void replaceObject(void);
void replaceObject();
// request a change to the mouse cursor text
void setText(const char *txt);
@ -142,7 +142,7 @@ public:
void setGauge(int16 numerator, int16 denominator);
// clear the mouse gauge
void clearGauge(void);
void clearGauge();
};
} // end of namespace Saga2

View File

@ -367,7 +367,7 @@ bool gTextBox::activate(gEventType why) {
//-----------------------------------------------------------------------
void gTextBox::deactivate(void) {
void gTextBox::deactivate() {
selected = 0;
isActiveCtl = false;
draw();
@ -386,7 +386,7 @@ void gTextBox::prepareEdit(int which) {
//-----------------------------------------------------------------------
bool gTextBox::changed(void) {
bool gTextBox::changed() {
if (undoBuffer && editing) {
return memcmp(undoBuffer, fieldStrings[index], currentLen[index] + 1);
}
@ -395,7 +395,7 @@ bool gTextBox::changed(void) {
//-----------------------------------------------------------------------
void gTextBox::commitEdit(void) {
void gTextBox::commitEdit() {
if (undoBuffer && changed()) {
memcpy(undoBuffer, fieldStrings[index], currentLen[index] + 1);
undoLen = currentLen[index];
@ -407,7 +407,7 @@ void gTextBox::commitEdit(void) {
//-----------------------------------------------------------------------
void gTextBox::revertEdit(void) {
void gTextBox::revertEdit() {
if (undoBuffer && changed()) {
cursorPos = anchorPos = currentLen[index] = undoLen;
memcpy(fieldStrings[index], undoBuffer, currentLen[index] + 1);
@ -548,13 +548,13 @@ void gTextBox::selectionMove(int howMany) {
//-----------------------------------------------------------------------
void gTextBox::scrollUp(void) {
void gTextBox::scrollUp() {
selectionUp(linesPerPage - 2);
}
//-----------------------------------------------------------------------
void gTextBox::scrollDown(void) {
void gTextBox::scrollDown() {
selectionDown(linesPerPage - 2);
}
@ -818,7 +818,7 @@ bool gTextBox::keyStroke(gPanelMessage &msg) {
//-----------------------------------------------------------------------
bool gTextBox::tabSelect(void) {
bool gTextBox::tabSelect() {
return true;
}
@ -881,7 +881,7 @@ void gTextBox::editRectFill(gPort &fillPort, gPen *pen) {
//-----------------------------------------------------------------------
void gTextBox::drawContents(void) {
void gTextBox::drawContents() {
int16 cPos, aPos;
assert(textFont);
assert(fontColorBack != -1);
@ -987,7 +987,7 @@ void gTextBox::drawContents(void) {
//-----------------------------------------------------------------------
void gTextBox::drawClipped(void) {
void gTextBox::drawClipped() {
gPort &port = window.windowPort;
Rect16 rect = window.getExtent();

View File

@ -118,9 +118,9 @@ private:
protected:
void prepareEdit(int which);
void revertEdit(void);
void commitEdit(void);
bool changed(void);
void revertEdit();
void commitEdit();
bool changed();
void scroll(int8);
@ -129,7 +129,7 @@ protected:
void reSelect(int which);
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
bool pointerHit(gPanelMessage &msg);
void pointerDrag(gPanelMessage &msg);
@ -155,7 +155,7 @@ protected:
void handleTimerTick(int32 tick);
void editRectFill(gPort &fillPort, gPen *pen);
void drawContents(void);
void drawContents();
public:
@ -184,27 +184,27 @@ public:
void drawClipped(gPort &, const Point16 &, const Rect16 &) {
drawClipped();
}
void drawClipped(void);
void draw(void) {
void drawClipped();
void draw() {
drawClipped(); // redraw the panel.
}
bool tabSelect(void);
bool tabSelect();
virtual void timerTick(gPanelMessage &msg);
void scrollUp(void);
void scrollDown(void);
void scrollUp();
void scrollDown();
char *getLine(int8);
int8 getIndex(void) {
int8 getIndex() {
return index;
}
void killChanges(void) {
void killChanges() {
revertEdit();
}
void keepChanges(void) {
void keepChanges() {
commitEdit();
}

View File

@ -76,7 +76,7 @@ struct MetaTileID {
int16 index; // index into metatile array
// Default constructor
MetaTileID(void) : map(0), index(0) {}
MetaTileID() : map(0), index(0) {}
// Copy constructor
MetaTileID(const MetaTileID &id) : map(id.map), index(id.index) {}
@ -128,7 +128,7 @@ struct ActiveItemID {
// next 13 bits index
// Default constructor
ActiveItemID(void) : val(0) {}
ActiveItemID() : val(0) {}
// Copy constructor
ActiveItemID(const ActiveItemID &id) : val(id.val) {
@ -164,7 +164,7 @@ struct ActiveItemID {
return val != id.val;
}
operator int16(void) {
operator int16() {
return val;
}
@ -173,7 +173,7 @@ struct ActiveItemID {
val |= (m << activeItemMapShift);
}
int16 getMapNum(void) {
int16 getMapNum() {
return (uint16)val >> activeItemMapShift;
}
@ -182,7 +182,7 @@ struct ActiveItemID {
val |= i & activeItemIndexMask;
}
int16 getIndexNum(void) {
int16 getIndexNum() {
return val & activeItemIndexMask;
}
} PACKED_STRUCT;

View File

@ -45,7 +45,7 @@ CImageNode::CImageNode(hResContext *con, uint32 resID) {
}
}
CImageNode::~CImageNode(void) {
CImageNode::~CImageNode() {
if (image) {
free(image);
image = nullptr;
@ -74,7 +74,7 @@ bool CImageNode::isSameImage(void *imagePtr) {
}
// return true if this node needs to be deleted
bool CImageNode::releaseRequest(void) {
bool CImageNode::releaseRequest() {
// the number of requests on this resource goes down by one
requested--;
@ -87,7 +87,7 @@ bool CImageNode::releaseRequest(void) {
return false;
}
void *CImageNode::getImagePtr(void) {
void *CImageNode::getImagePtr() {
requested++;
return image;
}
@ -96,7 +96,7 @@ void *CImageNode::getImagePtr(void) {
ImageCache member functions
* ===================================================================== */
CImageCache::~CImageCache(void) {
CImageCache::~CImageCache() {
/* >>> See notes below
// return if list is empty

View File

@ -43,15 +43,15 @@ private:
public:
CImageNode(hResContext *con, uint32 resID);
~CImageNode(void);
~CImageNode();
void *getImagePtr(void);
void *getImagePtr();
bool isSameImage(hResContext *con, uint32 resID);
bool isSameImage(void *imagePtr);
uint16 getNumRequested(void) {
uint16 getNumRequested() {
return requested;
}
bool releaseRequest(void);
bool releaseRequest();
};
@ -64,10 +64,10 @@ private:
Common::List<CImageNode *> _nodes; // list of ImageNode
public:
CImageCache(void) {
CImageCache() {
assert(_nodes.empty());
}
~CImageCache(void);
~CImageCache();
void *requestImage(hResContext *con, uint32 resID);
void releaseImage(void *);

View File

@ -475,7 +475,7 @@ class RandomGenerator {
static const uint32 b; // arbitrary constant
public:
RandomGenerator(void) : a(1) {
RandomGenerator() : a(1) {
}
RandomGenerator(uint16 seed) {
a = (uint32)seed << 16;
@ -485,7 +485,7 @@ public:
a = (uint32)seed << 16;
}
uint16 operator()(void) {
uint16 operator()() {
a = (a * b) + 1;
return a >> 16;
}
@ -566,7 +566,7 @@ static void print_stack(int16 *stackBase, int16 *stack) {
#define D_OP2(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] = %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, (void *)addr, *stack)
#define D_OP3(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, (void *)addr, *addr)
bool Thread::interpret(void) {
bool Thread::interpret() {
uint8 *pc,
*addr;
int16 *stack = (int16 *)stackPtr;
@ -792,7 +792,7 @@ bool Thread::interpret(void) {
break;
case op_call_member: // call member function
case op_call_member_v: // call member function (void)
case op_call_member_v: // call member function ()
if (op == op_call_member)
D_OP(op_call_member);
else
@ -1177,7 +1177,7 @@ class ThreadList {
public:
// Constructor
ThreadList(void) {
ThreadList() {
for (uint i = 0; i < kNumThreads; i++)
_list[i] = nullptr;
}
@ -1186,12 +1186,12 @@ public:
// Return the number of bytes needed to archive this thread list
// in an archive buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Cleanup the active threads
void cleanup(void);
void cleanup();
// Place a thread back into the inactive list
void deleteThread(Thread *p);
@ -1216,7 +1216,7 @@ public:
}
// Return a pointer to the first active thread
Thread *first(void);
Thread *first();
Thread *next(Thread *thread);
};
@ -1241,7 +1241,7 @@ void ThreadList::read(Common::InSaveFile *in) {
}
}
int32 ThreadList::archiveSize(void) {
int32 ThreadList::archiveSize() {
int32 size = sizeof(int16);
for (uint i = 0; i < kNumThreads; i++) {
@ -1277,7 +1277,7 @@ void ThreadList::write(Common::MemoryWriteStreamDynamic *out) {
//-------------------------------------------------------------------
// Cleanup the active threads
void ThreadList::cleanup(void) {
void ThreadList::cleanup() {
for (uint i = 0; i < kNumThreads; i++) {
delete _list[i];
_list[i] = nullptr;
@ -1316,7 +1316,7 @@ void ThreadList::newThread(Thread *p) {
//-------------------------------------------------------------------
// Return a pointer to the first active thread
Thread *ThreadList::first(void) {
Thread *ThreadList::first() {
for (uint i = 0; i < kNumThreads; i++)
if (_list[i])
return _list[i];
@ -1360,7 +1360,7 @@ static ThreadList &threadList = *((ThreadList *)threadListBuffer);
//-------------------------------------------------------------------
// Initialize the SAGA thread list
void initSAGAThreads(void) {
void initSAGAThreads() {
// Simply call the Thread List default constructor
}
@ -1387,7 +1387,7 @@ void loadSAGAThreads(Common::InSaveFile *in, int32 chunkSize) {
//-------------------------------------------------------------------
// Dispose of the active SAGA threads
void cleanupSAGAThreads(void) {
void cleanupSAGAThreads() {
// Simply call the ThreadList cleanup() function
threadList.cleanup();
}
@ -1505,7 +1505,7 @@ Thread::~Thread() {
// Return the number of bytes need to archive this thread in an arhive
// buffer
int32 Thread::archiveSize(void) {
int32 Thread::archiveSize() {
return sizeof(programCounter)
+ sizeof(stackSize)
+ sizeof(flags)
@ -1545,7 +1545,7 @@ void Thread::write(Common::MemoryWriteStreamDynamic *out) {
//-----------------------------------------------------------------------
// Thread dispatcher
void Thread::dispatch(void) {
void Thread::dispatch() {
Thread *th,
*nextThread;
@ -1630,14 +1630,14 @@ break_thread_loop:
//-----------------------------------------------------------------------
// Run scripts which are on the queue
void dispatchScripts(void) {
void dispatchScripts() {
Thread::dispatch();
}
//-----------------------------------------------------------------------
// Run a script until finished
scriptResult Thread::run(void) {
scriptResult Thread::run() {
int i = 4000;
while (i--) {
@ -1658,7 +1658,7 @@ scriptResult Thread::run(void) {
//-----------------------------------------------------------------------
// Convert to extended thread
void Thread::setExtended(void) {
void Thread::setExtended() {
if (!(flags & extended)) {
flags |= extended;
extendedThreadLevel++;
@ -1668,7 +1668,7 @@ void Thread::setExtended(void) {
//-----------------------------------------------------------------------
// Convert back to regular thread
void Thread::clearExtended(void) {
void Thread::clearExtended() {
if (flags & extended) {
flags &= ~extended;
extendedThreadLevel--;
@ -1678,7 +1678,7 @@ void Thread::clearExtended(void) {
/* ============================================================================ *
Script Management functions
* ============================================================================ */
void initScripts(void) {
void initScripts() {
// Open the script resource group
scriptRes = scriptResFile->newContext(sagaID, "script resources");
if (scriptRes == NULL)
@ -1705,7 +1705,7 @@ void initScripts(void) {
(void*)exportSegment, scriptRes->getSize(exportSegID, "saga export segment"), exportCount);
}
void cleanupScripts(void) {
void cleanupScripts() {
if (exportSegment)
free(exportSegment);
@ -1720,7 +1720,7 @@ void cleanupScripts(void) {
//-----------------------------------------------------------------------
// Load the SAGA data segment from the resource file
void initSAGADataSeg(void) {
void initSAGADataSeg() {
// Load the data segment
scriptRes->seek(dataSegID);
scriptRes->read(dataSegment, dataSegSize);

View File

@ -435,7 +435,7 @@ void CPlaqText::invalidate(Rect16 *) {
window.update(_extent);
}
void CPlaqText::draw(void) {
void CPlaqText::draw() {
gPort &port = window.windowPort;
Rect16 rect = window.getExtent();
@ -625,7 +625,7 @@ CStatusLine::CStatusLine(gPanelList &list,
minWaitAlarm.basetime = minWaitAlarm.duration = 0;
}
CStatusLine::~CStatusLine(void) {
CStatusLine::~CStatusLine() {
while (queueTail != queueHead) {
assert(lineQueue[queueTail].text != nullptr);
@ -648,7 +648,7 @@ void CStatusLine::setLine(char *msg, uint32 frameTime) { // frametime def
}
}
void CStatusLine::experationCheck(void) {
void CStatusLine::experationCheck() {
if (lineDisplayed
&& (waitAlarm.check()
|| (queueTail != queueHead && minWaitAlarm.check()))) {
@ -684,7 +684,7 @@ void CStatusLine::experationCheck(void) {
}
}
void CStatusLine::clear(void) {
void CStatusLine::clear() {
enable(false);
window.update(_extent);
lineDisplayed = false;
@ -771,7 +771,7 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
g_vm->_indList.push_back(this);
}
CMassWeightIndicator::~CMassWeightIndicator(void) {
CMassWeightIndicator::~CMassWeightIndicator() {
g_vm->_indList.remove(this);
unloadImageRes(pieIndImag, numPieIndImages);
@ -783,7 +783,7 @@ CMassWeightIndicator::~CMassWeightIndicator(void) {
** Description: This will recalculate the values to be displayed for the
** mass and bulk of the current ( single mode ) player
**/
void CMassWeightIndicator::recalculate(void) {
void CMassWeightIndicator::recalculate() {
assert(pieMass);
assert(pieBulk);
@ -806,7 +806,7 @@ void CMassWeightIndicator::recalculate(void) {
** Description: This will call recalculate and then invalidate the entire
** weight/bulk control ( so it refreshes )
**/
void CMassWeightIndicator::update(void) {
void CMassWeightIndicator::update() {
if (bRedraw == true) {
for (Common::List<CMassWeightIndicator *>::iterator it = g_vm->_indList.begin(); it != g_vm->_indList.end(); ++it) {
(*it)->recalculate();
@ -898,7 +898,7 @@ CManaIndicator::CManaIndicator(gPanelList &list) : GfxCompImage(list,
savedMap.data = new uint8[savedMap.bytes()];
}
CManaIndicator::~CManaIndicator(void) {
CManaIndicator::~CManaIndicator() {
// release images
unloadImageRes(starImages, numStars);
unloadImageRes(ringImages, numRings);
@ -937,7 +937,7 @@ Rect16 CManaIndicator::getManaRegionRect(int8 nRegion) {
return manaRegionRects[nRegion];
}
void CManaIndicator::draw(void) {
void CManaIndicator::draw() {
gPort &port = window.windowPort;
@ -1298,7 +1298,7 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
}
CHealthIndicator::~CHealthIndicator(void) {
CHealthIndicator::~CHealthIndicator() {
// release star imagery
unloadImageRes(starImag, starNum);
@ -1329,7 +1329,7 @@ void CHealthIndicator::updateStar(GfxCompImage *starCtl, int32 bro, int32 baseVi
}
}
void CHealthIndicator::update(void) {
void CHealthIndicator::update() {
if (g_vm->_indivControlsFlag) {
// get the stats for the selected brother
int16 baseVitality = g_vm->_playerList[translatePanID(uiIndiv)]->getBaseStats().vitality;
@ -1526,7 +1526,7 @@ void unloadImageRes(void **images, int16 numRes) {
}
// defined for setup off all button based user controls
void SetupUserControls(void) {
void SetupUserControls() {
// index variables
uint16 n;
uint8 index = 0;
@ -1689,22 +1689,22 @@ void SetupUserControls(void) {
updateAllUserControls();
}
void enableUserControls(void) {
void enableUserControls() {
g_vm->_userControlsSetup = true;
}
void disableUserControls(void) {
void disableUserControls() {
g_vm->_userControlsSetup = false;
}
// defines the cleanup for ALL user interface controls
void CleanupUserControls(void) {
void CleanupUserControls() {
g_vm->_userControlsSetup = false;
CleanupButtonImages();
}
// defines the cleaup for the global button image array
void CleanupButtonImages(void) {
void CleanupButtonImages() {
int16 i;
// deallocates the images in the array and the arrays themselves
@ -1742,7 +1742,7 @@ void CleanupButtonImages(void) {
}
}
void updateIndicators(void) {
void updateIndicators() {
HealthIndicator->update();
MassWeightIndicator->update();
@ -1828,7 +1828,7 @@ uint16 getBulkRatio(GameObject *obj, uint16 &maxRatio, bool bReturnMaxRatio = tr
Application functions
* ===================================================================== */
void updateReadyContainers(void) {
void updateReadyContainers() {
// if in individual mode
if (g_vm->_indivControlsFlag) {
indivCviewTop->invalidate();
@ -1838,7 +1838,7 @@ void updateReadyContainers(void) {
}
}
void setEnchantmentDisplay(void) {
void setEnchantmentDisplay() {
if (enchDisp) enchDisp->setValue(getCenterActorPlayerID());
}
@ -1883,7 +1883,7 @@ void setIndivBtns(uint16 brotherID) { // top = 0, mid = 1, bot = 2
}
// sets the trio brothers control state buttons
void setTrioBtns(void) {
void setTrioBtns() {
g_vm->_indivControlsFlag = false;
// reset any value that might have changed in idividual mode
@ -1906,14 +1906,14 @@ void setControlPanelsToIndividualMode(uint16 brotherID) {
trioControls->show(false, true);
}
void setControlPanelsToTrioMode(void) {
void setControlPanelsToTrioMode() {
setTrioBtns();
indivControls->show(false, false);
trioControls->show(true, true);
indivControls->show(false, true);
}
void toggleIndivMode(void) {
void toggleIndivMode() {
if (g_vm->_indivControlsFlag) setControlPanelsToTrioMode();
else setControlPanelsToIndividualMode(getCenterActorPlayerID());
}
@ -2017,7 +2017,7 @@ void updateBrotherArmor(uint16 brotherID) {
}
}
void updateAllUserControls(void) {
void updateAllUserControls() {
if (displayEnabled()) {
if (g_vm->_userControlsSetup) {
uint16 centerBrotherID = getCenterActorPlayerID(),
@ -2546,11 +2546,11 @@ APPFUNC(cmdManaInd) {
}
}
bool isIndivMode(void) {
bool isIndivMode() {
return g_vm->_indivControlsFlag;
}
void initUIState(void) {
void initUIState() {
g_vm->_indivControlsFlag = false;
indivBrother = 0;
@ -2583,7 +2583,7 @@ void loadUIState(Common::InSaveFile *in) {
updateAllUserControls();
}
void cleanupUIState(void) {
void cleanupUIState() {
if (StatusLine != nullptr)
StatusLine->clear();
}

View File

@ -44,15 +44,15 @@ namespace Saga2 {
// the appfunc helper functions will eventually be merged into an object
// that will handle all of the trasitive portion of the UI.
void SetupUserControls(void);
void CleanupButtonImages(void);
void CleanupUserControls(void);
void SetupUserControls();
void CleanupButtonImages();
void CleanupUserControls();
void SetupContainerViews(ContainerWindow *viewWindow);
void **loadButtonRes(hResContext *con, int16 resID, int16 numRes);
void **loadButtonRes(hResContext *con, int16 resID, int16 numRes, char a, char b, char c);
void **loadImageRes(hResContext *con, int16 resID, int16 numRes, char a, char b, char c);
void unloadImageRes(void **images, int16 numRes);
bool isIndivMode(void);
bool isIndivMode();
// temp >>>
uint16 getPlayerActorWeightRatio(PlayerActor *player, uint16 &maxRatio, bool bReturnMaxRatio);
@ -64,10 +64,10 @@ void GetTotalMassBulk(GameObject *obj, uint16 &totalMass, uint16 &totalBulk);
// appfunc helpers
void setIndivBtns(uint16 broNum);
void setTrioBtns(void);
void setTrioBtns();
void setCenterBtns(uint16 whichBrother);
void setControlPanelsToIndividualMode(uint16 whichBrother);
void setControlPanelsToTrioMode(void);
void setControlPanelsToTrioMode();
void setCenterBrother(uint16 whichBrother);
void toggleBrotherBanding(uint16 whichBrother);
uint16 translatePanID(uint16 ID);
@ -75,23 +75,23 @@ void updateBrotherPortrait(uint16 brotherID, int16 pType);
void updateBrotherAggressionButton(uint16 brotherID, bool aggressive);
void updateBrotherBandingButton(uint16 brotherID, bool banded);
void updateBrotherRadioButtons(uint16 brotherID);
void updateReadyContainers(void);
void updateReadyContainers();
void updateBrotherArmor(uint16 brotherID);
void updateAllUserControls(void);
void updateAllUserControls();
void updateBrotherControls(PlayerActorID brotherID);
void enableUserControls(void);
void disableUserControls(void);
void enableUserControls();
void disableUserControls();
bool isBrotherDead(PlayerActorID brotherID);
// update functions
void updateIndicators(void);
void updateIndicators();
void initUIState(void);
void initUIState();
void saveUIState(Common::OutSaveFile *outS);
void loadUIState(Common::InSaveFile *in);
void cleanupUIState(void);
void cleanupUIState();
// Varargs function to write to the status line.
void StatusMsg(const char *msg, ...); // frametime def
@ -203,7 +203,7 @@ public:
void enable(bool);
void invalidate(Rect16 *unused = nullptr);
void draw(void);
void draw();
virtual void drawClipped(gPort &,
const Point16 &,
const Rect16 &);
@ -240,12 +240,12 @@ private:
public:
CStatusLine(gPanelList &, const Rect16 &, const char *, gFont *,
int16, textPallete, int32, int16, AppFunc *cmd = NULL);
~CStatusLine(void);
~CStatusLine();
void setLine(char *, uint32 frameTime);
void experationCheck(void);
void experationCheck();
void clear(void);
void clear();
};
@ -343,12 +343,12 @@ public:
}
CMassWeightIndicator(gPanelList *, const Point16 &, uint16 type = 1, bool death = false);
~CMassWeightIndicator(void);
~CMassWeightIndicator();
uint16 getMassPieDiv(void) {
uint16 getMassPieDiv() {
return pieMass->getMax();
}
uint16 getBulkPieDiv(void) {
uint16 getBulkPieDiv() {
return pieBulk->getMax();
}
@ -358,8 +358,8 @@ public:
void setBulkPie(uint16 val) {
pieBulk->setCurrent(val);
}
void recalculate(void);
static void update(void);
void recalculate();
static void update();
};
@ -525,7 +525,7 @@ protected:
public:
CManaIndicator(gPanelList &list);
~CManaIndicator(void);
~CManaIndicator();
// this updates the star and ring position info
bool update(PlayerActor *player);
@ -540,12 +540,12 @@ public:
// |3 4 5|
// -------
Rect16 getManaRegionRect(int8 region);
int getNumManaRegions(void) {
int getNumManaRegions() {
return numManaRegions;
}
// drawing routines
void draw(void);
void draw();
virtual void drawClipped(gPort &, const Point16 &, const Rect16 &);
};
@ -602,10 +602,10 @@ public:
public:
CHealthIndicator(AppFunc *cmd);
~CHealthIndicator(void);
~CHealthIndicator();
void update(void);
void update();
};

View File

@ -37,11 +37,11 @@ extern uint8 *loadingWindowPalette;
static bool inLoadMode = false;
void initLoadMode(void) {
void initLoadMode() {
inLoadMode = true;
}
void updateLoadMode(void) {
void updateLoadMode() {
if (inLoadMode) {
byte normalPalette[768];
@ -56,12 +56,12 @@ void updateLoadMode(void) {
}
}
void closeLoadMode(void) {
void closeLoadMode() {
inLoadMode = false;
//blackOut();
}
void loadingScreen(void) {
void loadingScreen() {
initLoadMode();
updateLoadMode();
}

View File

@ -30,10 +30,10 @@
namespace Saga2 {
void initLoadMode(void);
void updateLoadMode(void);
void closeLoadMode(void);
void loadingScreen(void);
void initLoadMode();
void updateLoadMode();
void closeLoadMode();
void loadingScreen();
} // end of namespace Saga2

View File

@ -99,10 +99,10 @@ bool implementSpell(GameObject *enactor, ActiveItem *target, SkillProto *spell);
bool implementSpell(GameObject *enactor, GameObject *target, SkillProto *spell);
// spell saving & loading
void initSpellState(void);
void initSpellState();
void saveSpellState(Common::OutSaveFile *outS);
void loadSpellState(Common::InSaveFile *in);
void cleanupSpellState(void);
void cleanupSpellState();
} // end of namespace Saga2

View File

@ -36,21 +36,21 @@ void main_saga2();
void parseCommandLine(int argc, char *argv[]);
// initialization & cleanup
void initCleanup(void);
void initCleanup();
bool initializeGame(void);
void shutdownGame(void);
bool initializeGame();
void shutdownGame();
bool initSystemTimer(void);
void cleanupSystemTimer(void);
bool initSystemTimer();
void cleanupSystemTimer();
void cleanupSystemTasks(void);
void cleanupPaletteData(void);
void cleanupSystemTasks();
void cleanupPaletteData();
// major parts of main that are actually in main.cpp
void cleanupGame(void); // auto-cleanup function
bool setupGame(void);
void cleanupPalettes(void);
void cleanupGame(); // auto-cleanup function
bool setupGame();
void cleanupPalettes();
} // end of namespace Saga2

View File

@ -57,7 +57,7 @@ namespace Saga2 {
// ------------------------------------------------------------------------
// init
void initMapFeatures(void) {
void initMapFeatures() {
//MAP_VILLAGE(13000,12535,"DummyVillage");
//MAP_STARGATE(1,2,"DummyGate");
@ -280,7 +280,7 @@ char *getMapFeaturesText(TileRegion viewRegion,
// ------------------------------------------------------------------------
// cleanup
void termMapFeatures(void) {
void termMapFeatures() {
for (uint i = 0; i < g_vm->_mapFeatures.size(); i++) {
if (g_vm->_mapFeatures[i])
delete g_vm->_mapFeatures[i];

View File

@ -60,23 +60,23 @@ public:
}
void draw(TileRegion tr, int16 inWorld, TilePoint bc, gPort &tport);
bool hitCheck(TileRegion vr, int16 inWorld, TilePoint bc, TilePoint cp);
int16 getWorld(void) {
int16 getWorld() {
return world;
}
int16 getU(void) {
int16 getU() {
return featureCoords.u;
}
int16 getV(void) {
int16 getV() {
return featureCoords.v;
}
char *getText(void) {
char *getText() {
return name;
}
// The only aspect of different map features is what they look like
virtual void blit(gPort &tp, int32 x, int32 y) = 0;
virtual bool isHit(TilePoint disp, TilePoint mouse) = 0;
virtual void update(void) = 0;
virtual void update() = 0;
};
@ -91,7 +91,7 @@ class CStaticMapFeature : public CMapFeature {
public:
CStaticMapFeature(TilePoint where, int16 inWorld, const char *desc, int16 bColor);
virtual void blit(gPort &tp, int32 x, int32 y);
virtual void update(void) {}
virtual void update() {}
virtual bool isHit(TilePoint disp, TilePoint mouse);
};
@ -105,7 +105,7 @@ class CPictureMapFeature : public CMapFeature {
public:
CPictureMapFeature(TilePoint where, int16 inWorld, char *desc, gPixelMap *pm);
virtual void blit(gPort &tp, int32 x, int32 y);
virtual void update(void) {}
virtual void update() {}
virtual bool isHit(TilePoint disp, TilePoint mouse) {
return false;
}
@ -116,13 +116,13 @@ public:
Prototypes
* ===================================================================== */
void initMapFeatures(void) ;
void initMapFeatures() ;
void updateMapFeatures(int16 currentWorld);
void drawMapFeatures(TileRegion viewRegion,
int16 world,
TilePoint baseCoords,
gPort &tPort);
void termMapFeatures(void) ;
void termMapFeatures() ;
char *getMapFeaturesText(TileRegion viewRegion,
int16 inWorld,
TilePoint baseCoords,

View File

@ -236,7 +236,7 @@ void ActiveMission::write(Common::MemoryWriteStreamDynamic *out) {
debugC(4, kDebugSaveload, "... numKnowledgeIDs = %d", _data.numKnowledgeIDs);
}
void ActiveMission::cleanup(void) {
void ActiveMission::cleanup() {
int i;
for (i = 0; i < _data.numKnowledgeIDs; i++) {
@ -262,7 +262,7 @@ void ActiveMission::cleanup(void) {
//-----------------------------------------------------------------------
// Initialize the active mission list
void initMissions(void) {
void initMissions() {
int i;
for (i = 0; i < ARRAYSIZE(activeMissions); i++)

View File

@ -73,8 +73,8 @@ struct ActiveMissionData {
class ActiveMission {
friend void initMissions(void);
friend void cleanupMissions(void);
friend void initMissions();
friend void cleanupMissions();
public:
@ -88,9 +88,9 @@ public:
void read(Common::InSaveFile *in);
void write(Common::MemoryWriteStreamDynamic *out);
void cleanup(void);
void cleanup();
bool spaceForObject(void) {
bool spaceForObject() {
return _data.numObjectIDs < ARRAYSIZE(_data.missionObjectList);
}
@ -106,23 +106,23 @@ public:
// Add record of knowledge creation to mission
bool removeKnowledgeID(ObjectID actor, uint16 knowledgeID);
int16 getMissionID(void) {
int16 getMissionID() {
return _data.missionID;
}
uint16 getScript(void) {
uint16 getScript() {
return _data.missionScript;
}
};
// Initialize the active mission list
void initMissions(void);
void initMissions();
void saveMissions(Common::OutSaveFile *out);
void loadMissions(Common::InSaveFile *in);
// Cleanup the active mission list
inline void cleanupMissions(void) { /* do nothing */ }
inline void cleanupMissions() { /* do nothing */ }
} // end of namespace Saga2

View File

@ -35,9 +35,9 @@ ModalWindow *mWinPtr;
APPFUNC(cmdModalWindow);
void ModalModeSetup(void) {}
void ModalModeCleanup(void) {}
void ModalModeHandleTask(void) {}
void ModalModeSetup() {}
void ModalModeCleanup() {}
void ModalModeHandleTask() {}
void ModalModeHandleKey(short, short);
GameMode ModalMode = {
@ -66,18 +66,18 @@ ModalWindow::ModalWindow(const Rect16 &r, uint16 ident, AppFunc *cmd)
prevModeStackPtr[i] = 0;
}
ModalWindow::~ModalWindow(void) {
ModalWindow::~ModalWindow() {
// Kludge because of Visual C's patching of vptr in destructor.
if (isOpen()) close();
}
bool ModalWindow::isModal(void) {
bool ModalWindow::isModal() {
return openFlag;
}
bool ModalWindow::open(void) {
bool ModalWindow::open() {
g_vm->_mouseInfo->replaceObject();
g_vm->_mouseInfo->clearGauge();
g_vm->_mouseInfo->setText(NULL);
@ -94,7 +94,7 @@ bool ModalWindow::open(void) {
return gWindow::open();
}
void ModalWindow::close(void) {
void ModalWindow::close() {
gWindow::close();
GameMode::SetStack(prevModeStackPtr, prevModeStackCtr);

View File

@ -31,9 +31,9 @@
namespace Saga2 {
void ModalModeSetup(void);
void ModalModeCleanup(void);
void ModalModeHandleTask(void);
void ModalModeSetup();
void ModalModeCleanup();
void ModalModeHandleTask();
void ModalModeHandleKey(short, short);
//Modal Mode GameMode Object
@ -55,9 +55,9 @@ public:
AppFunc *cmd);
~ModalWindow();
bool open(void);
void close(void);
bool isModal(void);
bool open();
void close();
bool isModal();
static ModalWindow *current;
void handleKey(short, short);

View File

@ -50,7 +50,7 @@ bool interruptableMotionsPaused;
* ===================================================================== */
bool unstickObject(GameObject *obj);
int32 currentGamePerformance(void);
int32 currentGamePerformance();
/* ===================================================================== *
Functions
@ -347,7 +347,7 @@ uint8 computeTurnFrames(Direction fromDir, Direction toDir) {
//-----------------------------------------------------------------------
// Initialize the MotionTaskList
MotionTaskList::MotionTaskList(void) {
MotionTaskList::MotionTaskList() {
_nextMT = _list.end();
}
@ -376,7 +376,7 @@ void MotionTaskList::read(Common::InSaveFile *in) {
// Return the number of bytes needed to archive the motion tasks
// in a buffer
int32 MotionTaskList::archiveSize(void) {
int32 MotionTaskList::archiveSize() {
// Initilialize with sizeof motion task count
int32 size = sizeof(int16);
@ -400,7 +400,7 @@ void MotionTaskList::write(Common::MemoryWriteStreamDynamic *out) {
//-----------------------------------------------------------------------
// Cleanup the motion tasks
void MotionTaskList::cleanup(void) {
void MotionTaskList::cleanup() {
for (Common::List<MotionTask *>::iterator it = _list.begin(); it != _list.end(); ++it) {
abortPathFind(*it);
(*it)->pathFindTask = NULL;
@ -714,7 +714,7 @@ void MotionTask::read(Common::InSaveFile *in) {
//-----------------------------------------------------------------------
// Return the number of bytes needed to archive this MotionTask
int32 MotionTask::archiveSize(void) {
int32 MotionTask::archiveSize() {
int32 size = 0;
size = sizeof(motionType)
@ -1101,7 +1101,7 @@ void MotionTask::remove(int16 returnVal) {
//-----------------------------------------------------------------------
// Determine the immediate target _data.location
TilePoint MotionTask::getImmediateTarget(void) {
TilePoint MotionTask::getImmediateTarget() {
if (immediateLocation != Nowhere)
return immediateLocation;
@ -1629,7 +1629,7 @@ void MotionTask::dropObjectOnTAI(
// Determine if this MotionTask is a reflex ( motion over which an actor
// has no control )
bool MotionTask::isReflex(void) {
bool MotionTask::isReflex() {
return motionType == motionTypeThrown
|| motionType == motionTypeFall
|| motionType == motionTypeLand
@ -1896,7 +1896,7 @@ void MotionTask::die(Actor &a) {
//-----------------------------------------------------------------------
// Determine if this MotionTask is a defensive motion
bool MotionTask::isDefense(void) {
bool MotionTask::isDefense() {
return motionType == motionTypeOneHandedParry
|| motionType == motionTypeTwoHandedParry
|| motionType == motionTypeShieldParry
@ -1906,7 +1906,7 @@ bool MotionTask::isDefense(void) {
//-----------------------------------------------------------------------
// Determine if this MotionTask is an offensive motion
bool MotionTask::isAttack(void) {
bool MotionTask::isAttack() {
return isMeleeAttack()
|| motionType == motionTypeFireBow
|| motionType == motionTypeCastSpell
@ -1916,7 +1916,7 @@ bool MotionTask::isAttack(void) {
//-----------------------------------------------------------------------
// Determine if this MotionTask is an offensive melee motion
bool MotionTask::isMeleeAttack(void) {
bool MotionTask::isMeleeAttack() {
return motionType == motionTypeOneHandedSwing
|| motionType == motionTypeTwoHandedSwing;
}
@ -1924,14 +1924,14 @@ bool MotionTask::isMeleeAttack(void) {
//-----------------------------------------------------------------------
// Determine if this MotionTask is a walk motion
bool MotionTask::isWalk(void) {
bool MotionTask::isWalk() {
return prevMotionType == motionTypeWalk;
}
//-----------------------------------------------------------------------
// Return the wandering tether region
TileRegion MotionTask::getTether(void) {
TileRegion MotionTask::getTether() {
TileRegion reg;
if (flags & tethered) {
@ -2001,7 +2001,7 @@ void MotionTask::changeDirectTarget(const TilePoint &newPos, bool run) {
}
// Cancel actor movement if walking...
void MotionTask::finishWalk(void) {
void MotionTask::finishWalk() {
// If the actor is in a running state
if (motionType == motionTypeWalk) {
remove();
@ -2018,7 +2018,7 @@ void MotionTask::finishWalk(void) {
}
// Cancel actor movement if talking...
void MotionTask::finishTalking(void) {
void MotionTask::finishTalking() {
if (motionType == motionTypeTalk) {
if (isActor(object)) {
Actor *a = (Actor *)object;
@ -2032,7 +2032,7 @@ void MotionTask::finishTalking(void) {
//-----------------------------------------------------------------------
// Handle actions for characters and objects in free-fall
void MotionTask::ballisticAction(void) {
void MotionTask::ballisticAction() {
TilePoint totalVelocity, // total velocity vector
stepVelocity, // sub-velocity vector
location,
@ -2298,7 +2298,7 @@ void MotionTask::ballisticAction(void) {
//-----------------------------------------------------------------------
// Get the coordinates of the next waypoint.
bool MotionTask::nextWayPoint(void) {
bool MotionTask::nextWayPoint() {
// If the pathfinder hasn't managed to determine waypoints
// yet, then return failure.
// if ( ( flags & pathFind ) && pathCount < 0 ) return false;
@ -2374,7 +2374,7 @@ bool MotionTask::checkWalk(
//-----------------------------------------------------------------------
// Handle actions for characters walking and running
void MotionTask::walkAction(void) {
void MotionTask::walkAction() {
enum WalkType {
walkNormal = 0,
walkSlow,
@ -2843,7 +2843,7 @@ void MotionTask::walkAction(void) {
//-----------------------------------------------------------------------
// Climb up a ladder
void MotionTask::upLadderAction(void) {
void MotionTask::upLadderAction() {
Actor *a = (Actor *)object;
if (flags & reset) {
@ -2970,7 +2970,7 @@ void MotionTask::upLadderAction(void) {
//-----------------------------------------------------------------------
// Climb down a ladder
void MotionTask::downLadderAction(void) {
void MotionTask::downLadderAction() {
Actor *a = (Actor *)object;
if (flags & reset) {
@ -3089,7 +3089,7 @@ void MotionTask::downLadderAction(void) {
}
// Go through the giving motions
void MotionTask::giveAction(void) {
void MotionTask::giveAction() {
Actor *a = (Actor *)object;
Direction targetDir = (targetObj->getLocation()
- a->getLocation()).quickDir();
@ -3124,7 +3124,7 @@ struct CombatMotionSet {
uint16 listSize; // Size of array
// Select randome element from the array
uint8 selectRandom(void) const {
uint8 selectRandom() const {
return list[g_vm->_rnd->getRandomNumber(listSize - 1)];
}
};
@ -3173,7 +3173,7 @@ const CombatMotionSet twoHandedLowSwingSet = {
//-----------------------------------------------------------------------
// Handle all two handed swing motions
void MotionTask::twoHandedSwingAction(void) {
void MotionTask::twoHandedSwingAction() {
// If the reset flag is set, initialize the motion
if (flags & reset) {
// Let the game engine know about this aggressive act
@ -3288,7 +3288,7 @@ const CombatMotionSet oneHandedLowSwingSet = {
//-----------------------------------------------------------------------
// Handle all one handed swing motions
void MotionTask::oneHandedSwingAction(void) {
void MotionTask::oneHandedSwingAction() {
if (flags & reset) {
// Let the game engine know about this aggressive act
logAggressiveAct(object->thisID(), targetObj->thisID());
@ -3376,7 +3376,7 @@ void MotionTask::oneHandedSwingAction(void) {
// Compute the number of frames before the actual strike in an
// offensive melee motion
uint16 MotionTask::framesUntilStrike(void) {
uint16 MotionTask::framesUntilStrike() {
// If the melee action has not been initialized, return a safe value
if (flags & reset) return maxuint16;
@ -3403,7 +3403,7 @@ GameObject *MotionTask::blockingObject(Actor *thisAttacker) {
//-----------------------------------------------------------------------
// Handle bow firing motions
void MotionTask::fireBowAction(void) {
void MotionTask::fireBowAction() {
Actor *a = (Actor *)object;
assert(a->_leftHandObject != Nothing);
@ -3503,7 +3503,7 @@ void MotionTask::fireBowAction(void) {
//-----------------------------------------------------------------------
// Handle spell casting motions
void MotionTask::castSpellAction(void) {
void MotionTask::castSpellAction() {
Actor *a = (Actor *)object;
// Turn until facing the target
@ -3568,7 +3568,7 @@ void MotionTask::castSpellAction(void) {
//-----------------------------------------------------------------------
// Handle wand using motions
void MotionTask::useWandAction(void) {
void MotionTask::useWandAction() {
// Initialize the wand using motion
if (flags & reset) {
// Let the game engine know about this aggressive act
@ -3606,7 +3606,7 @@ void MotionTask::useWandAction(void) {
//-----------------------------------------------------------------------
// Handle two handed parrying motions
void MotionTask::twoHandedParryAction(void) {
void MotionTask::twoHandedParryAction() {
if (flags & reset) {
Actor *a = (Actor *)object;
int16 animationFrames;
@ -3641,7 +3641,7 @@ void MotionTask::twoHandedParryAction(void) {
//-----------------------------------------------------------------------
// Handle one handed parrying motions
void MotionTask::oneHandedParryAction(void) {
void MotionTask::oneHandedParryAction() {
if (flags & reset) {
Actor *a = (Actor *)object;
int16 animationFrames;
@ -3677,7 +3677,7 @@ void MotionTask::oneHandedParryAction(void) {
//-----------------------------------------------------------------------
// Handle shield parrying motions
void MotionTask::shieldParryAction(void) {
void MotionTask::shieldParryAction() {
if (flags & reset) {
Actor *a = (Actor *)object;
int16 animationFrames;
@ -3712,7 +3712,7 @@ void MotionTask::shieldParryAction(void) {
//-----------------------------------------------------------------------
// Handle dodging motions
void MotionTask::dodgeAction(void) {
void MotionTask::dodgeAction() {
Actor *a = (Actor *)object;
MotionTask *attackerMotion = d.attacker->_moveTask;
@ -3774,7 +3774,7 @@ void MotionTask::dodgeAction(void) {
//-----------------------------------------------------------------------
// Handle accept hit motions
void MotionTask::acceptHitAction(void) {
void MotionTask::acceptHitAction() {
Actor *a = (Actor *)object;
if (flags & reset) {
@ -3832,7 +3832,7 @@ void MotionTask::acceptHitAction(void) {
//-----------------------------------------------------------------------
// Handle fall down motions
void MotionTask::fallDownAction(void) {
void MotionTask::fallDownAction() {
Actor *a = (Actor *)object;
if (flags & reset) {
@ -3893,7 +3893,7 @@ void MotionTask::fallDownAction(void) {
// Generic offensive melee code. Called by twoHandedSwingAction()
// and oneHandedSwingAction()
void MotionTask::offensiveMeleeAction(void) {
void MotionTask::offensiveMeleeAction() {
Actor *a = (Actor *)object;
// Turn until facing the target
@ -3932,7 +3932,7 @@ void MotionTask::offensiveMeleeAction(void) {
//-----------------------------------------------------------------------
// Generic magic weapon code. Called by useWandAction().
void MotionTask::useMagicWeaponAction(void) {
void MotionTask::useMagicWeaponAction() {
Actor *a = (Actor *)object;
// Turn until facing the target
@ -3987,7 +3987,7 @@ void MotionTask::useMagicWeaponAction(void) {
// Generic defensive melee code. Called by twoHandedParryAction(),
// oneHandedParryAction() and shieldParryAction().
void MotionTask::defensiveMeleeAction(void) {
void MotionTask::defensiveMeleeAction() {
Actor *a = (Actor *)object;
MotionTask *attackerMotion = d.attacker->_moveTask;
@ -4029,7 +4029,7 @@ void MotionTask::defensiveMeleeAction(void) {
//-----------------------------------------------------------------------
// Routine to update positions of all moving objects using MotionTasks
void MotionTask::updatePositions(void) {
void MotionTask::updatePositions() {
TilePoint targetVector;
TilePoint fallVelocity, terminalVelocity(15, 15, 0);
TilePoint curLoc;
@ -4799,11 +4799,11 @@ bool checkLadder(Actor *a, const TilePoint &loc) {
}
void pauseInterruptableMotions(void) {
void pauseInterruptableMotions() {
interruptableMotionsPaused = true;
}
void resumeInterruptableMotions(void) {
void resumeInterruptableMotions() {
interruptableMotionsPaused = false;
}
@ -4814,7 +4814,7 @@ void resumeInterruptableMotions(void) {
//-----------------------------------------------------------------------
// Initialize the motion task list
void initMotionTasks(void) {
void initMotionTasks() {
// Simply call the default MotionTaskList constructor
//new (g_vm->_mTaskList) MotionTaskList;
}
@ -4844,7 +4844,7 @@ void loadMotionTasks(Common::InSaveFile *in, int32 chunkSize) {
//-----------------------------------------------------------------------
// Cleanup the motion task list
void cleanupMotionTasks(void) {
void cleanupMotionTasks() {
// Simply call stackList's cleanup
g_vm->_mTaskList->cleanup();
}

View File

@ -261,18 +261,18 @@ private:
void read(Common::InSaveFile *in);
// Return the number of bytes needed to archive this MotionTask
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// motion task is finished.
void remove(int16 returnVal = motionInterrupted);
TilePoint getImmediateTarget(void); // determine immediate target
TilePoint getImmediateTarget(); // determine immediate target
// location
// Routines to handle updating of specific motion types
void turnAction(void) {
void turnAction() {
Actor *a = (Actor *)object;
if (flags & reset) {
@ -286,47 +286,47 @@ private:
remove(motionCompleted);
}
void ballisticAction(void);
void walkAction(void);
void giveAction(void);
void ballisticAction();
void walkAction();
void giveAction();
void upLadderAction(void);
void downLadderAction(void);
void upLadderAction();
void downLadderAction();
// Set up specified animation and run through the frames
void genericAnimationAction(uint8 actionType);
// Offensive combat actions
void twoHandedSwingAction(void);
void oneHandedSwingAction(void);
void fireBowAction(void);
void castSpellAction(void);
void useWandAction(void);
void twoHandedSwingAction();
void oneHandedSwingAction();
void fireBowAction();
void castSpellAction();
void useWandAction();
// Defensive combat actions
void twoHandedParryAction(void);
void oneHandedParryAction(void);
void shieldParryAction(void);
void dodgeAction(void);
void twoHandedParryAction();
void oneHandedParryAction();
void shieldParryAction();
void dodgeAction();
// Other combat actions
void acceptHitAction(void);
void fallDownAction(void);
void acceptHitAction();
void fallDownAction();
// Generic offensive melee code. Called by twoHandedSwingAction()
// and oneHandedSwingAction
void offensiveMeleeAction(void);
void offensiveMeleeAction();
// Generic magic weapon code. Called by useWandAction() and
// useStaffAction()
void useMagicWeaponAction(void);
void useMagicWeaponAction();
// Generic defensive melee code. Called by twoHandedParryAction(),
// oneHandedParryAction() and shieldParryAction().
void defensiveMeleeAction(void);
void defensiveMeleeAction();
// Retrieve the next waypoint from the path list.
bool nextWayPoint(void);
bool nextWayPoint();
bool checkWalk(int16, int16, int16, TilePoint &);
// Determine the velocity for a ballistic motion
@ -443,78 +443,78 @@ public:
static void fallDown(Actor &obj, Actor &opponent);
static void die(Actor &obj);
static void updatePositions(void);
static void updatePositions();
int16 testCollision(GameObject &obstacle);
bool freeFall(TilePoint &newPos, StandingTileInfo &sti);
// Determine if the motion task is a walk motion
bool isWalk(void);
bool isWalk();
// Determine if the motion task is walking to a destination
bool isWalkToDest(void) {
bool isWalkToDest() {
return isWalk() && !(flags & wandering);
}
// Determine if the motion task is a wandering motion
bool isWander(void) {
bool isWander() {
return isWalk() && (flags & wandering);
}
// Determine if the motion task is tethered
bool isTethered(void) {
bool isTethered() {
return isWander() && (flags & tethered);
}
bool isRunning(void) {
bool isRunning() {
return (flags & requestRun) && runCount == 0;
}
bool isTurn(void) {
bool isTurn() {
return motionType == motionTypeTurn;
}
// Return the wandering tether region
TileRegion getTether(void);
TileRegion getTether();
// Return the final target location
TilePoint getTarget(void) {
TilePoint getTarget() {
return finalTarget;
}
// Update to a new final target
void changeTarget(const TilePoint &newPos, bool run = false);
void changeDirectTarget(const TilePoint &newPos, bool run = false);
void finishWalk(void); // stop walking
void finishTurn(void) {
void finishWalk(); // stop walking
void finishTurn() {
if (isTurn()) remove();
}
void finishTalking(void); // stop talking motion
void finishTalking(); // stop talking motion
// Determine if this MotionTask is a reflexive motion
bool isReflex(void);
bool isReflex();
// Determine if this MotionTask is a defensive motion
bool isDefense(void);
bool isDefense();
// End the defensive motion task
void finishDefense(void) {
void finishDefense() {
if (isDefense()) remove();
}
// Determine if this MotionTask is an offensive motion
bool isAttack(void);
bool isAttack();
// Determine if this MotionTask is an offensive melee motion
bool isMeleeAttack(void);
bool isMeleeAttack();
// Compute the number of frames before the actual strike in an
// offensive melee motion
uint16 framesUntilStrike(void);
uint16 framesUntilStrike();
// End the offensive motion
void finishAttack(void) {
void finishAttack() {
if (isAttack()) remove();
}
@ -527,9 +527,9 @@ public:
return motionType == motionTypeDodge && thisAttacker == d.attacker;
}
static void initMotionTasks(void);
static void initMotionTasks();
bool isPrivledged(void) {
bool isPrivledged() {
return flags & privledged;
}
};
@ -542,7 +542,7 @@ class MotionTaskList {
public:
// Default constructor
MotionTaskList(void);
MotionTaskList();
MotionTaskList(Common::SeekableReadStream *stream);
@ -550,12 +550,12 @@ public:
// Return the number of bytes needed to archive the motion tasks
// in a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Cleanup the motion tasks
void cleanup(void);
void cleanup();
MotionTask *newTask(GameObject *obj); // get new motion task
};
@ -614,21 +614,21 @@ inline void MotionTask::give(ThreadID th, Actor &actor, Actor &givee) {
// Initiate ladder climbing
bool checkLadder(Actor *a, const TilePoint &tp);
void pauseInterruptableMotions(void);
void resumeInterruptableMotions(void);
void pauseInterruptableMotions();
void resumeInterruptableMotions();
/* ===================================================================== *
MotionTask list management functions
* ===================================================================== */
// Initialize the motion task list
void initMotionTasks(void);
void initMotionTasks();
void saveMotionTasks(Common::OutSaveFile *out);
void loadMotionTasks(Common::InSaveFile *in, int32 chunkSize);
// Cleanup the motion task list
void cleanupMotionTasks(void);
void cleanupMotionTasks();
} // end of namespace Saga2

View File

@ -212,12 +212,12 @@ inline void disposeStackedImage(gPixelMap **image) {
// pixel map and reset the global mouse cursor to use the new combined
// image.
void cleanupMousePointer(void) {
void cleanupMousePointer() {
if (combinedImage->data != nullptr)
disposeStackedImage(&combinedImage);
}
void setupMousePointer(void) {
void setupMousePointer() {
int imageIndex = 1;
gPixelMap *imageArray[3];
int imageCenterArray[3];
@ -275,7 +275,7 @@ void setMouseImage(gPixelMap &img, int16 x, int16 y) {
//-----------------------------------------------------------------------
// Dispose of old text
inline void disposeText(void) {
inline void disposeText() {
mouseText[0] = '\0';
// Free the memory previously allocated to hold the text image
@ -414,7 +414,7 @@ void setMouseGauge(int numerator, int denominator) {
//-----------------------------------------------------------------------
// Turn off the gauge on the mouse pointer
void clearMouseGauge(void) {
void clearMouseGauge() {
showGauge = false;
setupMousePointer();

View File

@ -63,7 +63,7 @@ void setMouseText(char *text);
void setMouseGauge(int numerator, int denominator);
// Turn off the gauge on the mouse pointer
void clearMouseGauge(void);
void clearMouseGauge();
void initCursors();
void freeCursors();

View File

@ -78,7 +78,7 @@ inline Rect16 butBox(int n, int i) {
Main message box code
* ===================================================================== */
bool userDialogAvailable(void);
bool userDialogAvailable();
int16 userDialog(const char *title, const char *msg, const char *btnMsg1, const char *btnMsg2, const char *btnMsg3);
// ------------------------------------------------------------------------
@ -163,7 +163,7 @@ ErrorWindow::ErrorWindow(const char *msg, const char *btnMsg1, const char *btnMs
}
int16 ErrorWindow::getResult(void) {
int16 ErrorWindow::getResult() {
open();
draw();
EventLoop(rInfo.running, true);
@ -223,18 +223,18 @@ SimpleWindow::SimpleWindow(const Rect16 &r,
title = stitle;
}
SimpleWindow::~SimpleWindow(void) {
SimpleWindow::~SimpleWindow() {
GameMode::SetStack(prevModeStackPtr, prevModeStackCtr);
}
bool SimpleWindow::isModal(void) {
bool SimpleWindow::isModal() {
return true;
}
void SimpleWindow::update(const Rect16 &) {
}
void SimpleWindow::draw(void) {
void SimpleWindow::draw() {
g_vm->_pointer->hide(g_vm->_mainPort, _extent); // hide mouse pointer
drawClipped(g_vm->_mainPort, Point16(0, 0), _extent);
g_vm->_pointer->show(g_vm->_mainPort, _extent); // show mouse pointer
@ -351,7 +351,7 @@ SimpleButton::SimpleButton(gWindow &win, const Rect16 &box, const char *title_,
window = &win;
}
void SimpleButton::deactivate(void) {
void SimpleButton::deactivate() {
selected = 0;
draw();
gPanel::deactivate();
@ -392,7 +392,7 @@ void SimpleButton::pointerDrag(gPanelMessage &msg) {
}
}
void SimpleButton::draw(void) {
void SimpleButton::draw() {
gDisplayPort &port = window->windowPort;
Rect16 rect = window->getExtent();

View File

@ -33,9 +33,9 @@ namespace Saga2 {
struct textPallete;
void ModalModeSetup(void);
void ModalModeCleanup(void);
void ModalModeHandleTask(void);
void ModalModeSetup();
void ModalModeCleanup();
void ModalModeHandleTask();
void ModalModeHandleKey(short, short);
//Modal Mode GameMode Object
@ -59,9 +59,9 @@ public:
AppFunc *cmd);
~SimpleWindow();
bool isModal(void);
bool isModal();
void update(const Rect16 &);
void draw(void); // redraw the panel.
void draw(); // redraw the panel.
void drawClipped(gPort &port, const Point16 &offset, const Rect16 &r);
static void DrawOutlineFrame(gPort &port, const Rect16 &r, int16 fillColor);
static void writeWrappedPlaqText(gPort &port,
@ -79,12 +79,12 @@ class SimpleButton : public gControl {
public:
SimpleButton(gWindow &, const Rect16 &, const char *, uint16, AppFunc *cmd = NULL);
void draw(void); // redraw the panel.
void draw(); // redraw the panel.
void drawClipped(gPort &port, const Point16 &offset, const Rect16 &r);
private:
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
bool pointerHit(gPanelMessage &msg);
void pointerDrag(gPanelMessage &msg);
void pointerRelease(gPanelMessage &msg);
@ -99,11 +99,11 @@ public:
static requestInfo rInfo;
ErrorWindow(const char *msg, const char *btnMsg1, const char *btnMsg2);
~ErrorWindow();
int16 getResult(void);
int16 getResult();
static APPFUNC(cmdMessageWindow);
static void ErrorModeSetup(void) {}
static void ErrorModeCleanup(void) {}
static void ErrorModeHandleTask(void) {}
static void ErrorModeSetup() {}
static void ErrorModeCleanup() {}
static void ErrorModeHandleTask() {}
static void ErrorModeHandleKey(short key, short);
};

View File

@ -180,7 +180,7 @@ struct GameObjectArchive {
//-----------------------------------------------------------------------
// Default constructor
GameObject::GameObject(void) {
GameObject::GameObject() {
prototype = nullptr;
_data.projectDummy = 0;
_data.location = Nowhere;
@ -285,7 +285,7 @@ void GameObject::read(Common::InSaveFile *in, bool expandProto) {
// Return the number of bytes need to archive this object in an archive
// buffer.
int32 GameObject::archiveSize(void) {
int32 GameObject::archiveSize() {
return sizeof(GameObjectArchive);
}
@ -446,13 +446,13 @@ Common::Array<ObjectID> GameObject::nameToID(Common::String name) {
}
uint16 GameObject::containmentSet(void) {
uint16 GameObject::containmentSet() {
return prototype->containmentSet();
}
// Calculates the ID of an object, given it's (implicit) address
ObjectID GameObject::thisID(void) { // calculate our own id
ObjectID GameObject::thisID() { // calculate our own id
return _index;
}
@ -479,7 +479,7 @@ ObjectID *GameObject::getHeadPtr(ObjectID parentID, TilePoint &l) {
// Removes an object from it's chain.
void GameObject::remove(void) { // removes from old list
void GameObject::remove() { // removes from old list
ObjectID id = thisID(),
*headPtr;
@ -547,7 +547,7 @@ void GameObject::insert(ObjectID newPrev) {
// Returns the identity of the actor possessing the object
ObjectID GameObject::possessor(void) {
ObjectID GameObject::possessor() {
GameObject *obj;
ObjectID id = _data.parentID;
@ -584,11 +584,11 @@ bool GameObject::getWorldLocation(Location &loc) {
}
}
Location GameObject::notGetLocation(void) {
Location GameObject::notGetLocation() {
return Location(getLocation(), IDParent());
}
Location GameObject::notGetWorldLocation(void) {
Location GameObject::notGetWorldLocation() {
GameObject *obj = this;
ObjectID id;
uint8 objHeight = prototype->height;
@ -697,7 +697,7 @@ void GameObject::objCursorText(char nameBuf[], const int8 size, int16 count) {
}
}
bool GameObject::isTrueSkill(void) {
bool GameObject::isTrueSkill() {
// figure out if it's a skill or spell
if (prototype->containmentSet() & (ProtoObj::isSkill | ProtoObj::isSpell)) {
// get skill proto for this spell or skill
@ -713,7 +713,7 @@ bool GameObject::isTrueSkill(void) {
}
// Returns the _data.location of an object within the world
TilePoint GameObject::getWorldLocation(void) {
TilePoint GameObject::getWorldLocation() {
GameObject *obj = this;
ObjectID id;
uint8 objHeight = prototype->height;
@ -732,7 +732,7 @@ TilePoint GameObject::getWorldLocation(void) {
}
// Return a pointer to the world on which this object resides
GameWorld *GameObject::world(void) {
GameWorld *GameObject::world() {
if (isWorld(this)) return (GameWorld *)this;
GameObject *obj = this;
@ -785,7 +785,7 @@ int32 GameObject::getSprOffset(int16 num) {
}
// Remove an object from a stack of objects
bool GameObject::unstack(void) {
bool GameObject::unstack() {
GameObject *item = nullptr,
*base = nullptr,
*zero = nullptr;
@ -916,14 +916,14 @@ void GameObject::move(const Location &location, int16 num) {
}
int16 GameObject::getChargeType(void) {
int16 GameObject::getChargeType() {
assert(prototype);
return prototype->getChargeType();
}
// this function recharges an object
void GameObject::recharge(void) {
void GameObject::recharge() {
// if this object has a charge type
// other then none, then reset
// it's charges to maximum
@ -1243,7 +1243,7 @@ ObjectID GameObject::makeAlias(const Location &l) {
// Creates a new object (if one is available), and
// return it's address
GameObject *GameObject::newObject(void) { // get a newly created object
GameObject *GameObject::newObject() { // get a newly created object
GameObject *limbo = objectAddress(ObjectLimbo),
*obj = nullptr;
@ -1287,7 +1287,7 @@ GameObject *GameObject::newObject(void) { // get a newly created object
// Deletes an object by adding it to either the actor limbo list
// or the object limbo list.
void GameObject::deleteObject(void) {
void GameObject::deleteObject() {
ObjectID dObj = thisID();
scriptCallFrame scf;
ContainerNode *cn;
@ -1351,7 +1351,7 @@ void GameObject::deleteObject(void) {
// Delete this object and every object it contains
void GameObject::deleteObjectRecursive(void) {
void GameObject::deleteObjectRecursive() {
// If this is an important object let's not delete it but try to drop
// it on the ground instead.
if (isImportant()) {
@ -1407,7 +1407,7 @@ void GameObject::deleteObjectRecursive(void) {
//-----------------------------------------------------------------------
// Activate this object
void GameObject::activate(void) {
void GameObject::activate() {
if (_data.objectFlags & objectActivated)
return;
@ -1436,7 +1436,7 @@ void GameObject::activate(void) {
//-----------------------------------------------------------------------
// Deactivate this object
void GameObject::deactivate(void) {
void GameObject::deactivate() {
if (!(_data.objectFlags & objectActivated))
return;
@ -1497,7 +1497,7 @@ bool GameObject::isContaining(ObjectTarget *objTarget) {
const int32 harmfulTerrain = terrainHot | terrainCold | terrainIce | terrainSlash | terrainBash;
void GameObject::updateState(void) {
void GameObject::updateState() {
int16 tHeight;
static TilePoint nullVelocity(0, 0, 0);
StandingTileInfo sti;
@ -1915,7 +1915,7 @@ void GameObject::removeTimer(TimerID id) {
//-----------------------------------------------------------------------
// Remove all timer's from this objects's timer list
void GameObject::removeAllTimers(void) {
void GameObject::removeAllTimers() {
TimerList *timerList;
// Get this object's timer list
@ -2103,7 +2103,7 @@ void GameObject::removeSensor(SensorID id) {
//-----------------------------------------------------------------------
// Remove all sensors from this object's sensor list
void GameObject::removeAllSensors(void) {
void GameObject::removeAllSensors() {
SensorList *sensorList;
// Get this object's sensor list
@ -2202,7 +2202,7 @@ bool GameObject::canSenseObjectProperty(
//-------------------------------------------------------------------
// Given an object, returns the prototype number
int32 GameObject::getProtoNum(void) {
int32 GameObject::getProtoNum() {
for (uint i = 0; i < g_vm->_actorProtos.size(); ++i) {
if (prototype == g_vm->_actorProtos[i])
return i;
@ -2247,7 +2247,7 @@ void GameObject::setProtoNum(int32 nProto) {
//-------------------------------------------------------------------
// Evaluate the effects of enchantments upon an object
void GameObject::evalEnchantments(void) {
void GameObject::evalEnchantments() {
if (isActor(this)) {
evalActorEnchantments((Actor *)this);
} else if (isObject(this)) {
@ -2352,7 +2352,7 @@ bool GameObject::stack(ObjectID enactor, ObjectID objToStackID) {
//-------------------------------------------------------------------
// Return the total mass of all objects contained within this object
uint16 GameObject::totalContainedMass(void) {
uint16 GameObject::totalContainedMass() {
uint16 total = 0;
GameObject *childObj;
ContainerIterator iter(this);
@ -2378,7 +2378,7 @@ uint16 GameObject::totalContainedMass(void) {
//-------------------------------------------------------------------
// Return the total bulk of all objects contained within this object
uint16 GameObject::totalContainedBulk(void) {
uint16 GameObject::totalContainedBulk() {
uint16 total = 0;
GameObject *childObj;
ContainerIterator iter(this);
@ -2467,7 +2467,7 @@ GameWorld::~GameWorld() {
//-------------------------------------------------------------------
// Return the number of bytes need to make an archive of this world
int32 GameWorld::archiveSize(void) {
int32 GameWorld::archiveSize() {
int32 bytes = 0;
bytes += sizeof(size.u)
@ -2480,7 +2480,7 @@ int32 GameWorld::archiveSize(void) {
//-------------------------------------------------------------------
// Cleanup
void GameWorld::cleanup(void) {
void GameWorld::cleanup() {
if (sectorArray != nullptr) {
delete[] sectorArray;
sectorArray = nullptr;
@ -2496,7 +2496,7 @@ extern int enchantmentProto;
//-------------------------------------------------------------------
// Load and construct object and actor prototype arrays
void initPrototypes(void) {
void initPrototypes() {
const int resourceObjProtoSize = 52;
const int resourceActProtoSize = 86;
uint count = 0;
@ -2696,7 +2696,7 @@ void initPrototypes(void) {
//-------------------------------------------------------------------
// Cleanup the prototype lists
void cleanupPrototypes(void) {
void cleanupPrototypes() {
for (uint i = 0; i < nameListCount; ++i) {
if (g_vm->_nameList[i])
delete[] g_vm->_nameList[i];
@ -2722,7 +2722,7 @@ void cleanupPrototypes(void) {
//-------------------------------------------------------------------
// Load the sound effects table
void initObjectSoundFXTable(void) {
void initObjectSoundFXTable() {
hResContext *itemRes;
itemRes = auxResFile->newContext(
@ -2746,7 +2746,7 @@ void initObjectSoundFXTable(void) {
//-------------------------------------------------------------------
// Cleanup the sound effects table
void cleanupObjectSoundFXTable(void) {
void cleanupObjectSoundFXTable() {
if (objectSoundFXTable != nullptr) {
free(objectSoundFXTable);
objectSoundFXTable = nullptr;
@ -2756,7 +2756,7 @@ void cleanupObjectSoundFXTable(void) {
//-------------------------------------------------------------------
// Allocate array to hold the counts of the temp actors
void initTempActorCount(void) {
void initTempActorCount() {
uint16 i;
// Allocate and initialize the temp actor count array
@ -2788,7 +2788,7 @@ void loadTempActorCount(Common::InSaveFile *in, int32 chunkSize) {
//-------------------------------------------------------------------
// Cleanup the array to temp actor counts
void cleanupTempActorCount(void) {
void cleanupTempActorCount() {
if (tempActorCount != nullptr) {
delete[] tempActorCount;
tempActorCount = nullptr;
@ -2819,7 +2819,7 @@ uint16 getTempActorCount(uint16 protoNum) {
//-------------------------------------------------------------------
// Initialize the worlds
void initWorlds(void) {
void initWorlds() {
int i;
// worldCount must be set by the map data initialization
@ -2899,7 +2899,7 @@ void loadWorlds(Common::InSaveFile *in) {
//-------------------------------------------------------------------
// Cleanup the GameWorld list
void cleanupWorlds(void) {
void cleanupWorlds() {
for (int i = 0; i < worldCount; i++) {
GameWorld *gw = &worldList[i];
@ -2928,7 +2928,7 @@ ResourceGameObject::ResourceGameObject(Common::SeekableReadStream *stream) {
misc = stream->readUint16LE();
}
void initObjects(void) {
void initObjects() {
int16 i, resourceObjectCount;
Common::Array<ResourceGameObject> resourceObjectList;
Common::SeekableReadStream *stream;
@ -3080,7 +3080,7 @@ void loadObjects(Common::InSaveFile *in) {
//-------------------------------------------------------------------
// Cleanup object list
void cleanupObjects(void) {
void cleanupObjects() {
if (objectList != nullptr)
delete[] objectList;
g_vm->_mainDisplayList->reset();
@ -3108,7 +3108,7 @@ void getViewTrackPos(TilePoint &tp) {
//-------------------------------------------------------------------
// Return a pointer to the currently viewed object
GameObject *getViewCenterObject(void) {
GameObject *getViewCenterObject() {
return viewCenterObject != Nothing
? GameObject::objectAddress(viewCenterObject)
: nullptr;
@ -3121,7 +3121,7 @@ GameObject *getViewCenterObject(void) {
//-------------------------------------------------------------------
// Activate all actors in sector if sector is not alreay active
void Sector::activate(void) {
void Sector::activate() {
if (activationCount++ == 0) {
ObjectID id = childID;
@ -3139,7 +3139,7 @@ void Sector::activate(void) {
// Decrement the activation count of the sector and deactivate all
// actors in sector if activation count has reached zero.
void Sector::deactivate(void) {
void Sector::deactivate() {
assert(activationCount != 0);
activationCount--;
@ -3189,7 +3189,7 @@ void ActiveRegion::write(Common::MemoryWriteStreamDynamic *out) {
region.min.u, region.min.v, region.min.z, region.max.u, region.max.v, region.max.z);
}
void ActiveRegion::update(void) {
void ActiveRegion::update() {
GameObject *obj = GameObject::objectAddress(anchor);
GameWorld *world = (GameWorld *)GameObject::objectAddress(worldID);
ObjectID objWorldID = obj->world()->thisID();
@ -3297,7 +3297,7 @@ void ActiveRegion::update(void) {
//-------------------------------------------------------------------
// Iterate through the active regions, updating each
void updateActiveRegions(void) {
void updateActiveRegions() {
int16 i;
for (i = 0; i < kPlayerActors; i++)
@ -3314,7 +3314,7 @@ ActiveRegion *getActiveRegion(PlayerActorID id) {
//-------------------------------------------------------------------
// Initialize the state of the active regions
void initActiveRegions(void) {
void initActiveRegions() {
static PlayerActorID playerIDArray[kPlayerActors] =
{ FTA_JULIAN, FTA_PHILIP, FTA_KEVIN };
@ -3793,17 +3793,17 @@ ObjectID TriangularObjectIterator::next(GameObject **obj) {
//------------------------------------------------------------------------
GameWorld *CenterRegionObjectIterator::CenterWorld(void) {
GameWorld *CenterRegionObjectIterator::CenterWorld() {
ActiveRegion *ar = getActiveRegion(getCenterActorPlayerID());
return ar->getWorld();
}
TilePoint CenterRegionObjectIterator::MinCenterRegion(void) {
TilePoint CenterRegionObjectIterator::MinCenterRegion() {
ActiveRegion *ar = getActiveRegion(getCenterActorPlayerID());
return ar->getRegion().min;
}
TilePoint CenterRegionObjectIterator::MaxCenterRegion(void) {
TilePoint CenterRegionObjectIterator::MaxCenterRegion() {
ActiveRegion *ar = getActiveRegion(getCenterActorPlayerID());
return ar->getRegion().max;
}
@ -3815,7 +3815,7 @@ TilePoint CenterRegionObjectIterator::MaxCenterRegion(void) {
//------------------------------------------------------------------------
bool ActiveRegionObjectIterator::firstActiveRegion(void) {
bool ActiveRegionObjectIterator::firstActiveRegion() {
activeRegionIndex = -1;
return nextActiveRegion();
@ -3823,7 +3823,7 @@ bool ActiveRegionObjectIterator::firstActiveRegion(void) {
//------------------------------------------------------------------------
bool ActiveRegionObjectIterator::nextActiveRegion(void) {
bool ActiveRegionObjectIterator::nextActiveRegion() {
int16 currentRegionSectors;
ActiveRegion *currentRegion;
TilePoint currentRegionSize;
@ -3920,7 +3920,7 @@ bool ActiveRegionObjectIterator::nextActiveRegion(void) {
//------------------------------------------------------------------------
bool ActiveRegionObjectIterator::firstSector(void) {
bool ActiveRegionObjectIterator::firstSector() {
if (!firstActiveRegion())
return false;
@ -3937,7 +3937,7 @@ bool ActiveRegionObjectIterator::firstSector(void) {
//------------------------------------------------------------------------
bool ActiveRegionObjectIterator::nextSector(void) {
bool ActiveRegionObjectIterator::nextSector() {
int16 u, v;
do {
@ -4070,7 +4070,7 @@ ObjectID ContainerIterator::next(GameObject **obj) {
// This class iterates through every object within a container
RecursiveContainerIterator::~RecursiveContainerIterator(void) {
RecursiveContainerIterator::~RecursiveContainerIterator() {
if (subIter != nullptr) delete subIter;
}
@ -4387,7 +4387,7 @@ APPFUNC(cmdBrain) {
}
// Move to playerActor structure!!!
void readyContainerSetup(void) {
void readyContainerSetup() {
int8 i;
int8 resStart = 28;
@ -4452,7 +4452,7 @@ void readyContainerSetup(void) {
//new gGenericControl(*indivControls,Rect16(488,265,40,40),0,cmdBrain);
}
void cleanupReadyContainers(void) {
void cleanupReadyContainers() {
if (backImages) {
// unload the images in the array and the array itself and nulls
// the appropriate pointers
@ -4485,7 +4485,7 @@ void cleanupReadyContainers(void) {
#endif
void objectTest(void) {
void objectTest() {
}
APPFUNC(cmdControl) {
@ -4530,7 +4530,7 @@ bool backgroundSimulationPaused;
// Main background simulation function
// This function does background processing on a few actors, objects
void doBackgroundSimulation(void) {
void doBackgroundSimulation() {
if (backgroundSimulationPaused) return;
// Debug code to verify the validity of the limbo counts
@ -4620,13 +4620,13 @@ void doBackgroundSimulation(void) {
// ------------------------------------------------------------------------
void pauseBackgroundSimulation(void) {
void pauseBackgroundSimulation() {
backgroundSimulationPaused = true;
}
// ------------------------------------------------------------------------
void resumeBackgroundSimulation(void) {
void resumeBackgroundSimulation() {
backgroundSimulationPaused = false;
}
@ -4634,7 +4634,7 @@ void resumeBackgroundSimulation(void) {
// This function simply calls the GameObject::updateState() method
// for all active objects directly within a world.
void updateObjectStates(void) {
void updateObjectStates() {
if (objectStatesPaused) return;
GameObject *obj,
@ -4654,13 +4654,13 @@ void updateObjectStates(void) {
//-------------------------------------------------------------------
void pauseObjectStates(void) {
void pauseObjectStates() {
objectStatesPaused = true;
}
//-------------------------------------------------------------------
void resumeObjectStates(void) {
void resumeObjectStates() {
objectStatesPaused = false;
}

View File

@ -112,22 +112,22 @@ struct ObjectData {
#include "common/pack-end.h"
void initActors(void);
void initActors();
void saveActors(Common::OutSaveFile *outS);
void loadActors(Common::InSaveFile *in);
void cleanupActors(void);
void cleanupActors();
class GameObject {
friend void initWorlds(void);
friend void cleanupWorlds(void);
friend void initWorlds();
friend void cleanupWorlds();
friend void initObjects(void);
friend void initObjects();
friend void saveObjects(Common::OutSaveFile *out);
friend void loadObjects(Common::InSaveFile *in);
friend void cleanupObjects(void);
friend void cleanupObjects();
friend void buildDisplayList(void);
friend void drawDisplayList(void);
friend void buildDisplayList();
friend void drawDisplayList();
friend void setMindContainer(int NewContainerClass, IntangibleContainerWindow &cw);
friend class EnchantmentContainerWindow;
friend bool Enchantment(ObjectID, ObjectID);
@ -157,7 +157,7 @@ private:
public:
ObjectID thisID(void); // calculate our own ID value
ObjectID thisID(); // calculate our own ID value
static const char *nameText(uint16 index);
@ -166,7 +166,7 @@ protected:
static ObjectID *getHeadPtr(ObjectID parentID, TilePoint &l);
// Object list management functions
void remove(void); // removes from old list
void remove(); // removes from old list
void append(ObjectID newParent); // adds to new list (no remove)
void insert(ObjectID newPrev); // inserts after this item (no remove)
@ -176,7 +176,7 @@ public:
uint _index;
bool _godmode;
// Default constructor
GameObject(void);
GameObject();
// Constructor -- initial construction
GameObject(const ResourceGameObject &res);
@ -187,7 +187,7 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out, bool expandProto);
@ -205,39 +205,39 @@ public:
static Common::Array<ObjectID> nameToID(Common::String name);
// object creation and deletion
static GameObject *newObject(void); // get a newly created object
void deleteObject(void); // delete this object and remove
void deleteObjectRecursive(void); // delete this object and every
static GameObject *newObject(); // get a newly created object
void deleteObject(); // delete this object and remove
void deleteObjectRecursive(); // delete this object and every
// object it contains
// Return pointer to parent/child/next sibling object, if any
GameObject *parent(void) {
GameObject *parent() {
return _data.parentID == Nothing ? NULL : objectAddress(_data.parentID);
}
GameObject *next(void) {
GameObject *next() {
return _data.siblingID == Nothing ? NULL : objectAddress(_data.siblingID);
}
GameObject *child(void) {
GameObject *child() {
return _data.childID == Nothing ? NULL : objectAddress(_data.childID);
}
// Return ID of parent/child/next sibling object, if any
ObjectID IDParent(void) {
ObjectID IDParent() {
return _data.parentID ;
}
ObjectID IDNext(void) {
ObjectID IDNext() {
return _data.siblingID;
}
ObjectID IDChild(void) {
ObjectID IDChild() {
return _data.childID ;
}
// Return a pointer to the world on which this object resides
GameWorld *world(void);
GameWorld *world();
// Return the number of the map of the world on which this object
// resides
int16 getMapNum(void);
int16 getMapNum();
// graphics functions
int16 sprNum(int16 state); // returns current sprite number
@ -246,11 +246,11 @@ public:
int32 getSprOffset(int16 num = -1);
// completely restore the magical energy of a magical object
void recharge(void);
void recharge();
// returns the type of charge an object has
// be it none, red, violet, etc...
int16 getChargeType(void);
int16 getChargeType();
// use charge of this object
bool deductCharge(ActorManaID manaID, uint16 manaCost);
@ -268,7 +268,7 @@ public:
// (assumes setLocation has been called)
// Remove an object from a stack of objects. Returns true if it was in a stack.
bool unstack(void);
bool unstack();
// this correctly moves merged or stacked objects
bool moveMerged(const Location &loc);
@ -292,10 +292,10 @@ public:
void move(int16 slot); // move to new slot in container
// Activate the object
void activate(void);
void activate();
// Deactivate this object
void deactivate(void);
void deactivate();
// Determine if this object is an alias for another object
bool isAlias() {
@ -446,22 +446,22 @@ public:
}
// query functions:
ObjectID possessor(void); // return actor posessing this object
ObjectID possessor(); // return actor posessing this object
// Access functions
ProtoObj *proto(void) {
ProtoObj *proto() {
return prototype;
}
TilePoint getLocation(void) const {
TilePoint getLocation() const {
return _data.location;
}
TilePoint getWorldLocation(void);
TilePoint getWorldLocation();
bool getWorldLocation(Location &loc);
Location notGetLocation(void);
Location notGetWorldLocation(void);
Location notGetLocation();
Location notGetWorldLocation();
// Return the name of this object (proper noun if it has one)
const char *objName(void) {
const char *objName() {
if (_data.nameIndex > 0)
return nameText((int16)_data.nameIndex);
else if (prototype)
@ -474,10 +474,10 @@ public:
void objCursorText(char nameBuf[], const int8 size, int16 count = -1);
// find out if this is a trueskill
bool isTrueSkill(void);
bool isTrueSkill();
// Access functions for name index
uint16 getNameIndex(void) {
uint16 getNameIndex() {
return _data.nameIndex;
}
void setNameIndex(uint16 n) {
@ -485,36 +485,36 @@ public:
}
// Return the name of this type of object
const char *protoName(void) {
const char *protoName() {
return nameText(prototype->nameIndex);
}
// Update the state of this object. This function is called every
// frame for every active object.
void updateState(void);
void updateState();
// Flag test functions
bool isOpen(void) {
bool isOpen() {
return (int16)(_data.objectFlags & objectOpen);
}
bool isLocked(void) {
bool isLocked() {
return (int16)(_data.objectFlags & objectLocked);
}
bool isImportant(void) {
bool isImportant() {
return (int16)(_data.objectFlags & objectImportant);
}
bool isGhosted(void) {
bool isGhosted() {
return (_data.objectFlags & objectGhosted)
|| (prototype->flags & ResourceObjectPrototype::objPropGhosted);
}
bool isInvisible(void) {
bool isInvisible() {
return (_data.objectFlags & objectInvisible)
|| (prototype->flags & ResourceObjectPrototype::objPropHidden);
}
bool isMoving(void) {
bool isMoving() {
return (int16)(_data.objectFlags & objectMoving);
}
bool isActivated(void) {
bool isActivated() {
return (int16)(_data.objectFlags & objectActivated);
}
@ -524,7 +524,7 @@ public:
else
_data.objectFlags &= ~objectScavengable;
}
bool isScavengable(void) {
bool isScavengable() {
return (_data.objectFlags & objectScavengable) != 0;
}
@ -534,7 +534,7 @@ public:
else
_data.objectFlags &= ~objectObscured;
}
bool isObscured(void) {
bool isObscured() {
return (_data.objectFlags & objectObscured) != 0;
}
@ -544,7 +544,7 @@ public:
else
_data.objectFlags &= ~objectTriggeringTAG;
}
bool isTriggeringTAG(void) {
bool isTriggeringTAG() {
return (_data.objectFlags & objectTriggeringTAG) != 0;
}
@ -554,7 +554,7 @@ public:
else
_data.objectFlags &= ~objectOnScreen;
}
bool isOnScreen(void) {
bool isOnScreen() {
return (_data.objectFlags & objectOnScreen) != 0;
}
@ -564,22 +564,22 @@ public:
else
_data.objectFlags &= ~objectSightedByCenter;
}
bool isSightedByCenter(void) {
bool isSightedByCenter() {
return (_data.objectFlags & objectSightedByCenter) != 0;
}
bool isMissile(void) {
bool isMissile() {
return prototype->isMissile();
}
// image data
Sprite *getIconSprite(void); // sprite when in inventory + cursor
Sprite *getGroundSprite(void); // sprite when on ground
Sprite *getIconSprite(); // sprite when in inventory + cursor
Sprite *getGroundSprite(); // sprite when on ground
// world interaction type flags
uint16 containmentSet(void);
uint16 containmentSet();
uint16 scriptClass(void) {
uint16 scriptClass() {
if (_data.script)
return _data.script;
if (prototype)
@ -590,7 +590,7 @@ public:
// General access functions
// Script access functions
uint16 getScript(void) {
uint16 getScript() {
return _data.script;
}
void setScript(uint16 scr) {
@ -605,7 +605,7 @@ public:
}
// Access functions for hit points
uint8 getHitPoints(void) {
uint8 getHitPoints() {
return _data.hitPoints;
}
void setHitPoints(uint8 hp) {
@ -619,11 +619,11 @@ public:
}
// Functions to get and set prototype (used by scripts)
int32 getProtoNum(void);
int32 getProtoNum();
void setProtoNum(int32 nProto);
// Acess functions for extra data
uint16 getExtra(void) {
uint16 getExtra() {
return _data.massCount;
}
void setExtra(uint16 x) {
@ -631,9 +631,9 @@ public:
}
// Function to evaluate the effects of all enchantments
void evalEnchantments(void);
void evalEnchantments();
bool makeSavingThrow(void) {
bool makeSavingThrow() {
return prototype->makeSavingThrow();
}
@ -641,11 +641,11 @@ public:
bool inRange(const TilePoint &tp, uint16 range);
// Generic function to test if object can be picked up
bool isCarryable(void) {
bool isCarryable() {
return prototype->mass <= 200 && prototype->bulk <= 200;
}
bool isMergeable(void) {
bool isMergeable() {
return (prototype->flags & ResourceObjectPrototype::objPropMergeable) != 0;
}
@ -666,7 +666,7 @@ public:
bool addTimer(TimerID id);
bool addTimer(TimerID id, int16 frameInterval);
void removeTimer(TimerID id);
void removeAllTimers(void);
void removeAllTimers();
// Sensor related member functions
private:
@ -685,7 +685,7 @@ public:
ObjectPropertyID prop);
bool addEventSensor(SensorID id, int16 range, int16 eventType);
void removeSensor(SensorID id);
void removeAllSensors(void);
void removeAllSensors();
bool canSenseProtaganist(SenseInfo &info, int16 range);
bool canSenseSpecificActor(SenseInfo &info, int16 range, Actor *a);
@ -712,21 +712,21 @@ public:
return prototype->canFitMasswise(this, obj);
}
uint16 totalContainedMass(void);
uint16 totalContainedBulk(void);
uint16 totalContainedMass();
uint16 totalContainedBulk();
uint16 totalMass(void) {
uint16 totalMass() {
return prototype->mass * (isMergeable() ? getExtra() : 1)
+ totalContainedMass();
}
uint16 totalBulk(void) {
uint16 totalBulk() {
return prototype->bulk * (isMergeable() ? getExtra() : 1);
}
uint16 massCapacity(void) {
uint16 massCapacity() {
return prototype->massCapacity(this);
}
uint16 bulkCapacity(void) {
uint16 bulkCapacity() {
return prototype->bulkCapacity(this);
}
};
@ -740,17 +740,17 @@ public:
uint16 activationCount;
ObjectID childID;
Sector(void) :
Sector() :
activationCount(0),
childID(Nothing) {
}
bool isActivated(void) {
bool isActivated() {
return activationCount != 0;
}
void activate(void);
void deactivate(void);
void activate();
void deactivate();
void write(Common::MemoryWriteStreamDynamic *out);
void read(Common::InSaveFile *in);
@ -768,9 +768,9 @@ public:
class GameWorld : public GameObject {
friend void initWorlds(void);
friend void cleanupWorlds(void);
friend void buildDisplayList(void);
friend void initWorlds();
friend void cleanupWorlds();
friend void buildDisplayList();
friend class ProtoObj;
friend class GameObject;
@ -783,7 +783,7 @@ public:
int16 mapNum; // map number for this world.
// Default constructor
GameWorld(void) : sectorArraySize(0), sectorArray(nullptr), mapNum(0) {}
GameWorld() : sectorArraySize(0), sectorArray(nullptr), mapNum(0) {}
// Initial constructor
GameWorld(int16 map);
@ -792,9 +792,9 @@ public:
~GameWorld();
int32 archiveSize(void);
int32 archiveSize();
void cleanup(void);
void cleanup();
Sector *getSector(int16 u, int16 v) {
if (u == -1 && v == -1)
@ -809,7 +809,7 @@ public:
return &(sectorArray)[v * sectorArraySize + u];
}
TilePoint sectorSize(void) { // size of map in sectors
TilePoint sectorSize() { // size of map in sectors
return TilePoint(sectorArraySize, sectorArraySize, 0);
}
@ -830,7 +830,7 @@ extern GameWorld *currentWorld;
//------------------------------------------------------------------------
// Return the number of the map of the world on which this object resides.
inline int16 GameObject::getMapNum(void) {
inline int16 GameObject::getMapNum() {
if (world())
return world()->mapNum;
else if (_data.siblingID) {
@ -857,8 +857,8 @@ inline int16 GameObject::getMapNum(void) {
class ActiveRegion {
friend void initActiveRegions(void);
friend void cleanupActiveRegions(void);
friend void initActiveRegions();
friend void cleanupActiveRegions();
friend class ActiveRegionObjectIterator;
@ -874,13 +874,13 @@ public:
};
ActiveRegion() : anchor(0), worldID(0) {}
void update(void);
void update();
void read(Common::InSaveFile *in);
void write(Common::MemoryWriteStreamDynamic *out);
// Return the current region in tile point coords
TileRegion getRegion(void) {
TileRegion getRegion() {
TileRegion tReg;
tReg.min.u = region.min.u << kSectorShift;
@ -893,20 +893,20 @@ public:
}
// Return the region world
GameWorld *getWorld(void) {
GameWorld *getWorld() {
return (GameWorld *)GameObject::objectAddress(worldID);
}
};
void updateActiveRegions(void);
void updateActiveRegions();
// Return a pointer to an active region given its PlayerActor's ID
ActiveRegion *getActiveRegion(PlayerActorID id);
void initActiveRegions(void);
void initActiveRegions();
void saveActiveRegions(Common::OutSaveFile *outS);
void loadActiveRegions(Common::InSaveFile *in);
inline void cleanupActiveRegions(void) {}
inline void cleanupActiveRegions() {}
/* ======================================================================= *
ObjectIterator Class
@ -918,7 +918,7 @@ inline void cleanupActiveRegions(void) {}
class ObjectIterator {
public:
// Virtual destructor
virtual ~ObjectIterator(void) {}
virtual ~ObjectIterator() {}
// Iteration functions
virtual ObjectID first(GameObject **obj) = 0;
@ -957,7 +957,7 @@ public:
}
protected:
GameWorld *getSearchWorld(void) {
GameWorld *getSearchWorld() {
return searchWorld;
}
@ -994,7 +994,7 @@ private:
protected:
// Simply return the center coordinates
TilePoint getCenter(void) {
TilePoint getCenter() {
return center;
}
@ -1204,13 +1204,13 @@ public:
class CenterRegionObjectIterator : public RegionalObjectIterator {
static GameWorld *CenterWorld(void);
static TilePoint MinCenterRegion(void);
static TilePoint MaxCenterRegion(void);
static GameWorld *CenterWorld();
static TilePoint MinCenterRegion();
static TilePoint MaxCenterRegion();
public:
// Constructor
CenterRegionObjectIterator(void) :
CenterRegionObjectIterator() :
RegionalObjectIterator(CenterWorld(),
MinCenterRegion(),
MaxCenterRegion()) {}
@ -1231,14 +1231,14 @@ class ActiveRegionObjectIterator : public ObjectIterator {
GameWorld *currentWorld;
GameObject *_currentObject;
bool firstActiveRegion(void);
bool nextActiveRegion(void);
bool firstSector(void);
bool nextSector(void);
bool firstActiveRegion();
bool nextActiveRegion();
bool firstSector();
bool nextSector();
public:
// Constructor
ActiveRegionObjectIterator(void) : activeRegionIndex(-1), sectorBitMask(0), currentWorld(nullptr), _currentObject(nullptr) {}
ActiveRegionObjectIterator() : activeRegionIndex(-1), sectorBitMask(0), currentWorld(nullptr), _currentObject(nullptr) {}
// Iteration functions
ObjectID first(GameObject **obj);
@ -1282,7 +1282,7 @@ public:
id(container->IDChild()),
subIter(NULL) {
}
~RecursiveContainerIterator(void);
~RecursiveContainerIterator();
// Iteration functions
ObjectID first(GameObject **obj);
@ -1393,19 +1393,19 @@ void evalActorEnchantments(Actor *a);
void evalObjectEnchantments(GameObject *obj);
// Load prototypes from resource file
void initPrototypes(void);
void initPrototypes();
// Cleanup the prototype lists
void cleanupPrototypes(void);
void cleanupPrototypes();
// Load the sound effects table
void initObjectSoundFXTable(void);
void initObjectSoundFXTable();
// Cleanup the sound effects table
void cleanupObjectSoundFXTable(void);
void cleanupObjectSoundFXTable();
// Allocate array to hold the counts of the temp actors
void initTempActorCount(void);
void initTempActorCount();
// Save the array of temp actor counts
void saveTempActorCount(Common::OutSaveFile *outS);
@ -1414,7 +1414,7 @@ void saveTempActorCount(Common::OutSaveFile *outS);
void loadTempActorCount(Common::InSaveFile *in, int32 chunkSize);
// Cleanup the array to temp actor counts
void cleanupTempActorCount(void);
void cleanupTempActorCount();
// Increment the temporary actor count for the specified prototype
void incTempActorCount(uint16 protoNum);
@ -1426,7 +1426,7 @@ void decTempActorCount(uint16 protoNum);
uint16 getTempActorCount(uint16 protoNum);
// Init game worlds
void initWorlds(void);
void initWorlds();
// Save worlds to the save file
void saveWorlds(Common::OutSaveFile *outS);
@ -1435,10 +1435,10 @@ void saveWorlds(Common::OutSaveFile *outS);
void loadWorlds(Common::InSaveFile *in);
// Cleanup game worlds
void cleanupWorlds(void);
void cleanupWorlds();
// Initialize object list
void initObjects(void);
void initObjects();
// Save the objects to the save file
void saveObjects(Common::OutSaveFile *outS);
@ -1447,26 +1447,26 @@ void saveObjects(Common::OutSaveFile *outS);
void loadObjects(Common::InSaveFile *in);
// Cleanup object list
void cleanupObjects(void);
void cleanupObjects();
// Do background processing for objects
void doBackgroundSimulation(void);
void doBackgroundSimulation();
void pauseBackgroundSimulation(void);
void resumeBackgroundSimulation(void);
void pauseBackgroundSimulation();
void resumeBackgroundSimulation();
// cleanup the ready container stuff
void cleanupReadyContainers(void);
void cleanupReadyContainers();
// This function simply calls the GameObject::updateState() method
// for all active objects directly within a world.
void updateObjectStates(void);
void updateObjectStates();
void pauseObjectStates(void);
void resumeObjectStates(void);
void pauseObjectStates();
void resumeObjectStates();
void readyContainerSetup(void);
void cleanupReadyContainers(void);
void readyContainerSetup();
void cleanupReadyContainers();
} // end of namespace Saga2

View File

@ -62,7 +62,7 @@ extern bool massAndBulkCount;
Functions
* ===================================================================== */
ObjectID ProtoObj::placeObject(void) {
ObjectID ProtoObj::placeObject() {
return 2;
}
@ -86,7 +86,7 @@ bool ProtoObj::isTwoHanded(ObjectID) {
}
// Determine if this type of object is a missile
bool ProtoObj::isMissile(void) {
bool ProtoObj::isMissile() {
return false;
}
@ -785,7 +785,7 @@ void ProtoObj::getColorTranslation(ColorTable map) {
buildColorTable(map, colorMap, ARRAYSIZE(colorMap));
}
uint16 ProtoObj::containmentSet(void) {
uint16 ProtoObj::containmentSet() {
return 0; // the prototye object is not contained in anything
}
@ -904,13 +904,13 @@ GameObject *ProtoObj::getSpell(ObjectID) {
}
// Determine if this type of object can block an attack
bool ProtoObj::canBlock(void) {
bool ProtoObj::canBlock() {
return false;
}
// Return a mask of bits indicating the directions relative to the
// wielders facing in which this object can defend
uint8 ProtoObj::defenseDirMask(void) {
uint8 ProtoObj::defenseDirMask() {
return 0;
}
@ -1004,7 +1004,7 @@ uint16 ProtoObj::bulkCapacity(GameObject *) {
InventoryProto class
* ==================================================================== */
uint16 InventoryProto::containmentSet(void) {
uint16 InventoryProto::containmentSet() {
return isTangible;
}
@ -1201,7 +1201,7 @@ bool InventoryProto::acceptStrikeAction(
//
// };
uint16 PhysicalContainerProto::containmentSet(void) {
uint16 PhysicalContainerProto::containmentSet() {
return InventoryProto::containmentSet() | isContainer;
}
@ -1465,7 +1465,7 @@ bool KeyProto::useOnAction(ObjectID dObj, ObjectID enactor, ActiveItem *withTAI)
BottleProto class
* ==================================================================== */
uint16 BottleProto::containmentSet(void) {
uint16 BottleProto::containmentSet() {
return InventoryProto::containmentSet() | isBottle;
}
@ -1479,7 +1479,7 @@ bool BottleProto::useAction(ObjectID dObj, ObjectID enactor) {
FoodProto class
* ==================================================================== */
uint16 FoodProto::containmentSet(void) {
uint16 FoodProto::containmentSet() {
return InventoryProto::containmentSet() | isFood;
}
@ -1491,7 +1491,7 @@ bool FoodProto::useAction(ObjectID dObj, ObjectID enactor) {
WearableProto class
* ==================================================================== */
uint16 WearableProto::containmentSet(void) {
uint16 WearableProto::containmentSet() {
return InventoryProto::containmentSet() | isWearable;
}
@ -1499,11 +1499,11 @@ uint16 WearableProto::containmentSet(void) {
WeaponProto class
* ==================================================================== */
weaponID WeaponProto::getWeaponID(void) {
weaponID WeaponProto::getWeaponID() {
return weaponDamage;
}
uint16 WeaponProto::containmentSet(void) {
uint16 WeaponProto::containmentSet() {
return InventoryProto::containmentSet() | isWeapon;
}
@ -1686,13 +1686,13 @@ void MeleeWeaponProto::initiateDefense(
}
// Melee weapons can block an attack
bool MeleeWeaponProto::canBlock(void) {
bool MeleeWeaponProto::canBlock() {
return true;
}
// Return a mask of bits indicating the directions relative to the
// wielders facing in which this object can defend
uint8 MeleeWeaponProto::defenseDirMask(void) {
uint8 MeleeWeaponProto::defenseDirMask() {
return 1 << dirUp;
}
@ -2087,7 +2087,7 @@ uint8 ProjectileProto::weaponRating(
}
// Projectiles are missiles
bool ProjectileProto::isMissile(void) {
bool ProjectileProto::isMissile() {
return true;
}
@ -2170,7 +2170,7 @@ void ArrowProto::applySkillGrowth(ObjectID enactor, uint8 points) {
ArmorProto class
* ==================================================================== */
uint16 ArmorProto::containmentSet(void) {
uint16 ArmorProto::containmentSet() {
return InventoryProto::containmentSet() | isWearable | isArmor;
}
@ -2246,7 +2246,7 @@ bool ArmorProto::useAction(ObjectID dObj, ObjectID enactor) {
ShieldProto class
* ==================================================================== */
uint16 ShieldProto::containmentSet(void) {
uint16 ShieldProto::containmentSet() {
return InventoryProto::containmentSet() | isWearable | isArmor;
}
@ -2307,13 +2307,13 @@ void ShieldProto::initiateDefense(
// Shields can block an attack
bool ShieldProto::canBlock(void) {
bool ShieldProto::canBlock() {
return true;
}
// Return a mask of bits indicating the directions relative to the
// wielders facing in which this object can defend
uint8 ShieldProto::defenseDirMask(void) {
uint8 ShieldProto::defenseDirMask() {
return (1 << dirUp) | (1 << dirUpLeft);
}
@ -2417,7 +2417,7 @@ bool ToolProto::useOnAction(ObjectID, ObjectID, ObjectID) {
DocumentProto class
* ==================================================================== */
uint16 DocumentProto::containmentSet(void) {
uint16 DocumentProto::containmentSet() {
return InventoryProto::containmentSet() | isDocument;
}
@ -2468,7 +2468,7 @@ bool AutoMapProto::openAction(ObjectID, ObjectID) {
IntangibleObjProto class
* ==================================================================== */
uint16 IntangibleObjProto::containmentSet(void) {
uint16 IntangibleObjProto::containmentSet() {
return isIntangible;
}
@ -2552,7 +2552,7 @@ bool IntangibleObjProto::acceptDropAction(
return false;
}
ObjectID IntangibleObjProto::placeObject(void) {
ObjectID IntangibleObjProto::placeObject() {
//return Container That It Inserted Itself Into
return 2;
}
@ -2593,7 +2593,7 @@ ObjectSpriteInfo IntangibleObjProto::getSprite(
IdeaProto class
* ==================================================================== */
uint16 IdeaProto::containmentSet(void) {
uint16 IdeaProto::containmentSet() {
//Maybe I Could Use This ID And Call IntanobjProt For Setting IsIntangible
return isConcept | isIntangible;
}
@ -2602,7 +2602,7 @@ uint16 IdeaProto::containmentSet(void) {
MemoryProto class
* ==================================================================== */
uint16 MemoryProto::containmentSet(void) {
uint16 MemoryProto::containmentSet() {
//Maybe I Could Use This ID And Call IntanobjProt For Setting IsIntangible
return isConcept | isIntangible;
}
@ -2611,7 +2611,7 @@ uint16 MemoryProto::containmentSet(void) {
PsychProto class
* ==================================================================== */
uint16 PsychProto::containmentSet(void) {
uint16 PsychProto::containmentSet() {
//Maybe I Could Use This ID And Call IntanobjProt For Setting IsIntangible
return isPsych | isIntangible;
}
@ -2621,7 +2621,7 @@ uint16 PsychProto::containmentSet(void) {
* ==================================================================== */
uint16 SkillProto::containmentSet(void) {
uint16 SkillProto::containmentSet() {
//Maybe I Could Use This ID And Call IntanobjProt For Setting IsIntangible
return isSkill | isIntangible;
}
@ -2737,7 +2737,7 @@ bool SkillProto::implementAction(SpellID dObj, ObjectID enactor, Location &loc)
EnchantmentProto class
* ==================================================================== */
uint16 EnchantmentProto::containmentSet(void) {
uint16 EnchantmentProto::containmentSet() {
return isEnchantment;
}
@ -2788,7 +2788,7 @@ void EnchantmentProto::doBackgroundUpdate(GameObject *obj) {
GeneratorProto
* ======================================================================== */
uint16 GeneratorProto::containmentSet(void) {
uint16 GeneratorProto::containmentSet() {
return isIntangible;
}
@ -2937,7 +2937,7 @@ bool IntangibleContainerProto::closeAction(ObjectID dObj, ObjectID) {
return true;
}
uint16 IntangibleContainerProto::containmentSet(void) {
uint16 IntangibleContainerProto::containmentSet() {
return isContainer | isIntangible;
}
/* ==================================================================== *

View File

@ -424,7 +424,7 @@ public:
virtual ~ProtoObj() {}
// returns the containment type flags for this object
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
// returns true if this object can contain another object
virtual bool canContain(ObjectID dObj, ObjectID item);
@ -440,9 +440,9 @@ public:
virtual bool isTwoHanded(ObjectID actor);
// Determine if this type of object is a missile
virtual bool isMissile(void);
virtual bool isMissile();
virtual ObjectID placeObject(void);
virtual ObjectID placeObject();
// call the object's script
bool invokeScript(scriptCallFrame &);
@ -669,11 +669,11 @@ public:
virtual GameObject *getSpell(ObjectID obj);
// Determine if this type of object can block an attack
virtual bool canBlock(void);
virtual bool canBlock();
// Return a mask of bits indicating the directions relative to the
// wielders facing in which this object can defend
virtual uint8 defenseDirMask(void);
virtual uint8 defenseDirMask();
// Compute how much damage this defensive object will absorb
virtual uint8 adjustDamage(uint8 damage);
@ -697,7 +697,7 @@ public:
return immunity & (1 << r);
}
virtual bool makeSavingThrow(void) {
virtual bool makeSavingThrow() {
return false;
}
@ -717,21 +717,21 @@ public:
// this is to determine size of containers
public:
virtual uint16 getViewableRows(void) {
virtual uint16 getViewableRows() {
return ViewableRows;
}
virtual uint16 getViewableCols(void) {
virtual uint16 getViewableCols() {
return ViewableCols;
}
virtual uint16 getMaxRows(void) {
virtual uint16 getMaxRows() {
return maxRows;
}
virtual uint16 getMaxCols(void) {
virtual uint16 getMaxCols() {
return maxCols;
}
// this returns the type of charge an item can have
int16 getChargeType(void) {
int16 getChargeType() {
return chargeType;
}
@ -754,7 +754,7 @@ public:
InventoryProto(ResourceObjectPrototype &proto) : ProtoObj(proto) {}
virtual ~InventoryProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
virtual bool takeAction(ObjectID dObj, ObjectID enactor, int16 num = 1);
@ -809,7 +809,7 @@ public:
PhysicalContainerProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~PhysicalContainerProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
virtual bool canContain(ObjectID dObj, ObjectID item);
virtual bool canContainAt(
@ -850,16 +850,16 @@ public:
int16 num = 1);
public:
virtual uint16 getViewableRows(void) {
virtual uint16 getViewableRows() {
return ViewableRows;
}
virtual uint16 getViewableCols(void) {
virtual uint16 getViewableCols() {
return ViewableCols;
}
virtual uint16 getMaxRows(void) {
virtual uint16 getMaxRows() {
return maxRows;
}
virtual uint16 getMaxCols(void) {
virtual uint16 getMaxCols() {
return maxCols;
}
@ -905,7 +905,7 @@ public:
BottleProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~BottleProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
// Drink From Bottle
virtual bool useAction(ObjectID dObj, ObjectID enactor);
@ -924,7 +924,7 @@ public:
FoodProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~FoodProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
// Eat it
virtual bool useAction(ObjectID dObj, ObjectID enactor);
@ -943,7 +943,7 @@ public:
WearableProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~WearableProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
};
/* ======================================================================== *
@ -964,11 +964,11 @@ public:
WeaponProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~WeaponProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
// return the address of the sprite when held in hand
virtual Sprite *getOrientedSprite(GameObject *obj, int16 offset);
weaponID getWeaponID(void);
weaponID getWeaponID();
// Returns true if object in continuous use.
bool isObjectBeingUsed(GameObject *obj);
@ -1023,10 +1023,10 @@ public:
ObjectID defender,
ObjectID attacker);
// Melee weapons can block attacks
virtual bool canBlock(void);
virtual bool canBlock();
// Return a mask of bits indicating the directions relative to the
// wielders facing in which this object can defend
virtual uint8 defenseDirMask(void);
virtual uint8 defenseDirMask();
// Determine if the specified object's 'use' slot is available within
// the specified actor
@ -1178,7 +1178,7 @@ public:
bool isObjectBeingUsed(GameObject *obj);
// Projectiles are missiles
virtual bool isMissile(void);
virtual bool isMissile();
// Rate this weapon's goodness for a specified attack situation
virtual uint8 weaponRating(
@ -1226,7 +1226,7 @@ public:
ArmorProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~ArmorProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
virtual bool useAction(ObjectID dObj, ObjectID enactor);
@ -1253,7 +1253,7 @@ public:
ShieldProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~ShieldProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
virtual bool useAction(ObjectID dObj, ObjectID enactor);
@ -1273,10 +1273,10 @@ public:
ObjectID defensiveObj,
ObjectID defender,
ObjectID attacker);
virtual bool canBlock(void);
virtual bool canBlock();
// Return a mask of bits indicating the directions relative to the
// wielders facing in which this object can defend
virtual uint8 defenseDirMask(void);
virtual uint8 defenseDirMask();
// Returns true if object in continuous use.
bool isObjectBeingUsed(GameObject *obj);
@ -1328,7 +1328,7 @@ public:
DocumentProto(ResourceObjectPrototype &proto) : InventoryProto(proto) {}
virtual ~DocumentProto() {}
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
//BookDoc
//ScrollDoc
@ -1421,8 +1421,8 @@ public:
ObjectID droppedObj,
int count);
virtual uint16 containmentSet(void);
virtual ObjectID placeObject(void);
virtual uint16 containmentSet();
virtual ObjectID placeObject();
// Creates a color translation table for this object
virtual void getColorTranslation(ColorTable map);
@ -1444,7 +1444,7 @@ public:
virtual ~IdeaProto() {}
//Talk To A Person
uint16 containmentSet(void);
uint16 containmentSet();
};
@ -1461,7 +1461,7 @@ public:
virtual ~MemoryProto() {}
//Get Info On Person Your Talking To
uint16 containmentSet(void);
uint16 containmentSet();
};
@ -1478,7 +1478,7 @@ public:
virtual ~PsychProto() {}
//Get Explanation Of Icon
uint16 containmentSet(void);
uint16 containmentSet();
};
@ -1526,8 +1526,8 @@ public:
virtual bool implementAction(SpellID dObj, ObjectID enactor, ObjectID withObj);
virtual bool implementAction(SpellID dObj, ObjectID enactor, ActiveItem *item);
virtual bool implementAction(SpellID dObj, ObjectID enactor, Location &loc);
uint16 containmentSet(void);
SpellID getSpellID(void) {
uint16 containmentSet();
SpellID getSpellID() {
return (SpellID) lockType;
}
@ -1553,7 +1553,7 @@ public:
// virtual bool acceptLockToggle( ObjectID dObj, ObjectID enactor, uint8 keyCode );
// virtual ContainerWindow *makeWindow( GameObject *Obj );
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
};
/* ======================================================================== *
@ -1656,7 +1656,7 @@ public:
// Do the background processing, if needed, for this object.
void doBackgroundUpdate(GameObject *obj);
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
};
/* ======================================================================== *
@ -1673,7 +1673,7 @@ public:
//Base class for monster, encounter, and mission generators
virtual uint16 containmentSet(void);
virtual uint16 containmentSet();
};
/* ======================================================================== *

View File

@ -36,7 +36,7 @@ namespace Saga2 {
* ===================================================================== */
// Initialize the state of the current palette and fade up/down.
void initPaletteState(void);
void initPaletteState();
// Save the current state of the current palette and fade up/down in
// a save file.
void savePaletteState(Common::OutSaveFile *outS);
@ -44,7 +44,7 @@ void savePaletteState(Common::OutSaveFile *outS);
// up/down from a save file.
void loadPaletteState(Common::InSaveFile *in);
// Cleanup the palette
inline void cleanupPaletteState(void) { /* do nothing */ }
inline void cleanupPaletteState() { /* do nothing */ }
} // end of namespace Saga2

View File

@ -120,7 +120,7 @@ gPanel::~gPanel() {
if (this == g_vm->_toolBase->activePanel)
g_vm->_toolBase->activePanel = NULL;
}
void gPanel::draw(void) {}
void gPanel::draw() {}
void gPanel::drawClipped(gPort &, const Point16 &, const Rect16 &) {}
void gPanel::pointerMove(gPanelMessage &) {}
bool gPanel::pointerHit(gPanelMessage &) {
@ -135,7 +135,7 @@ bool gPanel::keyStroke(gPanelMessage &) {
return false;
}
void gPanel::timerTick(gPanelMessage &) {}
void gPanel::onMouseHintDelay(void) {}
void gPanel::onMouseHintDelay() {}
void gPanel::enable(bool abled) {
enabled = abled ? 1 : 0;
@ -149,7 +149,7 @@ void gPanel::ghost(bool b) {
ghosted = b ? 1 : 0;
}
bool gPanel::isActive(void) {
bool gPanel::isActive() {
return (this == g_vm->_toolBase->activePanel);
}
@ -171,11 +171,11 @@ bool gPanel::activate(gEventType) {
return false;
}
void gPanel::deactivate(void) {
void gPanel::deactivate() {
if (isActive()) g_vm->_toolBase->activePanel = NULL;
}
void gPanel::makeActive(void) {
void gPanel::makeActive() {
g_vm->_toolBase->setActive(this);
}
@ -280,7 +280,7 @@ gPanelList::~gPanelList() {
window.contents.remove(this);
}
void gPanelList::removeControls(void) {
void gPanelList::removeControls() {
gPanel *ctl;
// Delete all sub-panels.
@ -315,7 +315,7 @@ void gPanelList::invalidate(Rect16 *) {
}
}
void gPanelList::draw(void) {
void gPanelList::draw() {
gPanel *ctl;
if (displayEnabled())
@ -427,7 +427,7 @@ gWindow::~gWindow() {
// delete backSave;
}
bool gWindow::open(void) {
bool gWindow::open() {
if (isOpen()) return true;
// Send a "pointer-leave" message to mouse panel.
@ -448,7 +448,7 @@ bool gWindow::open(void) {
return true;
}
void gWindow::close(void) {
void gWindow::close() {
//saver.onExit(this);
if (!isOpen()) return;
@ -473,7 +473,7 @@ void gWindow::close(void) {
// Move the window to the front...
void gWindow::toFront(void) { // re-order the windows
void gWindow::toFront() { // re-order the windows
if (!isOpen()) return;
g_vm->_toolBase->windowList.remove(this);
@ -486,7 +486,7 @@ void gWindow::toFront(void) { // re-order the windows
update(_extent);
}
bool gWindow::isModal(void) {
bool gWindow::isModal() {
return false;
}
@ -522,7 +522,7 @@ void gWindow::setExtent(const Rect16 &r) {
}
// insert window into window list
void gWindow::insert(void) {
void gWindow::insert() {
g_vm->_toolBase->windowList.push_front(this);
}
@ -530,7 +530,7 @@ void gWindow::insert(void) {
// REM: Need to either adjuct coords when we draw OR
// redefine the address of the pixel map.
void gWindow::deactivate(void) {
void gWindow::deactivate() {
selected = 0;
gPanel::deactivate();
}
@ -564,7 +564,7 @@ void gWindow::pointerRelease(gPanelMessage &) {
deactivate();
}
void gWindow::draw(void) {
void gWindow::draw() {
if (displayEnabled())
gPanelList::draw();
}
@ -670,7 +670,7 @@ gPanel *gControl::keyTest(int16 key) {
// "clipped" one, and the normal draw routine just calls
// drawClipped with the main port.
void gControl::draw(void) {
void gControl::draw() {
g_vm->_pointer->hide(window.windowPort, _extent);
if (displayEnabled())
drawClipped(*globalPort,
@ -694,7 +694,7 @@ bool gGenericControl::activate(gEventType) {
return true;
}
void gGenericControl::deactivate(void) {
void gGenericControl::deactivate() {
selected = 0;
gPanel::deactivate();
}
@ -727,7 +727,7 @@ void gGenericControl::pointerRelease(gPanelMessage &) {
}
// Generic control has no rendering code.
void gGenericControl::draw(void) {
void gGenericControl::draw() {
}
/* ===================================================================== *
@ -988,7 +988,7 @@ void gToolBase::handleMouse(Common::Event &event, uint32 time) {
prevState = _curMouseState;
}
void gToolBase::leavePanel(void) {
void gToolBase::leavePanel() {
msg.timeStamp = g_system->getMillis();
if (mousePanel) {
@ -1101,14 +1101,14 @@ void initPanels(gDisplayPort &port) {
mainFont = &Helv11Font;
}
void cleanupPanels(void) {
void cleanupPanels() {
}
int16 leftButtonState(void) {
int16 leftButtonState() {
return g_vm->_toolBase->msg.leftButton;
}
int16 rightButtonState(void) {
int16 rightButtonState() {
return g_vm->_toolBase->msg.rightButton;
}

View File

@ -161,7 +161,7 @@ protected:
virtual void pointerRelease(gPanelMessage &msg);
virtual bool keyStroke(gPanelMessage &msg);
virtual void timerTick(gPanelMessage &msg);
virtual void onMouseHintDelay(void);
virtual void onMouseHintDelay();
void notify(enum gEventType, int32 value);
void notify(gEvent &ev) {
@ -171,10 +171,10 @@ protected:
public:
bool isActive(void); // true if we are active panel
bool isActive(); // true if we are active panel
virtual bool activate(gEventType why); // activate the control
virtual void deactivate(void); // deactivate the control
virtual void draw(void); // redraw the panel.
virtual void deactivate(); // deactivate the control
virtual void draw(); // redraw the panel.
virtual void enable(bool abled);
virtual void select(uint16 selected);
virtual void ghost(bool ghosted);
@ -191,20 +191,20 @@ public:
const Rect16 &r);
// void setCommand( AppFunc *func ) { command = func; }
gWindow *getWindow(void) {
gWindow *getWindow() {
return &window;
}
void makeActive(void);
Rect16 getExtent(void) {
void makeActive();
Rect16 getExtent() {
return _extent;
}
bool isSelected(void) {
bool isSelected() {
return selected != 0;
}
bool isGhosted(void) {
bool isGhosted() {
return ghosted != 0;
}
bool getEnabled(void) const {
bool getEnabled() const {
return (bool) enabled;
}
void show(bool shown = true, bool inval = true) {
@ -279,11 +279,11 @@ public:
gPanel *hitTest(const Point16 &p);
gPanel *keyTest(int16 key);
void removeControls(void);
void removeControls();
public:
void invalidate(Rect16 *area = nullptr);
void draw(void); // redraw the controls
void draw(); // redraw the controls
void drawClipped(
gPort &port,
const Point16 &offset,
@ -344,7 +344,7 @@ protected:
private:
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
void pointerMove(gPanelMessage &msg);
bool pointerHit(gPanelMessage &msg);
@ -362,23 +362,23 @@ private:
static StaticRect dragExtent; // dragging extent
static StaticPoint16 dragOffset; // offset to window origin
void shadow(void);
void shadow();
public:
void setExtent(const Rect16 &); // set window position and size
Rect16 getExtent(void) {
Rect16 getExtent() {
return _extent; // set window position and size
}
protected:
void setPos(Point16 pos); // set window position
void insert(void); // insert window into window list
virtual void toFront(void); // re-order the windows
void insert(); // insert window into window list
virtual void toFront(); // re-order the windows
public:
bool isOpen(void) {
bool isOpen() {
return openFlag; // true if window is visible
}
void draw(void); // redraw the panel.
void draw(); // redraw the panel.
void drawClipped(
gPort &port,
const Point16 &offset,
@ -394,9 +394,9 @@ public:
void enable(bool abled);
void select(uint16 sel); // activate the window
virtual bool open(void);
virtual void close(void);
virtual bool isModal(void);
virtual bool open();
virtual void close();
virtual bool isModal();
// Update a region of a window, and all floaters which
// might be above that window.
@ -427,7 +427,7 @@ public:
void ghost(bool ghosted);
// virtual void newValue( void );
void draw(void); // redraw the control.
void draw(); // redraw the control.
};
/* ===================================================================== *
@ -441,7 +441,7 @@ public:
gGenericControl(gPanelList &, const Rect16 &, uint16, AppFunc *cmd = NULL);
// Disable double click for next mouse click
void disableDblClick(void) {
void disableDblClick() {
dblClickFlag = true;
}
@ -452,14 +452,14 @@ public:
protected:
bool activate(gEventType why); // activate the control
void deactivate(void);
void deactivate();
void pointerMove(gPanelMessage &msg);
bool pointerHit(gPanelMessage &msg);
void pointerDrag(gPanelMessage &msg);
void pointerRelease(gPanelMessage &msg);
void draw(void); // redraw the control.
void draw(); // redraw the control.
};
@ -474,10 +474,10 @@ class gToolBase {
friend class gWindow;
friend class gPanel;
friend void EventLoop(bool &running);
friend int16 leftButtonState(void);
friend int16 rightButtonState(void);
friend void StageModeCleanup(void);
friend void TileModeCleanup(void);
friend int16 leftButtonState();
friend int16 rightButtonState();
friend void StageModeCleanup();
friend void TileModeCleanup();
friend void dumpGBASE(char *msg);
// windows
@ -531,21 +531,21 @@ private:
public:
void setActive(gPanel *newActive);
void leavePanel(void); // we're changing windows
void leavePanel(); // we're changing windows
public:
void handleMouse(Common::Event &event, uint32 time);
void handleKeyStroke(Common::Event &event);
void handleTimerTick(int32 tick);
Common::List<gWindow *>::iterator topWindowIterator(void) {
Common::List<gWindow *>::iterator topWindowIterator() {
return windowList.end();
}
Common::List<gWindow *>::iterator bottomWindowIterator(void) {
Common::List<gWindow *>::iterator bottomWindowIterator() {
return windowList.reverse_begin();
}
gWindow *topWindow(void) {
gWindow *topWindow() {
return windowList.front();
}
gWindow *bottomWindow(void) {
gWindow *bottomWindow() {
return windowList.back();
}
bool isMousePanel(gPanel *p) {
@ -559,12 +559,12 @@ public:
void EventLoop(bool &running);
void initPanels(gDisplayPort &port);
void cleanupPanels(void);
void cleanupPanels();
//void writeHelpLine( char *msg, ... );
int16 leftButtonState(void);
int16 rightButtonState(void);
int16 leftButtonState();
int16 rightButtonState();
// Kludge structure to contain both a mouse event and a time stamp
struct MouseExtState {

View File

@ -481,7 +481,7 @@ private:
// The cell array
PathCell array[chunkTileDiameter][chunkTileDiameter];
PathArrayChunk(void) : mask(0) {}
PathArrayChunk() : mask(0) {}
};
// Master array of chunk pointers
@ -492,10 +492,10 @@ public:
class CellAllocationFailure {};
// Constructor
PathArray(void);
PathArray();
// Destructor
~PathArray(void);
~PathArray();
// Make a new cell or access an existing cell. If the specified
// cell already exists *newCell will be set to false, else it will
@ -511,11 +511,11 @@ public:
void deleteCell(int plat, int uCoord, int vCoord);
// Delete all existing cells
void reset(void);
void reset();
};
// Constructor
PathArray::PathArray(void) {
PathArray::PathArray() {
int plat, chunkU, chunkV;
for (plat = 0; plat < maxPlatforms; plat++) {
@ -527,7 +527,7 @@ PathArray::PathArray(void) {
}
// Destructor
PathArray::~PathArray(void) {
PathArray::~PathArray() {
reset();
}
@ -631,7 +631,7 @@ void PathArray::deleteCell(int plat, int uCoord, int vCoord) {
}
// Delete all existing cells
void PathArray::reset(void) {
void PathArray::reset() {
int plat, chunkU, chunkV;
for (plat = 0; plat < maxPlatforms; plat++) {
@ -727,7 +727,7 @@ private:
int16 arraySize;
public:
MaskComputer(void) : arraySize(0) {
MaskComputer() : arraySize(0) {
for (int i = 0; i < 8; i++)
ptrArray[i] = nullptr;
}
@ -1141,15 +1141,15 @@ public:
path = nullptr;
}
void requestAbort(void) {
void requestAbort() {
flags |= aborted;
}
virtual void initialize(void);
virtual void finish(void); // completion method
virtual void abortReq(void); // abnormal termination method
virtual void initialize();
virtual void finish(); // completion method
virtual void abortReq(); // abnormal termination method
PathResult findPath(void);
PathResult findPath();
// Set and evaluate a new center location.
virtual bool setCenter(
@ -1173,7 +1173,7 @@ public:
virtual int16 evaluateMove(const TilePoint &testPt, uint8 testPlatform) = 0;
// NEW added by Evan 12/3
virtual bool timeLimitExceeded(void);
virtual bool timeLimitExceeded();
};
@ -1202,7 +1202,7 @@ public:
DestinationPathRequest(Actor *a, int16 howSmart);
// Initialize the static data members for this path request.
void initialize(void);
void initialize();
// Set and evaluate a new center location.
bool setCenter(
@ -1252,7 +1252,7 @@ public:
WanderPathRequest(Actor *a, int16 howSmart);
// Initialize the static data members
void initialize(void);
void initialize();
// Set and evaluate a new center location.
bool setCenter(
@ -1398,7 +1398,7 @@ PathRequest::PathRequest(Actor *a, int16 howSmart) {
mTask->pathFindTask = this;
}
void PathRequest::initialize(void) {
void PathRequest::initialize() {
ProtoObj *proto = actor->proto();
TilePoint startingCoords = actor->getLocation();
int uCoord, vCoord;
@ -1590,7 +1590,7 @@ big_break:
}
}
void PathRequest::finish(void) {
void PathRequest::finish() {
Direction prevDir;
int16 prevHeight = 0;
TilePoint *resultSteps = path,
@ -1672,7 +1672,7 @@ void PathRequest::finish(void) {
}
}
void PathRequest::abortReq(void) {
void PathRequest::abortReq() {
debugC(4, kDebugPath, "Aborting Path Request: %p", (void *)this);
if (mTask->pathFindTask == this)
@ -1680,7 +1680,7 @@ void PathRequest::abortReq(void) {
}
PathResult PathRequest::findPath(void) {
PathResult PathRequest::findPath() {
assert(cellArray != nullptr);
static const uint8 costTable[] = {4, 10, 12, 16, 12, 10, 4, 0, 4, 10, 12, 16, 12, 10, 4, 0};
@ -2044,7 +2044,7 @@ big_continue:
// usually get (72/2)+(100/10) or 46 ticks.
bool PathRequest::timeLimitExceeded(void) {
bool PathRequest::timeLimitExceeded() {
#ifdef OLD_PATHFINDER_TIME_MGMT
return (gameTime - firstTick >= timeLimit);
#else
@ -2073,7 +2073,7 @@ DestinationPathRequest::DestinationPathRequest(Actor *a, int16 howSmart) :
}
// Initialize the static data members
void DestinationPathRequest::initialize(void) {
void DestinationPathRequest::initialize() {
debugC(2, kDebugPath, "Initializing Path Request: %p", (void *)this);
PathRequest::initialize();
@ -2204,7 +2204,7 @@ WanderPathRequest::WanderPathRequest(
}
// Initialize the static data members
void WanderPathRequest::initialize(void) {
void WanderPathRequest::initialize() {
PathRequest::initialize();
// Initialize bestDist to zero.
@ -2281,7 +2281,7 @@ int16 WanderPathRequest::evaluateMove(const TilePoint &testPt, uint8) {
return (centerCost - (dist + zDist)) >> 1;
}
void runPathFinder(void) {
void runPathFinder() {
if (currentRequest == nullptr && !g_vm->_pathQueue.empty()) {
currentRequest = g_vm->_pathQueue.front();
g_vm->_pathQueue.pop_front();
@ -2933,7 +2933,7 @@ bool checkPath(
Path finder management functions
* ===================================================================== */
void initPathFinder(void) {
void initPathFinder() {
queue = new PriorityQueue<QueueItem, 192>;
squeue = new PriorityQueue<QueueItem, 128>;
objectVolumeArray = new TileRegion[128];
@ -2944,7 +2944,7 @@ void initPathFinder(void) {
PathRequest::tileArray = new PathTileRegion;
}
void cleanupPathFinder(void) {
void cleanupPathFinder() {
if (pathTileArray) {
free(pathTileArray);
pathTileArray = nullptr;

View File

@ -119,7 +119,7 @@ void PatrolRouteIterator::write(Common::MemoryWriteStreamDynamic *out) const {
//-----------------------------------------------------------------------
// Increment the waypoint index
void PatrolRouteIterator::increment(void) {
void PatrolRouteIterator::increment() {
const PatrolRoute &route = patrolRouteList[_mapNum]->getRoute(_routeNo);
_vertexNo++;
@ -138,7 +138,7 @@ void PatrolRouteIterator::increment(void) {
//-----------------------------------------------------------------------
// Decrement the waypoint index
void PatrolRouteIterator::decrement(void) {
void PatrolRouteIterator::decrement() {
const PatrolRoute &route = patrolRouteList[_mapNum]->getRoute(_routeNo);
_vertexNo--;
@ -157,7 +157,7 @@ void PatrolRouteIterator::decrement(void) {
//-----------------------------------------------------------------------
// Increment the waypoint index in the alternate direction
void PatrolRouteIterator::altIncrement(void) {
void PatrolRouteIterator::altIncrement() {
const PatrolRoute &route = patrolRouteList[_mapNum]->getRoute(_routeNo);
_vertexNo++;
@ -172,7 +172,7 @@ void PatrolRouteIterator::altIncrement(void) {
//-----------------------------------------------------------------------
// Decrement the waypoint index in the alternate direction
void PatrolRouteIterator::altDecrement(void) {
void PatrolRouteIterator::altDecrement() {
const PatrolRoute &route = patrolRouteList[_mapNum]->getRoute(_routeNo);
_vertexNo--;
@ -187,13 +187,13 @@ void PatrolRouteIterator::altDecrement(void) {
//-----------------------------------------------------------------------
// Return the coordinates of the current waypoint
const TilePoint PatrolRouteIterator::operator*(void) const {
const TilePoint PatrolRouteIterator::operator*() const {
const PatrolRoute &route = patrolRouteList[_mapNum]->getRoute(_routeNo);
return _vertexNo >= 0 && _vertexNo < route.vertices() ? route[_vertexNo] : Nowhere;
}
const PatrolRouteIterator &PatrolRouteIterator::operator++(void) {
const PatrolRouteIterator &PatrolRouteIterator::operator++() {
const PatrolRoute &route = patrolRouteList[_mapNum]->getRoute(_routeNo);
if (_vertexNo >= 0 && _vertexNo < route.vertices()) {
@ -219,7 +219,7 @@ const PatrolRouteIterator &PatrolRouteIterator::operator++(void) {
//-----------------------------------------------------------------------
// Load the patrol routes from the resource file
void initPatrolRoutes(void) {
void initPatrolRoutes() {
// Get patrol route resource context
hResContext *patrolRouteRes = auxResFile->newContext(MKTAG('P', 'T', 'R', 'L'), "patrol route resource");
if (patrolRouteRes == nullptr || !patrolRouteRes->_valid)
@ -254,7 +254,7 @@ void initPatrolRoutes(void) {
auxResFile->disposeContext(patrolRouteRes);
}
void cleanupPatrolRoutes(void) {
void cleanupPatrolRoutes() {
if (!patrolRouteList)
return;

View File

@ -51,7 +51,7 @@ public:
~PatrolRoute();
// Return the number of way points
int16 vertices(void) const {
int16 vertices() const {
return _wayPoints;
}
@ -70,8 +70,8 @@ public:
// beginning of the patrol route data.
class PatrolRouteList {
friend void initPatrolRoutes(void);
friend void cleanupPatrolRoutes(void);
friend void initPatrolRoutes();
friend void cleanupPatrolRoutes();
int16 _numRoutes;
PatrolRoute **_routes;
@ -81,7 +81,7 @@ public:
~PatrolRouteList();
// Returns the number of patrol routes in the list
int16 routes(void) {
int16 routes() {
return _numRoutes;
}
@ -128,27 +128,27 @@ public:
void write(Common::MemoryWriteStreamDynamic *out) const;
private:
void increment(void); // Increment waypoint index
void decrement(void); // Decrement waypoint index
void altIncrement(void); // Increment in alternate direction
void altDecrement(void); // Decrement in alternate direction
void increment(); // Increment waypoint index
void decrement(); // Decrement waypoint index
void altIncrement(); // Increment in alternate direction
void altDecrement(); // Decrement in alternate direction
public:
// Determine if the iterator will repeat infinitely
bool isRepeating(void) const {
bool isRepeating() const {
return _flags & (patrolRouteRepeat | patrolRouteRandom);
}
// Return the current way point number
int16 wayPointNum(void) const {
int16 wayPointNum() const {
return _vertexNo;
}
// Return the coordinates of the current waypoint
const TilePoint operator*(void) const;
const TilePoint operator*() const;
// Iterate
const PatrolRouteIterator &operator++(void);
const PatrolRouteIterator &operator++();
// Determine if this iterator is equivalent to the specified iterator
bool operator==(const PatrolRouteIterator &iter) const {
@ -162,10 +162,10 @@ public:
* ===================================================================== */
// Load the patrol routes from the resource file
void initPatrolRoutes(void);
void initPatrolRoutes();
// Cleanup the patrol routes
void cleanupPatrolRoutes(void);
void cleanupPatrolRoutes();
} // end of namespace Saga2

View File

@ -43,7 +43,7 @@ extern ReadyContainerView *TrioCviews[kNumViews];
extern ReadyContainerView *indivCviewTop, *indivCviewBot;
extern ContainerNode *indivReadyNode;
void updateMainDisplay(void);
void updateMainDisplay();
TilePoint selectNearbySite(
ObjectID worldID,
@ -74,7 +74,7 @@ bool brotherBandingEnabled;
//-----------------------------------------------------------------------
// Resolve the banding state of this actor
void PlayerActor::resolveBanding(void) {
void PlayerActor::resolveBanding() {
Actor *follower = getActor();
Actor *centerActor_ = getCenterActor();
@ -96,7 +96,7 @@ void PlayerActor::resolveBanding(void) {
//-----------------------------------------------------------------------
// Re-evaluate the portrait type for this player actor
void PlayerActor::recalcPortraitType(void) {
void PlayerActor::recalcPortraitType() {
PortraitType pType;
Actor *a = getActor();
ActorAttributes &stats = getBaseStats();
@ -123,14 +123,14 @@ void PlayerActor::recalcPortraitType(void) {
}
void PlayerActor::recoveryUpdate(void) { // change name to recovery update
void PlayerActor::recoveryUpdate() { // change name to recovery update
manaUpdate();
AttribUpdate();
}
void PlayerActor::AttribUpdate(void) {
void PlayerActor::AttribUpdate() {
// get the actor pointer for this character
Actor *actor = getActor();
@ -177,7 +177,7 @@ void PlayerActor::stdAttribUpdate(uint8 &stat, uint8 baseStat, int16 index) {
}
}
void PlayerActor::manaUpdate(void) {
void PlayerActor::manaUpdate() {
const int numManas = 6;
const int minMana = 0;
@ -467,7 +467,7 @@ uint8 PlayerActor::getStatIndex(SkillProto *proto) {
return stat;
}
ActorAttributes *PlayerActor::getEffStats(void) {
ActorAttributes *PlayerActor::getEffStats() {
// get the actor pointer for this character
Actor *actor = getActor();
@ -484,7 +484,7 @@ ActorAttributes *PlayerActor::getEffStats(void) {
//-----------------------------------------------------------------------
// Notify the user of attack if necessary
void PlayerActor::handleAttacked(void) {
void PlayerActor::handleAttacked() {
if (!notifiedOfAttack) {
StatusMsg(ATTACK_STATUS, getActor()->objName());
notifiedOfAttack = true;
@ -519,21 +519,21 @@ PlayerActorID getPlayerActorID(PlayerActor *p) {
//-----------------------------------------------------------------------
// Return a pointer the center actor's Actor structure
Actor *getCenterActor(void) {
Actor *getCenterActor() {
return g_vm->_playerList[centerActor]->getActor();
}
//-----------------------------------------------------------------------
// Return the center actor's object ID
ObjectID getCenterActorID(void) {
ObjectID getCenterActorID() {
return ActorBaseID + centerActor;
}
//-----------------------------------------------------------------------
// Return the center actor's player actor ID
PlayerActorID getCenterActorPlayerID(void) {
PlayerActorID getCenterActorPlayerID() {
return centerActor;
}
@ -541,7 +541,7 @@ PlayerActorID getCenterActorPlayerID(void) {
// Set a new center actor based upon a PlayerActor ID
void setCenterActor(PlayerActorID newCenter) {
extern void setEnchantmentDisplay(void);
extern void setEnchantmentDisplay();
assert(newCenter < kPlayerActors);
@ -604,7 +604,7 @@ void setCenterActor(PlayerActor *newCenter) {
//-----------------------------------------------------------------------
// Return the coordinates of the current center actor
TilePoint centerActorCoords(void) {
TilePoint centerActorCoords() {
Actor *a;
a = g_vm->_playerList[centerActor]->getActor();
@ -647,7 +647,7 @@ bool isAggressive(PlayerActorID player) {
// Adjust the player actors aggression setting based upon their
// proximity to enemies
void autoAdjustAggression(void) {
void autoAdjustAggression() {
PlayerActorID i;
// Iterate through all player actors
@ -866,7 +866,7 @@ void handlePlayerActorAttacked(PlayerActorID id) {
//-----------------------------------------------------------------------
void handleEndOfCombat(void) {
void handleEndOfCombat() {
PlayerActorID i;
// Iterate through all player actors
@ -896,7 +896,7 @@ struct PlayerActorArchive {
//-----------------------------------------------------------------------
// Initialize the player list
void initPlayerActors(void) {
void initPlayerActors() {
g_vm->_playerList.push_back(new PlayerActor(ActorBaseID + 0)); // Julian
g_vm->_playerList.push_back(new PlayerActor(ActorBaseID + 1)); // Philip
g_vm->_playerList.push_back(new PlayerActor(ActorBaseID + 2)); // Kevin
@ -1024,7 +1024,7 @@ void loadPlayerActors(Common::InSaveFile *in) {
//-----------------------------------------------------------------------
// Cleanup the player actor list
void cleanupPlayerActors(void) {
void cleanupPlayerActors() {
cleanupReadyContainers();
}
@ -1042,7 +1042,7 @@ struct CenterActorArchive {
//-----------------------------------------------------------------------
// Initialize the center actor ID and view object ID
void initCenterActor(void) {
void initCenterActor() {
centerActor = FTA_JULIAN;
viewCenterObject = g_vm->_playerList[centerActor]->getActorID();
@ -1078,24 +1078,24 @@ void loadCenterActor(Common::InSaveFile *in) {
//-----------------------------------------------------------------------
// Iterates through all player actors
PlayerActor *PlayerActorIterator::first(void) {
PlayerActor *PlayerActorIterator::first() {
index = 0;
return g_vm->_playerList[index++];
}
PlayerActor *PlayerActorIterator::next(void) {
PlayerActor *PlayerActorIterator::next() {
return (index < kPlayerActors) ? g_vm->_playerList[index++] : NULL;
}
//-----------------------------------------------------------------------
// Iterates through all player actors that are not dead.
PlayerActor *LivingPlayerActorIterator::first(void) {
PlayerActor *LivingPlayerActorIterator::first() {
index = 0;
return LivingPlayerActorIterator::next();
}
PlayerActor *LivingPlayerActorIterator::next(void) {
PlayerActor *LivingPlayerActorIterator::next() {
if (index >= kPlayerActors)
return nullptr;

View File

@ -44,8 +44,8 @@ class ContainerNode;
class PlayerActor {
friend class Actor;
friend void initPlayerActors(void);
friend void cleanupPlayerActors(void);
friend void initPlayerActors();
friend void cleanupPlayerActors();
ObjectID actorID; // ID of player's actor
@ -115,7 +115,7 @@ public:
uint8 getStatIndex(SkillProto *);
// get the effective stats of this player actor
ActorAttributes *getEffStats(void);
ActorAttributes *getEffStats();
// these update a players baseStat skills
void skillAdvance(uint8 stat,
@ -134,74 +134,74 @@ public:
void vitalityAdvance(uint8 points);
// Return Actor structure pointer
Actor *getActor(void) {
Actor *getActor() {
return (Actor *)GameObject::objectAddress(actorID);
}
// Return Actor's object ID
ObjectID getActorID(void) {
ObjectID getActorID() {
return actorID;
}
// Set player to be aggressive
void setAggression(void) {
void setAggression() {
flags |= playerAggressive;
}
// Set player to not aggressive
void clearAggression(void) {
void clearAggression() {
flags &= ~playerAggressive;
}
// Determine if actor is in aggressive state
bool isAggressive(void) {
bool isAggressive() {
return (flags & playerAggressive) != 0;
}
// Set the player to be banded
void setBanded(void) {
void setBanded() {
flags |= playerBanded;
}
// Set the player to not be banded
void clearBanded(void) {
void clearBanded() {
flags &= ~playerBanded;
}
// Determine if this player actor is banded
bool isBanded(void) {
bool isBanded() {
return (flags & playerBanded) != 0;
}
// Resolve the banding state of this actor
void resolveBanding(void);
void resolveBanding();
// Re-evaluate the portrait type for this player actor
void recalcPortraitType(void);
void recalcPortraitType();
// Return the integer representing the portrait type for this
// player actor
int16 getPortraitType(void) {
int16 getPortraitType() {
return portraitType;
}
// figures out what what ( if any ) changes are required to
// the charaters vitality
void recoveryUpdate(void);
void manaUpdate(void);
void AttribUpdate(void);
void recoveryUpdate();
void manaUpdate();
void AttribUpdate();
void stdAttribUpdate(uint8 &stat, uint8 baseStat, int16 index);
// get this player actor's base stats
ActorAttributes &getBaseStats(void) {
ActorAttributes &getBaseStats() {
return baseStats;
}
// Notify the user of attack if necessary
void handleAttacked(void);
void handleAttacked();
// Simply reset the attack notification flag
void resetAttackNotification(void) {
void resetAttackNotification() {
notifiedOfAttack = false;
}
};
@ -213,11 +213,11 @@ PlayerActor *getPlayerActorAddress(PlayerActorID id);
PlayerActorID getPlayerActorID(PlayerActor *p);
// Return a pointer to the center actor
Actor *getCenterActor(void);
Actor *getCenterActor();
// Return the center actor's object ID
ObjectID getCenterActorID(void);
ObjectID getCenterActorID();
// Return the center actor's player actor ID
PlayerActorID getCenterActorPlayerID(void);
PlayerActorID getCenterActorPlayerID();
// Set a new center actor based upon the PlayerActor ID
void setCenterActor(PlayerActorID newCenter);
@ -230,7 +230,7 @@ void setCenterActor(Actor *newCenter);
void setCenterActor(PlayerActor *newCenter);
// Get the coordinates of the center actor
TilePoint centerActorCoords(void);
TilePoint centerActorCoords();
// Set a player actor's aggression
void setAggression(PlayerActorID player, bool aggression);
@ -244,7 +244,7 @@ inline void setCenterActorAggression(bool aggression) {
bool isAggressive(PlayerActorID player);
// Determine if center actor is aggressive
inline bool isCenterActorAggressive(void) {
inline bool isCenterActorAggressive() {
return isAggressive(getCenterActorPlayerID());
}
@ -259,7 +259,7 @@ void setBrotherBanding(bool enabled);
// Adjust the player actors aggression setting based upon their
// proximity to enemies
void autoAdjustAggression(void);
void autoAdjustAggression();
// Calculate the portrait for this brother's current state.
void recalcPortraitType(PlayerActorID id);
@ -279,7 +279,7 @@ void transportCenterBand(const Location &loc);
void handlePlayerActorAttacked(PlayerActorID id);
void handleEndOfCombat(void);
void handleEndOfCombat();
/* ======================================================================= *
PlayerActor list management function prototypes
@ -287,26 +287,26 @@ void handleEndOfCombat(void);
// Initialize the player actor list
void initPlayerActors(void);
void initPlayerActors();
void savePlayerActors(Common::OutSaveFile *out);
void loadPlayerActors(Common::InSaveFile *in);
// Cleanup the player actor list
void cleanupPlayerActors(void);
void cleanupPlayerActors();
/* ======================================================================= *
CenterActor management function prototypes
* ======================================================================= */
// Initialize the center actor ID and view object ID
void initCenterActor(void);
void initCenterActor();
void saveCenterActor(Common::OutSaveFile *outS);
void loadCenterActor(Common::InSaveFile *in);
// Do nothing
inline void cleanupCenterActor(void) {}
inline void cleanupCenterActor() {}
/* ======================================================================= *
PlayerActor iteration class
@ -317,12 +317,12 @@ protected:
int16 index;
public:
PlayerActorIterator(void) {
PlayerActorIterator() {
index = 0;
}
PlayerActor *first(void);
PlayerActor *next(void);
PlayerActor *first();
PlayerActor *next();
};
// Iterates through all player actors that are not dead.
@ -330,10 +330,10 @@ public:
class LivingPlayerActorIterator : public PlayerActorIterator {
public:
LivingPlayerActorIterator(void) {}
LivingPlayerActorIterator() {}
PlayerActor *first(void);
PlayerActor *next(void);
PlayerActor *first();
PlayerActor *next();
};
} // end of namespace Saga2

View File

@ -61,7 +61,7 @@ int16 ScreenDepth(TilePoint);
#ifdef FTA
void cleanupButtonImages(void);
void cleanupButtonImages();
#endif
@ -71,23 +71,23 @@ void cleanupButtonImages(void);
* ===================================================================== */
//void drawInventory( gPort &port, GameObject &container, Rect16 displayRect );
void motionTest(void);
void drawBorders(void);
void motionTest();
void drawBorders();
void windowTest(void);
void closeAllFloatingWindows(void);
void windowTest();
void closeAllFloatingWindows();
void objectTest(void);
void objectTest();
#ifdef hasReadyContainers
void readyContainerSetup(void);
void readyContainerSetup();
#endif
/* ===================================================================== *
PlayMode definition
* ===================================================================== */
void PlayModeSetup(void);
void PlayModeCleanup(void);
void PlayModeSetup();
void PlayModeCleanup();
// The Mode object for the main "play" mode.
@ -133,7 +133,7 @@ hResContext *imageRes; // image resource handle
//-----------------------------------------------------------------------
// Initialize the Play mode
bool checkTileAreaPort(void) {
bool checkTileAreaPort() {
if (g_vm->_gameRunning && g_vm->_tileDrawMap.data == nullptr) {
// Allocate back buffer for tile rendering
g_vm->_tileDrawMap.size.x = (kTileRectWidth + kTileWidth - 1) & ~kTileDXMask;
@ -144,7 +144,7 @@ bool checkTileAreaPort(void) {
return g_vm->_tileDrawMap.data != nullptr;
}
void clearTileAreaPort(void) {
void clearTileAreaPort() {
if (g_vm->_gameRunning && g_vm->_tileDrawMap.data != nullptr) {
_FillRect(g_vm->_tileDrawMap.data, g_vm->_tileDrawMap.size.x, g_vm->_tileDrawMap.size.x, g_vm->_tileDrawMap.size.y, 0);
}
@ -154,7 +154,7 @@ void clearTileAreaPort(void) {
}
void PlayModeSetup(void) {
void PlayModeSetup() {
// Init resources for images
if (imageRes == nullptr)
imageRes = resFile->newContext(imageGroupID, "image resources");
@ -243,7 +243,7 @@ void PlayModeSetup(void) {
//-----------------------------------------------------------------------
// Cleanup function for Play mode
void PlayModeCleanup(void) {
void PlayModeCleanup() {
closeAllFloatingWindows();
if (playControls) {
if (StatusLine)

View File

@ -45,16 +45,16 @@ class PriorityQueue {
}
public:
PriorityQueue(void) { // constructor
PriorityQueue() { // constructor
tail = 1;
}
bool insert(ITEM &newItem); // insert an item
bool remove(ITEM &result); // remove an item
void clear(void) {
void clear() {
tail = 1; // clear the queue
}
int16 getCount(void) {
int16 getCount() {
return tail - 1;
}
};

View File

@ -143,7 +143,7 @@ CompoundMetaTileProperty::CompoundMetaTileProperty(
arraySize = size;
}
CompoundMetaTileProperty::~CompoundMetaTileProperty(void) {
CompoundMetaTileProperty::~CompoundMetaTileProperty() {
// Free the memory for the copy of the array
free(propertyArray);
}

View File

@ -103,7 +103,7 @@ public:
CompoundProperty(Property< T > **array, uint16 size);
// Virtual destructor
virtual ~CompoundProperty(void);
virtual ~CompoundProperty();
};
template < class T >
@ -125,7 +125,7 @@ CompoundProperty< T >::CompoundProperty(
template < class T >
CompoundProperty< T >::~CompoundProperty(void) {
CompoundProperty< T >::~CompoundProperty() {
// Free the array memory
free(propertyArray);
}
@ -329,7 +329,7 @@ public:
CompoundMetaTileProperty(MetaTileProperty **array, uint16 size);
// Virtual destructor
virtual ~CompoundMetaTileProperty(void);
virtual ~CompoundMetaTileProperty();
};
/* ===================================================================== *

View File

@ -92,7 +92,7 @@ Rect16 intersect(const Rect16 a, const Rect16 b) {
return Rect16(x1, y1, width, height);
}
void Rect16::normalize(void) {
void Rect16::normalize() {
if (width < 0) {
x += width;
width = -width;
@ -147,7 +147,7 @@ Rect32 intersect(const Rect32 a, const Rect32 b) {
return Rect32(x1, y1, width, height);
}
void Rect32::normalize(void) {
void Rect32::normalize() {
if (width < 0) {
x += width;
width = -width;

View File

@ -362,11 +362,11 @@ public:
}
// functions
void normalize(void); // make rect right-side out
void normalize(); // make rect right-side out
void expand(int16 dx, int16 dy); // grow or shrink the rect
void expand(int16 left, int16 top, int16 right, int16 bottom);
int empty(void) const {
int empty() const {
return width <= 0 || height <= 0;
}
@ -490,12 +490,12 @@ public:
y -= a.y;
}
// functions
void normalize(void); // make rect right-side out
void normalize(); // make rect right-side out
void expand(int32 dx, int32 dy); // grow or shrink the rect
void expand(int32 left, int32 top, int32 right, int32 bottom);
int empty(void) const {
int empty() const {
return width <= 0 || height <= 0;
}

View File

@ -51,7 +51,7 @@
#include "saga2/tile.h"
#include "saga2/tilemode.h"
void drawMainDisplay(void);
void drawMainDisplay();
#define MONOLOG(s) {debugC(2, kDebugScripts, "cfunc: " #s );}
#define OBJLOG(s) {debugC(2, kDebugScripts, "cfunc: [%s]." #s , (((ObjectData *)thisThread->thisObject)->obj)->objName() );}

View File

@ -46,7 +46,7 @@
namespace Saga2 {
void updateMainDisplay(void);
void updateMainDisplay();
void fadeUp();
void fadeDown();
void enablePaletteChanges();
@ -111,7 +111,7 @@ void SaveFileHeader::write(Common::OutSaveFile *out) {
//----------------------------------------------------------------------
// Load initial game state
void initGameState(void) {
void initGameState() {
pauseTimer();
initGlobals();
@ -536,7 +536,7 @@ void loadGame(int16 saveNo) {
//----------------------------------------------------------------------
// Cleanup the game state
void cleanupGameState(void) {
void cleanupGameState() {
cleanupContainerNodes();
cleanupPaletteState();
cleanupUIState();
@ -579,7 +579,7 @@ void checkRestartGame(const char *exeName) {
}
void loadRestartGame(void) {
void loadRestartGame() {
loadSavedGameState(999);
}

View File

@ -50,7 +50,7 @@ struct SaveFileHeader {
kHeaderSize = 128
};
ChunkID gameID; // ID of game (FTA2 of DINO).
ChunkID gameID; // ID of game (FTA2 or DINO)
Common::String saveName; // The long name of the saved
void read(Common::InSaveFile *in);
@ -58,7 +58,7 @@ struct SaveFileHeader {
};
// Load initial game state
void initGameState(void);
void initGameState();
// Save the current game state
void saveGame(Common::OutSaveFile *out, Common::String saveName);
@ -70,10 +70,10 @@ void loadSavedGameState(int16 saveNo);
void loadGame(int16 saveNo);
// Cleanup the game state
void cleanupGameState(void);
void cleanupGameState();
void checkRestartGame(const char *exeName);
void loadRestartGame(void);
void loadRestartGame();
} // end of namespace Saga2

View File

@ -122,13 +122,13 @@ enum builtinTypes {
* ===================================================================== */
// Load the SAGA data segment from the resource file
void initSAGADataSeg(void);
void initSAGADataSeg();
void saveSAGADataSeg(Common::OutSaveFile *outS);
void loadSAGADataSeg(Common::InSaveFile *in);
// Dispose of the SAGA data segment -- do nothing
inline void cleanupSAGADataSeg(void) {}
inline void cleanupSAGADataSeg() {}
/* ===================================================================== *
Thread management functions
@ -137,13 +137,13 @@ inline void cleanupSAGADataSeg(void) {}
class Thread;
// Initialize the SAGA thread list
void initSAGAThreads(void);
void initSAGAThreads();
void saveSAGAThreads(Common::OutSaveFile *outS);
void loadSAGAThreads(Common::InSaveFile *in, int32 chunkSize);
// Dispose of the active SAGA threads
void cleanupSAGAThreads(void);
void cleanupSAGAThreads();
// Dispose of an active SAGA thread
void deleteThread(Thread *p);
@ -251,7 +251,7 @@ public:
// Return the number of bytes need to archive this thread in an
// arhive buffer
int32 archiveSize(void);
int32 archiveSize();
// Create an archive of this thread in an archive buffer
void *archive(void *buf);
@ -259,10 +259,10 @@ public:
void write(Common::MemoryWriteStreamDynamic *out);
// Dispatch all asynchronous threads
static void dispatch(void);
static void dispatch();
// Intepret a single thread
scriptResult run(void);
scriptResult run();
// Tells thread to wait for an event
void waitForEvent(enum WaitTypes wt, ActiveItem *param) {
@ -272,10 +272,10 @@ public:
}
// Convert to extended script, and back to synchonous script
void setExtended(void);
void clearExtended(void);
void setExtended();
void clearExtended();
bool interpret(void);
bool interpret();
private:
uint8 *strAddress(int strNum);

View File

@ -138,7 +138,7 @@ void writeSensor(Sensor *sensor, Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
void checkSensors(void) {
void checkSensors() {
Common::Array<Sensor *> deadSensors;
for (Common::List<Sensor *>::iterator it = g_vm->_sensorList.begin(); it != g_vm->_sensorList.end(); ++it) {
@ -199,7 +199,7 @@ void assertEvent(const GameEvent &ev) {
//----------------------------------------------------------------------
// Initialize the sensors
void initSensors(void) {
void initSensors() {
// Nothing to do
assert(sizeof(ProtaganistSensor) <= maxSensorSize);
assert(sizeof(SpecificObjectSensor) <= maxSensorSize);
@ -302,7 +302,7 @@ void loadSensors(Common::InSaveFile *in) {
//----------------------------------------------------------------------
// Cleanup the active sensors
void cleanupSensors(void) {
void cleanupSensors() {
Common::List<SensorList *>::iterator sensorListNextIt;
for (Common::List<SensorList *>::iterator it = g_vm->_sensorListList.begin(); it != g_vm->_sensorListList.end(); it = sensorListNextIt) {
sensorListNextIt = it;
@ -404,7 +404,7 @@ void Sensor::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Return an integer representing the type of this sensor
int16 ProtaganistSensor::getType(void) {
int16 ProtaganistSensor::getType() {
return protaganistSensor;
}
@ -558,7 +558,7 @@ void SpecificObjectSensor::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Return an integer representing the type of this sensor
int16 SpecificObjectSensor::getType(void) {
int16 SpecificObjectSensor::getType() {
return specificObjectSensor;
}
@ -636,7 +636,7 @@ void ObjectPropertySensor::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Return an integer representing the type of this sensor
int16 ObjectPropertySensor::getType(void) {
int16 ObjectPropertySensor::getType() {
return objectPropertySensor;
}
@ -690,7 +690,7 @@ void SpecificActorSensor::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Return an integer representing the type of this sensor
int16 SpecificActorSensor::getType(void) {
int16 SpecificActorSensor::getType() {
return specificActorSensor;
}
@ -757,7 +757,7 @@ void ActorPropertySensor::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Return an integer representing the type of this sensor
int16 ActorPropertySensor::getType(void) {
int16 ActorPropertySensor::getType() {
return actorPropertySensor;
}
@ -806,7 +806,7 @@ void EventSensor::write(Common::MemoryWriteStreamDynamic *out) {
//----------------------------------------------------------------------
// Return an integer representing the type of this sensor
int16 EventSensor::getType(void) {
int16 EventSensor::getType() {
return eventSensor;
}

View File

@ -73,16 +73,16 @@ void newSensor(Sensor *s, int16 ctr);
void deleteSensor(Sensor *p);
// Check all active sensors
void checkSensors(void);
void checkSensors();
// Evaluate an event for all active sensors
void assertEvent(const GameEvent &ev);
// Initialize the sensors
void initSensors(void);
void initSensors();
void saveSensors(Common::OutSaveFile *outS);
void loadSensors(Common::InSaveFile *in);
// Cleanup the active sensors
void cleanupSensors(void);
void cleanupSensors();
/* ===================================================================== *
GameEvent struct
@ -130,13 +130,13 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
static int32 archiveSize(void) {
static int32 archiveSize() {
return sizeof(ObjectID);
}
void write(Common::MemoryWriteStreamDynamic *out);
GameObject *getObject(void) {
GameObject *getObject() {
return obj;
}
};
@ -166,7 +166,7 @@ public:
Sensor(Common::InSaveFile *in, int16 ctr);
// Virtural destructor
virtual ~Sensor(void) {
virtual ~Sensor() {
deleteSensor(this);
SensorList *sl = fetchSensorList(obj);
debugC(1, kDebugSensors, "Deleting Sensor %p of %d (%s) (list = %p, total = %d)",
@ -176,15 +176,15 @@ public:
virtual void write(Common::MemoryWriteStreamDynamic *out);
// Return an integer representing the type of this sensor
virtual int16 getType(void) = 0;
virtual int16 getType() = 0;
GameObject *getObject(void) {
GameObject *getObject() {
return obj;
}
SensorID thisID(void) {
SensorID thisID() {
return id;
}
int16 getRange(void) {
int16 getRange() {
return range;
}
@ -211,7 +211,7 @@ public:
}
// Return an integer representing the type of this sensor
int16 getType(void);
int16 getType();
// Determine if the object can sense what it's looking for
bool check(SenseInfo &info, uint32 senseFlags);
@ -266,12 +266,12 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Return an integer representing the type of this sensor
int16 getType(void);
int16 getType();
// Determine if the object can sense what it's looking for
bool check(SenseInfo &info, uint32 senseFlags);
@ -303,12 +303,12 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Return an integer representing the type of this sensor
int16 getType(void);
int16 getType();
private:
// Determine if an object meets the search criteria
@ -358,12 +358,12 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Return an integer representing the type of this sensor
int16 getType(void);
int16 getType();
// Determine if the object can sense what it's looking for
bool check(SenseInfo &info, uint32 senseFlags);
@ -395,12 +395,12 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Return an integer representing the type of this sensor
int16 getType(void);
int16 getType();
private:
// Determine if an actor meets the search criteria
@ -426,12 +426,12 @@ public:
// Return the number of bytes needed to archive this object in
// a buffer
int32 archiveSize(void);
int32 archiveSize();
void write(Common::MemoryWriteStreamDynamic *out);
// Return an integer representing the type of this sensor
int16 getType(void);
int16 getType();
// Determine if the object can sense what it's looking for
bool check(SenseInfo &info, uint32 senseFlags);

View File

@ -179,7 +179,7 @@ void Speech::read(Common::InSaveFile *in) {
//-----------------------------------------------------------------------
// Return the number of bytes needed to archive this SpeechTask
int32 Speech::archiveSize(void) {
int32 Speech::archiveSize() {
return sizeof(sampleCount)
+ sizeof(charCount)
+ sizeof(bounds)
@ -260,7 +260,7 @@ bool Speech::append(char *text, int32 sampID) {
//-----------------------------------------------------------------------
// Move speech to active list
bool Speech::activate(void) {
bool Speech::activate() {
// Remove from existing list
speechList.remove(this);
@ -277,7 +277,7 @@ bool Speech::activate(void) {
//-----------------------------------------------------------------------
// Move speech to active list
bool Speech::setupActive(void) {
bool Speech::setupActive() {
int16 x, y;
int16 buttonNum = 0,
buttonChars;
@ -482,7 +482,7 @@ bool Speech::calcPosition(StaticPoint16 &p) {
//-----------------------------------------------------------------------
// Draw the text on the back buffer
bool Speech::displayText(void) {
bool Speech::displayText() {
StaticPoint16 p;
// If there are button in the speech, then don't scroll the
@ -508,7 +508,7 @@ bool Speech::displayText(void) {
// Dispose of this speech object. If this is the one being displayed,
// then dealloc the speech image
void Speech::dispose(void) {
void Speech::dispose() {
if (speechList.currentActive() == this) {
// Actor *a = (Actor *)sp->obj;
// a->animationFlags |= animateFinished;
@ -546,7 +546,7 @@ void Speech::dispose(void) {
//-----------------------------------------------------------------------
// Render the speech object at the head of the speech queue.
void updateSpeech(void) {
void updateSpeech() {
Speech *sp;
// if there is a speech object
@ -574,7 +574,7 @@ void updateSpeech(void) {
} else speechList.SetLock(false);
}
bool Speech::longEnough(void) {
bool Speech::longEnough() {
if (speechFlags & spHasVoice)
return (!stillDoingVoice(sampleID));
else
@ -583,7 +583,7 @@ bool Speech::longEnough(void) {
// Gets rid of the current speech
void Speech::abortSpeech(void) {
void Speech::abortSpeech() {
// Start by displaying first frame straight off, no delay
speechFinished.set(0);
if (speechFlags & spHasVoice) {
@ -591,7 +591,7 @@ void Speech::abortSpeech(void) {
}
}
void abortSpeech(void) {
void abortSpeech() {
if (speechList.currentActive()) speechList.currentActive()->abortSpeech();
}
@ -866,7 +866,7 @@ void SpeechTaskList::remove(Speech *p) {
//-----------------------------------------------------------------------
// Initialize the SpeechTaskList
SpeechTaskList::SpeechTaskList(void) {
SpeechTaskList::SpeechTaskList() {
lockFlag = false;
}
@ -893,7 +893,7 @@ SpeechTaskList::SpeechTaskList(Common::InSaveFile *in) {
//-----------------------------------------------------------------------
// Return the number of bytes needed to archive the speech tasks
int32 SpeechTaskList::archiveSize(void) {
int32 SpeechTaskList::archiveSize() {
int32 size = 0;
size += sizeof(int16); // Speech count
@ -939,7 +939,7 @@ void SpeechTaskList::write(Common::MemoryWriteStreamDynamic *out) {
//-----------------------------------------------------------------------
// Cleanup the speech tasks
void SpeechTaskList::cleanup(void) {
void SpeechTaskList::cleanup() {
for (Common::List<Speech *>::iterator it = speechList._list.begin();
it != speechList._list.end(); ++it) {
delete *it;
@ -1032,7 +1032,7 @@ void SpeechTaskList::SetLock(int newState) {
//-----------------------------------------------------------------------
// When a speech task is finished, call this function to delete it.
void Speech::remove(void) {
void Speech::remove() {
speechList.remove(this);
}
@ -1081,7 +1081,7 @@ APPFUNC(cmdClickSpeech) {
//-----------------------------------------------------------------------
// Initialize the speech task list
void initSpeechTasks(void) {
void initSpeechTasks() {
// Simply call the SpeechTaskList default constructor
new (&speechList) SpeechTaskList;
}
@ -1111,7 +1111,7 @@ void loadSpeechTasks(Common::InSaveFile *in, int32 chunkSize) {
//-----------------------------------------------------------------------
// Cleanup the speech task list
void cleanupSpeechTasks(void) {
void cleanupSpeechTasks() {
// Call speechList's cleanup() function
speechList.cleanup();
}

View File

@ -39,13 +39,13 @@ namespace Saga2 {
void TileToScreenCoords(const TilePoint &tp, Point16 &p);
void TileToScreenCoords(const TilePoint &tp, StaticPoint16 &p);
void updateSpeech();
extern TilePoint centerActorCoords(void);
extern TilePoint centerActorCoords();
bool isVisible(GameObject *obj);
#ifdef FRANKC
void sentenceGenerator(char *);
void abortSpeech(void);
void abortAllSpeeches(void);
void abortSpeech();
void abortAllSpeeches();
void queueActorSpeech(
GameObject *obj,
char *text,
@ -109,19 +109,19 @@ private:
void read(Common::InSaveFile *in);
// Return the number of bytes needed to archive this SpeechTask
int32 archiveSize(void);
int32 archiveSize();
// Archive this SpeechTask in a buffer
void *archive(void *buf);
void write(Common::MemoryWriteStreamDynamic *out);
bool setupActive(void); // render speech into temp image
bool displayText(void);
bool setupActive(); // render speech into temp image
bool displayText();
int16 fits(int16 space);
void setWidth(void);
void setWidth();
bool calcPosition(StaticPoint16 &p); // calculate position
void remove(void); // Remove from active list
void remove(); // Remove from active list
public:
@ -134,13 +134,13 @@ public:
};
// remove speech, dealloc resources
void dispose(void);
void dispose();
// Append text and samples to speech
bool append(char *text, int32 sampID);
// Move speech to active list
bool activate(void);
bool activate();
// Set speech to wake up thread when done
void setWakeUp(ThreadID th) {
@ -148,10 +148,10 @@ public:
}
// See if its time to kill it
bool longEnough(void);
bool longEnough();
// Abort the current speech.
void abortSpeech(void);
void abortSpeech();
};
class SpeechTaskList {
@ -177,7 +177,7 @@ class SpeechTaskList {
public:
// Constructor
SpeechTaskList(void);
SpeechTaskList();
// Constructor -- reconstruct from archive buffer
SpeechTaskList(void **buf);
@ -185,7 +185,7 @@ public:
SpeechTaskList(Common::InSaveFile *in);
// Return the number of bytes needed to archive the speech tasks
int32 archiveSize(void);
int32 archiveSize();
// Create an archive of the speech tasks in an archive buffer
void *archive(void *buf);
@ -193,7 +193,7 @@ public:
void write(Common::MemoryWriteStreamDynamic *out);
// Cleanup the speech tasks
void cleanup(void);
void cleanup();
// Allocate a new speech task
Speech *newTask(ObjectID id, uint16 flags);
@ -201,17 +201,17 @@ public:
// Find a non-active speech for a given actor
Speech *findSpeech(ObjectID id);
Speech *currentActive(void) {
Speech *currentActive() {
if (_list.size() > 0)
return _list.front();
return nullptr;
}
int32 activeCount(void) {
int32 activeCount() {
return _list.size();
}
int speechCount(void) {
int speechCount() {
return _list.size() + _inactiveList.size();
}
@ -222,14 +222,14 @@ extern SpeechTaskList &speechList;
// Initialize the speech task list
void initSpeechTasks(void);
void initSpeechTasks();
// Save the speech tasks in a save file
void saveSpeechTasks(Common::OutSaveFile *outS);
void loadSpeechTasks(Common::InSaveFile *in, int32 chunkSize);
// Cleanup the speech task list
void cleanupSpeechTasks(void);
void cleanupSpeechTasks();
} // end of namespace Saga2

View File

@ -79,7 +79,7 @@ SpellStuff::SpellStuff() {
//-----------------------------------------------------------------------
// is this spell harmful
bool SpellStuff::isOffensive(void) {
bool SpellStuff::isOffensive() {
return (canTarget(spellTargActor) || canTarget(spellTargObject)) &&
(!canTarget(spellTargCaster));
}
@ -87,7 +87,7 @@ bool SpellStuff::isOffensive(void) {
//-----------------------------------------------------------------------
// determine whether an area spell protects the caster
bool SpellStuff::safe(void) {
bool SpellStuff::safe() {
switch (shape) {
case eAreaInvisible:
case eAreaAura:
@ -135,7 +135,7 @@ void SpellStuff::playSound(GameObject *go) {
//-----------------------------------------------------------------------
// cleanup
void SpellStuff::killEffects(void) {
void SpellStuff::killEffects() {
if (effects) {
delete effects;
}
@ -377,7 +377,7 @@ void SpellStuff::addTarget(SpellTarget *trg) {
//-----------------------------------------------------------------------
// clean the target list
void SpellStuff::removeTargetList(void) {
void SpellStuff::removeTargetList() {
switch (shape) {
case eAreaInvisible:
case eAreaAura:
@ -648,7 +648,7 @@ SpellInstance::~SpellInstance() {
// ------------------------------------------------------------------
// common initialization code
void SpellInstance::init(void) {
void SpellInstance::init() {
dProto = (*g_vm->_sdpList)[spell];
ProtoObj *proto = caster->proto();
TilePoint sPoint = caster->getWorldLocation();
@ -671,7 +671,7 @@ void SpellInstance::init(void) {
// ------------------------------------------------------------------
// common cleanup
void SpellInstance::termEffect(void) {
void SpellInstance::termEffect() {
if (eList.count)
for (int32 i = 0; i < eList.count; i++) {
if (eList.displayList[i].efx) {
@ -702,7 +702,7 @@ void SpellInstance::initEffect(TilePoint startpoint) {
// ------------------------------------------------------------------
// visual update
bool SpellInstance::buildList(void) {
bool SpellInstance::buildList() {
if (eList.dissipated()) {
termEffect();
if (effect->next == NULL)
@ -833,7 +833,7 @@ void Effectron::updateEffect(int32 deltaTime) {
}
//-----------------------------------------------------------------------
void Effectron::bump(void) {
void Effectron::bump() {
switch (parent->dProto->elasticity) {
case ecFlagBounce :
velocity = -velocity;

View File

@ -111,8 +111,8 @@ int32 loadedColorMaps;
prototypes
* ===================================================================== */
static void defineEffects(void);
static void loadMagicData(void);
static void defineEffects();
static void loadMagicData();
/* ===================================================================== *
code
@ -121,7 +121,7 @@ static void loadMagicData(void);
//-----------------------------------------------------------------------
// InitMagic called from main startup code
void initMagic(void) {
void initMagic() {
g_vm->_edpList = new EffectDisplayPrototypeList(maxEffectPrototypes);
g_vm->_sdpList = new SpellDisplayPrototypeList(maxSpellPrototypes);
@ -147,7 +147,7 @@ void initMagic(void) {
}
void cleanupMagic(void) {
void cleanupMagic() {
g_vm->_activeSpells->cleanup();
for (int i = 0; i < maxSpells; i++) {
spellBook[i].killEffects();
@ -176,7 +176,7 @@ void cleanupMagic(void) {
//-----------------------------------------------------------------------
static void defineEffects(void) {
static void defineEffects() {
int16 i;
ADD_EFFECT(1, invisibleSpellPos, invisibleSprites, invisibleSpellSta, ShortTillThere, ThinTillThere, invisibleSpellInit);
ADD_EFFECT(1, auraSpellPos, auraSprites, auraSpellSta, ShortTillThere, ThinTillThere, auraSpellInit);
@ -205,7 +205,7 @@ static void defineEffects(void) {
//-----------------------------------------------------------------------
// loadMagicData : reads magic related data from the resource file
static void loadMagicData(void) {
static void loadMagicData() {
int16 i;
hResContext *spellRes;

View File

@ -224,7 +224,7 @@ public:
next = nullptr;
};
TilePoint getPoint(void) {
TilePoint getPoint() {
switch (type) {
case spellTargetPoint :
case spellTargetObjectPoint :
@ -239,16 +239,16 @@ public:
}
}
spellTargetType getType(void) {
spellTargetType getType() {
return type;
}
GameObject *getObject(void) {
GameObject *getObject() {
assert(type == spellTargetObject);
return obj;
}
ActiveItem *getTAG(void) {
ActiveItem *getTAG() {
assert(type == spellTargetTAG);
return tag;
}
@ -310,48 +310,48 @@ public:
Effectron(uint16 newPos, uint16 newDir);
Effectron(StorageEffectron &se, SpellInstance *si);
void drawEffect(void);
void drawEffect();
void updateEffect(int32 deltaTime);
inline TilePoint SpellPos(void) {
inline TilePoint SpellPos() {
return current;
}
inline int32 spriteID(void) {
inline int32 spriteID() {
return spr;
}
inline void hide(void) {
inline void hide() {
flags |= effectronHidden;
}
inline void unhide(void) {
inline void unhide() {
flags &= (~effectronHidden);
}
inline bool isHidden(void) const {
inline bool isHidden() const {
return flags & effectronHidden;
}
inline void kill(void) {
inline void kill() {
flags |= effectronDead;
}
inline int isDead(void) const {
inline int isDead() const {
return flags & effectronDead;
}
inline void bump(void);
inline int isBumped(void) const {
inline void bump();
inline int isBumped() const {
return flags & effectronBumped;
}
inline GameWorld *world(void) const;
inline int16 getMapNum(void) const;
inline GameWorld *world() const;
inline int16 getMapNum() const;
inline EffectID spellID(void);
inline SpellDisplayPrototype *spell(void);
inline EffectID effectID(void);
inline EffectDisplayPrototype *effect(void);
inline EffectronFlags staCall(void);
inline TilePoint posCall(void);
inline SpellSpritationSeed sprCall(void);
inline spellHeight hgtCall(void);
inline spellBreadth brdCall(void);
inline EffectID spellID();
inline SpellDisplayPrototype *spell();
inline EffectID effectID();
inline EffectDisplayPrototype *effect();
inline EffectronFlags staCall();
inline TilePoint posCall();
inline SpellSpritationSeed sprCall();
inline spellHeight hgtCall();
inline spellBreadth brdCall();
inline void initCall(int16);
};

View File

@ -97,7 +97,7 @@ int32 EffectDisplayPrototypeList::add(EffectDisplayPrototype *edp) {
return count - 1;
}
void EffectDisplayPrototypeList::cleanup(void) {
void EffectDisplayPrototypeList::cleanup() {
if (maxCount && effects)
for (int i = 0; i < maxCount; i++)
if (effects[i]) {
@ -162,12 +162,12 @@ void SpellDisplayPrototype::getColorTranslation(ColorTable map, Effectron *e) {
SpellDisplayPrototypeList implementation
* ===================================================================== */
void SpellDisplayPrototypeList::init(void) {
void SpellDisplayPrototypeList::init() {
// originally this was going to load data from the resfile
// that plan has been cancelled
}
void SpellDisplayPrototypeList::cleanup(void) {
void SpellDisplayPrototypeList::cleanup() {
if (spells) {
for (int i = 0; i < maxCount; i++)
if (spells[i]) {
@ -221,11 +221,11 @@ SpellDisplayList::~SpellDisplayList() {
cleanup();
}
void SpellDisplayList::init(void) {
void SpellDisplayList::init() {
count = 0;
}
void SpellDisplayList::cleanup(void) {
void SpellDisplayList::cleanup() {
if (maxCount && spells)
delete[] spells;
spells = nullptr;
@ -237,7 +237,7 @@ void SpellDisplayList::add(SpellInstance *newSpell) {
spells[count++] = newSpell;
}
void SpellDisplayList::buildList(void) {
void SpellDisplayList::buildList() {
if (count)
for (int16 i = 0; i < count; i++) // check all active spells
if (!spells[i]->buildList()) { // update

View File

@ -131,7 +131,7 @@ public:
void setProto(SkillProto *p) {
prototype = p;
}
SkillProto *getProto(void) {
SkillProto *getProto() {
return prototype;
}
@ -139,7 +139,7 @@ public:
void addEffect(ProtoEffect *pe);
void addEffect(ResourceSpellEffect *rse);
void killEffects(void);
void killEffects();
bool canTarget(SpellTargetingTypes t) {
return targetableTypes & t;
@ -148,10 +148,10 @@ public:
return targetTypes & t;
}
bool untargetable(void) {
bool untargetable() {
return (targetableTypes == spellTargNone);
}
bool untargeted(void) {
bool untargeted() {
return false; //(targetableTypes == spellTargWorld ) ||
}
//(targetableTypes == spellTargCaster ) ||
@ -163,19 +163,19 @@ public:
void implement(GameObject *enactor, ActiveItem *target);
void implement(GameObject *enactor, Location target);
SpellID getDisplayID(void) {
SpellID getDisplayID() {
return display;
}
SpellManaID getManaType(void) {
SpellManaID getManaType() {
return manaType;
}
void setManaType(SpellManaID smid) {
manaType = smid;
}
int8 getManaAmt(void) {
int8 getManaAmt() {
return manaUse;
}
int32 getRange(void) {
int32 getRange() {
return range;
}
@ -188,8 +188,8 @@ public:
void playSound(GameObject *go);
void show(GameObject *, SpellTarget &);
bool safe(void);
bool isOffensive(void);
bool safe();
bool isOffensive();
};
/* ===================================================================== *

View File

@ -203,7 +203,7 @@ void SpellStuff::addEffect(ResourceSpellEffect *rse) {
// ------------------------------------------------------------------
// init spells
void initSpellState(void) {
void initSpellState() {
}
void saveSpellState(Common::OutSaveFile *outS) {
@ -220,7 +220,7 @@ void loadSpellState(Common::InSaveFile *in) {
// ------------------------------------------------------------------
// cleanup active spells
void cleanupSpellState(void) {
void cleanupSpellState() {
g_vm->_activeSpells->wipe();
}
@ -356,7 +356,7 @@ SpellInstance::SpellInstance(StorageSpellInstance &ssi) {
effect = effect->next;
}
size_t SpellDisplayList::saveSize(void) {
size_t SpellDisplayList::saveSize() {
size_t total = 0;
total += sizeof(count);
@ -407,7 +407,7 @@ void SpellDisplayList::read(Common::InSaveFile *in) {
assert(tCount == count);
}
void SpellDisplayList::wipe(void) {
void SpellDisplayList::wipe() {
for (int i = 0; i < maxCount; i++)
if (spells[i]) {
delete spells[i];
@ -418,7 +418,7 @@ void SpellDisplayList::wipe(void) {
assert(count == 0);
}
size_t SpellInstance::saveSize(void) {
size_t SpellInstance::saveSize() {
size_t total = 0;
total += sizeof(StorageSpellInstance);
if (eList.count)

View File

@ -167,7 +167,7 @@ public:
void setID(EffectID i) {
ID = i;
}
EffectID thisID(void) {
EffectID thisID() {
return ID;
}
};
@ -191,7 +191,7 @@ public:
~EffectDisplayPrototypeList();
int32 add(EffectDisplayPrototype *edp) ;
void cleanup(void);
void cleanup();
void append(EffectDisplayPrototype *edp, int32 acount);
EffectDisplayPrototype *operator[](EffectID e);
};
@ -259,7 +259,7 @@ public:
void setID(SpellID i) {
ID = i;
}
SpellID thisID(void) {
SpellID thisID() {
return ID;
}
};
@ -279,8 +279,8 @@ public:
SpellDisplayPrototypeList(uint16 s);
~SpellDisplayPrototypeList();
void init(void);
void cleanup(void);
void init();
void cleanup();
int32 add(SpellDisplayPrototype *sdp);
SpellDisplayPrototype *operator[](SpellID s);
};
@ -313,14 +313,14 @@ public:
SpellInstance(StorageSpellInstance &ssi);
~SpellInstance();
void init(void);
void init();
void initEffect(TilePoint);
void readEffect(Common::InSaveFile *in, uint16 eListSize);
void writeEffect(Common::MemoryWriteStreamDynamic *out);
void termEffect(void);
size_t saveSize(void);
void termEffect();
size_t saveSize();
bool buildList(void);
bool buildList();
bool updateStates(int32 deltaTime);
};
@ -337,8 +337,8 @@ class SpellDisplayList {
public :
pSpellInstance *spells;
void init(void);
void cleanup(void);
void init();
void cleanup();
SpellDisplayList(uint16 s);
~SpellDisplayList();
@ -346,13 +346,13 @@ public :
void tidyKill(uint16 spellNo);
void buildList(void);
void buildList();
void updateStates(int32 deltaTime);
void write(Common::OutSaveFile *outD);
void read(Common::InSaveFile *in);
void wipe(void);
size_t saveSize(void);
void wipe();
size_t saveSize();
};
@ -363,38 +363,38 @@ public :
//-----------------------------------------------------------------------
// Some functions that require the above definitions to work
inline GameWorld *Effectron::world(void) const {
inline GameWorld *Effectron::world() const {
return parent->world;
}
inline int16 Effectron::getMapNum(void) const {
inline int16 Effectron::getMapNum() const {
return parent->world->mapNum;
}
inline EffectID Effectron::spellID(void) {
inline EffectID Effectron::spellID() {
return parent->spell;
}
inline SpellDisplayPrototype *Effectron::spell(void) {
inline SpellDisplayPrototype *Effectron::spell() {
return (*g_vm->_sdpList)[(SpellID) spellID()];
}
inline EffectID Effectron::effectID(void) {
inline EffectID Effectron::effectID() {
return spell()->effect;
}
inline EffectDisplayPrototype *Effectron::effect(void) {
inline EffectDisplayPrototype *Effectron::effect() {
return parent->effect;
}
inline EffectronFlags Effectron::staCall(void) {
inline EffectronFlags Effectron::staCall() {
return parent->effect->status(this);
}
inline TilePoint Effectron::posCall(void) {
inline TilePoint Effectron::posCall() {
return parent->effect->location(this);
}
inline SpellSpritationSeed Effectron::sprCall(void) {
inline SpellSpritationSeed Effectron::sprCall() {
return parent->effect->spriteno(this);
}
inline spellHeight Effectron::hgtCall(void) {
inline spellHeight Effectron::hgtCall() {
return parent->effect->height(this);
}
inline spellBreadth Effectron::brdCall(void) {
inline spellBreadth Effectron::brdCall() {
return parent->effect->breadth(this);
}
inline void Effectron::initCall(int16 eno) {

View File

@ -99,7 +99,7 @@ void initQuickMem(int32 size) {
quickMemPtr = quickMemBase;
}
void cleanupQuickMem(void) {
void cleanupQuickMem() {
if (quickMemBase)
delete[] quickMemBase;
quickMemBase = nullptr;
@ -806,7 +806,7 @@ SpriteSet::~SpriteSet() {
free(_sprites);
}
void initSprites(void) {
void initSprites() {
int i;
Common::SeekableReadStream *stream = nullptr;
@ -865,7 +865,7 @@ void initSprites(void) {
}
}
void cleanupSprites(void) {
void cleanupSprites() {
int i;
cleanupQuickMem();

View File

@ -330,8 +330,8 @@ public:
Prototypes
* ===================================================================== */
void initSprites(void);
void cleanupSprites(void);
void initSprites();
void cleanupSprites();
struct TilePoint;

View File

@ -138,10 +138,10 @@ void insertLocation(
Target member functions
* ===================================================================== */
bool Target::isObjectTarget(void) const {
bool Target::isObjectTarget() const {
return false;
}
bool Target::isActorTarget(void) const {
bool Target::isActorTarget() const {
return false;
}
@ -160,7 +160,7 @@ LocationTarget::LocationTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 LocationTarget::archiveSize(void) const {
inline int32 LocationTarget::archiveSize() const {
return sizeof(loc);
}
@ -172,14 +172,14 @@ void LocationTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 LocationTarget::getType(void) const {
int16 LocationTarget::getType() const {
return locationTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t LocationTarget::size(void) const {
size_t LocationTarget::size() const {
return sizeof(*this);
}
@ -344,7 +344,7 @@ SpecificTileTarget::SpecificTileTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 SpecificTileTarget::archiveSize(void) const {
inline int32 SpecificTileTarget::archiveSize() const {
return sizeof(tile);
}
@ -356,14 +356,14 @@ void SpecificTileTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 SpecificTileTarget::getType(void) const {
int16 SpecificTileTarget::getType() const {
return specificTileTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t SpecificTileTarget::size(void) const {
size_t SpecificTileTarget::size() const {
return sizeof(*this);
}
@ -404,7 +404,7 @@ TilePropertyTarget::TilePropertyTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 TilePropertyTarget::archiveSize(void) const {
inline int32 TilePropertyTarget::archiveSize() const {
return sizeof(tileProp);
}
@ -415,14 +415,14 @@ void TilePropertyTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 TilePropertyTarget::getType(void) const {
int16 TilePropertyTarget::getType() const {
return tilePropertyTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t TilePropertyTarget::size(void) const {
size_t TilePropertyTarget::size() const {
return sizeof(*this);
}
@ -573,7 +573,7 @@ SpecificMetaTileTarget::SpecificMetaTileTarget(Common::SeekableReadStream *strea
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 SpecificMetaTileTarget::archiveSize(void) const {
inline int32 SpecificMetaTileTarget::archiveSize() const {
return sizeof(MetaTileID);
}
@ -586,14 +586,14 @@ void SpecificMetaTileTarget::write(Common::MemoryWriteStreamDynamic *out) const
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 SpecificMetaTileTarget::getType(void) const {
int16 SpecificMetaTileTarget::getType() const {
return specificMetaTileTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t SpecificMetaTileTarget::size(void) const {
size_t SpecificMetaTileTarget::size() const {
return sizeof(*this);
}
@ -637,7 +637,7 @@ MetaTilePropertyTarget::MetaTilePropertyTarget(Common::SeekableReadStream *strea
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 MetaTilePropertyTarget::archiveSize(void) const {
inline int32 MetaTilePropertyTarget::archiveSize() const {
return sizeof(metaProp);
}
@ -649,14 +649,14 @@ void MetaTilePropertyTarget::write(Common::MemoryWriteStreamDynamic *out) const
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 MetaTilePropertyTarget::getType(void) const {
int16 MetaTilePropertyTarget::getType() const {
return metaTilePropertyTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t MetaTilePropertyTarget::size(void) const {
size_t MetaTilePropertyTarget::size() const {
return sizeof(*this);
}
@ -762,7 +762,7 @@ void ObjectTarget::searchObject(
}
}
bool ObjectTarget::isObjectTarget(void) const {
bool ObjectTarget::isObjectTarget() const {
return true;
}
@ -912,7 +912,7 @@ SpecificObjectTarget::SpecificObjectTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 SpecificObjectTarget::archiveSize(void) const {
inline int32 SpecificObjectTarget::archiveSize() const {
return sizeof(obj);
}
@ -924,14 +924,14 @@ void SpecificObjectTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 SpecificObjectTarget::getType(void) const {
int16 SpecificObjectTarget::getType() const {
return specificObjectTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t SpecificObjectTarget::size(void) const {
size_t SpecificObjectTarget::size() const {
return sizeof(*this);
}
@ -1063,7 +1063,7 @@ ObjectPropertyTarget::ObjectPropertyTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 ObjectPropertyTarget::archiveSize(void) const {
inline int32 ObjectPropertyTarget::archiveSize() const {
return sizeof(objProp);
}
@ -1075,14 +1075,14 @@ void ObjectPropertyTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 ObjectPropertyTarget::getType(void) const {
int16 ObjectPropertyTarget::getType() const {
return objectPropertyTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t ObjectPropertyTarget::size(void) const {
size_t ObjectPropertyTarget::size() const {
return sizeof(*this);
}
@ -1116,7 +1116,7 @@ bool ActorTarget::isTarget(GameObject *obj) const {
return isActor(obj) && isTarget((Actor *)obj);
}
bool ActorTarget::isActorTarget(void) const {
bool ActorTarget::isActorTarget() const {
return true;
}
@ -1162,7 +1162,7 @@ SpecificActorTarget::SpecificActorTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 SpecificActorTarget::archiveSize(void) const {
inline int32 SpecificActorTarget::archiveSize() const {
return sizeof(ObjectID);
}
@ -1177,14 +1177,14 @@ void SpecificActorTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 SpecificActorTarget::getType(void) const {
int16 SpecificActorTarget::getType() const {
return specificActorTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t SpecificActorTarget::size(void) const {
size_t SpecificActorTarget::size() const {
return sizeof(*this);
}
@ -1346,7 +1346,7 @@ ActorPropertyTarget::ActorPropertyTarget(Common::SeekableReadStream *stream) {
// Return the number of bytes needed to archive this object in
// a buffer
inline int32 ActorPropertyTarget::archiveSize(void) const {
inline int32 ActorPropertyTarget::archiveSize() const {
return sizeof(actorProp);
}
@ -1358,14 +1358,14 @@ void ActorPropertyTarget::write(Common::MemoryWriteStreamDynamic *out) const {
//----------------------------------------------------------------------
// Return an integer representing the type of target
int16 ActorPropertyTarget::getType(void) const {
int16 ActorPropertyTarget::getType() const {
return actorPropertyTarget;
}
//----------------------------------------------------------------------
// Virtual function returning the sizeof this target
size_t ActorPropertyTarget::size(void) const {
size_t ActorPropertyTarget::size() const {
return sizeof(*this);
}

Some files were not shown because too many files have changed in this diff Show More