aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNeil Millstone2007-04-06 18:34:53 +0000
committerNeil Millstone2007-04-06 18:34:53 +0000
commitc6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe (patch)
treed53d35422e0d3d700a48d4f1bca587eb1b7af79d /engines
parent40245fe4504ecc7cb26ccfc5b5c7d5d2b15cbbe7 (diff)
downloadscummvm-rg350-c6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe.tar.gz
scummvm-rg350-c6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe.tar.bz2
scummvm-rg350-c6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe.zip
Updating DS port for changes in main codebase. Code changes for DevkitArm r20 and latest libnds.
svn-id: r26394
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/text.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 7f4cf1fc54..8f3f0a7a44 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -35,7 +35,14 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
int maxx, minx, ofoff;
int update;
/* Note: Must be unsigned to use AGDS cyrillic characters! */
+#ifdef __DS__
+ // On the DS, a compiler bug causes the text to render incorrectly, because
+ // GCC tries to optimisie out writes to this pointer (tested on DevkitARM v19b and v20)
+ // Making this pointer volatile fixes this.
+ volatile const unsigned char *m;
+#else
const unsigned char *m;
+#endif
/* kludge! */
update = 1;
@@ -81,6 +88,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
}
x1++;
+
/* DF: changed the len-1 to len... */
if (x1 == len && m[1] != '\n')
y1++, x1 = foff = 0;