diff options
-rw-r--r-- | engines/lab/allocroom.cpp | 4 | ||||
-rw-r--r-- | engines/lab/labfile.cpp | 41 | ||||
-rw-r--r-- | engines/lab/labfun.h | 3 | ||||
-rw-r--r-- | engines/lab/map.cpp | 1 | ||||
-rw-r--r-- | engines/lab/undiff.cpp | 28 |
5 files changed, 2 insertions, 75 deletions
diff --git a/engines/lab/allocroom.cpp b/engines/lab/allocroom.cpp index e6dad3bc23..434a147d48 100644 --- a/engines/lab/allocroom.cpp +++ b/engines/lab/allocroom.cpp @@ -40,16 +40,12 @@ namespace Lab { #define MAXMARKERS 10 extern RoomData *Rooms; -extern uint16 ManyRooms; - typedef struct { uint16 RoomNum; void *Start0, *End0, *Start1, *End1; } RoomMarker; - - static RoomMarker RoomMarkers[MAXMARKERS]; static void *RoomBuffer = NULL; static uint16 CurMarker = 0; diff --git a/engines/lab/labfile.cpp b/engines/lab/labfile.cpp index dfb72571b2..231c63ab67 100644 --- a/engines/lab/labfile.cpp +++ b/engines/lab/labfile.cpp @@ -34,10 +34,6 @@ namespace Lab { -#define MAXREADSIZE 30720L -/* NOTE: set to 0 for non-CDTV machines. */ - - static byte *buffer = NULL, *realbufferstart = NULL, *startoffilestorage = NULL; @@ -46,16 +42,9 @@ static uint32 buffersize, realbuffersize; /*-------------------- Routines that buffer a whole file --------------------*/ - - -/*----- divides up and manages the buffer -----*/ - - - #define MAXMARKERS 15 - struct FileMarker { char name[32]; void *Start, *End; @@ -182,7 +171,6 @@ bool allocFile(void **Ptr, uint32 Size, const char *fileName) { /*****************************************************************************/ byte **openFile(const char *name, uint32 &size) { byte *buf; - Common::File file; file.open(translateFileName(name)); @@ -195,10 +183,8 @@ byte **openFile(const char *name, uint32 &size) { size = file.size(); buf = (byte *)malloc(size); - - if (!buf) { + if (!buf) error("Unable to allocate %d bytes file file %s", size, name); - } *startoffile = buf; @@ -208,7 +194,6 @@ byte **openFile(const char *name, uint32 &size) { } - /*****************************************************************************/ /* Reads a block of memory. */ /*****************************************************************************/ @@ -217,30 +202,6 @@ void readBlock(void *Buffer, uint32 Size, byte **File) { (*File) += Size; } - - -/*****************************************************************************/ -/* Reads on character. */ -/*****************************************************************************/ -char readChar(char **File) { - char c = **File; - - (*File)++; - return c; -} - - - - -/*****************************************************************************/ -/* Skips a chunk of memory. */ -/*****************************************************************************/ -void skip(byte **File, uint32 skip) { - (*File) += skip; -} - - - /*****************************************************************************/ /* Resets the internal buffers to empty. */ /*****************************************************************************/ diff --git a/engines/lab/labfun.h b/engines/lab/labfun.h index ea0d3c8c48..9655c24691 100644 --- a/engines/lab/labfun.h +++ b/engines/lab/labfun.h @@ -140,8 +140,6 @@ bool quitPlaying(); byte **isBuffered(const char *fileName); byte **openFile(const char *name, uint32 &size); void readBlock(void *Buffer, uint32 Size, byte **File); -char readChar(char **File); -void skip(byte **File, uint32 skip); void resetBuffer(); bool initBuffer(uint32 BufSize, bool IsGraphicsMem); void freeBuffer(); @@ -280,7 +278,6 @@ void showCombination(const char *filename); void mouseCombination(uint16 x, uint16 y); void showTile(const char *filename, bool showsolution); void mouseTile(uint16 x, uint16 y); -void inner_main(); } // End of namespace Lab diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index cb51a51fff..a3cae9b841 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -163,7 +163,6 @@ void readImage(byte **buffer, Image **im) { /*---------------------------------------------------------------------------*/ extern RoomData *Rooms; -extern const char *ViewPath; static Image *Map, *Room, *UpArrowRoom, *DownArrowRoom, *Bridge, *HRoom, *VRoom, *Maze, *HugeMaze, *Path, *MapNorth, diff --git a/engines/lab/undiff.cpp b/engines/lab/undiff.cpp index bc4eacc603..d9d53a3031 100644 --- a/engines/lab/undiff.cpp +++ b/engines/lab/undiff.cpp @@ -322,39 +322,13 @@ bool VUnDIFFMemory(byte *Dest, byte *diff, uint16 HeaderSize, uint16 CopySize, u else return false; - } - /* - else if (HeaderSize == 2) - { - if (CopySize == 1) - VUnDIFFWordByte(Dest, diff, bytesperrow); - - else if (CopySize == 2) - VUnDIFFWordWord(Dest, diff, bytesperrow); - - else if (CopySize == 4) - VUnDIFFWordLong(Dest, diff, bytesperrow); - - else - return false; - } - */ - else + } else return (false); return true; } - - - -/*---------------------------- Runlength Decodes ----------------------------*/ - - - - - /*****************************************************************************/ /* Runlength decodes a chunk of memory. */ /*****************************************************************************/ |