diff options
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
| -rw-r--r-- | engines/dreamweb/dreambase.h | 3 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 8 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
| -rw-r--r-- | engines/dreamweb/monitor.cpp | 21 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 6 | 
6 files changed, 23 insertions, 17 deletions
| diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 1ddb900d31..2a8d0bebf9 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -530,6 +530,7 @@ generator = cpp(context, "DreamGen", blacklist = [  	'mainman',  	'mainscreen',  	'makebackob', +	'makecaps',  	'makeheader',  	'makemainscreen',  	'makename', diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 2048f39e3b..a451704c6a 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -52,6 +52,9 @@ public:  public:  	// from monitor.cpp +	void input(); +	byte makeCaps(byte c); +	void delChar();  	void printOuterMon();  	void showCurrentFile();  	void accessLightOn(); diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index ef96461d17..3831f386db 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -2813,14 +2813,6 @@ emptyinterface:  	al = 0;  } -void DreamGenContext::makeCaps() { -	STACK_CHECK; -	_cmp(al, 'a'); -	if (flags.c()) -		return /* (notupperc) */; -	_sub(al, 32); -} -  void DreamGenContext::dirCom() {  	STACK_CHECK;  	cx = 30; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index dc06f1f9e5..8d23f9768e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -554,7 +554,6 @@ public:  	void checkInside();  	void findPathOfPoint();  	void getDestInfo(); -	void makeCaps();  	void read();  	void additionalText();  	void mugger(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index dba0d56c31..5d0987b29e 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -185,7 +185,7 @@ void DreamBase::printLogo() {  	showCurrentFile();  } -void DreamGenContext::input() { +void DreamBase::input() {  	char *inputLine = (char *)data.ptr(kInputline, 64);  	memset(inputLine, 0, 64);  	data.word(kCurpos) = 0; @@ -215,9 +215,7 @@ void DreamGenContext::input() {  			continue;  		if ((currentKey == 32) && (data.word(kCurpos) == 0))  			continue; -		al = currentKey; -		makeCaps(); -		currentKey = al; +		currentKey = makeCaps(currentKey);  		inputLine[data.word(kCurpos) * 2 + 0] = currentKey;  		if (currentKey > 'Z')  			continue; @@ -231,7 +229,18 @@ void DreamGenContext::input() {  	}  } -void DreamGenContext::delChar() { +void DreamGenContext::makeCaps() { +	al = makeCaps(al); +} + +byte DreamBase::makeCaps(byte c) { +	// TODO: Replace calls to this by toupper() ? +	if (c >= 'a') +		c -= 'a' - 'A'; // = 32 +	return c; +} + +void DreamBase::delChar() {  	char *inputLine = (char *)data.ptr(kInputline, 0);  	--data.word(kCurpos);  	inputLine[data.word(kCurpos) * 2] = 0; @@ -241,7 +250,7 @@ void DreamGenContext::delChar() {  	uint16 offset = data.word(kCurpos);  	offset = ((offset & 0x00ff) << 8) | ((offset & 0xff00) >> 8);  	multiPut(mapStore() + offset, data.word(kMonadx), data.word(kMonady), 8, 8); -	multiDump(data.word(kMonadx), data.word(kMonady), al, 8); +	multiDump(data.word(kMonadx), data.word(kMonady), 8, 8);  }  void DreamBase::printCurs() { diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index b3b974a43d..481e784e4a 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -38,7 +38,6 @@  	void loadTempCharset();  	void loadTempCharset(const char *fileName);  	void saveLoad(); -	void delChar();  	void hangOnCurs(uint16 frameCount);  	void hangOnCurs();  	void workToScreen(); @@ -267,7 +266,10 @@  	void dumpMenu();  	void useMenu();  	void useMon(); -	void input(); +	void makeCaps(); +	byte makeCaps(byte c) { +		return DreamBase::makeCaps(c); +	}  	void monPrint();  	const char *monPrint(const char *string) {  		return DreamBase::monPrint(string); | 
