[Scummvm-cvs-logs] scummvm master -> b12fed08356d8cd59de5ae5867bb8f8f9b0c5453
tramboi
bertrand_augereau at yahoo.fr
Mon Aug 29 12:24:07 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b12fed0835 DREAMWEB: 'printmessage' ported to C++
Commit: b12fed08356d8cd59de5ae5867bb8f8f9b0c5453
https://github.com/scummvm/scummvm/commit/b12fed08356d8cd59de5ae5867bb8f8f9b0c5453
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-29T03:15:25-07:00
Commit Message:
DREAMWEB: 'printmessage' ported to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 744e285..f2134be 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -51,6 +51,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'printchar',
'printdirect',
'printslow',
+ 'printmessage',
'usetimedtext',
'dumptimedtext',
'setuptimedtemp',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 8d3518d..f716d89 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -15615,26 +15615,6 @@ void DreamGenContext::examineobtext() {
commandwithob();
}
-void DreamGenContext::printmessage() {
- STACK_CHECK;
- push(dx);
- push(bx);
- push(di);
- ah = 0;
- _add(ax, ax);
- bx = ax;
- es = data.word(kCommandtext);
- ax = es.word(bx);
- _add(ax, (66*2));
- si = ax;
- di = pop();
- bx = pop();
- dx = pop();
- al = 0;
- ah = 0;
- printdirect();
-}
-
void DreamGenContext::printmessage2() {
STACK_CHECK;
push(dx);
@@ -18459,7 +18439,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_walkintoroom: walkintoroom(); break;
case addr_afterintroroom: afterintroroom(); break;
case addr_examineobtext: examineobtext(); break;
- case addr_printmessage: printmessage(); break;
case addr_printmessage2: printmessage2(); break;
case addr_setwalk: setwalk(); break;
case addr_bresenhams: bresenhams(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index fc4deeb..3ad99d1 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -105,7 +105,6 @@ public:
static const uint16 addr_bresenhams = 0xca50;
static const uint16 addr_setwalk = 0xca44;
static const uint16 addr_printmessage2 = 0xca30;
- static const uint16 addr_printmessage = 0xca2c;
static const uint16 addr_examineobtext = 0xca20;
static const uint16 addr_afterintroroom = 0xca14;
static const uint16 addr_walkintoroom = 0xca10;
@@ -2017,7 +2016,7 @@ public:
void loadsecondsample();
void transfercontoex();
//void multiput();
- void printmessage();
+ //void printmessage();
void businessman();
void switchryanoff();
//void commandwithob();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 9b85cbb..92a2a3d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1618,6 +1618,16 @@ void DreamGenContext::animpointer() {
data.byte(kPointerframe) = 8;
}
+void DreamGenContext::printmessage() {
+ printmessage(di, bx, al, dl, (bool)(dl & 1));
+}
+
+void DreamGenContext::printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) {
+ uint16 offset = kTextstart + segRef(data.word(kCommandtext)).word(index * 2);
+ const uint8 *string = segRef(data.word(kCommandtext)).ptr(offset, 0);
+ printdirect(&string, x, &y, maxWidth, centered);
+}
+
bool DreamGenContext::isCD() {
// The original sources has two codepaths depending if the game is 'if cd' or not
// This is a hack to guess which version to use with the assumption that if we have a cd version
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 7c8cee4..bb5568e 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -47,6 +47,8 @@
void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);
void printdirect();
void printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered);
+ void printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered);
+ void printmessage();
void usetimedtext();
void dumptimedtext();
void setuptimedtemp();
More information about the Scummvm-git-logs
mailing list