[Scummvm-cvs-logs] scummvm master -> bda312b61b2fa4ce8c7e728f3bf0f603fd839e3d
bluegr
md5 at scummvm.org
Tue Dec 27 09:16:33 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:
bda312b61b DREAMWEB: Remove more unused/unnecessary variables
Commit: bda312b61b2fa4ce8c7e728f3bf0f603fd839e3d
https://github.com/scummvm/scummvm/commit/bda312b61b2fa4ce8c7e728f3bf0f603fd839e3d
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-27T00:16:06-08:00
Commit Message:
DREAMWEB: Remove more unused/unnecessary variables
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/sound.cpp
engines/dreamweb/sprite.cpp
engines/dreamweb/structs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 4ef85b4..598f1e8 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -237,6 +237,8 @@ p = parser(skip_binary_data = [
'netseg',
'netpoint',
'cursorstate',
+ 'ch0blockstocopy',
+ 'ch1blockstocopy',
# vgagrafx.asm
'cityname',
'extragraphics1',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index ad4b505..f3b9851 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -73,9 +73,9 @@ void DreamGenContext::__start() {
//0x0140: .... .... .... ....
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0150: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
//0x0160: .... .... .... ....
- 0x00, 0xff, 0x00, 0x00, };
+ };
ds.assign(src, src + sizeof(src));
dreamweb();
}
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index b217b4e..e5887c7 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -297,11 +297,9 @@ static const uint16 kLineendy = 360;
static const uint16 kLinepointer = 362;
static const uint16 kLinedirection = 363;
static const uint16 kLinelength = 364;
-static const uint16 kCh0blockstocopy = 365;
-static const uint16 kCh0playing = 367;
-static const uint16 kCh0repeat = 368;
-static const uint16 kCh1playing = 369;
-static const uint16 kCh1blockstocopy = 370;
+static const uint16 kCh0playing = 365;
+static const uint16 kCh0repeat = 366;
+static const uint16 kCh1playing = 367;
static const uint16 kBlocktextdat = (0);
static const uint16 kPersonframes = (0);
static const uint16 kDebuglevel1 = (0);
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index e99c7da..23a12c2 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -65,7 +65,6 @@ void DreamBase::playChannel0(uint8 index, uint8 repeat) {
soundBank = (Sound *)getSegment(data.word(kSounddata)).ptr(0, 0);
data.byte(kCh0repeat) = repeat;
- data.word(kCh0blockstocopy) = soundBank[index].blockCount();
}
void DreamBase::playChannel1(uint8 index) {
@@ -79,19 +78,15 @@ void DreamBase::playChannel1(uint8 index) {
index -= 12;
} else
soundBank = (Sound *)getSegment(data.word(kSounddata)).ptr(0, 0);
-
- data.word(kCh1blockstocopy) = soundBank[index].blockCount();
}
void DreamBase::cancelCh0() {
data.byte(kCh0repeat) = 0;
- data.word(kCh0blockstocopy) = 0;
data.byte(kCh0playing) = 255;
engine->stopSound(0);
}
void DreamBase::cancelCh1() {
- data.word(kCh1blockstocopy) = 0;
data.byte(kCh1playing) = 255;
engine->stopSound(1);
}
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index bc2fc60..2cb57bd 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -497,7 +497,7 @@ void DreamBase::showRain() {
}
}
- if (data.word(kCh1blockstocopy) != 0)
+ if (data.word(kCh1playing) != 255)
return;
if (data.byte(kReallocation) == 2 && data.byte(kBeenmugged) != 1)
return;
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index fdc8453..7a9db54 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -244,10 +244,10 @@ struct Sound {
uint8 w1_hi;
uint16 offset() const { return READ_LE_UINT16(&w1_lo); }
void setOffset(uint16 v) { WRITE_LE_UINT16(&w1_lo, v); }
- uint8 w3_lo;
- uint8 w3_hi;
- uint16 blockCount() const { return READ_LE_UINT16(&w3_lo); }
- void setBlockCount(uint16 v) { WRITE_LE_UINT16(&w3_lo, v); }
+ uint8 w3_lo; // block count (low byte) - unused in ScummVM
+ uint8 w3_hi; // block count (high byte) - unused in ScummVM
+ //uint16 blockCount() const { return READ_LE_UINT16(&w3_lo); }
+ //void setBlockCount(uint16 v) { WRITE_LE_UINT16(&w3_lo, v); }
uint8 b5;
};
More information about the Scummvm-git-logs
mailing list