Skip to content

Commit

Permalink
DREAMWEB: 'fadeupyellows' ported to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
tramboi committed Nov 18, 2011
1 parent bb63c3f commit 37052c1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
1 change: 1 addition & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -241,6 +241,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'printcurs',
'delcurs',
'hangoncurs',
'fadeupyellows',
'loadroomssample',
], skip_output = [
# These functions are processed but not output
Expand Down
20 changes: 0 additions & 20 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -2769,25 +2769,6 @@ void DreamGenContext::fadeupmonfirst() {
hangon();
}

void DreamGenContext::fadeupyellows() {
STACK_CHECK;
paltoendpal();
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 128;
hangon();
}

void DreamGenContext::initialmoncols() {
STACK_CHECK;
paltostartpal();
Expand Down Expand Up @@ -15503,7 +15484,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_fadedownmon: fadedownmon(); break;
case addr_fadeupmon: fadeupmon(); break;
case addr_fadeupmonfirst: fadeupmonfirst(); break;
case addr_fadeupyellows: fadeupyellows(); break;
case addr_initialmoncols: initialmoncols(); break;
case addr_titles: titles(); break;
case addr_endgame: endgame(); break;
Expand Down
3 changes: 1 addition & 2 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -474,7 +474,6 @@ class DreamGenContext : public Context {
static const uint16 addr_endgame = 0xc2c4;
static const uint16 addr_titles = 0xc2c0;
static const uint16 addr_initialmoncols = 0xc2bc;
static const uint16 addr_fadeupyellows = 0xc2b8;
static const uint16 addr_fadeupmonfirst = 0xc2b4;
static const uint16 addr_fadeupmon = 0xc2b0;
static const uint16 addr_fadedownmon = 0xc2ac;
Expand Down Expand Up @@ -1309,7 +1308,7 @@ class DreamGenContext : public Context {
//void showpanel();
void soundstartup();
void slabdoora();
void fadeupyellows();
//void fadeupyellows();
void slabdoorc();
void slabdoorb();
void slabdoore();
Expand Down
1 change: 1 addition & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -292,4 +292,5 @@
void textforend();
void readsetdata();
void loadroomssample();
void fadeupyellows();

11 changes: 11 additions & 0 deletions engines/dreamweb/vgafades.cpp
Expand Up @@ -83,5 +83,16 @@ void DreamGenContext::fadecalculation() {
--data.byte(kFadecount);
}

void DreamGenContext::fadeupyellows() {
paltoendpal();
memset(endPalette() + 231*3, 0, 8*3);
memset(endPalette() + 246*3, 0, 1*3);
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
hangon(128);
}

} /*namespace dreamgen */

0 comments on commit 37052c1

Please sign in to comment.