[Scummvm-cvs-logs] scummvm master -> c452bf9c1268155bd896b2f42c003c8eda110e84
bluegr
md5 at scummvm.org
Mon Dec 12 23:56:02 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c452bf9c12 DREAMWEB: Port 'selectslot' to C++
Commit: c452bf9c1268155bd896b2f42c003c8eda110e84
https://github.com/scummvm/scummvm/commit/c452bf9c1268155bd896b2f42c003c8eda110e84
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-12T14:54:51-08:00
Commit Message:
DREAMWEB: Port 'selectslot' 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 b663a01..566ad8a 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -663,6 +663,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'security',
'seecommandtail',
'selectlocation',
+ 'selectslot',
'selectslot2',
'set16colpalette',
'setallchanges',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b917f58..7ab361b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4532,58 +4532,6 @@ void DreamGenContext::findText1() {
si = ax;
}
-void DreamGenContext::selectSlot() {
- STACK_CHECK;
- _cmp(data.byte(kCommandtype), 244);
- if (flags.z())
- goto alreadysel;
- data.byte(kCommandtype) = 244;
- al = 45;
- commandOnly();
-alreadysel:
- ax = data.word(kMousebutton);
- _cmp(ax, 1);
- if (!flags.z())
- return /* (noselslot) */;
- _cmp(ax, data.word(kOldbutton));
- if (flags.z())
- return /* (noselslot) */;
- _cmp(data.byte(kLoadingorsave), 3);
- if (!flags.z())
- goto notnocurs;
- _dec(data.byte(kLoadingorsave));
-notnocurs:
- oldToNames();
- ax = data.word(kMousey);
- _sub(ax, (52)+4);
- cl = -1;
-getslotnum:
- _inc(cl);
- _sub(ax, 11);
- if (!flags.c())
- goto getslotnum;
- data.byte(kCurrentslot) = cl;
- delPointer();
- showOpBox();
- showSlots();
- showNames();
- _cmp(data.byte(kLoadingorsave), 1);
- if (flags.z())
- goto isloadmode;
- showSaveOps();
- readMouse();
- showPointer();
- workToScreen();
- delPointer();
- return;
-isloadmode:
- showLoadOps();
- readMouse();
- showPointer();
- workToScreen();
- delPointer();
-}
-
void DreamGenContext::showSlots() {
STACK_CHECK;
di = (60)+7;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f146649..3bb554e 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -528,7 +528,6 @@ public:
void getKeyAndLogo();
void selectOb();
void receptionist();
- void selectSlot();
void fadeUpMon();
void showDiaryPage();
void reExFromInv();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e52ccf0..97dad08 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4476,4 +4476,39 @@ void DreamGenContext::entryAnims() {
}
}
+void DreamGenContext::selectSlot() {
+ if (data.byte(kCommandtype) != 244) {
+ data.byte(kCommandtype) = 244;
+ commandOnly(45);
+ }
+
+ if (data.word(kMousebutton) != 1 || data.word(kMousebutton) == data.word(kOldbutton))
+ return; // noselslot
+ if (data.byte(kLoadingorsave) == 3)
+ data.byte(kLoadingorsave)--;
+
+ oldToNames();
+ uint16 y = data.word(kMousey) - (kOpsy + 4);
+ byte currentSlot = (byte)-1;
+
+ do {
+ currentSlot++;
+ y -= 11;
+ } while (y >= 11);
+
+ data.byte(kCurrentslot) = currentSlot;
+ delPointer();
+ showOpBox();
+ showSlots();
+ showNames();
+ if (data.byte(kLoadingorsave) == 1)
+ showLoadOps();
+ else
+ showSaveOps();
+ readMouse();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 4376f5b..b32f546 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -476,6 +476,7 @@
void afterIntroRoom();
void gettingShot();
void redrawMainScrn();
+ void selectSlot();
void selectSlot2();
void blank();
void allPointer();
More information about the Scummvm-git-logs
mailing list