[Scummvm-cvs-logs] scummvm master -> 64c0b0faa74867f33156e9c91516dc6ae68464d8

tramboi bertrand_augereau at yahoo.fr
Mon Nov 28 18:36:32 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:
5b44ff3617 DREAMWEB: Small cleanup in 'showleftpage' and 'showrightpage'
64c0b0faa7 DREAMWEB: Helper to get strings from kTextfile1


Commit: 5b44ff36179156bafa5a1639a6f87a0568b28000
    https://github.com/scummvm/scummvm/commit/5b44ff36179156bafa5a1639a6f87a0568b28000
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T09:34:47-08:00

Commit Message:
DREAMWEB: Small cleanup in 'showleftpage' and 'showrightpage'

Changed paths:
    engines/dreamweb/stubs.cpp



diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 9c81f95..e2cf111 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2354,7 +2354,7 @@ void DreamGenContext::showleftpage() {
 	data.word(kCharshift) = 91;
 	data.byte(kKerning) = 1;
 	uint8 pageIndex = data.byte(kFolderpage) - 2;
-	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + 66*2;
+	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + kTextstart;
 	const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
 	y = 48;
 	for (size_t i = 0; i < 2; ++i) {
@@ -2388,7 +2388,7 @@ void DreamGenContext::showrightpage() {
 	data.word(kLinespacing) = 8;
 	data.byte(kKerning) = 1;
 	uint8 pageIndex = data.byte(kFolderpage) - 1;
-	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + 66*2;
+	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + kTextstart;
 	const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
 	y = 48;
 	for (size_t i = 0; i < 2; ++i) {


Commit: 64c0b0faa74867f33156e9c91516dc6ae68464d8
    https://github.com/scummvm/scummvm/commit/64c0b0faa74867f33156e9c91516dc6ae68464d8
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T09:34:48-08:00

Commit Message:
DREAMWEB: Helper to get strings from kTextfile1

Changed paths:
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e2cf111..f44d290 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2354,8 +2354,7 @@ void DreamGenContext::showleftpage() {
 	data.word(kCharshift) = 91;
 	data.byte(kKerning) = 1;
 	uint8 pageIndex = data.byte(kFolderpage) - 2;
-	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + kTextstart;
-	const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
+	const uint8 *string = getTextInFile1(pageIndex * 2);
 	y = 48;
 	for (size_t i = 0; i < 2; ++i) {
 		uint8 lastChar;
@@ -2388,8 +2387,7 @@ void DreamGenContext::showrightpage() {
 	data.word(kLinespacing) = 8;
 	data.byte(kKerning) = 1;
 	uint8 pageIndex = data.byte(kFolderpage) - 1;
-	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + kTextstart;
-	const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
+	const uint8 *string = getTextInFile1(pageIndex * 2);
 	y = 48;
 	for (size_t i = 0; i < 2; ++i) {
 		uint8 lastChar;
@@ -2419,5 +2417,11 @@ void DreamGenContext::setlocation() {
 	setlocation(al);
 }
 
+const uint8 *DreamGenContext::getTextInFile1(uint16 index) {
+	uint16 offset = segRef(data.word(kTextfile1)).word(index * 2) + kTextstart;
+	const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
+	return string;
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f1245ad..76964b0 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -362,4 +362,5 @@
 	void getlocation();
 	void setlocation(uint8 index);
 	void setlocation();
+	const uint8 *getTextInFile1(uint16 index);
 






More information about the Scummvm-git-logs mailing list