[Scummvm-cvs-logs] scummvm master -> 362f21d30d2b8f531c30ec19829326e369ac01cd
bluegr
md5 at scummvm.org
Sun Dec 18 14:46:09 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a5879196df DREAMWEB: Port 'showdiarykeys' to C++
362f21d30d DREAMWEB: Port 'showkeys' to C++
Commit: a5879196df33eb7946b2c7afa6491c9a7d5e7213
https://github.com/scummvm/scummvm/commit/a5879196df33eb7946b2c7afa6491c9a7d5e7213
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-18T05:44:16-08:00
Commit Message:
DREAMWEB: Port 'showdiarykeys' 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 42aac4a..efdeb07 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -752,6 +752,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showcurrentfile',
'showdecisions',
'showdiary',
+ 'showdiarykeys',
'showdiarypage',
'showdiscops',
'showexit',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 04276c0..43c2e50 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2463,52 +2463,6 @@ lookcolon:
goto lookcolon;
}
-void DreamGenContext::showDiaryKeys() {
- STACK_CHECK;
- _cmp(data.byte(kPresscount), 0);
- if (flags.z())
- return /* (nokeyatall) */;
- _dec(data.byte(kPresscount));
- _cmp(data.byte(kPresscount), 0);
- if (flags.z())
- return /* (nokeyatall) */;
- _cmp(data.byte(kPressed), 'N');
- if (!flags.z())
- goto nokeyn;
- al = 3;
- _cmp(data.byte(kPresscount), 1);
- if (flags.z())
- goto gotkeyn;
- al = 4;
-gotkeyn:
- ah = 0;
- di = (68+24)+94;
- bx = (48+12)+97;
- ds = data.word(kTempgraphics);
- showFrame();
- _cmp(data.byte(kPresscount), 1);
- if (!flags.z())
- return /* (notshown) */;
- showDiaryPage();
- return;
-nokeyn:
- al = 5;
- _cmp(data.byte(kPresscount), 1);
- if (flags.z())
- goto gotkeyp;
- al = 6;
-gotkeyp:
- ah = 0;
- di = (68+24)+151;
- bx = (48+12)+71;
- ds = data.word(kTempgraphics);
- showFrame();
- _cmp(data.byte(kPresscount), 1);
- if (!flags.z())
- return /* (notshowp) */;
- showDiaryPage();
-}
-
void DreamGenContext::findPathOfPoint() {
STACK_CHECK;
push(ax);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index cbf4d55..9ecd688 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -507,7 +507,6 @@ public:
void deleteExObject();
void getEitherAd();
void dropObject();
- void showDiaryKeys();
void useOpened();
void signOn();
void locationPic();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 021b2ba..51587f1 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4569,5 +4569,25 @@ void DreamBase::clearChanges() {
memcpy(data.ptr(kRoomscango, 16), initialRoomsCanGo, 16);
}
+void DreamGenContext::showDiaryKeys() {
+ if (!data.byte(kPresscount))
+ return; // nokeyatall
+
+ data.byte(kPresscount)--;
+
+ if (!data.byte(kPresscount))
+ return; // nokeyatall
+
+ if (data.byte(kPressed) == 'N') {
+ byte frame = (data.byte(kPresscount) == 1) ? 3 : 4;
+ showFrame(tempGraphics(), kDiaryx + 94, kDiaryy + 97, frame, 0);
+ } else {
+ byte frame = (data.byte(kPresscount) == 1) ? 5 : 6;
+ showFrame(tempGraphics(), kDiaryx + 151, kDiaryy + 71, frame, 0);
+ }
+
+ if (data.byte(kPresscount) == 1)
+ showDiaryPage();
+}
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index b835a26..1578aef 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -368,5 +368,6 @@
void findInvPos();
uint16 findInvPosCPP();
void setPickup();
+ void showDiaryKeys();
#endif
Commit: 362f21d30d2b8f531c30ec19829326e369ac01cd
https://github.com/scummvm/scummvm/commit/362f21d30d2b8f531c30ec19829326e369ac01cd
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-18T05:44:17-08:00
Commit Message:
DREAMWEB: Port 'showkeys' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/monitor.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index efdeb07..2ed1edf 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -764,6 +764,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'showgun',
'showicon',
'showkeypad',
+ 'showkeys',
'showleftpage',
'showloadops',
'showmainops',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 43c2e50..f763251 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2129,33 +2129,6 @@ passpassed:
es.byte(bx) = 1;
}
-void DreamGenContext::showKeys() {
- STACK_CHECK;
- cx = 10;
- randomAccess();
- scrollMonitor();
- al = 18;
- monMessage();
- es = cs;
- bx = offset_keys;
- cx = 4;
-keysloop:
- push(cx);
- push(bx);
- _cmp(es.byte(bx), 0);
- if (flags.z())
- goto notheld;
- _add(bx, 14);
- monPrint();
-notheld:
- bx = pop();
- cx = pop();
- _add(bx, 26);
- if (--cx)
- goto keysloop;
- scrollMonitor();
-}
-
void DreamGenContext::read() {
STACK_CHECK;
cx = 40;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9ecd688..12af1ab 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -495,7 +495,6 @@ public:
void purgeAnItem();
void purgeALocation();
void getSetAd();
- void showKeys();
void nextColon();
void findOpenPos();
void deleteExFrame();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 9bac71a..8ff199c 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -25,21 +25,33 @@
namespace DreamGen {
struct MonitorKeyEntry {
- uint8 b0;
- uint8 b1;
- char b2[24];
+ uint8 keyHeld;
+ uint8 b1; // unused, for alignment
+ char userpass[24];
+ //char password[12]; // for the new monitor key list below
+ //char username[12]; // for the new monitor key list below
};
+#if 0
+// New monitor key list
+static MonitorKeyEntry monitorKeyEntries[4] = {
+ { 1, "PUBLIC ", "PUBLIC " },
+ { 0, "BLACKDRAGON", "RYAN " },
+ { 0, "HENDRIX ", "LOUIS " },
+ { 0, "SEPTIMUS ", "BECKETT " }
+};
+#endif
+
void DreamGenContext::useMon() {
data.byte(kLasttrigger) = 0;
memset(data.ptr(kCurrentfile+1, 0), ' ', 12);
memset(data.ptr(offset_operand1+1, 0), ' ', 12);
MonitorKeyEntry *monitorKeyEntries = (MonitorKeyEntry *)data.ptr(offset_keys, 0);
- monitorKeyEntries[0].b0 = 1;
- monitorKeyEntries[1].b0 = 0;
- monitorKeyEntries[2].b0 = 0;
- monitorKeyEntries[3].b0 = 0;
+ monitorKeyEntries[0].keyHeld = 1;
+ monitorKeyEntries[1].keyHeld = 0;
+ monitorKeyEntries[2].keyHeld = 0;
+ monitorKeyEntries[3].keyHeld = 0;
createPanel();
showPanel();
@@ -417,4 +429,20 @@ void DreamBase::loadCart() {
data.word(kTextfile3) = standardLoad("DREAMWEB.T24"); // monitor file 24
}
+void DreamGenContext::showKeys() {
+ randomAccess(10);
+ scrollMonitor();
+ monMessage(18);
+
+ MonitorKeyEntry *monitorKeyEntries = (MonitorKeyEntry *)data.ptr(offset_keys, 0);
+
+ for (int i = 0; i < 4; i++) {
+ if (monitorKeyEntries[i].keyHeld)
+ monPrint(monitorKeyEntries[i].userpass + 12); // username
+ //monPrint(monitorKeyEntries[i].username);
+ }
+
+ scrollMonitor();
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 1578aef..0d2d8df 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -369,5 +369,6 @@
uint16 findInvPosCPP();
void setPickup();
void showDiaryKeys();
+ void showKeys();
#endif
More information about the Scummvm-git-logs
mailing list