mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
LAB: Handle some differences of the Amiga version
The Amiga version is still not working, as the CONTROL and INV files are missing, and the format of the font files is different
This commit is contained in:
parent
1c02487a00
commit
c5528a631d
@ -87,7 +87,7 @@ static const ADGameDescription labDescriptions[] = {
|
||||
AD_ENTRY1s("doors", "7bf458df6ec30cc8ef4665e4d7c77f59", 2537), // game/doors
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformAmiga,
|
||||
ADGF_NO_FLAGS,
|
||||
Lab::GF_LOWRES,
|
||||
GUIO0()
|
||||
},
|
||||
AD_TABLE_END_MARKER
|
||||
|
@ -405,6 +405,7 @@ void DisplayMan::setUpScreens() {
|
||||
|
||||
createScreen(_vm->_isHiRes);
|
||||
|
||||
// TODO: The CONTROL file is not present in the Amiga version
|
||||
Common::File *controlFile = _vm->_resource->openDataFile("P:Control");
|
||||
for (uint16 i = 0; i < 20; i++)
|
||||
_vm->_moveImages[i] = new Image(controlFile, _vm);
|
||||
@ -426,6 +427,7 @@ void DisplayMan::setUpScreens() {
|
||||
moveButtonList->push_back(e->createButton(257, y, 8, VKEY_RTARROW, moveImages[18], moveImages[19]));
|
||||
moveButtonList->push_back(e->createButton(289, y, 9, 'p', moveImages[10], moveImages[11]));
|
||||
|
||||
// TODO: The INV file is not present in the Amiga version
|
||||
Common::File *invFile = _vm->_resource->openDataFile("P:Inv");
|
||||
if (_vm->getPlatform() == Common::kPlatformWindows) {
|
||||
for (uint16 imgIdx = 0; imgIdx < 10; imgIdx++)
|
||||
|
@ -1154,7 +1154,10 @@ void LabEngine::go() {
|
||||
_graphics->setUpScreens();
|
||||
|
||||
_event->initMouse();
|
||||
_msgFont = _resource->getFont("P:AvanteG.12");
|
||||
if (getPlatform() != Common::kPlatformAmiga)
|
||||
_msgFont = _resource->getFont("F:AvanteG.12");
|
||||
else
|
||||
_msgFont = _resource->getFont("F:Map.fon");
|
||||
_event->mouseHide();
|
||||
|
||||
Intro *intro = new Intro(this);
|
||||
|
@ -325,7 +325,7 @@ void Intro::introSequence() {
|
||||
_vm->_graphics->blackAllScreen();
|
||||
_vm->_music->updateMusic();
|
||||
|
||||
TextFont *msgFont = _vm->_resource->getFont("P:Map.fon");
|
||||
TextFont *msgFont = _vm->_resource->getFont("F:Map.fon");
|
||||
|
||||
_vm->_anim->_noPalChange = true;
|
||||
nReadPict("Intro.1", true);
|
||||
|
@ -51,6 +51,7 @@ void Resource::readStaticText() {
|
||||
}
|
||||
|
||||
TextFont *Resource::getFont(const char *fileName) {
|
||||
// TODO: Add support for the font format of the Amiga version
|
||||
Common::File *dataFile = openDataFile(fileName, MKTAG('V', 'G', 'A', 'F'));
|
||||
|
||||
uint32 headerSize = 4 + 2 + 256 * 3 + 4;
|
||||
@ -154,15 +155,29 @@ Common::String Resource::translateFileName(Common::String filename) {
|
||||
filename.toUppercase();
|
||||
Common::String fileNameStrFinal;
|
||||
|
||||
if (filename.hasPrefix("P:")) {
|
||||
if (filename.hasPrefix("P:") || filename.hasPrefix("F:")) {
|
||||
if (_vm->_isHiRes)
|
||||
fileNameStrFinal = "GAME/SPICT/";
|
||||
else
|
||||
fileNameStrFinal = "GAME/PICT/";
|
||||
} else if (filename.hasPrefix("LAB:"))
|
||||
fileNameStrFinal = "GAME/";
|
||||
else if (filename.hasPrefix("MUSIC:"))
|
||||
fileNameStrFinal = "GAME/MUSIC/";
|
||||
|
||||
if (_vm->getPlatform() == Common::kPlatformAmiga) {
|
||||
if (filename.hasPrefix("P:")) {
|
||||
fileNameStrFinal = "PICT/";
|
||||
} else {
|
||||
fileNameStrFinal = "LABFONTS/";
|
||||
filename += "T"; // all the Amiga fonts have a ".FONT" suffix
|
||||
}
|
||||
}
|
||||
} else if (filename.hasPrefix("LAB:")) {
|
||||
if (_vm->getPlatform() != Common::kPlatformAmiga)
|
||||
fileNameStrFinal = "GAME/";
|
||||
} else if (filename.hasPrefix("MUSIC:")) {
|
||||
if (_vm->getPlatform() != Common::kPlatformAmiga)
|
||||
fileNameStrFinal = "GAME/MUSIC/";
|
||||
else
|
||||
fileNameStrFinal = "MUSIC/";
|
||||
}
|
||||
|
||||
if (filename.contains(':')) {
|
||||
while (filename[0] != ':') {
|
||||
|
@ -51,7 +51,7 @@ namespace Lab {
|
||||
* Does the things to properly set up the detective notes.
|
||||
*/
|
||||
void LabEngine::doNotes() {
|
||||
TextFont *noteFont = _resource->getFont("P:Note.fon");
|
||||
TextFont *noteFont = _resource->getFont("F:Note.fon");
|
||||
char *noteText = _resource->getText("Lab:Rooms/Notes");
|
||||
|
||||
Common::Rect textRect = Common::Rect(_utils->vgaScaleX(25) + _utils->svgaCord(15), _utils->vgaScaleY(50), _utils->vgaScaleX(295) - _utils->svgaCord(15), _utils->vgaScaleY(148));
|
||||
@ -66,7 +66,7 @@ void LabEngine::doNotes() {
|
||||
* OpenHiRes already called.
|
||||
*/
|
||||
void LabEngine::doWestPaper() {
|
||||
TextFont *paperFont = _resource->getFont("P:News22.fon");
|
||||
TextFont *paperFont = _resource->getFont("F:News22.fon");
|
||||
char *paperText = _resource->getText("Lab:Rooms/Date");
|
||||
|
||||
Common::Rect textRect = Common::Rect(_utils->vgaScaleX(57), _utils->vgaScaleY(77) + _utils->svgaCord(2), _utils->vgaScaleX(262), _utils->vgaScaleY(91));
|
||||
@ -74,7 +74,7 @@ void LabEngine::doWestPaper() {
|
||||
_graphics->closeFont(paperFont);
|
||||
delete[] paperText;
|
||||
|
||||
paperFont = _resource->getFont("P:News32.fon");
|
||||
paperFont = _resource->getFont("F:News32.fon");
|
||||
paperText = _resource->getText("Lab:Rooms/Headline");
|
||||
|
||||
int fileLen = strlen(paperText) - 1;
|
||||
@ -93,7 +93,7 @@ void LabEngine::doWestPaper() {
|
||||
_graphics->closeFont(paperFont);
|
||||
delete[] paperText;
|
||||
|
||||
paperFont = _resource->getFont("P:Note.fon");
|
||||
paperFont = _resource->getFont("F:Note.fon");
|
||||
paperText = _resource->getText("Lab:Rooms/Col1");
|
||||
charsPrinted = _graphics->flowText(paperFont, -4, 0, 0, false, false, false, true, _utils->vgaRectScale(45, y, 158, 148), paperText);
|
||||
delete[] paperText;
|
||||
@ -109,7 +109,7 @@ void LabEngine::doWestPaper() {
|
||||
* Loads in the data for the journal.
|
||||
*/
|
||||
void LabEngine::loadJournalData() {
|
||||
_journalFont = _resource->getFont("P:Journal.fon");
|
||||
_journalFont = _resource->getFont("F:Journal.fon");
|
||||
_music->updateMusic();
|
||||
|
||||
char filename[20];
|
||||
@ -496,7 +496,7 @@ void LabEngine::doMonitor(char *background, char *textfile, bool isinteractive,
|
||||
_lastPage = false;
|
||||
_graphics->_fadePalette = _highPalette;
|
||||
|
||||
TextFont *monitorFont = _resource->getFont("P:Map.fon");
|
||||
TextFont *monitorFont = _resource->getFont("F:Map.fon");
|
||||
Common::File *buttonFile = _resource->openDataFile("P:MonImage");
|
||||
_monitorButton = new Image(buttonFile, this);
|
||||
delete buttonFile;
|
||||
|
Loading…
x
Reference in New Issue
Block a user