aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-10-07 07:07:47 +0000
committerTorbjörn Andersson2003-10-07 07:07:47 +0000
commit29b646b30a967f1ec1028b4112fd106ed7b24143 (patch)
treea2f2dbe3de212e437844fe546ef51321a6f13ffd /sword2
parente8b6016e336567ef9abf9c0b5e1fe3097c02a90e (diff)
downloadscummvm-rg350-29b646b30a967f1ec1028b4112fd106ed7b24143.tar.gz
scummvm-rg350-29b646b30a967f1ec1028b4112fd106ed7b24143.tar.bz2
scummvm-rg350-29b646b30a967f1ec1028b4112fd106ed7b24143.zip
Some cleanup, some code removal and some unstubbing. Nothing important.
svn-id: r10659
Diffstat (limited to 'sword2')
-rw-r--r--sword2/driver/driver96.h1
-rw-r--r--sword2/driver/language.cpp30
-rw-r--r--sword2/driver/palette.cpp17
-rw-r--r--sword2/driver/rdwin.cpp16
-rw-r--r--sword2/driver/render.cpp247
-rw-r--r--sword2/function.cpp16
-rw-r--r--sword2/layers.cpp17
-rw-r--r--sword2/maketext.cpp13
8 files changed, 106 insertions, 251 deletions
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h
index f27adae736..3f49a84961 100644
--- a/sword2/driver/driver96.h
+++ b/sword2/driver/driver96.h
@@ -303,7 +303,6 @@ extern void SetWindowName(const char *windowName);
//-----------------------------------------------------------------------------
extern int32 GetLanguageVersion(uint8 *version);
extern int32 SetLanguageVersion(uint8 version);
-extern int32 GetGameName(uint8 *name);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
diff --git a/sword2/driver/language.cpp b/sword2/driver/language.cpp
index a7b67d7f99..eaef47999b 100644
--- a/sword2/driver/language.cpp
+++ b/sword2/driver/language.cpp
@@ -66,34 +66,4 @@ int32 SetLanguageVersion(uint8 version) {
return RD_OK;
}
-/**
- * Fills the string pointed to by 'name' with the title of the game, depending
- * upon what the current language version is.
- * @param name buffer to store the title of the game in
- */
-
-int32 GetGameName(uint8 *name) {
- uint8 version;
- int32 rv;
-
- rv = GetLanguageVersion(&version);
-
- switch (version) {
- case ENGLISH:
- strcpy((char *) name, "Broken Sword II");
- break;
- case AMERICAN:
- strcpy((char *) name, "Circle of Blood II");
- break;
- case GERMAN:
- strcpy((char *) name, "Baphomet's Fluch II");
- break;
- default:
- strcpy((char *) name, "Some game or other, part 86");
- return RDERR_INVALIDVERSION;
- }
-
- return rv;
-}
-
} // End of namespace Sword2
diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp
index fe10ce31c0..c08f0ac14e 100644
--- a/sword2/driver/palette.cpp
+++ b/sword2/driver/palette.cpp
@@ -29,11 +29,10 @@ namespace Sword2 {
#define PALTABLESIZE 64 * 64 * 64
uint8 palCopy[256][4];
-uint8 fadePalette[256][4];
-uint8 paletteMatch[PALTABLESIZE];
-
-uint8 fadeStatus = RDFADE_NONE;
+static uint8 fadePalette[256][4];
+static uint8 paletteMatch[PALTABLESIZE];
+static uint8 fadeStatus = RDFADE_NONE;
static int32 fadeStartTime;
static int32 fadeTotalTime;
@@ -65,8 +64,7 @@ uint8 GetMatch(uint8 r, uint8 g, uint8 b) {
min = diff;
minIndex = 0;
if (diff > 0) {
- i = 1;
- while (i < 256) {
+ for (i = 1; i < 256; i++) {
diffred = palCopy[i][0] - r;
diffgreen = palCopy[i][1] - g;
diffblue = palCopy[i][2] - b;
@@ -78,7 +76,6 @@ uint8 GetMatch(uint8 r, uint8 g, uint8 b) {
if (min == 0)
break;
}
- i++;
}
}
@@ -111,7 +108,7 @@ int32 UpdatePaletteMatchTable(uint8 *data) {
}
}
} else {
- // The provided data is th new palette match table
+ // The provided data is the new palette match table
memcpy(paletteMatch, data, PALTABLESIZE);
}
@@ -155,10 +152,10 @@ int32 BS2_SetPalette(int16 startEntry, int16 noEntries, uint8 *colourTable, uint
int32 DimPalette(void) {
byte *p = (byte *) palCopy;
- uint32 i;
- for (i = 0; i < 256 * 4; i++)
+ for (int i = 0; i < 256 * 4; i++)
p[i] /= 2;
+
g_system->set_palette(p, 0, 256);
return RD_OK;
}
diff --git a/sword2/driver/rdwin.cpp b/sword2/driver/rdwin.cpp
index 95a5e12efc..6d63521ce7 100644
--- a/sword2/driver/rdwin.cpp
+++ b/sword2/driver/rdwin.cpp
@@ -18,8 +18,7 @@
*/
#include "common/stdafx.h"
-#include "base/engine.h"
-#include "common/timer.h"
+#include "bs2/sword2.h"
#include "bs2/driver/driver96.h"
#include "bs2/driver/_mouse.h"
#include "bs2/driver/keyboard.h"
@@ -29,12 +28,9 @@
#include "bs2/driver/render.h"
#include "bs2/driver/menu.h"
#include "bs2/driver/d_sound.h"
-#include "bs2/sword2.h"
namespace Sword2 {
-#define MENUDEEP 40 // Temporary, until menu.h is written!
-
// ---------------------------------------------------------------------------
// OSystem Event Handler. Full of cross platform goodness and 99% fat free!
// ---------------------------------------------------------------------------
@@ -117,14 +113,14 @@ int32 ServiceWindows(void) {
}
/**
- * Set the window name to windowName and stores this name in gameName for
- * future use.
+ * Set the window title
*/
void SetWindowName(const char *windowName) {
- warning("stub SetWindowName( %s )", windowName);
- // SetWindowText(hwnd, windowName);
- // strcpy(gameName, windowName);
+ OSystem::Property prop;
+
+ prop.caption = windowName;
+ g_system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop);
}
} // End of namespace Sword2
diff --git a/sword2/driver/render.cpp b/sword2/driver/render.cpp
index ffae9d5518..9718106963 100644
--- a/sword2/driver/render.cpp
+++ b/sword2/driver/render.cpp
@@ -49,14 +49,14 @@ static uint16 layer = 0;
#define RENDERAVERAGETOTAL 4
-int32 renderCountIndex = 0;
-int32 renderTimeLog[RENDERAVERAGETOTAL] = { 60, 60, 60, 60 };
-int32 initialTime;
-int32 startTime;
-int32 totalTime;
-int32 renderAverageTime = 60;
-int32 framesPerGameCycle;
-int32 renderTooSlow;
+static int32 renderCountIndex = 0;
+static int32 renderTimeLog[RENDERAVERAGETOTAL] = { 60, 60, 60, 60 };
+static int32 initialTime;
+static int32 startTime;
+static int32 totalTime;
+static int32 renderAverageTime = 60;
+static int32 framesPerGameCycle;
+static int32 renderTooSlow;
#define BLOCKWIDTH 64
#define BLOCKHEIGHT 64
@@ -64,8 +64,8 @@ int32 renderTooSlow;
#define BLOCKHBITS 6
#define MAXLAYERS 5
-uint8 xblocks[MAXLAYERS];
-uint8 yblocks[MAXLAYERS];
+static uint8 xblocks[MAXLAYERS];
+static uint8 yblocks[MAXLAYERS];
// blockSurfaces stores an array of sub-blocks for each of the parallax layers.
@@ -74,7 +74,7 @@ typedef struct {
bool transparent;
} BlockSurface;
-BlockSurface **blockSurfaces[MAXLAYERS] = { 0, 0, 0, 0, 0 };
+static BlockSurface **blockSurfaces[MAXLAYERS] = { 0, 0, 0, 0, 0 };
void UploadRect(Common::Rect *r) {
g_system->copy_rect(lpBackBuffer + r->top * screenWide + r->left,
@@ -403,41 +403,16 @@ int32 RestoreBackgroundLayer(_parallax *p, int16 l)
*/
int32 PlotPoint(uint16 x, uint16 y, uint8 colour) {
- warning("stub PlotPoint( %d, %d, %d )", x, y, colour);
-/*
+ uint8 *buf = lpBackBuffer + 40 * RENDERWIDE;
int16 newx, newy;
newx = x - scrollx;
newy = y - scrolly;
- if ((newx < 0) || (newx > RENDERWIDE) || (newy < 0) || (newy > RENDERDEEP))
- {
- return(RD_OK);
- }
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- {
- DDSURFACEDESC ddsd;
- HRESULT hr;
-
- ddsd.dwSize = sizeof(DDSURFACEDESC);
- hr = IDirectDrawSurface2_Lock(lpBackBuffer, NULL, &ddsd, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL);
- if (hr != DD_OK)
- {
- hr = IDirectDrawSurface2_Lock(lpBackBuffer, NULL, &ddsd, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL);
- }
-
- if (hr == DD_OK)
- {
-
- *((uint8 *) ddsd.lpSurface + (newy + 40) * ddsd.lPitch + newx) = colour;
- IDirectDrawSurface2_Unlock(lpBackBuffer, ddsd.lpSurface);
- }
- }
- else
- myScreenBuffer[newy * RENDERWIDE + newx] = colour;
-*/
- return(RD_OK);
+ if (newx >= 0 && newx < RENDERWIDE && newy >= 0 && newy < RENDERDEEP)
+ buf[newy * RENDERWIDE + newx] = colour;
+ return RD_OK;
}
/**
@@ -451,46 +426,24 @@ int32 PlotPoint(uint16 x, uint16 y, uint8 colour) {
// Uses Bressnham's incremental algorithm!
int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
- warning("stub DrawLine( %d, %d, %d, %d, %d )", x0, y0, x1, y1, colour);
-/*
+ uint8 *buf = lpBackBuffer + 40 * RENDERWIDE;
int dx, dy;
int dxmod, dymod;
int ince, incne;
- int d;
+ int d;
int x, y;
int addTo;
- DDSURFACEDESC ddsd;
- HRESULT hr;
x1 -= scrollx;
y1 -= scrolly;
x0 -= scrollx;
y0 -= scrolly;
-
// Lock the surface if we're rendering to the back buffer.
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- {
- ddsd.dwSize = sizeof(DDSURFACEDESC);
- hr = IDirectDrawSurface2_Lock(lpBackBuffer, NULL, &ddsd, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL);
- if (hr != DD_OK)
- {
- hr = IDirectDrawSurface2_Lock(lpBackBuffer, NULL, &ddsd, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL);
- }
- if (hr != DD_OK)
- return(RD_OK);
-
- (uint8 *) ddsd.lpSurface += (40 * ddsd.lPitch);
-
- }
-
-
-
-
//Make sure we're going from left to right
- if (x1 < x0)
- {
+
+ if (x1 < x0) {
x = x1;
x1 = x0;
x0 = x;
@@ -498,6 +451,7 @@ int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
y1 = y0;
y0 = y;
}
+
dx = x1 - x0;
dy = y1 - y0;
@@ -511,42 +465,29 @@ int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
else
dymod = dy;
- if (dxmod >= dymod)
- {
- if (dy > 0)
- {
+ if (dxmod >= dymod) {
+ if (dy > 0) {
d = 2 * dy - dx;
ince = 2 * dy;
incne = 2 * (dy - dx);
x = x0;
y = y0;
- if ((x >= 0) && (x < RENDERWIDE) && (y >= 0) && (y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + y * ddsd.lPitch + x) = colour;
- else
- myScreenBuffer[y * RENDERWIDE + x] = colour;
- while (x < x1)
- {
- if (d <= 0)
- {
+ if (x >= 0 && x < RENDERWIDE && y >= 0 && y < RENDERDEEP)
+ buf[y * RENDERWIDE + x] = colour;
+
+ while (x < x1) {
+ if (d <= 0) {
d += ince;
- x += 1;
- }
- else
- {
+ x++;
+ } else {
d += incne;
- x += 1;
- y += 1;
+ x++;
+ y++;
}
- if ((x >= 0) && (x < RENDERWIDE) && (y >= 0) && (y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + y * ddsd.lPitch + x) = colour;
- else
- myScreenBuffer[y * RENDERWIDE + x] = colour;
+ if (x >= 0 && x < RENDERWIDE && y >= 0 && y < RENDERDEEP)
+ buf[y * RENDERWIDE + x] = colour;
}
- }
- else
- {
+ } else {
addTo = y0;
y0 = 0;
y1 -= addTo;
@@ -558,39 +499,26 @@ int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
incne = 2 * (dy - dx);
x = x0;
y = y0;
- if ((x >= 0) && (x < RENDERWIDE) && (addTo - y >= 0) && (addTo - y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + (addTo - y) * ddsd.lPitch + x) = colour;
- else
- myScreenBuffer[(addTo - y) * RENDERWIDE + x] = colour;
- while (x < x1)
- {
- if (d <= 0)
- {
+ if (x >= 0 && x < RENDERWIDE && addTo - y >= 0 && addTo - y < RENDERDEEP)
+ buf[(addTo - y) * RENDERWIDE + x] = colour;
+
+ while (x < x1) {
+ if (d <= 0) {
d += ince;
- x += 1;
- }
- else
- {
+ x++;
+ } else {
d += incne;
- x += 1;
- y += 1;
+ x++;
+ y++;
}
- if ((x >= 0) && (x < RENDERWIDE) && (addTo - y >= 0) && (addTo - y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + (addTo - y) * ddsd.lPitch + x) = colour;
- else
- myScreenBuffer[(addTo - y) * RENDERWIDE + x] = colour;
+ if (x >= 0 && x < RENDERWIDE && addTo - y >= 0 && addTo - y < RENDERDEEP)
+ buf[(addTo - y) * RENDERWIDE + x] = colour;
}
-
}
- }
- else
- {
+ } else {
//OK, y is now going to be the single increment.
// Ensure the line is going top to bottom
- if (y1 < y0)
- {
+ if (y1 < y0) {
x = x1;
x1 = x0;
x0 = x;
@@ -601,40 +529,28 @@ int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
dx = x1 - x0;
dy = y1 - y0;
- if (dx > 0)
- {
+ if (dx > 0) {
d = 2 * dx - dy;
ince = 2 * dx;
incne = 2 * (dx - dy);
x = x0;
y = y0;
- if ((x >= 0) && (x < RENDERWIDE) && (y >= 0) && (y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + y * ddsd.lPitch + x) = colour;
- else
- myScreenBuffer[y * RENDERWIDE + x] = colour;
- while (y < y1)
- {
- if (d <= 0)
- {
+ if (x >= 0 && x < RENDERWIDE && y >= 0 && y < RENDERDEEP)
+ buf[y * RENDERWIDE + x] = colour;
+
+ while (y < y1) {
+ if (d <= 0) {
d += ince;
- y += 1;
- }
- else
- {
+ y++;
+ } else {
d += incne;
- x += 1;
- y += 1;
+ x++;
+ y++;
}
- if ((x >= 0) && (x < RENDERWIDE) && (y >= 0) && (y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + y * ddsd.lPitch + x) = colour;
- else
- myScreenBuffer[y * RENDERWIDE + x] = colour;
+ if (x >= 0 && x < RENDERWIDE && y >= 0 && y < RENDERDEEP)
+ buf[y * RENDERWIDE + x] = colour;
}
- }
- else
- {
+ } else {
addTo = x0;
x0 = 0;
x1 -= addTo;
@@ -646,41 +562,24 @@ int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
incne = 2 * (dx - dy);
x = x0;
y = y0;
- if ((addTo - x >= 0) && (addTo - x < RENDERWIDE) && (y >= 0) && (y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + y * ddsd.lPitch + addTo - x) = colour;
- else
- myScreenBuffer[y * RENDERWIDE + addTo - x] = colour;
- while (y < y1)
- {
- if (d <= 0)
- {
+ if (addTo - x >= 0 && addTo - x < RENDERWIDE && y >= 0 && y < RENDERDEEP)
+ buf[y * RENDERWIDE + addTo - x] = colour;
+
+ while (y < y1) {
+ if (d <= 0) {
d += ince;
- y += 1;
- }
- else
- {
+ y++;
+ } else {
d += incne;
- x += 1;
- y += 1;
+ x++;
+ y++;
}
- if ((addTo - x >= 0) && (addTo - x < RENDERWIDE) && (y >= 0) && (y < RENDERDEEP))
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- *((uint8 *) ddsd.lpSurface + y * ddsd.lPitch + addTo - x) = colour;
- else
- myScreenBuffer[y * RENDERWIDE + addTo - x] = colour;
+ if (addTo - x >= 0 && addTo - x < RENDERWIDE && y >= 0 && y < RENDERDEEP)
+ buf[y * RENDERWIDE + addTo - x] = colour;
}
-
}
-
}
- if (renderCaps & RDBLTFX_ALLHARDWARE)
- {
- (uint8 *) ddsd.lpSurface -= (40 * ddsd.lPitch);
- IDirectDrawSurface2_Unlock(lpBackBuffer, ddsd.lpSurface);
- }
-*/
return RD_OK;
}
@@ -796,7 +695,7 @@ int32 EndRenderCycle(bool *end) {
startTime = time;
renderAverageTime = (renderTimeLog[0] + renderTimeLog[1] + renderTimeLog[2] + renderTimeLog[3]) >> 2;
- framesPerGameCycle += 1;
+ framesPerGameCycle++;
if (++renderCountIndex == RENDERAVERAGETOTAL)
renderCountIndex = 0;
@@ -870,8 +769,6 @@ int32 InitialiseBackgroundLayer(_parallax *p) {
// This function is called to re-initialise the layers if they have
// been lost. We know this if the layers have already been assigned.
- // TODO: Can layers still be lost, or is that a DirectDraw-ism?
-
if (layer == MAXLAYERS)
CloseBackgroundLayer();
diff --git a/sword2/function.cpp b/sword2/function.cpp
index 0016771e7a..1d8e588861 100644
--- a/sword2/function.cpp
+++ b/sword2/function.cpp
@@ -198,7 +198,7 @@ int32 FN_random_pause(int32 *params) {
return FN_pause(pars);
}
-int32 FN_pass_graph(int32 *params) { // Tony28Nov96
+int32 FN_pass_graph(int32 *params) {
// makes an engine local copy of passed graphic_structure and
// mega_structure - run script 4 of an object to request this
// used by FN_turn_to(id) etc
@@ -224,7 +224,7 @@ int32 FN_pass_mega(int32 *params) {
// params 0 pointer to a mega structure
- memcpy(&engine_mega, (uint8*) params[0], sizeof(Object_mega));
+ memcpy(&engine_mega, (uint8 *) params[0], sizeof(Object_mega));
//makes no odds
return IR_CONT;
@@ -358,7 +358,7 @@ int32 FN_reset_globals(int32 *params) {
debug(5, "globals size %d", size / 4);
- globals = (uint32*) ((uint8 *) res_man.open(1) + sizeof(_standardHeader));
+ globals = (uint32 *) ((uint8 *) res_man.open(1) + sizeof(_standardHeader));
// blank each global variable
for (j = 0; j < size / 4; j++)
@@ -369,12 +369,7 @@ int32 FN_reset_globals(int32 *params) {
// all objects but george
res_man.killAllObjects(0);
- // reopen global variables resource & send address to interpreter - it
- // won't be moving
- // SetGlobalInterpreterVariables((int32 *) (res_man.open(1) + sizeof(_standardHeader)));
- // res_man.close(1);
-
- // FOR THE DEMO - FORCE THE SCROLLING TO BE RESET! (James29may97)
+ // FOR THE DEMO - FORCE THE SCROLLING TO BE RESET!
// - this is taken from FN_init_background
// switch on scrolling (2 means first time on screen)
@@ -395,9 +390,6 @@ int32 FN_play_credits(int32 *params) {
int32 music_length;
int32 pars[2];
- // FIXME: We need a better method for saving/restoring the
- // music state as this one only restarts looping music.
-
g_sound->saveMusicState();
g_sound->muteFx(1);
diff --git a/sword2/layers.cpp b/sword2/layers.cpp
index d1357514af..9ce4b1dfa1 100644
--- a/sword2/layers.cpp
+++ b/sword2/layers.cpp
@@ -50,7 +50,6 @@ int32 FN_init_background(int32 *params) {
_screenHeader *screen_head;
_layerHeader *layer;
_spriteInfo spriteInfo;
- uint32 j;
uint8 *file;
uint32 rv;
@@ -83,8 +82,8 @@ int32 FN_init_background(int32 *params) {
if (this_screen.background_layer_id)
CloseBackgroundLayer();
- this_screen.background_layer_id = *params; // set the res id
- this_screen.new_palette = *(params + 1); // yes or no - palette is taken from layer file
+ this_screen.background_layer_id = params[0]; // set the res id
+ this_screen.new_palette = params[1]; // yes or no - palette is taken from layer file
// ok, now read the resource and pull out all the normal sort layer
// info/and set them up at the beginning of the sort list - why do it
@@ -106,19 +105,19 @@ int32 FN_init_background(int32 *params) {
SetLocationMetrics(screen_head->width, screen_head->height);
if (screen_head->noLayers) {
- for (j = 0; j < screen_head->noLayers; j++) {
- // get layer header for layer j
- layer = FetchLayerHeader(file, j);
+ for (int i = 0; i < screen_head->noLayers; i++) {
+ // get layer header for layer i
+ layer = FetchLayerHeader(file, i);
// add into the sort list
// need this for sorting - but leave the rest blank,
// we'll take from the header at print time
- sort_list[j].sort_y = layer->y + layer->height;
+ sort_list[i].sort_y = layer->y + layer->height;
// signifies a layer
- sort_list[j].layer_number = j + 1;
+ sort_list[i].layer_number = i + 1;
- debug(5, "init layer %d", j);
+ debug(5, "init layer %d", i);
}
}
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp
index 5fb09bce94..f813a897d6 100644
--- a/sword2/maketext.cpp
+++ b/sword2/maketext.cpp
@@ -451,7 +451,7 @@ typedef struct {
mem *text_mem;
} text_bloc;
-text_bloc text_sprite_list[MAX_text_blocs];
+static text_bloc text_sprite_list[MAX_text_blocs];
void Init_text_bloc_system(void) {
for (int j = 0; j < MAX_text_blocs; j++)
@@ -648,9 +648,6 @@ void InitialiseFontResourceFlags(void) {
// Get the game name for the windows application
- // FIXME: Since SetWindowName() is stubbed, this doesn't actually do
- // anything at the moment. Should it be removed?
-
// Get the text line - skip the 2 chars containing the wavId
if (g_sword2->_gameId == GID_SWORD2_DEMO)
@@ -658,6 +655,14 @@ void InitialiseFontResourceFlags(void) {
else
textLine = FetchTextLine(textFile, 54) + 2;
+ // According to the GetNameFunction(), which was never called and has
+ // therefore been removed, the name of the game is:
+ //
+ // ENGLISH: "Broken Sword II"
+ // AMERICAN: "Circle of Blood II"
+ // GERMAN: "Baphomet's Fluch II"
+ // default: "Some game or other, part 86"
+
SetWindowName((char *) textLine);
// now ok to close the text file