aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-11-25 07:35:52 +0000
committerTorbjörn Andersson2003-11-25 07:35:52 +0000
commita1e80765f58e8d8624e7e24b1fb796114605d16c (patch)
tree7efd25b5fd87096408a6f3d58fdd56a69b36bec4 /sword2
parent07a9638d77503132deeddd8d36ce32cb229e7d3c (diff)
downloadscummvm-rg350-a1e80765f58e8d8624e7e24b1fb796114605d16c.tar.gz
scummvm-rg350-a1e80765f58e8d8624e7e24b1fb796114605d16c.tar.bz2
scummvm-rg350-a1e80765f58e8d8624e7e24b1fb796114605d16c.zip
More cleanup. Another unused file bites the dust.
svn-id: r11363
Diffstat (limited to 'sword2')
-rw-r--r--sword2/driver/driver96.h45
-rw-r--r--sword2/driver/language.cpp69
-rw-r--r--sword2/maketext.cpp6
-rw-r--r--sword2/module.mk1
4 files changed, 12 insertions, 109 deletions
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h
index 5f769ec4f3..d08180f979 100644
--- a/sword2/driver/driver96.h
+++ b/sword2/driver/driver96.h
@@ -24,10 +24,7 @@ namespace Sword2 {
class Sword2Engine;
-//
-// Defines
-// -------
-//
+// Error codes
enum {
// Generic error codes
@@ -80,12 +77,6 @@ enum {
RDERR_INVALIDID
};
-// Key codes
-
-enum {
-// RDKEY_ESCAPE = 27
-};
-
// Mouse button defines
enum {
@@ -180,10 +171,7 @@ enum {
RDBLTFX_EDGEBLEND = 0x04
};
-//
-// Structure definitions
-// ---------------------
-//
+// Structure definitions
typedef struct {
uint16 buttons;
@@ -209,7 +197,6 @@ struct _parallax {
#pragma END_PACK_STRUCTS
#endif
-
// The _spriteInfo structure is used to tell the driver96 code what attributes
// are linked to a sprite for drawing. These include position, scaling and
// compression.
@@ -228,11 +215,11 @@ typedef struct {
uint8 *colourTable; // pointer to 16-byte colour table, only applicable to 16-col compression type
} _spriteInfo;
+// This is the format of a .WAV file. Somewhere after this header is the
+// string 'DATA' followed by an int32 size which is the size of the data.
+// Following the size of the data is the data itself.
-// This is the format of a .WAV file. Somewhere after this header is the string
-// 'DATA' followed by an int32 size which is the size of the data. Following
-// the size of the data is the data itself.
-typedef struct {
+ typedef struct {
uint32 riff;
uint32 fileLength;
uint32 wavID;
@@ -248,10 +235,9 @@ typedef struct {
uint16 bitsPerSample;
} _wavHeader;
-
-// This is the structure which is passed to the sequence player.
-// It includes the smack to play, and any text lines which are
-// to be displayed over the top of the sequence.
+// This is the structure which is passed to the sequence player. It includes
+// the smack to play, and any text lines which are to be displayed over the top
+// of the sequence.
typedef struct {
uint16 startFrame;
@@ -261,18 +247,9 @@ typedef struct {
uint16 *speech;
} _movieTextObject;
-//
-// Function Prototypes
-// -------------------
-//
-
-//-----------------------------------------------------------------------------
-// Language functions - from language.c
-//-----------------------------------------------------------------------------
-extern int32 GetLanguageVersion(uint8 *version);
-extern int32 SetLanguageVersion(uint8 version);
-//-----------------------------------------------------------------------------
+// Input handling class
+// Mouse buffer size
#define MAX_MOUSE_EVENTS 16
// Key buffer size
diff --git a/sword2/driver/language.cpp b/sword2/driver/language.cpp
deleted file mode 100644
index af09ef43e7..0000000000
--- a/sword2/driver/language.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 1994-2003 Revolution Software Ltd
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- */
-
-#include "common/stdafx.h"
-#include "sword2/sword2.h"
-
-namespace Sword2 {
-
-// Language codes
-#define ENGLISH 0x00
-#define AMERICAN 0x01
-#define GERMAN 0x02
-#define FRENCH 0x03
-#define SPANISH 0x04
-#define ITIALIAN 0x05
-#define JAPANESE 0x06
-#define SLOVAK 0x07
-
-uint8 languageVersion = ENGLISH;
-
-static uint8 versionFromFile = 0;
-
-/**
- * This function modifies the 'version' passed in to be the current language.
- * The first time this function is called, it gets the language from the
- * version.inf file distributed on the game CD.
- * @param version a pointer to the variable to store language information in
- * @return an RD error code if version.inf cannot be opened, or the version
- * cannot be obtained from it
- */
-
-int32 GetLanguageVersion(uint8 *version) {
- if (versionFromFile) {
- *version = languageVersion;
- } else {
- versionFromFile = 1;
- languageVersion = AMERICAN;
- return RDERR_OPENVERSIONFILE;
- }
- return RD_OK;
-}
-
-/**
- * This function is useful for debugging. It sets the version to the one passed
- * in.
- */
-
-int32 SetLanguageVersion(uint8 version) {
- languageVersion = version;
- return RD_OK;
-}
-
-} // End of namespace Sword2
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp
index 9b92e940ef..65c0eddd2b 100644
--- a/sword2/maketext.cpp
+++ b/sword2/maketext.cpp
@@ -405,11 +405,7 @@ uint32 FontRenderer::buildNewBloc(uint8 *ascii, int16 x, int16 y, uint16 width,
while (j < MAX_text_blocs && _blocList[j].text_mem)
j++;
-#ifdef _SWORD2_DEBUG
- // we've run out - might as well stop the system
- if (j == MAX_text_blocs)
- error("Build_new_block ran out of blocks!");
-#endif
+ assert(j < MAX_text_blocs);
// make the sprite!
_blocList[j].text_mem = makeTextSprite(ascii, width, pen, fontRes);
diff --git a/sword2/module.mk b/sword2/module.mk
index 7061020a39..2b4d805f7f 100644
--- a/sword2/module.mk
+++ b/sword2/module.mk
@@ -30,7 +30,6 @@ MODULE_OBJS := \
sword2/driver/d_draw.o \
sword2/driver/d_sound.o \
sword2/driver/keyboard.o \
- sword2/driver/language.o \
sword2/driver/menu.o \
sword2/driver/_mouse.o \
sword2/driver/palette.o \