aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/bitmap.cpp5
-rw-r--r--engines/cge/cge_main.cpp14
-rw-r--r--engines/cge/config.cpp13
-rw-r--r--engines/cge/detection.cpp33
-rw-r--r--engines/cge/ems.cpp3
-rw-r--r--engines/cge/general.cpp4
-rw-r--r--engines/cge/keybd.cpp2
-rw-r--r--engines/cge/snail.cpp4
-rw-r--r--engines/cge/talk.cpp6
-rw-r--r--engines/cge/vga13h.cpp28
-rw-r--r--engines/cge/vga13h.h2
11 files changed, 41 insertions, 73 deletions
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 10fc9a4df6..9f19e91b1f 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -140,6 +140,8 @@ BITMAP::~BITMAP(void) {
case FAR_MEM :
free(V);
default:
+ warning("Unhandled MemType in Bitmap destructor");
+ break;
break;
}
}
@@ -193,6 +195,9 @@ BMP_PTR BITMAP::Code(void) {
case FAR_MEM :
free(V);
break;
+ default:
+ warning("Unhandled MemType in Bitmap::Code()");
+ break;
}
V = NULL;
}
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 2066376885..e5294c0c14 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -262,7 +262,7 @@ void CGEEngine::LoadGame(XFILE &file, bool tiny = false) {
file.Read((uint8 *) &i, sizeof(i));
if (i != SVGCHKSUM)
- error(Text->getText(BADSVG_TEXT));
+ error("%s", Text->getText(BADSVG_TEXT));
if (STARTUP::Core < CORE_HIG)
Music = false;
@@ -357,6 +357,7 @@ static void TooFar(void) {
}
+// Used in stubbed function, do not remove!
static void NoWay(void) {
Trouble(NO_WAY, NO_WAY_TEXT);
}
@@ -582,15 +583,12 @@ void CGEEngine::SetMapBrick(int x, int z) {
}
}
-//static void SwitchMapping(void);
static void SwitchColorMode(void);
-//static void StartCountDown(void);
static void SwitchDebug(void);
static void SwitchMusic(void);
static void KillSprite(void);
static void PushSprite(void);
static void PullSprite(void);
-static void BackPaint(void);
static void NextStep(void);
static void SaveMapping(void);
@@ -631,7 +629,7 @@ static void AltCtrlDel(void) {
SNPOST_(SNSAY, -1, A_C_D_TEXT, Hero);
}
-
+// Used in stubbed function, do not remove!
static void MiniStep(int stp) {
if (stp < 0)
_miniCave->Flags.Hide = true;
@@ -1357,7 +1355,7 @@ void CGEEngine::LoadSprite(const char *fname, int ref, int cav, int col = 0, int
continue;
if ((i = TakeEnum(Comd, strtok(line, " =\t"))) < 0)
- error("%s [%s]", NumStr("Bad line ######", lcnt), fname);
+ error("%s [%s]", NumStr("Bad line ######", lcnt), (const char *)fname);
switch (i) {
@@ -1365,7 +1363,7 @@ void CGEEngine::LoadSprite(const char *fname, int ref, int cav, int col = 0, int
break;
case 1 : // Type
if ((type = TakeEnum(Type, strtok(NULL, " \t,;/"))) < 0)
- error("%s [%s]", NumStr("Bad line ######", lcnt), fname);
+ error("%s [%s]", NumStr("Bad line ######", lcnt), (const char *)fname);
break;
case 2 : // Phase
++ shpcnt;
@@ -1541,7 +1539,7 @@ void CGEEngine::MainLoop() {
SayDebug();
if (_isDemo) {
- static uint32 tc = 0;
+// static uint32 tc = 0;
if (/* FIXME: TimerCount - tc >= ((182L * 6L) * 5L) && */ Talk == NULL && Snail->Idle()) {
if (Text->getText(DemoText)) {
SNPOST(SNSOUND, -1, 4, NULL); // drumla
diff --git a/engines/cge/config.cpp b/engines/cge/config.cpp
index 4aa4f40c8a..a9d55957af 100644
--- a/engines/cge/config.cpp
+++ b/engines/cge/config.cpp
@@ -59,19 +59,6 @@ namespace CGE {
#define DETECT 0xFFFF
-static void NONE(void);
-static void SB(void);
-static void SBM(void);
-static void GUS(void);
-static void GUSM(void);
-static void MIDI(void);
-static void AUTO(void);
-static void SetPortD(void);
-static void SetPortM(void);
-static void SetIRQ(void);
-static void SetDMA(void);
-
-
static int DevName[] = {
NONE_TEXT, SB_TEXT, SBM_TEXT, GUS_TEXT, GUSM_TEXT,
MIDI_TEXT, AUTO_TEXT
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index f03a42fb35..31bf629fcf 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -85,34 +85,15 @@ static const ADFileBasedFallback fileBasedFallback[] = {
} // End of namespace CGE
-static const ADParams detectionParams = {
- // Pointer to ADGameDescription or its superset structure
- (const byte *)CGE::gameDescriptions,
- // Size of that superset structure
- sizeof(ADGameDescription),
- // Number of bytes to compute MD5 sum for
- 5000,
- // List of all engine targets
- CGEGames,
- // Structure for autoupgrading obsolete targets
- 0,
- // Name of single gameid (optional)
- "Soltys",
- // List of files for file-based fallback detection (optional)
- CGE::fileBasedFallback,
- // Flags
- 0,
- // Additional GUI options (for every game}
- Common::GUIO_NONE,
- // Maximum directory depth
- 0,
- // List of directory globs
- NULL
-};
-
class CGEMetaEngine : public AdvancedMetaEngine {
public:
- CGEMetaEngine() : AdvancedMetaEngine(detectionParams) {}
+ CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames) {
+ _singleid = "Soltys";
+ }
+
+ virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ return detectGameFilebased(allFiles, CGE::fileBasedFallback);
+ }
virtual const char *getName() const {
return "CGE";
diff --git a/engines/cge/ems.cpp b/engines/cge/ems.cpp
index f1f7ece708..56d853f4e8 100644
--- a/engines/cge/ems.cpp
+++ b/engines/cge/ems.cpp
@@ -83,7 +83,7 @@ EMM::EMM(long size): Han(-1), Top(0), Lim(0), List(NULL) {
EMM::~EMM(void) {
- /*
+ /* FIXME
Release();
if (Han >= 0)
{
@@ -94,7 +94,6 @@ EMM::~EMM(void) {
asm int EMS_INT
}
*/
- warning("STUB: EMM::~EMM");
}
diff --git a/engines/cge/general.cpp b/engines/cge/general.cpp
index 428498923e..7bf753ff9f 100644
--- a/engines/cge/general.cpp
+++ b/engines/cge/general.cpp
@@ -304,7 +304,7 @@ EC void SNDInit() {
}
EC void SNDDone() {
- warning("STUB: SNDDone");
+ // FIXME: STUB: SNDDone
}
EC void SNDSetVolume() {
@@ -324,7 +324,7 @@ EC void SNDMIDIStart(uint8 *MIDFile) {
}
EC void SNDMIDIStop() {
- warning("STUB: SNDMIDIStop");
+ // FIXME: STUB: SNDMIDIStop
}
DATACK *LoadWave(XFILE *file, EMM *emm) {
diff --git a/engines/cge/keybd.cpp b/engines/cge/keybd.cpp
index 4aee394e07..8530815b16 100644
--- a/engines/cge/keybd.cpp
+++ b/engines/cge/keybd.cpp
@@ -74,7 +74,7 @@ KEYBOARD::~KEYBOARD(void) {
/* TODO replace totally by scummvm handling
setvect(KEYBD_INT, OldKeyboard);
*/
- warning("STUB: KEYBOARD::~KEYBOARD");
+ // FIXME: STUB: KEYBOARD::~KEYBOARD
}
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index 1cb53d2024..50eed3f562 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -819,7 +819,6 @@ static void SNLevel(Sprite *spr, int lev) {
static int maxcav[] = { 1, 8, 16, 23, 24 };
#endif
while (Lev < lev) {
- Sprite *spr;
++Lev;
spr = Vga->SpareQ->Locate(100 + Lev);
if (spr) {
@@ -1114,6 +1113,9 @@ void SNAIL::RunCom(void) {
case SNGHOST :
SNGhost((BITMAP *) snc->Ptr);
break;
+ default :
+ warning("Unhandled snc->Com in SNMouse(bool)");
+ break;
}
++Tail;
if (!Turbo)
diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp
index 544359897f..43917732be 100644
--- a/engines/cge/talk.cpp
+++ b/engines/cge/talk.cpp
@@ -167,14 +167,14 @@ void TALK::Update(const char *tx) {
int cw = _Font->Wid[*tx], i;
uint8 *f = _Font->Map + _Font->Pos[*tx];
for (i = 0; i < cw; i++) {
- uint8 *p = m;
+ uint8 *pp = m;
uint16 n;
register uint16 b = *(f++);
for (n = 0; n < FONT_HIG; n++) {
if (b & 1)
- *p = TEXT_FG;
+ *pp = TEXT_FG;
b >>= 1;
- p += mw;
+ pp += mw;
}
++m;
}
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index e642db8e7f..56960389c8 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -41,12 +41,8 @@
namespace CGE {
-#define FADE_STEP 2
-#define TMR_DIV ((0x8000/TMR_RATE)*2)
-
-//--------------------------------------------------------------------------
-
-static char Report[] = "NearHeap=..... FarHeap=......\n";
+#define FADE_STEP 2
+#define TMR_DIV ((0x8000/TMR_RATE)*2)
#define NREP 9
#define FREP 24
@@ -64,10 +60,9 @@ static VgaRegBlk VideoMode[] = {
// { 0x12, VGACRT, 0xFF, 0x6E }, // vert display end
// { 0x15, VGACRT, 0xFF, 0x7F }, // start vb
// { 0x10, VGACRT, 0xFF, 0x94 }, // start vr
- { 0x00 }
+ { 0x00, 0x00, 0x00, 0x00 }
};
-
bool SpeedTest = false;
Seq _seq1[] = { { 0, 0, 0, 0, 0 } };
Seq _seq2[] = { { 0, 1, 0, 0, 0 }, { 1, 0, 0, 0, 0 } };
@@ -82,8 +77,8 @@ char *NumStr(char *str, int num) {
}
-static void Video() {
/*
+static void Video() {
static uint16 SP_S;
asm push bx
@@ -100,9 +95,8 @@ static void Video() {
asm pop si
asm pop bp
asm pop bx
-*/
- warning("STUB: Video");
}
+*/
uint16 *SaveScreen(void) {
@@ -562,7 +556,7 @@ Sprite *Sprite::Expand(void) {
else {
SNAIL::COM *c = &nea[neacnt++];
if ((c->Com = (SNCOM) TakeEnum(SNAIL::ComTxt, strtok(NULL, " \t,;/"))) < 0)
- error("%s [%s]", NumStr("Bad NEAR in ######", lcnt), fname);
+ error("%s [%s]", (const char*)NumStr("Bad NEAR in ######", lcnt), (const char*)fname);
c->Ref = atoi(strtok(NULL, " \t,;/"));
c->Val = atoi(strtok(NULL, " \t,;/"));
c->Ptr = NULL;
@@ -578,7 +572,7 @@ Sprite *Sprite::Expand(void) {
else {
SNAIL::COM *c = &tak[takcnt++];
if ((c->Com = (SNCOM) TakeEnum(SNAIL::ComTxt, strtok(NULL, " \t,;/"))) < 0)
- error("%s [%s]", NumStr("Bad NEAR in ######", lcnt), fname);
+ error("%s [%s]", NumStr("Bad NEAR in ######", lcnt), (const char *)fname);
c->Ref = atoi(strtok(NULL, " \t,;/"));
c->Val = atoi(strtok(NULL, " \t,;/"));
c->Ptr = NULL;
@@ -701,6 +695,9 @@ void Sprite::KillXlat(void) {
case FAR_MEM :
free(m);
break;
+ default:
+ warning("Unhandled MemType in Sprite::KillXlat()");
+ break;
}
for (b = _ext->_shpList; *b; b++)
(*b)->M = NULL;
@@ -942,8 +939,7 @@ VGA::VGA(int mode)
for (i = 10; i < 20; i++) {
char *txt = Text->getText(i);
if (txt) {
-// puts(txt);
- warning(txt);
+ warning("%s", txt);
std = false;
}
}
@@ -986,7 +982,7 @@ VGA::~VGA(void) {
if (Nam)
buffer = buffer + " [" + Nam + "]";
- warning(buffer.c_str());
+ warning("%s", buffer.c_str());
}
}
diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h
index af1c981aa8..77594217ab 100644
--- a/engines/cge/vga13h.h
+++ b/engines/cge/vga13h.h
@@ -344,6 +344,6 @@ Sprite *Locate(int ref);
extern bool SpeedTest;
-} // End if namespace CGE
+} // End of namespace CGE
#endif