mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
Move some things around, to get rid of all these resource/ sprintf's for CMI
svn-id: r6182
This commit is contained in:
parent
a8b5549fb5
commit
fd64fc2b6b
@ -53,7 +53,7 @@ public:
|
||||
// Get the save game dir path
|
||||
const char *getSavePath() const;
|
||||
|
||||
const char *getGameDataPath() const { return _gameDataPath; }
|
||||
virtual const char *getGameDataPath() const { return _gameDataPath; }
|
||||
|
||||
// Create a new engine object based on the detector - either
|
||||
// a Scumm or a SimonState object currently.
|
||||
|
@ -397,7 +397,7 @@ CharsetRendererNut::CharsetRendererNut(Scumm *vm)
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
char fontname[256];
|
||||
sprintf(fontname, "resource/font%d.nut", i);
|
||||
sprintf(fontname, "font%d.nut", i);
|
||||
warning("Loading charset %s\n", fontname);
|
||||
_fr[i] = new NutRenderer(_vm);
|
||||
if (!(_fr[i]->loadFont(fontname, _vm->getGameDataPath()))) {
|
||||
|
@ -194,7 +194,7 @@ bool Scumm::openResourceFile(const char *filename)
|
||||
}
|
||||
|
||||
strcpy(buf, filename);
|
||||
_fileHandle.open(buf, getGameDataPath(), 1, _encbyte);
|
||||
_fileHandle.open(buf, getResDataPath(), 1, _encbyte);
|
||||
|
||||
return _fileHandle.isOpen();
|
||||
}
|
||||
|
@ -1283,8 +1283,7 @@ void Scumm_v8::o8_startVideo()
|
||||
char dirName[255];
|
||||
int len = resStrLen((char*)_scriptPointer);
|
||||
|
||||
sprintf(dirName, "%s/resource/", getGameDataPath());
|
||||
warning("o8_startVideo(%s/%s)\n", dirName, (char*)_scriptPointer);
|
||||
warning("o8_startVideo(%s/%s)\n", getGameDataPath(), (char*)_scriptPointer);
|
||||
|
||||
//ScummRenderer * sr = new ScummRenderer(this, 1000/14);
|
||||
//SmushPlayer * sp = new SmushPlayer(sr);
|
||||
|
@ -280,6 +280,16 @@ public:
|
||||
int scummLoop(int delta);
|
||||
void initScummVars();
|
||||
|
||||
const char *getResDataPath() const {return _gameDataPath;}
|
||||
const char *getGameDataPath() const {
|
||||
if (_features & GF_AFTER_V8) {
|
||||
char resourcePath[255];
|
||||
sprintf(resourcePath, "%s/resource", _gameDataPath);
|
||||
return resourcePath;
|
||||
}
|
||||
return _gameDataPath;
|
||||
}
|
||||
|
||||
void pauseGame(bool user);
|
||||
void shutDown(int i);
|
||||
void setOptions(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user