SAGA2: Reduce header dependency
This commit is contained in:
parent
4a5b055e10
commit
68bbf3c16c
20 changed files with 10 additions and 96 deletions
|
@ -24,8 +24,6 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/magic.h"
|
||||
#include "saga2/idtypes.h"
|
||||
|
@ -33,7 +31,6 @@
|
|||
#include "saga2/spellbuk.h"
|
||||
#include "saga2/spelshow.h"
|
||||
#include "saga2/motion.h"
|
||||
#include "saga2/actor.h"
|
||||
#include "saga2/player.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
|
|
@ -29,13 +29,9 @@
|
|||
#include "common/debug.h"
|
||||
|
||||
#include "saga2/std.h"
|
||||
|
||||
#include "saga2/fta.h"
|
||||
|
||||
#include "saga2/setup.h"
|
||||
#include "saga2/transit.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/calender.h"
|
||||
#include "saga2/tile.h"
|
||||
#include "saga2/messager.h"
|
||||
#include "saga2/intrface.h"
|
||||
|
@ -45,14 +41,10 @@
|
|||
#include "saga2/display.h"
|
||||
#include "saga2/tower.h"
|
||||
#include "saga2/tromode.h"
|
||||
#include "saga2/loadmsg.h"
|
||||
#include "saga2/ioerrors.h"
|
||||
#include "saga2/loadsave.h"
|
||||
#include "saga2/gamerate.h"
|
||||
#include "saga2/msgbox.h"
|
||||
#include "saga2/script.h"
|
||||
#include "saga2/config.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
#include "saga2/savefile.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
*/
|
||||
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/fta.h"
|
||||
#include "saga2/mainmap.h"
|
||||
|
|
|
@ -24,15 +24,10 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/mapfeatr.h"
|
||||
#include "saga2/automap.h"
|
||||
#include "saga2/tile.h"
|
||||
#include "saga2/objects.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/grequest.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
||||
|
|
|
@ -24,13 +24,8 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/fta.h"
|
||||
#include "saga2/floating.h"
|
||||
#include "saga2/modal.h"
|
||||
#include "saga2/setup.h"
|
||||
#include "saga2/speech.h"
|
||||
#include "saga2/grabinfo.h"
|
||||
|
||||
|
|
|
@ -27,18 +27,12 @@
|
|||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/cmisc.h"
|
||||
#include "saga2/dispnode.h"
|
||||
#include "saga2/tile.h"
|
||||
#include "saga2/motion.h"
|
||||
#include "saga2/actor.h"
|
||||
#include "saga2/panel.h"
|
||||
#include "saga2/tilemode.h"
|
||||
#include "saga2/transit.h"
|
||||
#include "saga2/assign.h"
|
||||
#include "saga2/magic.h"
|
||||
#include "saga2/spellbuk.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/contain.h"
|
||||
#include "saga2/intrface.h"
|
||||
#include "saga2/savefile.h"
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/blitters.h"
|
||||
#include "saga2/fta.h"
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/fta.h"
|
||||
#include "saga2/button.h"
|
||||
|
|
|
@ -24,27 +24,19 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/fta.h"
|
||||
#include "saga2/audio.h"
|
||||
#include "saga2/audiores.h"
|
||||
#include "saga2/audiodec.h"
|
||||
#include "saga2/audiofnc.h"
|
||||
#include "saga2/tcoords.h"
|
||||
#include "saga2/button.h"
|
||||
#include "saga2/annoy.h"
|
||||
#include "saga2/objproto.h"
|
||||
#include "saga2/player.h"
|
||||
|
||||
#include "saga2/queues.h"
|
||||
#include "saga2/audiosmp.h"
|
||||
#include "saga2/audqueue.h"
|
||||
#include "saga2/audiosys.h"
|
||||
|
||||
#include "saga2/config.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
||||
|
|
|
@ -28,28 +28,22 @@
|
|||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/objects.h"
|
||||
#include "saga2/actor.h"
|
||||
#include "saga2/tile.h"
|
||||
#include "saga2/terrain.h"
|
||||
#include "saga2/cmisc.h"
|
||||
#include "saga2/motion.h"
|
||||
#include "saga2/contain.h"
|
||||
#include "saga2/setup.h"
|
||||
#include "saga2/script.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/target.h"
|
||||
#include "saga2/uimetrcs.h"
|
||||
#include "saga2/magic.h"
|
||||
#include "saga2/intrface.h"
|
||||
#include "saga2/sensor.h"
|
||||
#include "saga2/timers.h"
|
||||
#include "saga2/magic.h"
|
||||
#include "saga2/grabinfo.h"
|
||||
#include "saga2/localize.h"
|
||||
#include "saga2/spellbuk.h"
|
||||
#include "saga2/tilevect.h"
|
||||
#include "saga2/dispnode.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
#include "saga2/savefile.h"
|
||||
|
||||
#include "saga2/methods.r" // generated by SAGA
|
||||
|
|
|
@ -24,22 +24,15 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/gdraw.h"
|
||||
#include "saga2/sprite.h"
|
||||
#include "saga2/objects.h"
|
||||
#include "saga2/actor.h"
|
||||
#include "saga2/grabinfo.h"
|
||||
#include "saga2/contain.h"
|
||||
#include "saga2/motion.h"
|
||||
#include "saga2/setup.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/script.h"
|
||||
#include "saga2/intrface.h"
|
||||
#include "saga2/document.h"
|
||||
#include "saga2/stimtype.h"
|
||||
#include "saga2/magic.h"
|
||||
#include "saga2/weapons.h"
|
||||
#include "saga2/spellbuk.h"
|
||||
|
@ -634,7 +627,7 @@ bool ProtoObj::acceptHealing(
|
|||
damage = absDamage;
|
||||
if (dice)
|
||||
for (int d = 0; d < abs(dice); d++)
|
||||
damage += ((rand() % sides) + pdm + 1) * (dice > 0 ? 1 : -1);
|
||||
damage += (g_vm->_rnd->getRandomNumber(sides - 1) + pdm + 1) * (dice > 0 ? 1 : -1);
|
||||
#if 0
|
||||
if ((scriptResult = stdActionScript(
|
||||
Method_GameObject_onAcceptDamage,
|
||||
|
@ -811,7 +804,7 @@ uint16 ProtoObj::containmentSet(void) {
|
|||
|
||||
// return the sprite data
|
||||
ObjectSpriteInfo ProtoObj::getSprite(GameObject *obj, enum spriteTypes spr, int16 count) {
|
||||
ObjectSpriteInfo sprInfo = { NULL, static_cast<bool>(flags & objPropFlipped != 0) };
|
||||
ObjectSpriteInfo sprInfo = { NULL, static_cast<bool>((flags & objPropFlipped) != 0) };
|
||||
int16 openOffset = ((flags & objPropVisOpen) && obj->isOpen()) ? 1 : 0;
|
||||
|
||||
switch (spr) {
|
||||
|
@ -1817,7 +1810,7 @@ void BludgeoningWeaponProto::applySkillGrowth(ObjectID enactor, uint8 points) {
|
|||
|
||||
player->skillAdvance(skillIDBludgeon, points);
|
||||
|
||||
if (rand() & 1)
|
||||
if (g_vm->_rnd->getRandomNumber(65534) & 1)
|
||||
player->skillAdvance(skillIDBrawn, points);
|
||||
}
|
||||
}
|
||||
|
@ -1854,7 +1847,7 @@ void SlashingWeaponProto::applySkillGrowth(ObjectID enactor, uint8 points) {
|
|||
|
||||
player->skillAdvance(skillIDSwordcraft, points);
|
||||
|
||||
if (rand() & 1)
|
||||
if (g_vm->_rnd->getRandomNumber(65534) & 1)
|
||||
player->skillAdvance(skillIDBrawn, points);
|
||||
}
|
||||
}
|
||||
|
@ -2181,7 +2174,7 @@ void ArrowProto::applySkillGrowth(ObjectID enactor, uint8 points) {
|
|||
|
||||
player->skillAdvance(skillIDArchery, points);
|
||||
|
||||
if (rand() & 1)
|
||||
if (g_vm->_rnd->getRandomNumber(65534) & 1)
|
||||
player->skillAdvance(skillIDBrawn, points);
|
||||
}
|
||||
}
|
||||
|
@ -2406,7 +2399,7 @@ void ShieldProto::applySkillGrowth(ObjectID enactor, uint8 points) {
|
|||
|
||||
player->skillAdvance(skillIDShieldcraft, points);
|
||||
|
||||
if (rand() & 1)
|
||||
if (g_vm->_rnd->getRandomNumber(65534) & 1)
|
||||
player->skillAdvance(skillIDBrawn, points);
|
||||
}
|
||||
}
|
||||
|
@ -2945,7 +2938,7 @@ void EncounterGeneratorProto::doBackgroundUpdate(GameObject *obj) {
|
|||
|
||||
// Now, roll to see if we got an encounter!
|
||||
|
||||
if (rand() & 0x0000ffff < prob) {
|
||||
if ((g_vm->_rnd->getRandomNumber(65534) & 0x0000ffff) < prob) {
|
||||
scriptCallFrame scf;
|
||||
|
||||
#if DEBUG
|
||||
|
|
|
@ -610,7 +610,7 @@ bool Speech::longEnough(void) {
|
|||
|
||||
// Gets rid of the current speech
|
||||
|
||||
void Speech::abort(void) {
|
||||
void Speech::abortSpeech(void) {
|
||||
// Start by displaying first frame straight off, no delay
|
||||
speechFinished.set(0);
|
||||
if (speechFlags & spHasVoice) {
|
||||
|
@ -619,7 +619,7 @@ void Speech::abort(void) {
|
|||
}
|
||||
|
||||
void abortSpeech(void) {
|
||||
if (speechList.currentActive()) speechList.currentActive()->abort();
|
||||
if (speechList.currentActive()) speechList.currentActive()->abortSpeech();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ public:
|
|||
bool longEnough(void);
|
||||
|
||||
// Abort the current speech.
|
||||
void abort(void);
|
||||
void abortSpeech(void);
|
||||
};
|
||||
|
||||
class SpeechTaskList {
|
||||
|
|
|
@ -27,13 +27,7 @@
|
|||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/objects.h"
|
||||
#include "saga2/button.h"
|
||||
#include "saga2/contain.h"
|
||||
#include "saga2/modal.h"
|
||||
#include "saga2/intrface.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
#include "saga2/grequest.h"
|
||||
#include "saga2/gtextbox.h"
|
||||
#include "saga2/loadsave.h"
|
||||
|
@ -45,7 +39,6 @@
|
|||
#include "saga2/audqueue.h"
|
||||
#include "saga2/audiosys.h"
|
||||
|
||||
#include "saga2/annoy.h"
|
||||
#include "saga2/uidialog.h"
|
||||
#include "saga2/document.h"
|
||||
#include "saga2/tilemode.h"
|
||||
|
@ -53,12 +46,8 @@
|
|||
#include "saga2/uitext.h"
|
||||
#include "saga2/vpal.h"
|
||||
#include "saga2/palette.h"
|
||||
#include "saga2/display.h"
|
||||
#include "saga2/program.h"
|
||||
#include "saga2/version.h"
|
||||
|
||||
#include "saga2/config.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
#include "saga2/fontlib.h"
|
||||
#include "saga2/savefile.h"
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/vbacksav.h"
|
||||
|
||||
|
|
|
@ -24,12 +24,8 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/floating.h"
|
||||
#include "saga2/videobox.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include "saga2/fta.h"
|
||||
#include "saga2/vpal.h"
|
||||
#include "saga2/palette.h"
|
||||
#include "saga2/transit.h"
|
||||
#include "saga2/cmisc.h"
|
||||
#include "saga2/calender.h"
|
||||
#include "saga2/player.h"
|
||||
#include "saga2/display.h"
|
||||
#include "saga2/hresmgr.h"
|
||||
#include "saga2/savefile.h"
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/vwpage.h"
|
||||
#include "saga2/vdraw.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
|
|
@ -24,14 +24,9 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/rect.h"
|
||||
#include "saga2/vdraw.h"
|
||||
#include "saga2/vwpage.h"
|
||||
#include "saga2/display.h"
|
||||
#include "saga2/vpage.h"
|
||||
|
||||
namespace Saga2 {
|
||||
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
|
||||
*/
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove
|
||||
|
||||
#include "saga2/std.h"
|
||||
#include "saga2/idtypes.h"
|
||||
#include "saga2/weapons.h"
|
||||
#include "saga2/spellbuk.h"
|
||||
#include "saga2/actor.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue