mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
CGE: Misc cleanup (provided by Digitall)
This commit is contained in:
parent
e1b6bc0427
commit
91dc5f424a
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -344,6 +344,6 @@ Sprite *Locate(int ref);
|
||||
|
||||
extern bool SpeedTest;
|
||||
|
||||
} // End if namespace CGE
|
||||
} // End of namespace CGE
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user