diff options
author | Willem Jan Palenstijn | 2011-12-26 20:54:33 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-26 20:54:48 +0100 |
commit | b5ad84a05d7ad56118794efe071fe20c35ef4821 (patch) | |
tree | c8ea59f097de368b20faa34bb107d1bd5bee279e | |
parent | b08804f360d7561ca1014445aa7eeb257297f8ed (diff) | |
download | scummvm-rg350-b5ad84a05d7ad56118794efe071fe20c35ef4821.tar.gz scummvm-rg350-b5ad84a05d7ad56118794efe071fe20c35ef4821.tar.bz2 scummvm-rg350-b5ad84a05d7ad56118794efe071fe20c35ef4821.zip |
DREAMWEB: Move inputline out of data blob
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreambase.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 16 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 7 | ||||
-rw-r--r-- | engines/dreamweb/monitor.cpp | 21 |
5 files changed, 16 insertions, 32 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index e7b3128144..57674d2d1c 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -54,6 +54,7 @@ p = parser(skip_binary_data = [ 'roomscango', 'oplist', 'presslist', + 'inputline', # keypad.asm 'keypadlist', 'symbollist', diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 0ee14bbd42..c17a15e34a 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -64,6 +64,9 @@ protected: // from keypad.cpp uint8 _pressList[6]; + // from monitor.cpp + char _inputLine[64]; + // from newplace.cpp uint8 _roomsCanGo[16]; diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 13067db073..a4eeeacd2f 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -210,22 +210,6 @@ void DreamGenContext::__start() { //0x01c0: ...D :... .... .... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x01d0: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x01e0: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x01f0: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0200: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0210: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0220: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0230: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0240: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0250: .... .... .... .... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; ds.assign(src, src + sizeof(src)); dreamweb(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 6d2e2eb5af..48b413807c 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -311,10 +311,9 @@ static const uint16 kCurrentsample = 379; static const uint16 kRoomssample = 380; static const uint16 kBasicsample = 381; static const uint16 kCurrentfile = 408; -static const uint16 kInputline = 483; -static const uint16 kQuitrequested = 611; -static const uint16 kSubtitles = 612; -static const uint16 kForeignrelease = 613; +static const uint16 kQuitrequested = 483; +static const uint16 kSubtitles = 484; +static const uint16 kForeignrelease = 485; static const uint16 kBlocktextdat = (0); static const uint16 kPersonframes = (0); static const uint16 kDebuglevel1 = (0); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 3b9b96e2b9..0caf4b7c25 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -111,8 +111,7 @@ bool DreamGenContext::execCommand() { "KEYS" }; - const char *inputLine = (const char *)data.ptr(kInputline, 64); - if (*inputLine == 0) { + if (_inputLine[0] == 0) { // No input scrollMonitor(); return false; @@ -123,7 +122,7 @@ bool DreamGenContext::execCommand() { // Loop over all commands in the list and see if we get a match for (cmd = 0; cmd < ARRAYSIZE(comlist); ++cmd) { const char *cmdStr = comlist[cmd]; - const char *inputStr = inputLine; + const char *inputStr = _inputLine; // Compare the command, char by char, to see if we get a match. // We only care about the prefix matching, though. char inputChar, cmdChar; @@ -191,8 +190,7 @@ void DreamBase::printLogo() { } void DreamBase::input() { - char *inputLine = (char *)data.ptr(kInputline, 64); - memset(inputLine, 0, 64); + memset(_inputLine, 0, 64); data.word(kCurpos) = 0; printChar(engine->tempCharset(), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL); multiDump(data.word(kMonadx), data.word(kMonady), 6, 8); @@ -221,13 +219,13 @@ void DreamBase::input() { if ((currentKey == 32) && (data.word(kCurpos) == 0)) continue; currentKey = makeCaps(currentKey); - inputLine[data.word(kCurpos) * 2 + 0] = currentKey; + _inputLine[data.word(kCurpos) * 2 + 0] = currentKey; if (currentKey > 'Z') continue; multiGet(mapStore() + data.word(kCurpos) * 256, data.word(kMonadx), data.word(kMonady), 8, 8); uint8 charWidth; printChar(engine->tempCharset(), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL); - inputLine[data.word(kCurpos) * 2 + 1] = charWidth; + _inputLine[data.word(kCurpos) * 2 + 1] = charWidth; data.word(kMonadx) += charWidth; ++data.word(kCurpos); data.word(kCurslocx) += charWidth; @@ -246,10 +244,9 @@ byte DreamBase::makeCaps(byte c) { } void DreamBase::delChar() { - char *inputLine = (char *)data.ptr(kInputline, 0); --data.word(kCurpos); - inputLine[data.word(kCurpos) * 2] = 0; - uint8 width = inputLine[data.word(kCurpos) * 2 + 1]; + _inputLine[data.word(kCurpos) * 2] = 0; + uint8 width = _inputLine[data.word(kCurpos) * 2 + 1]; data.word(kMonadx) -= width; data.word(kCurslocx) -= width; uint16 offset = data.word(kCurpos); @@ -587,7 +584,7 @@ void DreamGenContext::signOn() { data.word(kMonadx) = prevX; data.word(kMonady) = prevY; - inputLine = (const char *)data.ptr(kInputline, 0); + inputLine = (const char *)_inputLine; inputLine.toUppercase(); // The entered line has zeroes in-between each character @@ -634,7 +631,7 @@ const char *DreamBase::parser() { char *p = output; *p++ = '='; - const char *in = (const char *)data.ptr(kInputline, 0); + const char *in = _inputLine; uint8 c; |