mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 07:30:56 +00:00
Use Saga namespace everywhere
svn-id: r13293
This commit is contained in:
parent
af80eef70e
commit
8ca8912dbd
@ -23,6 +23,8 @@
|
||||
|
||||
#include "binread.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
BinReader::BinReader() {
|
||||
_buf = NULL;
|
||||
_bufPtr = NULL;
|
||||
@ -146,4 +148,4 @@ int32 BinReader::readSint32BE() {
|
||||
return u32_be;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "gamedesc.h"
|
||||
#include "gamedesc_priv.h"
|
||||
|
||||
using namespace SagaGameDesc;
|
||||
namespace Saga {
|
||||
|
||||
/*--------------------------------------------------------------------------*\
|
||||
* Inherit the Earth - Demo version
|
||||
@ -308,7 +308,7 @@ R_GAMEDESC GameDescs[] = {
|
||||
|
||||
static R_GAMEMODULE GameModule;
|
||||
|
||||
void SagaGameDesc::setGameDirectory(const char *gamedir) {
|
||||
void setGameDirectory(const char *gamedir) {
|
||||
assert(gamedir != NULL);
|
||||
|
||||
debug(1, "Using game data path: %s", gamedir);
|
||||
@ -316,7 +316,7 @@ void SagaGameDesc::setGameDirectory(const char *gamedir) {
|
||||
GameModule.game_dir = gamedir;
|
||||
}
|
||||
|
||||
int SagaGameDesc::detectGame() {
|
||||
int detectGame() {
|
||||
File test_file;
|
||||
|
||||
bool disqualified = false;
|
||||
@ -381,7 +381,7 @@ int SagaGameDesc::detectGame() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool SagaGameDesc::openGame() {
|
||||
bool openGame() {
|
||||
int game_filect;
|
||||
|
||||
if ((GameModule.game_index = detectGame()) < 0) {
|
||||
@ -445,3 +445,5 @@ bool verifyIHNMDEMO() {
|
||||
bool verifyIHNMCD() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
/* Public stuff */
|
||||
|
||||
namespace SagaGameDesc {
|
||||
namespace Saga {
|
||||
|
||||
enum R_GAME_BASETYPES {
|
||||
R_GAMETYPE_ITE,
|
||||
@ -120,9 +120,6 @@ typedef struct R_GAME_RESOURCEINFO_tag {
|
||||
|
||||
} // end namespace
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "gamedesc.h"
|
||||
|
||||
using namespace SagaGameDesc;
|
||||
namespace Saga {
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Private stuff
|
||||
@ -43,32 +43,30 @@ using namespace SagaGameDesc;
|
||||
typedef bool (ResourceFile::*R_GAME_VERIFYFUNC)();
|
||||
|
||||
typedef struct R_GAME_FILEDESC_tag {
|
||||
|
||||
const char * gf_fname;
|
||||
unsigned int gf_type;
|
||||
const char *gf_fname;
|
||||
unsigned int gf_type;
|
||||
|
||||
} R_GAME_FILEDESC;
|
||||
|
||||
typedef struct R_GAMEDESC_tag {
|
||||
|
||||
int gd_game_type;
|
||||
int gd_game_id;
|
||||
|
||||
const char * gd_title;
|
||||
const char *gd_title;
|
||||
|
||||
R_GAME_DISPLAYINFO * gd_display_info;
|
||||
R_GAME_DISPLAYINFO *gd_display_info;
|
||||
|
||||
int gd_startscene;
|
||||
|
||||
R_GAME_RESOURCEINFO * gd_resource_info;
|
||||
R_GAME_RESOURCEINFO *gd_resource_info;
|
||||
|
||||
int gd_filect;
|
||||
R_GAME_FILEDESC * gd_filedescs;
|
||||
int gd_filect;
|
||||
R_GAME_FILEDESC *gd_filedescs;
|
||||
|
||||
int gd_fontct;
|
||||
R_GAME_FONTDESC * gd_fontdescs;
|
||||
int gd_fontct;
|
||||
R_GAME_FONTDESC *gd_fontdescs;
|
||||
|
||||
R_GAME_SOUNDINFO * gd_soundinfo;
|
||||
R_GAME_SOUNDINFO *gd_soundinfo;
|
||||
|
||||
int gd_supported;
|
||||
|
||||
@ -76,7 +74,6 @@ typedef struct R_GAMEDESC_tag {
|
||||
|
||||
|
||||
typedef struct R_GAME_FILEDATA_tag {
|
||||
|
||||
ResourceFile *file_ctxt;
|
||||
|
||||
unsigned int file_types;
|
||||
@ -86,26 +83,25 @@ typedef struct R_GAME_FILEDATA_tag {
|
||||
|
||||
|
||||
typedef struct R_GAMEMODULE_tag {
|
||||
|
||||
int game_init;
|
||||
int game_index;
|
||||
|
||||
R_GAMEDESC * gamedesc;
|
||||
R_GAMEDESC *gamedesc;
|
||||
|
||||
int g_skipintro;
|
||||
|
||||
const char *game_dir;
|
||||
|
||||
char game_language[ R_GAME_LANGSTR_LIMIT ];
|
||||
char game_language[R_GAME_LANGSTR_LIMIT];
|
||||
|
||||
unsigned int gfile_n;
|
||||
R_GAME_FILEDATA * gfile_data;
|
||||
R_GAME_FILEDATA *gfile_data;
|
||||
|
||||
unsigned int gd_fontct;
|
||||
R_GAME_FONTDESC * gd_fontdescs;
|
||||
R_GAME_FONTDESC *gd_fontdescs;
|
||||
|
||||
int err_n;
|
||||
const char * err_str;
|
||||
int err_n;
|
||||
const char *err_str;
|
||||
|
||||
} R_GAMEMODULE;
|
||||
|
||||
@ -115,6 +111,8 @@ bool verifyITECD();
|
||||
bool verifyIHNMDEMO();
|
||||
bool verifyIHNMCD();
|
||||
|
||||
}
|
||||
|
||||
#endif // SAGA_GAMEDESC_PRIV_H
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "resfile.h"
|
||||
#include "binread.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
ResourceFile::ResourceFile() {
|
||||
_resTblOffset = 0;
|
||||
@ -130,7 +131,7 @@ bool ResourceFile::loadResource(int32 rn, byte **res, int32 *res_len) {
|
||||
*res = NULL;
|
||||
*res_len = NULL;
|
||||
|
||||
if (!R_PBOUNDS( rn, _resTblCt)) {
|
||||
if (!R_PBOUNDS(rn, _resTblCt)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -158,13 +159,4 @@ void ResourceFile::freeResource(byte *res) {
|
||||
delete[] res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -48,13 +48,13 @@ struct SAGAGameSettings {
|
||||
|
||||
static const SAGAGameSettings saga_settings[] = {
|
||||
/* Inherit the Earth - Original floppy version */
|
||||
{ "ite", "Inherit the Earth (DOS)", GID_ITE,
|
||||
{ "ite", "Inherit the Earth (DOS)", Saga::GID_ITE,
|
||||
MDT_ADLIB, "ite.rsc" },
|
||||
/* Inherit the Earth - CD version */
|
||||
{ "itecd", "Inherit the Earth (DOS CD Version)", GID_ITECD,
|
||||
{ "itecd", "Inherit the Earth (DOS CD Version)", Saga::GID_ITECD,
|
||||
MDT_ADLIB, "sounds.rsc" },
|
||||
/* I Have No Mouth and I Must Scream */
|
||||
{ "ihnm", "I Have No Mouth and I Must Scream (DOS)", GID_IHNM,
|
||||
{ "ihnm", "I Have No Mouth and I Must Scream (DOS)", Saga::GID_IHNM,
|
||||
MDT_ADLIB, "scream.res" },
|
||||
|
||||
{ NULL, NULL, 0, 0, NULL }
|
||||
@ -90,7 +90,7 @@ DetectedGameList Engine_SAGA_detectGames(const FSList &fslist) {
|
||||
}
|
||||
|
||||
Engine *Engine_SAGA_create(GameDetector *detector, OSystem *syst) {
|
||||
return new SagaEngine(detector, syst);
|
||||
return new Saga::SagaEngine(detector, syst);
|
||||
}
|
||||
|
||||
REGISTER_PLUGIN("SAGA Engine", Engine_SAGA_gameList, Engine_SAGA_create, Engine_SAGA_detectGames)
|
||||
@ -100,8 +100,8 @@ namespace Saga {
|
||||
SagaEngine::SagaEngine(GameDetector *detector, OSystem *syst)
|
||||
: Engine(syst) {
|
||||
|
||||
SagaGameDesc::setGameDirectory(getGameDataPath());
|
||||
SagaGameDesc::openGame();
|
||||
setGameDirectory(getGameDataPath());
|
||||
openGame();
|
||||
|
||||
// Setup mixer
|
||||
if (!_mixer->isReady()) {
|
||||
|
@ -29,6 +29,8 @@
|
||||
|
||||
#include "gamedesc.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
#define R_PBOUNDS(n,max) (((n)>=(0))&&((n)<(max)))
|
||||
|
||||
enum SAGAGameId {
|
||||
@ -52,5 +54,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user