mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
HOPKINS: Added further configuration setup
This commit is contained in:
parent
c10f87f9c8
commit
578b1601fe
46
engines/hopkins/files.h
Normal file
46
engines/hopkins/files.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HOPKINS_FILES_H
|
||||
#define HOPKINS_FILES_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "common/hash-str.h"
|
||||
#include "common/str.h"
|
||||
#include "common/stream.h"
|
||||
|
||||
namespace Hopkins {
|
||||
|
||||
class FileManager {
|
||||
public:
|
||||
static void initSaves();
|
||||
static bool SAUVE_FICHIER(const Common::String &file, const void *buf, size_t n);
|
||||
static bool bsave(const Common::String &file, const void *buf, size_t n);
|
||||
static void Chage_Inifile(Common::StringMap &iniParams);
|
||||
static void *CHARGE_FICHIER(const Common::String &file);
|
||||
static void DMESS1();
|
||||
static int bload_it(Common::ReadStream &stream, void *buf, size_t nbytes);
|
||||
};
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
||||
#endif /* HOPKINS_GLOBALS_H */
|
@ -27,11 +27,46 @@ namespace Hopkins {
|
||||
Globals::Globals() {
|
||||
FR = 0;
|
||||
SVGA = 2;
|
||||
MANU_SCROLL = 0;
|
||||
MANU_SCROLL = 1;
|
||||
SPEED_SCROLL = 16;
|
||||
internet = 1;
|
||||
PUBEXIT = 0;
|
||||
FADESPD = 15;
|
||||
vitesse = 1;
|
||||
INSTALL_TYPE = 1;
|
||||
MUSICVOL = 6;
|
||||
SOUNDVOL = 6;
|
||||
VOICEVOL = 6;
|
||||
MUSICOFF = false;
|
||||
SOUNDOFF = false;
|
||||
VOICEOFF = false;
|
||||
}
|
||||
|
||||
void Globals::setConfig() {
|
||||
HOPIMAGE = "BUFFER";
|
||||
HOPANIM = "ANIM";
|
||||
HOPLINK = "LINK";
|
||||
HOPSAVE = "SAVE";
|
||||
HOPSOUND = "SOUND";
|
||||
HOPMUSIC = "MUSIC";
|
||||
HOPVOICE = "VOICE";
|
||||
HOPANM = "ANM";
|
||||
HOPSEQ = "SEQ";
|
||||
|
||||
switch (FR) {
|
||||
case 0:
|
||||
FICH_ZONE = "ZONEAN.TXT";
|
||||
FICH_TEXTE = "TEXTEAN.TXT";
|
||||
break;
|
||||
case 1:
|
||||
FICH_ZONE = "ZONE01.TXT";
|
||||
FICH_TEXTE = "TEXTE01.TXT";
|
||||
break;
|
||||
case 2:
|
||||
FICH_ZONE = "ZONEES.TXT";
|
||||
FICH_TEXTE = "TEXTEES.TXT";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define HOPKINS_GLOBALS_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "common/str.h"
|
||||
|
||||
namespace Hopkins {
|
||||
|
||||
@ -39,8 +40,34 @@ public:
|
||||
int SPEED_SCROLL;
|
||||
int internet;
|
||||
int PUBEXIT;
|
||||
bool XFULLSCREEN;
|
||||
int XSETMODE;
|
||||
int XZOOM;
|
||||
bool XFORCE16;
|
||||
bool XFORCE8;
|
||||
bool CARD_SB;
|
||||
int vitesse;
|
||||
int INSTALL_TYPE;
|
||||
Common::String HOPIMAGE;
|
||||
Common::String HOPANIM;
|
||||
Common::String HOPLINK;
|
||||
Common::String HOPSAVE;
|
||||
Common::String HOPSOUND;
|
||||
Common::String HOPMUSIC;
|
||||
Common::String HOPVOICE;
|
||||
Common::String HOPANM;
|
||||
Common::String HOPSEQ;
|
||||
Common::String FICH_ZONE;
|
||||
Common::String FICH_TEXTE;
|
||||
int SOUNDVOL;
|
||||
int MUSICVOL;
|
||||
int VOICEVOL;
|
||||
bool SOUNDOFF;
|
||||
bool MUSICOFF;
|
||||
bool VOICEOFF;
|
||||
|
||||
Globals();
|
||||
Globals();
|
||||
void setConfig();
|
||||
};
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
@ -51,17 +51,6 @@ Common::Error HopkinsEngine::run() {
|
||||
processIniParams(iniParams);
|
||||
|
||||
/*
|
||||
Chage_Inifile();
|
||||
LOAD_CONFIG();
|
||||
*(_DWORD *)HOPIMAGE = dword_807B6D0;
|
||||
*(_WORD *)&HOPIMAGE[4] = word_807B6D4;
|
||||
HOPIMAGE[6] = byte_807B6D6;
|
||||
*(_DWORD *)HOPANIM = dword_807B6D7;
|
||||
HOPANIM[4] = byte_807B6DB;
|
||||
*(_DWORD *)HOPLINK = dword_807B6DC;
|
||||
HOPLINK[4] = byte_807B6E0;
|
||||
*(_DWORD *)HOPSAVE = dword_807B6E1;
|
||||
HOPSAVE[4] = byte_807B6E5;
|
||||
if ( FR == 1 )
|
||||
{
|
||||
*(_DWORD *)FICH_ZONE = dword_807B6E6;
|
||||
@ -530,7 +519,23 @@ int HopkinsEngine::getRandomNumber(int maxNumber) {
|
||||
}
|
||||
|
||||
void HopkinsEngine::processIniParams(Common::StringMap &iniParams) {
|
||||
GLOBALS.XFULLSCREEN = iniParams["FULLSCREEN"] == "YES";
|
||||
|
||||
GLOBALS.XSETMODE = 1;
|
||||
if (iniParams.contains("SETMODE")) {
|
||||
int setMode = atoi(iniParams["SETMODE"].c_str());
|
||||
GLOBALS.XSETMODE = CLIP(setMode, 1, 5);
|
||||
}
|
||||
|
||||
GLOBALS.XZOOM = 0;
|
||||
if (GLOBALS.XSETMODE == 5 && iniParams.contains("ZOOM")) {
|
||||
int zoom = atoi(iniParams["ZOOM"].c_str());
|
||||
GLOBALS.XZOOM = CLIP(zoom, 25, 100);
|
||||
}
|
||||
|
||||
GLOBALS.XFORCE16 = iniParams["FORCE16BITS"] == "YES";
|
||||
GLOBALS.XFORCE8 = iniParams["FORCE8BITS"] == "YES";
|
||||
GLOBALS.CARD_SB = iniParams["SOUND"] == "YES";
|
||||
}
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
@ -61,6 +61,9 @@ private:
|
||||
const HopkinsGameDescription *_gameDescription;
|
||||
Common::RandomSource _randomSource;
|
||||
|
||||
/**
|
||||
* Processes the loaded list of ini file parameters
|
||||
*/
|
||||
void processIniParams(Common::StringMap &iniParams);
|
||||
protected:
|
||||
// Engine APIs
|
||||
|
Loading…
Reference in New Issue
Block a user