diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 27 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/monitor.cpp | 42 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 36 insertions, 35 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 43c2e50d1e..f7632514e1 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 9ecd688824..12af1ab3c7 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 9bac71a8e5..8ff199cf49 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 1578aefc71..0d2d8dfe76 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -369,5 +369,6 @@ uint16 findInvPosCPP(); void setPickup(); void showDiaryKeys(); + void showKeys(); #endif |