aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.h2
-rw-r--r--engines/agi/detection.cpp2
-rw-r--r--engines/agi/op_cmd.cpp8
-rw-r--r--engines/agi/text.cpp5
4 files changed, 12 insertions, 5 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 0dd20be283..4685032ba3 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -963,7 +963,7 @@ public:
void printText(const char *, int, int, int, int, int, int, bool checkerboard = false);
void printTextConsole(const char *, int, int, int, int, int);
int print(const char *, int, int, int);
- char *wordWrapString(char *, int *);
+ char *wordWrapString(const char *, int *);
char *agiSprintf(const char *);
void writeStatus(void);
void writePrompt(void);
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 775bed1ce4..94f3e35fac 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -216,7 +216,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Menus not tested
GAME3_P("goldrush", "1.0M 1989-02-28 (CE) aka 2.01 1988-12-22", "grdir", "3f7b9ce62631434389f85371b11921d6", 0x3149, GID_GOLDRUSH, Common::kPlatformApple2GS),
- // Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
+ // Gold Rush! (ST) 1.01 1/13/89 aka 2.01 12/22/88
GAME3_P("goldrush", "1.01 1989-01-13 aka 2.01 1988-12-22", "grdir", "4dd4d50480a3d6c206fa227ce8142735", 0x3149, GID_GOLDRUSH, Common::kPlatformAtariST),
// Gold Rush! (PC 5.25") 2.01 12/22/88 [AGI 3.002.149]
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 70587820f7..32a8f62a58 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1387,7 +1387,13 @@ cmd(set_string) {
}
cmd(display) {
- g_agi->printText(curLogic->texts[p2 - 1], p1, 0, p0, 40, game.colorFg, game.colorBg);
+ int len = 40;
+
+ char *s = g_agi->wordWrapString(curLogic->texts[p2 - 1], &len);
+
+ g_agi->printText(s, p1, 0, p0, 40, game.colorFg, game.colorBg);
+
+ free(s);
}
cmd(display_f) {
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 7e8d569fea..853ede650e 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -224,8 +224,9 @@ void AgiEngine::printTextConsole(const char *msg, int x, int y, int len, int fg,
*
* Based on GBAGI implementaiton with permission from the author
*/
-char *AgiEngine::wordWrapString(char *s, int *len) {
- char *pWord, *outStr, *msgBuf, maxWidth = *len;
+char *AgiEngine::wordWrapString(const char *s, int *len) {
+ char *outStr, *msgBuf, maxWidth = *len;
+ const char *pWord;
int lnLen, wLen;
msgBuf = outStr = strdup(s);