[Scummvm-cvs-logs] scummvm master -> 88c0246aaec022b8e840c564f08da6f8b4004dc2
tramboi
bertrand_augereau at yahoo.fr
Mon Nov 28 15:48:32 CET 2011
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
00eaf55fdf DREAMWEB: 'printdirect' returns the last read char in al
87571f0c8c DREAMWEB: 'viewfolder' ported to C++
a2721b6c57 DREAMWEB: Allow quitting in the diary
ae8e5ea2f7 DREAMWEB: 'showfolder' ported to C++
88c0246aae DREAMWEB: 'showleftpage' ported to C++
Commit: 00eaf55fdfdb447a4071eb82eca54764aefbfffc
https://github.com/scummvm/scummvm/commit/00eaf55fdfdb447a4071eb82eca54764aefbfffc
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T06:47:23-08:00
Commit Message:
DREAMWEB: 'printdirect' returns the last read char in al
Changed paths:
engines/dreamweb/print.cpp
engines/dreamweb/stubs.h
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 3a71c47..791c85b 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -138,16 +138,16 @@ void DreamGenContext::printdirect() {
uint16 initialSi = si;
const uint8 *initialString = es.ptr(si, 0);
const uint8 *string = initialString;
- printdirect(&string, di, &y, dl, (bool)(dl & 1));
+ al = printdirect(&string, di, &y, dl, (bool)(dl & 1));
si = initialSi + (string - initialString);
bx = y;
}
-void DreamGenContext::printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
- printdirect(&string, x, &y, maxWidth, centered);
+uint8 DreamGenContext::printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
+ return printdirect(&string, x, &y, maxWidth, centered);
}
-void DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
+uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
data.word(kLastxpos) = x;
const Frame *charSet = (const Frame *)segRef(data.word(kCurrentset)).ptr(0, 0);
while (true) {
@@ -159,7 +159,7 @@ void DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, uin
uint8 nextChar = (*string)[1];
++(*string);
if ((c == 0) || (c == ':')) {
- return;
+ return c;
}
c = engine->modifyChar(c);
uint8 width, height;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index cbad64b..a09cd64 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -72,8 +72,8 @@
void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);
void printchar(const Frame* charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);
void printdirect();
- void printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered);
- void printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
+ uint8 printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered);
+ uint8 printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
void printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered);
void printmessage();
void usetimedtext();
Commit: 87571f0c8c9dca4699750adf7771e85d203bf022
https://github.com/scummvm/scummvm/commit/87571f0c8c9dca4699750adf7771e85d203bf022
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T06:47:24-08:00
Commit Message:
DREAMWEB: 'viewfolder' ported to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.h
engines/dreamweb/use.cpp
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index adcd5a2..9a3354c 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -301,6 +301,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'restoreall',
'restorereels',
'allocateload',
+ 'viewfolder',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index cbbfc6d..1e629a8 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9760,37 +9760,6 @@ void DreamGenContext::loadmenu() {
loadintotemp2();
}
-void DreamGenContext::viewfolder() {
- STACK_CHECK;
- data.byte(kManisoffscreen) = 1;
- getridofall();
- loadfolder();
- data.byte(kFolderpage) = 0;
- showfolder();
- worktoscreenm();
- data.byte(kGetback) = 0;
-folderloop:
- delpointer();
- readmouse();
- showpointer();
- vsync();
- dumppointer();
- dumptextline();
- bx = offset_folderlist;
- checkcoords();
- _cmp(data.byte(kGetback), 0);
- if (flags.z())
- goto folderloop;
- data.byte(kManisoffscreen) = 0;
- getridoftemp();
- getridoftemp2();
- getridoftemp3();
- getridoftempcharset();
- restoreall();
- redrawmainscrn();
- worktoscreenm();
-}
-
void DreamGenContext::nextfolder() {
STACK_CHECK;
_cmp(data.byte(kFolderpage), 12);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f3c9873..8e1a807 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -184,7 +184,6 @@ public:
static const uint16 addr_lastfolder = 0xc7c0;
static const uint16 addr_folderhints = 0xc7bc;
static const uint16 addr_nextfolder = 0xc7b8;
- static const uint16 addr_viewfolder = 0xc7b4;
static const uint16 addr_loadmenu = 0xc7b0;
static const uint16 addr_showmenu = 0xc7ac;
static const uint16 addr_dumpmenu = 0xc79c;
@@ -1273,7 +1272,6 @@ public:
//void hangoncurs();
//void getblockofpixel();
//void kernchars();
- //void printcurs();
//void convertkey();
void outofopen();
//void dealwithspecial();
@@ -1497,7 +1495,7 @@ public:
//void readmouse2();
//void zoom();
void outofinv();
- void viewfolder();
+ //void printcurs();
//void walking();
void diarykeyp();
//void readabyte();
@@ -1525,6 +1523,7 @@ public:
void purgealocation();
void sparkydrip();
//void paltostartpal();
+ //void viewfolder();
void getridofpit();
//void convnum();
//void checkifset();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index a09cd64..029b99a 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -354,4 +354,5 @@
void loadRoomData(const Room* room, bool skipDat);
void restoreall();
void restorereels();
+ void viewfolder();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 278767a..6e2de2e 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -194,5 +194,39 @@ void DreamGenContext::showseconduse() {
hangonp(400);
}
+void DreamGenContext::viewfolder() {
+ data.byte(kManisoffscreen) = 1;
+ getridofall();
+ loadfolder();
+ data.byte(kFolderpage) = 0;
+ showfolder();
+ worktoscreenm();
+ data.byte(kGetback) = 0;
+ do {
+ delpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ RectWithCallback folderlist[] = {
+ { 280,320,160,200,&DreamGenContext::quitkey },
+ { 143,300,6,194,&DreamGenContext::nextfolder },
+ { 0,143,6,194,&DreamGenContext::lastfolder },
+ { 0,320,0,200,&DreamGenContext::blank },
+ { 0xFFFF,0,0,0,0 }
+ };
+ checkcoords(folderlist);
+ } while (data.byte(kGetback) == 0);
+ data.byte(kManisoffscreen) = 0;
+ getridoftemp();
+ getridoftemp2();
+ getridoftemp3();
+ getridoftempcharset();
+ restoreall();
+ redrawmainscrn();
+ worktoscreenm();
+}
+
} /*namespace dreamgen */
Commit: a2721b6c579bbf5c3b4e83c9e70cd17f88fc049e
https://github.com/scummvm/scummvm/commit/a2721b6c579bbf5c3b4e83c9e70cd17f88fc049e
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T06:47:27-08:00
Commit Message:
DREAMWEB: Allow quitting in the diary
Changed paths:
engines/dreamweb/use.cpp
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 6e2de2e..2e32a21 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -203,6 +203,8 @@ void DreamGenContext::viewfolder() {
worktoscreenm();
data.byte(kGetback) = 0;
do {
+ if (quitRequested())
+ break;
delpointer();
readmouse();
showpointer();
Commit: ae8e5ea2f7b93bb0dfdb3aca225ede80eadc5ac7
https://github.com/scummvm/scummvm/commit/ae8e5ea2f7b93bb0dfdb3aca225ede80eadc5ac7
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T06:47:29-08:00
Commit Message:
DREAMWEB: 'showfolder' ported 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 9a3354c..bff57d8 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -302,6 +302,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'restorereels',
'allocateload',
'viewfolder',
+ 'showfolder',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 1e629a8..518d25e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9895,70 +9895,6 @@ void DreamGenContext::loadfolder() {
loadtemptext();
}
-void DreamGenContext::showfolder() {
- STACK_CHECK;
- data.byte(kCommandtype) = 255;
- _cmp(data.byte(kFolderpage), 0);
- if (flags.z())
- goto closedfolder;
- usetempcharset();
- createpanel2();
- ds = data.word(kTempgraphics);
- di = 0;
- bx = 0;
- al = 0;
- ah = 0;
- showframe();
- ds = data.word(kTempgraphics);
- di = 143;
- bx = 0;
- al = 1;
- ah = 0;
- showframe();
- ds = data.word(kTempgraphics);
- di = 0;
- bx = 92;
- al = 2;
- ah = 0;
- showframe();
- ds = data.word(kTempgraphics);
- di = 143;
- bx = 92;
- al = 3;
- ah = 0;
- showframe();
- folderexit();
- _cmp(data.byte(kFolderpage), 1);
- if (flags.z())
- goto noleftpage;
- showleftpage();
-noleftpage:
- _cmp(data.byte(kFolderpage), 12);
- if (flags.z())
- goto norightpage;
- showrightpage();
-norightpage:
- usecharset1();
- undertextline();
- return;
-closedfolder:
- createpanel2();
- ds = data.word(kTempgraphics3);
- di = 143-28;
- bx = 0;
- al = 0;
- ah = 0;
- showframe();
- ds = data.word(kTempgraphics3);
- di = 143-28;
- bx = 92;
- al = 1;
- ah = 0;
- showframe();
- folderexit();
- undertextline();
-}
-
void DreamGenContext::folderexit() {
STACK_CHECK;
ds = data.word(kTempgraphics2);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 8e1a807..fc77962 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -179,7 +179,6 @@ public:
static const uint16 addr_showrightpage = 0xc7d4;
static const uint16 addr_showleftpage = 0xc7d0;
static const uint16 addr_folderexit = 0xc7cc;
- static const uint16 addr_showfolder = 0xc7c8;
static const uint16 addr_loadfolder = 0xc7c4;
static const uint16 addr_lastfolder = 0xc7c0;
static const uint16 addr_folderhints = 0xc7bc;
@@ -1188,7 +1187,7 @@ public:
void deallocatemem();
void mainscreen();
void watchreel();
- void showfolder();
+ //void showfolder();
void showslots();
void openfilefromc();
void gettime();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e8a5624..22bf348 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2317,5 +2317,30 @@ void DreamGenContext::restorereels() {
closefile();
}
+void DreamGenContext::showfolder() {
+ data.byte(kCommandtype) = 255;
+ if (data.byte(kFolderpage)) {
+ usetempcharset();
+ createpanel2();
+ showframe(tempGraphics(), 0, 0, 0, 0);
+ showframe(tempGraphics(), 143, 0, 1, 0);
+ showframe(tempGraphics(), 0, 92, 2, 0);
+ showframe(tempGraphics(), 143, 92, 3, 0);
+ folderexit();
+ if (data.byte(kFolderpage) != 1)
+ showleftpage();
+ if (data.byte(kFolderpage) != 12)
+ showrightpage();
+ usecharset1();
+ undertextline();
+ } else {
+ createpanel2();
+ showframe(tempGraphics3(), 143-28, 0, 0, 0);
+ showframe(tempGraphics3(), 143-28, 92, 1, 0);
+ folderexit();
+ undertextline();
+ }
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 029b99a..b5201d8 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -355,4 +355,5 @@
void restoreall();
void restorereels();
void viewfolder();
+ void showfolder();
Commit: 88c0246aaec022b8e840c564f08da6f8b4004dc2
https://github.com/scummvm/scummvm/commit/88c0246aaec022b8e840c564f08da6f8b4004dc2
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T06:47:31-08:00
Commit Message:
DREAMWEB: 'showleftpage' ported 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 bff57d8..8e54272 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -303,6 +303,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'allocateload',
'viewfolder',
'showfolder',
+ 'showleftpage',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 518d25e..6c63e0f 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9905,92 +9905,6 @@ void DreamGenContext::folderexit() {
showframe();
}
-void DreamGenContext::showleftpage() {
- STACK_CHECK;
- ds = data.word(kTempgraphics2);
- di = 0;
- bx = 12;
- al = 3;
- ah = 0;
- showframe();
- bx = 12+5;
- cx = 9;
-leftpageloop:
- push(cx);
- push(bx);
- ds = data.word(kTempgraphics2);
- di = 0;
- al = 4;
- ah = 0;
- showframe();
- bx = pop();
- cx = pop();
- _add(bx, 16);
- if (--cx)
- goto leftpageloop;
- ds = data.word(kTempgraphics2);
- di = 0;
- al = 5;
- ah = 0;
- showframe();
- data.word(kLinespacing) = 8;
- data.word(kCharshift) = 91;
- data.byte(kKerning) = 1;
- bl = data.byte(kFolderpage);
- _dec(bl);
- _dec(bl);
- _add(bl, bl);
- bh = 0;
- _add(bx, bx);
- es = data.word(kTextfile1);
- si = es.word(bx);
- _add(si, 66*2);
- di = 2;
- bx = 48;
- dl = 140;
- cx = 2;
-twolotsleft:
- push(cx);
-contleftpage:
- printdirect();
- _add(bx, data.word(kLinespacing));
- _cmp(al, 0);
- if (!flags.z())
- goto contleftpage;
- cx = pop();
- if (--cx)
- goto twolotsleft;
- data.byte(kKerning) = 0;
- data.word(kCharshift) = 0;
- data.word(kLinespacing) = 10;
- es = data.word(kWorkspace);
- ds = data.word(kWorkspace);
- di = (48*320)+2;
- si = (48*320)+2+130;
- cx = 120;
-flipfolder:
- push(cx);
- push(di);
- push(si);
- cx = 65;
-flipfolderline:
- al = es.byte(di);
- ah = es.byte(si);
- es.byte(di) = ah;
- es.byte(si) = al;
- _dec(si);
- _inc(di);
- if (--cx)
- goto flipfolderline;
- si = pop();
- di = pop();
- cx = pop();
- _add(si, 320);
- _add(di, 320);
- if (--cx)
- goto flipfolder;
-}
-
void DreamGenContext::showrightpage() {
STACK_CHECK;
ds = data.word(kTempgraphics2);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index fc77962..eef7a35 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -177,7 +177,6 @@ public:
static const uint16 addr_quitsymbol = 0xc7dc;
static const uint16 addr_entersymbol = 0xc7d8;
static const uint16 addr_showrightpage = 0xc7d4;
- static const uint16 addr_showleftpage = 0xc7d0;
static const uint16 addr_folderexit = 0xc7cc;
static const uint16 addr_loadfolder = 0xc7c4;
static const uint16 addr_lastfolder = 0xc7c0;
@@ -1415,7 +1414,7 @@ public:
void allpalette();
//void loopchannel0();
//void initrain();
- void showleftpage();
+ //void showleftpage();
void rockstar();
void adjustright();
void putunderzoom();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 22bf348..0973e9e 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2342,5 +2342,39 @@ void DreamGenContext::showfolder() {
}
}
+void DreamGenContext::showleftpage() {
+ showframe(tempGraphics2(), 0, 12, 3, 0);
+ uint16 y = 12+5;
+ for (size_t i = 0; i < 9; ++i) {
+ showframe(tempGraphics2(), 0, y, 4, 0);
+ y += 16;
+ }
+ showframe(tempGraphics2(), 0, y, 5, 0);
+ data.word(kLinespacing) = 8;
+ 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;
+ const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
+ y = 48;
+ for (size_t i = 0; i < 2; ++i) {
+ uint8 lastChar;
+ do {
+ lastChar = printdirect(&string, 2, &y, 140, false);
+ y += data.word(kLinespacing);
+ } while (lastChar != '\0');
+ }
+ data.byte(kKerning) = 0;
+ data.word(kCharshift) = 0;
+ data.word(kLinespacing) = 10;
+ uint8 *bufferToSwap = workspace() + (48*320)+2;
+ for (size_t i = 0; i < 120; ++i) {
+ for (size_t j = 0; j < 65; ++j) {
+ SWAP(bufferToSwap[j], bufferToSwap[130 - j]);
+ }
+ bufferToSwap += 320;
+ }
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index b5201d8..129d906 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -356,4 +356,5 @@
void restorereels();
void viewfolder();
void showfolder();
+ void showleftpage();
More information about the Scummvm-git-logs
mailing list