aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resource.cpp2
-rw-r--r--script.cpp19
-rw-r--r--script_v2.cpp2
-rw-r--r--scumm.h2
-rw-r--r--scummvm.dsp2
-rw-r--r--sound/adlib.cpp5
-rw-r--r--string.cpp8
7 files changed, 25 insertions, 15 deletions
diff --git a/resource.cpp b/resource.cpp
index 876cbf1d52..40cf7ac5f7 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -472,7 +472,7 @@ int Scumm::readSoundResource(int type, int index) {
#if defined(SAMNMAX) || defined(FULL_THROTTLE)
if (basetag == MKID('MIDI')) {
fileSeek(_fileHandle, -8, SEEK_CUR);
- fileRead(_fileHandle,createResource(type, index, size+8), size+8);
+ fileRead(_fileHandle,createResource(type, index, total_size+8), total_size+8);
return 1;
}
#else
diff --git a/script.cpp b/script.cpp
index 620c20af1e..193abe5635 100644
--- a/script.cpp
+++ b/script.cpp
@@ -380,7 +380,7 @@ void Scumm::setResult(int value) {
void Scumm::drawBox(int x, int y, int x2, int y2, int color) {
int top,bottom,count;
VirtScreen *vs;
- byte *backbuff;
+ byte *backbuff, *bgbuff;
if ((vs=findVirtScreen(y)) == NULL)
return;
@@ -407,11 +407,18 @@ void Scumm::drawBox(int x, int y, int x2, int y2, int color) {
backbuff = getResourceAddress(rtBuffer, vs->number+1) + vs->xstart + (y-top)*320 + x;
- count = y2 - y;
- while (count) {
- memset(backbuff, color, x2 - x);
- backbuff += 320;
- count--;
+ if (color==-1) {
+ if(vs->number!=0)
+ error("can only copy bg to main window");
+ bgbuff = getResourceAddress(rtBuffer, vs->number+5) + vs->xstart + (y-top)*320 + x;
+ blit(backbuff, bgbuff, x2 - x, y2 - y);
+ } else {
+ count = y2 - y;
+ while (count) {
+ memset(backbuff, color, x2 - x);
+ backbuff += 320;
+ count--;
+ }
}
}
diff --git a/script_v2.cpp b/script_v2.cpp
index 7495248b01..3e83d89c54 100644
--- a/script_v2.cpp
+++ b/script_v2.cpp
@@ -1830,7 +1830,7 @@ void Scumm::o6_getActorAnimCounter1() {
}
void Scumm::o6_soundKludge() {
- int16 list[8];
+ int16 list[16];
getStackList(list,sizeof(list)/sizeof(list[0]));
soundKludge(list);
}
diff --git a/scumm.h b/scumm.h
index 2e97833701..5d9092e302 100644
--- a/scumm.h
+++ b/scumm.h
@@ -570,7 +570,7 @@ struct CharsetRenderer {
byte *_backbuff_ptr, *_bgbak_ptr;
byte *_mask_ptr;
- byte *_bg_ptr2;
+ byte *_dest_ptr;
byte _colorMap[16];
byte _buffer[256];
diff --git a/scummvm.dsp b/scummvm.dsp
index 41e6e89593..829b6f37bb 100644
--- a/scummvm.dsp
+++ b/scummvm.dsp
@@ -103,7 +103,7 @@ SOURCE=.\sound\gmidi.cpp
# End Source File
# Begin Source File
-SOURCE=.\imuse.cpp
+SOURCE=.\sound\imuse.cpp
# End Source File
# End Group
# Begin Source File
diff --git a/sound/adlib.cpp b/sound/adlib.cpp
index 28dd37983c..5b42d0acde 100644
--- a/sound/adlib.cpp
+++ b/sound/adlib.cpp
@@ -117,8 +117,11 @@ void AdlibSoundDriver::init(SoundEngine *eng) {
_se = eng;
- for(i=0,mc=_midi_channels; i!=ARRAYSIZE(_midi_channels);i++,mc++)
+ for(i=0,mc=_midi_channels; i!=ARRAYSIZE(_midi_channels);i++,mc++) {
mc->_channel = i;
+ mc->_s11a.s10 = &mc->_s10b;
+ mc->_s11b.s10 = &mc->_s10a;
+ }
_adlib_reg_cache = (byte*)calloc(256,1);
_opl = OPLCreate(OPL_TYPE_YM3812,3579545,22050);
diff --git a/string.cpp b/string.cpp
index e6a223ac94..0b369ec207 100644
--- a/string.cpp
+++ b/string.cpp
@@ -723,7 +723,7 @@ void CharsetRenderer::printChar(int chr) {
_hasMask = true;
#endif
- _bg_ptr2 = _backbuff_ptr = _vm->getResourceAddress(rtBuffer, vs->number+1)
+ _dest_ptr = _backbuff_ptr = _vm->getResourceAddress(rtBuffer, vs->number+1)
+ vs->xstart + _drawTop * 320 + _left;
#if !defined(OLD)
@@ -731,7 +731,7 @@ void CharsetRenderer::printChar(int chr) {
#else
if (1) {
#endif
- _bg_ptr2 = _bgbak_ptr = _vm->getResourceAddress(rtBuffer, vs->number+5)
+ _dest_ptr = _bgbak_ptr = _vm->getResourceAddress(rtBuffer, vs->number+5)
+ vs->xstart + _drawTop * 320 + _left;
}
@@ -774,7 +774,7 @@ void CharsetRenderer::drawBits() {
bits = *_charPtr++;
numbits = 8;
- dst = _bg_ptr2;
+ dst = _dest_ptr;
mask = _mask_ptr;
y = 0;
@@ -801,7 +801,7 @@ void CharsetRenderer::drawBits() {
maskpos++;
}
}
- dst = (_bg_ptr2 += 320);
+ dst = (_dest_ptr += 320);
mask += 40;
y++;
}