mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
SAGA: Migrate engine to Path
This commit is contained in:
parent
50e4085263
commit
f58b045ec8
@ -227,7 +227,7 @@ DefaultFont::~DefaultFont() {
|
||||
}
|
||||
}
|
||||
|
||||
void DefaultFont::loadChineseFontITE(const Common::String& fileName) {
|
||||
void DefaultFont::loadChineseFontITE(const Common::Path &fileName) {
|
||||
Common::File f;
|
||||
if (!f.open(fileName))
|
||||
return;
|
||||
@ -246,7 +246,7 @@ void DefaultFont::loadChineseFontITE(const Common::String& fileName) {
|
||||
}
|
||||
}
|
||||
|
||||
void DefaultFont::loadKoreanFontIHNM(const Common::String& fileName) {
|
||||
void DefaultFont::loadKoreanFontIHNM(const Common::Path &fileName) {
|
||||
Common::File f;
|
||||
if (!f.open(fileName))
|
||||
return;
|
||||
|
@ -239,8 +239,8 @@ class DefaultFont : public Font {
|
||||
void loadFont(FontData *font, uint32 fontResourceId);
|
||||
void loadFont(FontData *font, const ByteArray& fontResourceData, bool isBigEndian);
|
||||
void loadChineseFontIHNM(FontData *font, uint32 fontResourceId);
|
||||
void loadChineseFontITE(const Common::String& fileName);
|
||||
void loadKoreanFontIHNM(const Common::String& fileName);
|
||||
void loadChineseFontITE(const Common::Path &fileName);
|
||||
void loadKoreanFontIHNM(const Common::Path &fileName);
|
||||
void saveBig5Index(byte head, byte tail, uint curIdx);
|
||||
void createOutline(FontData *font);
|
||||
void blitGlyph(const Common::Point &textPoint, const byte* bitmap, int charWidth, int charHeight, int rowLength, byte color);
|
||||
|
@ -470,9 +470,9 @@ void Music::playQuickTime(uint32 resourceId, MusicFlags flags) {
|
||||
// Handle music looping
|
||||
_parser->property(MidiParser::mpAutoLoop, flags & MUSIC_LOOP);
|
||||
|
||||
const Common::String &musicName = Common::String::format("Music/Music%02x", resourceId);
|
||||
Common::Path musicName(Common::String::format("Music/Music%02x", resourceId));
|
||||
if (!((MidiParser_QT *)_parser)->loadFromContainerFile(musicName))
|
||||
error("Music::playQuickTime(): Failed to load file '%s'", musicName.c_str());
|
||||
error("Music::playQuickTime(): Failed to load file '%s'", musicName.toString().c_str());
|
||||
_parser->setTrack(0);
|
||||
}
|
||||
|
||||
|
@ -501,12 +501,13 @@ void Resource::loadResource(ResourceContext *context, uint32 resourceId, ByteArr
|
||||
sz--;
|
||||
if (sz > 0)
|
||||
sz--;
|
||||
Common::Path filePath;
|
||||
if (_vm->getFeatures() & GF_ITE_FLOPPY)
|
||||
fileName = Common::String::format("%s%02d.adf", fileName.substr(0, sz).c_str(), resourceData->diskNum + 1);
|
||||
filePath = Common::Path(Common::String::format("%s%02d.adf", fileName.substr(0, sz).c_str(), resourceData->diskNum + 1));
|
||||
else
|
||||
fileName = Common::String::format("%s.%03d", fileName.substr(0, sz).c_str(), resourceData->diskNum);
|
||||
if (!actualFile.open(fileName))
|
||||
error("Resource::loadResource() failed to open %s", fileName.c_str());
|
||||
filePath = Common::Path(Common::String::format("%s.%03d", fileName.substr(0, sz).c_str(), resourceData->diskNum));
|
||||
if (!actualFile.open(filePath))
|
||||
error("Resource::loadResource() failed to open %s", filePath.toString().c_str());
|
||||
file = &actualFile;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
|
||||
|
||||
_frameCount = 0;
|
||||
|
||||
const Common::FSNode gameDataDir(ConfMan.get("path"));
|
||||
const Common::FSNode gameDataDir(ConfMan.getPath("path"));
|
||||
|
||||
// The Linux version of Inherit the Earth puts all data files in an
|
||||
// 'itedata' sub-directory, except for voices.rsc
|
||||
|
Loading…
x
Reference in New Issue
Block a user