aboutsummaryrefslogtreecommitdiff
path: root/sword2/maketext.cpp
diff options
context:
space:
mode:
authorJonathan Gray2003-07-28 07:00:15 +0000
committerJonathan Gray2003-07-28 07:00:15 +0000
commit77cf6b7c3e66cca495e9ddbc92dad68a1874ee17 (patch)
tree9666199f71264dad443687a0326099c62800973a /sword2/maketext.cpp
parent376f78f7f650604d580a3c681ab20b490667f289 (diff)
downloadscummvm-rg350-77cf6b7c3e66cca495e9ddbc92dad68a1874ee17.tar.gz
scummvm-rg350-77cf6b7c3e66cca495e9ddbc92dad68a1874ee17.tar.bz2
scummvm-rg350-77cf6b7c3e66cca495e9ddbc92dad68a1874ee17.zip
add bs2demo target for broken sword 2 demo
svn-id: r9229
Diffstat (limited to 'sword2/maketext.cpp')
-rw-r--r--sword2/maketext.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp
index fef6cac73c..617565892a 100644
--- a/sword2/maketext.cpp
+++ b/sword2/maketext.cpp
@@ -64,6 +64,7 @@
#include "memory.h"
#include "protocol.h" // for FetchFrameHeader()
#include "resman.h"
+#include "sword2.h"
extern uint32 sequenceTextLines; // see anims.cpp
@@ -624,12 +625,6 @@ void InitialiseFontResourceFlags(void) // (James31july97)
#define TEXT_RES 3258 // resource 3258 contains text from location script for 152 (install, save & restore text, etc)
#define SAVE_LINE_NO 1 // local line number of "save" (actor no. 1826)
-#ifndef _DEMO // normal game
- #define NAME_LINE_NO 54 // local line number of game name (actor no. 3550)
-#else
- #define NAME_LINE_NO 451 // local line number of demo game name
-#endif // _DEMO
-
//---------------------------------------------------------------------------------
textFile = res_man.Res_open(TEXT_RES); // open the text resource
//---------------------------------------------------------------------------------
@@ -649,7 +644,11 @@ void InitialiseFontResourceFlags(void) // (James31july97)
//---------------------------------------------------------------------------------
// Get the game name for the windows application
- textLine = FetchTextLine(textFile, NAME_LINE_NO )+2; // get the text line (& skip the 2 chars containing the wavId)
+ if (g_bs2->_gameId == GID_BS2_DEMO)
+ textLine = FetchTextLine(textFile, 451 )+2; // get the text line (& skip the 2 chars containing the wavId)
+ else
+ textLine = FetchTextLine(textFile, 54 )+2; // get the text line (& skip the 2 chars containing the wavId)
+
SetWindowName((char*)textLine); // driver function
//---------------------------------------------------------------------------------
res_man.Res_close(TEXT_RES); // now ok to close the text file