diff options
author | Strangerke | 2011-06-12 22:06:44 +0200 |
---|---|---|
committer | Strangerke | 2011-06-12 22:06:44 +0200 |
commit | b1df7ca7340ccf43817894eedcaea6d211eeb6dd (patch) | |
tree | 97ab669a4815d65f5ed14d548cb8b8115c1fe98f /engines | |
parent | 3bef49c003a888b935dc2aeaf2aa00e66249e71c (diff) | |
download | scummvm-rg350-b1df7ca7340ccf43817894eedcaea6d211eeb6dd.tar.gz scummvm-rg350-b1df7ca7340ccf43817894eedcaea6d211eeb6dd.tar.bz2 scummvm-rg350-b1df7ca7340ccf43817894eedcaea6d211eeb6dd.zip |
CGE: Add missing file, and STUB some missing functions in general.cpp
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/cge_main.cpp | 3 | ||||
-rw-r--r-- | engines/cge/ems.cpp | 240 | ||||
-rw-r--r-- | engines/cge/game.cpp | 2 | ||||
-rw-r--r-- | engines/cge/general.cpp | 346 | ||||
-rw-r--r-- | engines/cge/general.h | 29 | ||||
-rw-r--r-- | engines/cge/module.mk | 3 | ||||
-rw-r--r-- | engines/cge/snddrv.h | 6 | ||||
-rw-r--r-- | engines/cge/stdpal.cpp | 92 | ||||
-rw-r--r-- | engines/cge/vga13h.cpp | 10 | ||||
-rw-r--r-- | engines/cge/vol.cpp | 8 |
10 files changed, 613 insertions, 126 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 4c3611650c..9a2ce931f0 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -297,8 +297,7 @@ static void LoadGame (XFILE& file, bool tiny = false) if (i != SVGCHKSUM) error(Text[BADSVG_TEXT]); if (STARTUP::Core < CORE_HIG) Music = false; - if (STARTUP::SoundOk == 1 && STARTUP::Mode == 0) - { + if (STARTUP::SoundOk == 1 && STARTUP::Mode == 0) { SNDDrvInfo.VOL2.D = volume[0]; SNDDrvInfo.VOL2.M = volume[1]; SNDSetVolume(); diff --git a/engines/cge/ems.cpp b/engines/cge/ems.cpp new file mode 100644 index 0000000000..abf118bda2 --- /dev/null +++ b/engines/cge/ems.cpp @@ -0,0 +1,240 @@ +/* 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. + * + */ + +/* + * This code is based on original Soltys source code + * Copyright (c) 1994-1995 Janus B. Wisniewski and L.K. Avalon + */ + +#include "cge/general.h" + +namespace CGE { + +#define EMS_INT 0x67 +#define PAGE_MASK 0x3FFF +#define SIZ(n) ((n) ? ((long)n) : (0x10000L)) + + +enum EMM_FUN { GET_STATUS = 0x40, + GET_FRAME, + GET_SIZE, + OPEN_HANDLE, + MAP_PAGE, + CLOSE_HANDLE, + GET_VER, + SAVE_CONTEXT, + REST_CONTEXT, + GET_PAGES = 0x4B, + GET_HANDLES, + GET_INFO, + CONTROL }; + + +void *EMM::Frame = NULL; + + +EMM::EMM (long size): Han(-1), Top(0), Lim(0), List(NULL) { +/* + if (Test()) + { + asm mov ah,GET_FRAME // get EMS frame segment + asm int EMS_INT // do it! + asm or ah,ah // see status + asm jnz xit // abort on error + Frame = (void _seg *) _BX; // save frame segment + + if (size == 0) + { + asm mov ah,GET_SIZE // get EMS memory size + asm int EMS_INT // do it! + asm or ah,ah // see status + asm jnz xit // abort on error + asm or bx,bx // test page count + asm jz xit // abort if no free pages + // number of available pages in BX is ready to use by OPEN + } + else _BX = (uint16) ((size + PAGE_MASK) >> 14); + asm mov ah,OPEN_HANDLE // open EMM handle + asm int EMS_INT // do it! + asm or ah,ah // see status + asm jnz xit // abort on error + Han = _DX; + Lim = _BX; + Lim <<= 14; + _DX = Han; + asm mov ah,SAVE_CONTEXT // save mapping context + asm int EMS_INT // do it! + } + xit: +*/ + warning("STUB: EMM:EMM"); +} + + +EMM::~EMM(void) { +/* + Release(); + if (Han >= 0) + { + _DX = Han; + asm mov ah,REST_CONTEXT + asm int EMS_INT + asm mov ah,CLOSE_HANDLE + asm int EMS_INT + } +*/ + warning("STUB: EMM::~EMM"); +} + + + +bool EMM::Test(void) { +/* + static char e[] = "EMMXXXX0"; + + asm mov ax,0x3D40 + asm mov dx,offset e + asm int 0x21 + asm jc fail + + asm push ax + asm mov bx,ax + asm mov ax,0x4407 + asm int 0x21 + + asm pop bx + asm push ax + asm mov ax,0x3E00 + asm int 0x21 + asm pop ax + + asm cmp al,0x00 + asm je fail + + success: + return TRUE; + fail: + return FALSE; +*/ + warning("EMM::Test"); + return FALSE; +} + + +EMS * EMM::Alloc (uint16 siz) { +/* + long size = SIZ(siz), + top = Top; + + uint16 pgn = (uint16) (top >> 14), + cnt = (uint16) ((top + size + PAGE_MASK) >> 14) - pgn; + + if (cnt > 4) + { + top = (top + PAGE_MASK) & 0xFFFFC000L; + ++ pgn; + -- cnt; + } + + if (size <= Lim - top) + { + EMS * e = new EMS, * f; + + if (e) + { + Top = (e->Ptr = top) + (e->Siz = siz); + e->Emm = this; + + if (List) + { + for (f = List; f->Nxt; f = f->Nxt); + return (f->Nxt = e); // existing list: link to the end + } + else + { + return (List = e); // empty list: link to the head + } + } + } + fail: return NULL; +*/ + warning("STUB: EMM::Alloc"); + return NULL; +} + + +void EMM::Release (void) { + while (List) + { + EMS * e = List; + List = e->Nxt; + delete e; + } + Top = 0; +} + + +EMS::EMS (void) +: Ptr(0), Siz(0), Nxt(NULL) +{ +} + + +void * EMS::operator & () const +{ +/* + uint16 pgn = (uint16) (Ptr >> 14), + off = (uint16) Ptr & PAGE_MASK, + cnt = (uint16) ((Ptr + SIZ(Siz) + PAGE_MASK) >> 14) - pgn, + cmd = MAP_PAGE << 8; + + _DX = Emm->Han; // take EMM handle + asm dec cnt // prapare for deferred checking + asm or dx,dx // see if valid + asm jns more // negative handle = unavailable + + fail: return NULL; + + more: + asm mov ax,cmd // command + page frame index + asm mov bx,pgn // logical page number + asm int EMS_INT // do it! + asm or ah,ah // check error code + asm jnz fail // exit on error + asm inc cmd // advance page frame index + asm inc pgn // advance logical page number + asm cmp al,byte ptr cnt // all pages? + asm jb more + + return (void *) (EMM::Frame + (void *) off); +*/ + warning("STUB: EMS::operator &"); + return NULL; +} + + +uint16 EMS::Size (void) +{ + return Siz; +} + +} // End of namespace CGE diff --git a/engines/cge/game.cpp b/engines/cge/game.cpp index b6530323e4..86e1324e0b 100644 --- a/engines/cge/game.cpp +++ b/engines/cge/game.cpp @@ -92,7 +92,7 @@ FLY::FLY (BITMAP ** shpl) : SPRITE(shpl), Tx(0), Ty(0) { Step(new_random(2)); - Goto(L+new_random(R-L-W), T+new_random(B-T-H)); + Goto(L + new_random(R - L - W), T + new_random(B - T - H)); } diff --git a/engines/cge/general.cpp b/engines/cge/general.cpp new file mode 100644 index 0000000000..f023bb1e0f --- /dev/null +++ b/engines/cge/general.cpp @@ -0,0 +1,346 @@ +/* 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. + * + */ + +/* + * This code is based on original Soltys source code + * Copyright (c) 1994-1995 Janus B. Wisniewski and L.K. Avalon + */ + +#include "cge/boot.h" +#include "cge/general.h" +#include "cge/snddrv.h" +#include "cge/wav.h" + +namespace CGE { + + DAC StdPal[] = {// R G B + { 0, 60, 0}, // 198 + { 0, 104, 0}, // 199 + { 20, 172, 0}, // 200 + { 82, 82, 0}, // 201 + { 0, 132, 82}, // 202 + { 132, 173, 82}, // 203 + { 82, 0, 0}, // 204 + { 206, 0, 24}, // 205 + { 255, 33, 33}, // 206 + { 123, 41, 0}, // 207 + { 0, 41, 0}, // 208 + { 0, 0, 82}, // 209 + { 132, 0, 0}, // 210 + { 255, 0, 0}, // 211 + { 255, 66, 66}, // 212 + { 148, 66, 16}, // 213 + { 0, 82, 0}, // 214 + { 0, 0,132}, // 215 + { 173, 0, 0}, // 216 + { 255, 49, 0}, // 217 + { 255, 99, 99}, // 218 + { 181, 107, 49}, // 219 + { 0, 132, 0}, // 220 + { 0, 0,255}, // 221 + { 173, 41, 0}, // 222 + { 255, 82, 0}, // 223 + { 255, 132,132}, // 224 + { 214, 148, 74}, // 225 + { 41, 214, 0}, // 226 + { 0, 82,173}, // 227 + { 255, 214, 0}, // 228 + { 247, 132, 49}, // 229 + { 255, 165,165}, // 230 + { 239, 198,123}, // 231 + { 173, 214, 0}, // 232 + { 0, 132,214}, // 233 + { 57, 57, 57}, // 234 + { 247, 189, 74}, // 235 + { 255, 198,198}, // 236 + { 255, 239,173}, // 237 + { 214, 255,173}, // 238 + { 82, 173,255}, // 239 + { 107, 107,107}, // 240 + { 247, 222, 99}, // 241 + { 255, 0,255}, // 242 + { 255, 132,255}, // 243 + { 132, 132,173}, // 244 + { 148, 247,255}, // 245 + { 148, 148,148}, // 246 + { 82, 0, 82}, // 247 + { 112, 68,112}, // 248 + { 176, 88,144}, // 249 + { 214, 132,173}, // 250 + { 206, 247,255}, // 251 + { 198, 198,198}, // 252 + { 0, 214,255}, // 253 + { 96, 224,96 }, // 254 + { 255, 255,255}, // 255 + }; + +EC void _fqsort (void *base, uint16 nelem, uint16 width, int (*fcmp)(const void*, const void*)) { + warning("STUB: _fqsort"); +} + +const char * ProgName (const char * ext) { + warning("STUB: ProgName"); + return NULL; +} + +char *MergeExt (char *buf, const char *nam, const char *ext) { +// char dr[MAXDRIVE], di[MAXDIR], na[MAXFILE], ex[MAXEXT]; +// fnmerge(buf, dr, di, na, (fnsplit(nam, dr, di, na, ex) & EXTENSION) ? ex : ext); +// return buf; + warning("STUB: MergeExt"); + return buf; +} + +char *ForceExt (char *buf, const char *nam, const char* ext) { +// char dr[MAXDRIVE], di[MAXDIR], na[MAXFILE], ex[MAXEXT]; +// fnsplit(nam, dr, di, na, ex); +// fnmerge(buf, dr, di, na, ext); +// return buf; + warning("STUB: ForceExt"); + return buf; +} + + +#define BUF ((uint8 *) buf) +static unsigned Seed = 1; + +unsigned FastRand (void) { return Seed = 257 * Seed + 817; } +unsigned FastRand (unsigned s) { return Seed = 257 * s + 817; } + +uint16 RCrypt (void * buf, uint16 siz, uint16 seed) { +/* + if (buf && siz) { + uint8 * q = BUF + (siz-1); + seed = FastRand(seed); + * (BUF ++) ^= seed; + while (buf < q) * (BUF ++) ^= FastRand(); + if (buf == q) * BUF ^= (seed = FastRand()); + } + return seed; +*/ + warning("STUB: RCrypt"); + return 0; +} + +uint16 XCrypt (void *buf, uint16 siz, uint16 seed) { +// for (uint16 i = 0; i < siz; i ++) +// *(BUF ++) ^= seed; + warning("STUB: XCrypt"); + return seed; +} + +uint16 atow (const char *a) { + uint16 w = 0; + if (a) + while (IsDigit(*a)) + w = (10 * w) + (*(a ++) & 0xF); + return w; +} + +uint16 xtow (const char *x) { + uint16 w = 0; + if (x) { + while (IsHxDig(*x)) { + register uint16 d = * (x ++); + if (d > '9') + d -= 'A' - ('9' + 1); + w = (w << 4) | (d & 0xF); + } + } + return w; +} + +char *wtom (uint16 val, char *str, int radix, int len) { + while (-- len >= 0) { + uint16 w = val % radix; + if (w > 9) w += ('A' - ('9'+1)); + str[len] = '0' + w; + val /= radix; + } + return str; +} + +IOHAND::IOHAND (IOMODE mode, CRYPT * crpt) +: XFILE(mode), Handle(-1), Crypt(crpt), Seed(SEED) +{ +} + +IOHAND::IOHAND (const char *name, IOMODE mode, CRYPT *crpt) +: XFILE(mode), Crypt(crpt), Seed(SEED) +{ +/* switch (mode) + { + case REA : Error = _dos_open(name, O_RDONLY | O_DENYNONE, &Handle); break; + case WRI : Error = _dos_creat(name, FA_ARCH, &Handle); break; + case UPD : Error = _dos_open(name, O_RDWR | O_DENYALL, &Handle); break; + } + if (Error) Handle = -1; +*/ + warning("STUB: IOHAND::IOHAND"); +} + +IOHAND::~IOHAND(void) { +/* + if (Handle != -1) + { + Error = _dos_close(Handle); + Handle = -1; + } +*/ + warning("STUB: IOHAND::~IOHAND"); +} + +uint16 IOHAND::Read(void *buf, uint16 len) { +/* + if (Mode == WRI || Handle < 0) return 0; + if (len) Error = _dos_read(Handle, buf, len, &len); + if (Crypt) Seed = Crypt(buf, len, Seed); + return len; +*/ + warning("STUB: IOHAND::Read"); + return 0; +} + +uint16 IOHAND::Write(void *buf, uint16 len) { +/* + if (len) { + if (Mode == REA || Handle < 0) return 0; + if (Crypt) Seed = Crypt(buf, len, Seed); + Error = _dos_write(Handle, buf, len, &len); + if (Crypt) Seed = Crypt(buf, len, Seed); //------$$$$$$$ + } + return len; +*/ + warning("STUB: IOHAND::Write"); + return 0; +} + +long IOHAND::Mark (void) +{ + return (Handle < 0) ? 0 : tell(Handle); +} + +long IOHAND::Seek (long pos) +{ + if (Handle < 0) return 0; + lseek(Handle, pos, SEEK_SET); + return tell(Handle); +} + +long IOHAND::Size (void) +{ + if (Handle < 0) return 0; + return filelength(Handle); +} + +bool IOHAND::Exist (const char * name) { + return access(name, 0) == 0; +} + +//#define EMS_ADR(a) (FP_SEG(a) > 0xA000) +//#define HNODE_OK(p) (heapchecknode(p)==4) + +MEM_TYPE MemType (void *mem) { +/* if (FP_SEG(mem) == _DS) { + if (heapchecknode((void *)mem)==4) + return NEAR_MEM; + } else { + if (FP_SEG(mem) > 0xA000) + return EMS_MEM; + else if (farheapchecknode(mem)==4) + return FAR_MEM; + } + return BAD_MEM; +*/ + warning("STUB: MemType"); + return FAR_MEM; +} + +bool IsVga() { + return true; +} + +EC void SNDInit() { + warning("STUB: SNDInit"); +} + +EC void SNDDone() { + warning("STUB: SNDDone"); +} + +EC void SNDSetVolume() { + warning("STUB: SNDSetVolume"); +} + +EC void SNDDigiStart(SMPINFO *PSmpInfo) { + warning("STUB: SNDDigitStart"); +} + +EC void SNDDigiStop(SMPINFO *PSmpInfo) { + warning("STUB: SNDDigiStop"); +} + +EC void SNDMIDIStart(uint8 *MIDFile) { + warning("STUB: SNDMIDIStart"); +} + +EC void SNDMIDIStop() { + warning("STUB: SNDMIDIStop"); +} + +DATACK *LoadWave(XFILE * file, EMM * emm) { + warning("STUB: LoadWave"); + return NULL; +} + +int TakeEnum(const char **tab, const char *txt) { + const char **e; + if (txt) + { + for (e = tab; *e; e ++) + { + if (scumm_stricmp(txt, *e) == 0) + { + return e - tab; + } + } + } + return -1; +} + +Boot *ReadBoot(int drive) { +/* + struct fatinfo fi; Boot *b; + getfat(drive+1, &fi); + if (fi.fi_sclus & 0x80) return NULL; + if ((b = malloc(fi.fi_bysec)) == NULL) return NULL; + // read boot sector + if (absread(drive, 1, 0L, b) == 0) return b; + free(b); + return NULL; +*/ + warning("STUB: ReadBoot"); + return NULL; +} + +} // End of namespace CGE + diff --git a/engines/cge/general.h b/engines/cge/general.h index 0d06d9b93d..62919328ed 100644 --- a/engines/cge/general.h +++ b/engines/cge/general.h @@ -64,8 +64,6 @@ extern Common::RandomSource randSrc; #define new_random(a) (randSrc.getRandomNumber(a)) - - class COUPLE { protected: @@ -238,39 +236,32 @@ public: CRYPT XCrypt; -CRYPT RXCrypt; CRYPT RCrypt; MEM_TYPE MemType (void *mem); -unsigned FastRand (void); -unsigned FastRand (unsigned s); -//CPU Cpu (void); -ALLOC_MODE SetAllocMode (ALLOC_MODE am); uint16 atow (const char * a); uint16 xtow (const char * x); char * wtom (uint16 val, char * str, int radix, int len); char * dwtom (uint32 val, char * str, int radix, int len); -char * DateTimeString (void); -void StdLog (const char *msg, const char *nam = NULL); -void StdLog (const char *msg, uint16 w); -void StdLog (const char *msg, uint32 d); int TakeEnum (const char ** tab, const char * txt); uint16 ChkSum (void *m, uint16 n); long Timer (void); -long TimerLimit (uint16 t); -bool TimerLimitGone (long t); char * MergeExt (char * buf, const char * nam, const char * ext); char * ForceExt (char * buf, const char * nam, const char * ext); -inline const char * ProgPath (void); -const char * ProgName (const char * ext = NULL); -int DriveFixed (unsigned drv); -int DriveRemote (unsigned drv); int DriveCD (unsigned drv); bool IsVga (void); -EC void _fqsort (void *base, uint16 nelem, uint16 width, - int (*fcmp)(const void*, const void*)); +// MISSING FUNCTIONS +EC void _fqsort (void *base, uint16 nelem, uint16 width, int (*fcmp)(const void*, const void*)); +const char *ProgName (const char *ext = NULL); +char *MergeExt (char *buf, const char *nam, const char *ext); +char *ForceExt (char *buf, const char *nam, const char *ext); +unsigned FastRand (void); +unsigned FastRand (unsigned s); +uint16 RCrypt (void * buf, uint16 siz, uint16 seed); +uint16 atow (const char *a); +uint16 xtow (const char *x); } // End of namespace CGE diff --git a/engines/cge/module.mk b/engines/cge/module.mk index a74eb1a469..552cddb500 100644 --- a/engines/cge/module.mk +++ b/engines/cge/module.mk @@ -10,7 +10,9 @@ MODULE_OBJS := \ config.o \ console.o \ detection.o \ + ems.o \ game.o \ + general.o \ gettext.o \ keybd.o \ mixer.o \ @@ -18,7 +20,6 @@ MODULE_OBJS := \ snail.o \ sound.o \ startup.o \ - stdpal.o \ talk.o \ text.o \ vga13h.o \ diff --git a/engines/cge/snddrv.h b/engines/cge/snddrv.h index 8d29a807d7..fc6c1aa143 100644 --- a/engines/cge/snddrv.h +++ b/engines/cge/snddrv.h @@ -94,13 +94,13 @@ struct SMPINFO // * Data * // ****************************************************** // driver info -extern DRVINFO SNDDrvInfo; +extern DRVINFO SNDDrvInfo; // midi player flag (1 means we are playing) -extern uint16 MIDIPlayFlag; +extern uint16 MIDIPlayFlag; // midi song end flag (1 means we have crossed end mark) -extern uint16 MIDIEndFlag; +extern uint16 MIDIEndFlag; // ****************************************************** // * Driver Code * diff --git a/engines/cge/stdpal.cpp b/engines/cge/stdpal.cpp deleted file mode 100644 index 8ceeddae3c..0000000000 --- a/engines/cge/stdpal.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* 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. - * - */ - -/* - * This code is based on original Soltys source code - * Copyright (c) 1994-1995 Janus B. Wisniewski and L.K. Avalon - */ - -#include "cge/general.h" - -namespace CGE { - - DAC StdPal[] = {// R G B - { 0, 60, 0}, // 198 - { 0, 104, 0}, // 199 - { 20, 172, 0}, // 200 - { 82, 82, 0}, // 201 - { 0, 132, 82}, // 202 - { 132, 173, 82}, // 203 - { 82, 0, 0}, // 204 - { 206, 0, 24}, // 205 - { 255, 33, 33}, // 206 - { 123, 41, 0}, // 207 - { 0, 41, 0}, // 208 - { 0, 0, 82}, // 209 - { 132, 0, 0}, // 210 - { 255, 0, 0}, // 211 - { 255, 66, 66}, // 212 - { 148, 66, 16}, // 213 - { 0, 82, 0}, // 214 - { 0, 0,132}, // 215 - { 173, 0, 0}, // 216 - { 255, 49, 0}, // 217 - { 255, 99, 99}, // 218 - { 181, 107, 49}, // 219 - { 0, 132, 0}, // 220 - { 0, 0,255}, // 221 - { 173, 41, 0}, // 222 - { 255, 82, 0}, // 223 - { 255, 132,132}, // 224 - { 214, 148, 74}, // 225 - { 41, 214, 0}, // 226 - { 0, 82,173}, // 227 - { 255, 214, 0}, // 228 - { 247, 132, 49}, // 229 - { 255, 165,165}, // 230 - { 239, 198,123}, // 231 - { 173, 214, 0}, // 232 - { 0, 132,214}, // 233 - { 57, 57, 57}, // 234 - { 247, 189, 74}, // 235 - { 255, 198,198}, // 236 - { 255, 239,173}, // 237 - { 214, 255,173}, // 238 - { 82, 173,255}, // 239 - { 107, 107,107}, // 240 - { 247, 222, 99}, // 241 - { 255, 0,255}, // 242 - { 255, 132,255}, // 243 - { 132, 132,173}, // 244 - { 148, 247,255}, // 245 - { 148, 148,148}, // 246 - { 82, 0, 82}, // 247 - { 112, 68,112}, // 248 - { 176, 88,144}, // 249 - { 214, 132,173}, // 250 - { 206, 247,255}, // 251 - { 198, 198,198}, // 252 - { 0, 214,255}, // 253 - { 96, 224,96 }, // 254 - { 255, 255,255}, // 255 - }; -} // End of namespace CGE diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 6e08a9790d..f771767c7b 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -1137,10 +1137,11 @@ uint8 * VGA::Page[4] = { (uint8 *) MK_FP(SCR_SEG, 0x0000), +//extern const char Copr[]; + VGA::VGA (int mode) : FrmCnt(0) { - extern const char Copr[]; bool std = true; int i; for (i = 10; i < 20; i ++) @@ -1155,9 +1156,10 @@ VGA::VGA (int mode) #endif } } - if (std) -// puts(Copr); - warning(Copr); +// if (std) +// warning(Copr); + warning("TODO: Fix Copr"); + SetStatAdr(); if (StatAdr != VGAST1_) ++ Mono; if (IsVga()) diff --git a/engines/cge/vol.cpp b/engines/cge/vol.cpp index 9af2efe8f3..4f39cd6186 100644 --- a/engines/cge/vol.cpp +++ b/engines/cge/vol.cpp @@ -25,12 +25,12 @@ * Copyright (c) 1994-1995 Janus B. Wisniewski and L.K. Avalon */ -#include "cge/vol.h" +#include "cge/vol.h" #include "common/system.h" #include "common/str.h" -#include <stdlib.h> -#include <string.h> -#include <errno.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> namespace CGE { |