aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-08-14 01:41:52 +0000
committerTravis Howell2005-08-14 01:41:52 +0000
commita820400f8c134a9119b5a2c5b68d614345322f45 (patch)
treecdb482abd5bd94d8d27261e96d7e2977d0e533c5 /scumm
parent3a86eb8d2e90999f5e646d94d39e427a04bebe96 (diff)
downloadscummvm-rg350-a820400f8c134a9119b5a2c5b68d614345322f45.tar.gz
scummvm-rg350-a820400f8c134a9119b5a2c5b68d614345322f45.tar.bz2
scummvm-rg350-a820400f8c134a9119b5a2c5b68d614345322f45.zip
Replace warnings with debug, errors or printfs:
-To catch any missing cases/functions used. -To prevent users reporting warnings as bugs svn-id: r18681
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp10
-rw-r--r--scumm/akos.cpp6
-rw-r--r--scumm/charset.cpp4
-rw-r--r--scumm/gfx.cpp23
-rw-r--r--scumm/resource.cpp6
-rw-r--r--scumm/resource_v3.cpp2
-rw-r--r--scumm/resource_v7he.cpp44
-rw-r--r--scumm/script_v100he.cpp6
-rw-r--r--scumm/script_v2.cpp2
-rw-r--r--scumm/script_v5.cpp48
-rw-r--r--scumm/script_v6.cpp12
-rw-r--r--scumm/script_v72he.cpp8
-rw-r--r--scumm/script_v8.cpp25
-rw-r--r--scumm/script_v90he.cpp2
-rw-r--r--scumm/scumm.cpp8
-rw-r--r--scumm/sound.cpp10
-rw-r--r--scumm/string.cpp13
-rw-r--r--scumm/wiz_he.cpp24
18 files changed, 122 insertions, 131 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index a4d72cd54e..70196e9b26 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1868,7 +1868,7 @@ void Actor::walkActorOld() {
byte *Actor::getActorName() {
byte *ptr = _vm->getResourceAddress(rtActorName, _number);
if (ptr == NULL) {
- warning("Failed to find name of actor %d", _number);
+ error("Failed to find name of actor %d", _number);
}
return ptr;
}
@@ -1890,13 +1890,13 @@ void Actor::remapActorPaletteColor(int color, int new_color) {
akos = _vm->getResourceAddress(rtCostume, _costume);
if (!akos) {
- warning("Can't remap actor %d, costume %d not found", _number, _costume);
+ debug(0, "Can't remap actor %d, costume %d not found", _number, _costume);
return;
}
akpl = _vm->findResourceData(MKID('AKPL'), akos);
if (!akpl) {
- warning("Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
+ debug(0, "Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
return;
}
@@ -1928,13 +1928,13 @@ void Actor::remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold)
akos = _vm->getResourceAddress(rtCostume, _costume);
if (!akos) {
- warning("Can't remap actor %d, costume %d not found", _number, _costume);
+ debug(0, "Can't remap actor %d, costume %d not found", _number, _costume);
return;
}
akpl = _vm->findResourceData(MKID('AKPL'), akos);
if (!akpl) {
- warning("Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
+ debug(0, "Can't remap actor %d, costume %d doesn't contain an AKPL block", _number, _costume);
return;
}
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index 6c7cf10d8c..7f34482afe 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -551,7 +551,7 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) {
if (pcolor == 13)
pcolor = _shadow_table[*dst];
} else if (_shadow_mode == 2) {
- warning("codec1_spec2"); // TODO
+ error("codec1_spec2"); // TODO
} else if (_shadow_mode == 3) {
if (pcolor < 8) {
pcolor = (pcolor << 8) + *dst;
@@ -934,7 +934,7 @@ byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) {
int32 maxw, maxh;
if (_actorHitMode) {
- warning("codec5: _actorHitMode not yet implemented");
+ error("codec5: _actorHitMode not yet implemented");
return 0;
}
@@ -1101,7 +1101,7 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) {
byte transparency = (_vm->_heversion >= 61) ? palette[0] : 255;
if (_actorHitMode) {
- warning("codec16: _actorHitMode not yet implemented");
+ error("codec16: _actorHitMode not yet implemented");
return 0;
}
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 43b691df80..03d99a8a87 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -75,7 +75,7 @@ void ScummEngine::loadCJKFont() {
fp.read(_2byteFontPtr, ((_2byteWidth + 7) / 8) * _2byteHeight * numChar);
fp.close();
} else {
- warning("Couldn't load any font");
+ error("Couldn't load any font");
}
}
}
@@ -156,7 +156,7 @@ static int SJIStoFMTChunk(int f, int s) { //converts sjis code to fmt font offse
else if (kanjiType == EKANJI) chunk = 144;
break;
default:
- warning("Invaild Char! f %x s %x base %x c %d p %d", f, s, base, c, p);
+ error("Invaild Char! f %x s %x base %x c %d p %d", f, s, base, c, p);
return 0;
}
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index fe692a0c7a..b7b32ab490 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1405,7 +1405,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
bottom = y + height;
if (bottom > vs->h) {
- warning("Gdi::drawBitmap, strip drawn to %d below window bottom %d", bottom, vs->h);
+ error("Gdi::drawBitmap, strip drawn to %d below window bottom %d", bottom, vs->h);
}
_vertStripNextInc = height * vs->pitch - 1;
@@ -1488,7 +1488,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 8);
}
if (offset < 0 || offset >= smapLen) {
- warning("drawBitmap: Trying to draw a non-existant strip");
+ error("drawBitmap: Trying to draw a non-existant strip");
return;
}
useOrDecompress = decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height);
@@ -1626,7 +1626,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) {
break;
default:
// Alternayive russian freddi3 uses badly formatted bitmaps
- warning("Gdi::drawBMAPBg: default case %d", code);
+ debug(0, "Gdi::drawBMAPBg: default case %d", code);
}
copyVirtScreenBuffers(Common::Rect(vs->w, vs->h));
@@ -2869,7 +2869,7 @@ void ScummEngine::fadeIn(int effect) {
dissolveEffect(1, virtscr[0].h);
break;
default:
- warning("Unknown screen effect, %d", effect);
+ error("Unknown screen effect, %d", effect);
}
_screenEffectFlag = true;
}
@@ -2921,7 +2921,7 @@ void ScummEngine::fadeOut(int effect) {
dissolveEffect(1, virtscr[0].h);
break;
default:
- warning("fadeOut: default case %d", effect);
+ error("fadeOut: default case %d", effect);
}
}
@@ -3038,10 +3038,8 @@ void ScummEngine::dissolveEffect(int width, int height) {
h++;
offsets = (int *) malloc(w * h * sizeof(int));
- if (offsets == NULL) {
- warning("dissolveEffect: out of memory");
- return;
- }
+ if (offsets == NULL)
+ error("dissolveEffect: out of memory");
// Create a permutation of offsets into the frame buffer
@@ -3066,11 +3064,8 @@ void ScummEngine::dissolveEffect(int width, int height) {
offsets[i++] = y * vs->pitch + x;
offsets2 = (int *) malloc(w * h * sizeof(int));
- if (offsets2 == NULL) {
- warning("dissolveEffect: out of memory");
- free(offsets);
- return;
- }
+ if (offsets2 == NULL)
+ error("dissolveEffect: out of memory");
memcpy(offsets2, offsets, w * h * sizeof(int));
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 9fe7ba399a..e359339778 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -430,7 +430,7 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
case MKID('SVER'):
_fileHandle->seek(itemsize - 8, SEEK_CUR);
- warning("SVER index block not yet handled, skipping");
+ debug(0, "SVER index block not yet handled, skipping");
break;
case MKID('INIB'):
@@ -568,7 +568,7 @@ void ScummEngine::loadCharset(int no) {
/* for Humongous catalogs */
if (_heversion >= 70 && _numCharsets == 1) {
- warning("not loading charset as it doesn't seem to exist?");
+ debug(0, "Not loading charset as it doesn't seem to exist?");
return;
}
@@ -819,7 +819,7 @@ ResourceManager::ResourceManager(ScummEngine *vm) {
bool ResourceManager::validateResource(const char *str, int type, int idx) const {
if (type < rtFirst || type > rtLast || (uint) idx >= (uint)num[type]) {
- warning("%s Illegal Glob type %s (%d) num %d", str, resTypeFromId(type), type, idx);
+ error("%s Illegal Glob type %s (%d) num %d", str, resTypeFromId(type), type, idx);
return false;
}
return true;
diff --git a/scumm/resource_v3.cpp b/scumm/resource_v3.cpp
index f143992ffa..64c38246c0 100644
--- a/scumm/resource_v3.cpp
+++ b/scumm/resource_v3.cpp
@@ -65,7 +65,7 @@ void ScummEngine_v3old::readIndexFile() {
magic = _fileHandle->readUint16LE();
if (magic != 0x0100)
- warning("The magic id doesn't match (0x%X)", magic);
+ error("The magic id doesn't match (0x%X)", magic);
_numGlobalObjects = _fileHandle->readUint16LE();
_fileHandle->seek(_numGlobalObjects * 4, SEEK_CUR);
diff --git a/scumm/resource_v7he.cpp b/scumm/resource_v7he.cpp
index f4a722c0b9..12c6cfdfcd 100644
--- a/scumm/resource_v7he.cpp
+++ b/scumm/resource_v7he.cpp
@@ -177,11 +177,11 @@ int Win32ResExtractor::extractResource_(const char *resType, char *resName, byte
fi.total_size = fi.file->size();
if (fi.total_size == -1) {
- warning("Cannot get size of file %s", fi.file->name());
+ error("Cannot get size of file %s", fi.file->name());
goto cleanup;
}
if (fi.total_size == 0) {
- warning("%s: file has a size of 0", fi.file->name());
+ error("%s: file has a size of 0", fi.file->name());
goto cleanup;
}
@@ -266,7 +266,7 @@ int Win32ResExtractor::extract_resources(WinLibrary *fi, WinResource *wr,
*data = extract_resource(fi, wr, &size, &free_it, type_wr->id, (lang_wr == NULL ? NULL : lang_wr->id), _arg_raw);
if (data == NULL) {
- warning("Win32ResExtractor::extract_resources() problem with resource extraction");
+ error("Win32ResExtractor::extract_resources() problem with resource extraction");
return 0;
}
@@ -362,7 +362,7 @@ byte *Win32ResExtractor::extract_group_icon_cursor_resource(WinLibrary *fi, WinR
snprintf(name, sizeof(name)/sizeof(char), "-%d", icondir->entries[c].res_id);
fwr = find_resource(fi, (is_icon ? "-3" : "-1"), name, lang, &level);
if (fwr == NULL) {
- warning("%s: could not find `%s' in `%s' resource.",
+ error("%s: could not find `%s' in `%s' resource.",
fi->file->name(), &name[1], (is_icon ? "group_icon" : "group_cursor"));
return NULL;
}
@@ -410,7 +410,7 @@ byte *Win32ResExtractor::extract_group_icon_cursor_resource(WinLibrary *fi, WinR
snprintf(name, sizeof(name)/sizeof(char), "-%d", icondir->entries[c].res_id);
fwr = find_resource(fi, (is_icon ? "-3" : "-1"), name, lang, &level);
if (fwr == NULL) {
- warning("%s: could not find `%s' in `%s' resource.",
+ error("%s: could not find `%s' in `%s' resource.",
fi->file->name(), &name[1], (is_icon ? "group_icon" : "group_cursor"));
return NULL;
}
@@ -471,7 +471,7 @@ bool Win32ResExtractor::check_offset(byte *memory, int total_size, const char *n
need_size, total_size, (byte *)offset - memory, size);
if (need_size < 0 || need_size > total_size) {
- warning("%s: premature end", name);
+ error("%s: premature end", name);
return false;
}
@@ -769,7 +769,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) {
RETURN_IF_BAD_POINTER(false, mz_header->lfanew);
if (mz_header->lfanew < sizeof(DOSImageHeader)) {
- warning("%s: not a Windows library", fi->file->name());
+ error("%s: not a Windows library", fi->file->name());
return false;
}
}
@@ -782,7 +782,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) {
RETURN_IF_BAD_POINTER(false, header->rsrctab);
RETURN_IF_BAD_POINTER(false, header->restab);
if (header->rsrctab >= header->restab) {
- warning("%s: no resource directory found", fi->file->name());
+ error("%s: no resource directory found", fi->file->name());
return false;
}
@@ -837,7 +837,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) {
RETURN_IF_BAD_POINTER(false, pe_header->optional_header.data_directory[IMAGE_DIRECTORY_ENTRY_RESOURCE]);
dir = pe_header->optional_header.data_directory + IMAGE_DIRECTORY_ENTRY_RESOURCE;
if (dir->size == 0) {
- warning("%s: file contains no resources", fi->file->name());
+ error("%s: file contains no resources", fi->file->name());
return false;
}
@@ -847,7 +847,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) {
}
/* other (unknown) header signature was found */
- warning("%s: not a Windows library", fi->file->name());
+ error("%s: not a Windows library", fi->file->name());
return false;
}
@@ -949,11 +949,11 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
fix_win32_cursor_icon_file_dir_endian(&dir);
if (dir.reserved != 0) {
- warning("not an icon or cursor file (reserved non-zero)");
+ error("not an icon or cursor file (reserved non-zero)");
goto cleanup;
}
if (dir.type != 1 && dir.type != 2) {
- warning("not an icon or cursor file (wrong type)");
+ error("not an icon or cursor file (wrong type)");
goto cleanup;
}
@@ -963,7 +963,7 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
goto cleanup;
fix_win32_cursor_icon_file_dir_entry_endian(&entries[c]);
if (entries[c].reserved != 0)
- warning("reserved is not zero");
+ error("reserved is not zero");
}
offset = sizeof(Win32CursorIconFileDir) + (dir.count - 1) * (sizeof(Win32CursorIconFileDirEntry));
@@ -987,24 +987,24 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
fix_win32_bitmap_info_header_endian(&bitmap);
if (bitmap.size < sizeof(Win32BitmapInfoHeader)) {
- warning("bitmap header is too short");
+ error("bitmap header is too short");
goto local_cleanup;
}
if (bitmap.compression != 0) {
- warning("compressed image data not supported");
+ error("compressed image data not supported");
goto local_cleanup;
}
if (bitmap.x_pels_per_meter != 0)
- warning("x_pels_per_meter field in bitmap should be zero");
+ error("x_pels_per_meter field in bitmap should be zero");
if (bitmap.y_pels_per_meter != 0)
- warning("y_pels_per_meter field in bitmap should be zero");
+ error("y_pels_per_meter field in bitmap should be zero");
if (bitmap.clr_important != 0)
- warning("clr_important field in bitmap should be zero");
+ error("clr_important field in bitmap should be zero");
if (bitmap.planes != 1)
- warning("planes field in bitmap should be one");
+ error("planes field in bitmap should be one");
if (bitmap.size != sizeof(Win32BitmapInfoHeader)) {
uint32 skip = bitmap.size - sizeof(Win32BitmapInfoHeader);
- warning("skipping %d bytes of extended bitmap header", skip);
+ error("skipping %d bytes of extended bitmap header", skip);
in->seek(skip, SEEK_CUR);
}
offset += bitmap.size;
@@ -1072,7 +1072,7 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
if (bitmap.bit_count <= 16) {
if (color >= palette_count) {
- warning("color out of range in image data");
+ error("color out of range in image data");
goto local_cleanup;
}
row[4*x+0] = palette[color].red;
@@ -1122,7 +1122,7 @@ int Win32ResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
if (previous == completed) {
if (min_offset < offset) {
- warning("offset of bitmap header incorrect (too low)");
+ error("offset of bitmap header incorrect (too low)");
goto cleanup;
}
debugC(DEBUG_RESOURCE, "skipping %d bytes of garbage at %d", min_offset-offset, offset);
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 159ce4566f..53bb136d23 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -2138,7 +2138,7 @@ void ScummEngine_v100he::o100_cursorCommand() {
_userPut--;
break;
default:
- warning("o100_cursorCommand: default case %x", subOp);
+ error("o100_cursorCommand: default case %x", subOp);
}
VAR(VAR_CURSORSTATE) = _cursor.state;
@@ -2441,7 +2441,7 @@ void ScummEngine_v100he::o100_getWizData() {
pop();
pop();
push(0);
- warning("o100_getWizData() case 34 unhandled");
+ debug(0, "o100_getWizData() case 34 unhandled");
break;
case 64:
state = pop();
@@ -2466,7 +2466,7 @@ void ScummEngine_v100he::o100_getWizData() {
copyScriptString(filename, sizeof(filename));
pop();
push(0);
- warning("o100_getWizData() case 111 unhandled");
+ debug(0, "o100_getWizData() case 111 unhandled");
break;
case 112:
h = pop();
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 4d911fd0f2..f7d390f8bb 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -718,7 +718,7 @@ void ScummEngine_v2::o2_actorOps() {
a->_talkColor = arg;
break;
default:
- warning("o2_actorOps: opcode %d not yet supported", _opcode);
+ error("o2_actorOps: opcode %d not yet supported", _opcode);
}
}
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index a5dfd1f5c1..f7501c526b 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -530,7 +530,7 @@ void ScummEngine_v5::o5_actorOps() {
a->_shadowMode = getVarOrDirectByte(PARAM_1);
break;
default:
- warning("o5_actorOps: default case");
+ error("o5_actorOps: default case %d", _opcode & 0x1F);
}
}
}
@@ -869,7 +869,7 @@ void ScummEngine_v5::o5_getStringWidth() {
width = _charset->getStringWidth(0, ptr);
setResult(width);
- warning("o5_getStringWidth, result %d", width);
+ debug(0, "o5_getStringWidth, result %d", width);
}
void ScummEngine_v5::o5_saveLoadVars() {
@@ -889,23 +889,23 @@ void ScummEngine_v5::saveVars() {
a = _resultVarNumber;
getResultPos();
b = _resultVarNumber;
- warning("stub saveVars: vars %d -> %d", a, b);
+ debug(0, "stub saveVars: vars %d -> %d", a, b);
break;
case 0x02: // write a range of string variables
a = getVarOrDirectByte(PARAM_1);
b = getVarOrDirectByte(PARAM_2);
- warning("stub saveVars: strings %d -> %d", a, b);
+ debug(0, "stub saveVars: strings %d -> %d", a, b);
break;
case 0x03: // open file
a = resStrLen(_scriptPointer);
- warning("stub saveVars to %s", _scriptPointer);
+ debug(0, "stub saveVars to %s", _scriptPointer);
_scriptPointer += a + 1;
break;
case 0x04:
return;
break;
case 0x1F: // close file
- warning("stub saveVars close file");
+ debug(0, "stub saveVars close file");
return;
break;
}
@@ -923,23 +923,23 @@ void ScummEngine_v5::loadVars() {
a = _resultVarNumber;
getResultPos();
b = _resultVarNumber;
- warning("stub loadVars: vars %d -> %d", a, b);
+ debug(0, "stub loadVars: vars %d -> %d", a, b);
break;
case 0x02: // read a range of string variables
a = getVarOrDirectByte(0x80);
b = getVarOrDirectByte(0x40);
- warning("stub loadVars: strings %d -> %d", a, b);
+ debug(0, "stub loadVars: strings %d -> %d", a, b);
break;
case 0x03: // open file
a = resStrLen(_scriptPointer);
- warning("stub loadVars from %s", _scriptPointer);
+ debug(0, "stub loadVars from %s", _scriptPointer);
_scriptPointer += a + 1;
break;
case 0x04:
return;
break;
case 0x1F: // close file
- warning("stub loadVars close file");
+ debug(0, "stub loadVars close file");
return;
break;
}
@@ -1740,7 +1740,7 @@ void ScummEngine_v5::o5_resourceRoutines() {
case 7: // SO_NUKE_COSTUME
case 8: // SO_NUKE_ROOM
if (_gameId == GID_ZAK256)
- warning("o5_resourceRoutines %d should not occur in Zak256", op);
+ error("o5_resourceRoutines %d should not occur in Zak256", op);
else
res.setResourceCounter(resType[op-5], resid, 0x7F);
break;
@@ -1795,33 +1795,32 @@ void ScummEngine_v5::o5_resourceRoutines() {
// TODO: For the following see also Hibarnatus' information on bug #805691.
case 32:
// TODO (apparently never used in FM-TOWNS)
- warning("o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
+ debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
break;
case 33:
// TODO (apparently never used in FM-TOWNS)
- warning("o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
+ debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
break;
case 35:
// TODO: Might be used to set CD volume in FM-TOWNS Loom
foo = getVarOrDirectByte(PARAM_2);
- warning("o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
+ debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
break;
case 36:
// TODO: Sets the loudness of a sound resource. Used in Indy3 and Zak.
foo = getVarOrDirectByte(PARAM_2);
bar = fetchScriptByte();
- warning("o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
+ debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
break;
case 37:
// TODO: Sets the pitch of a sound resource (pitch = foo - center semitones.
// "center" is at 0x32 in the sfx resource (always 0x3C in zak256, but sometimes different in Indy3).
foo = getVarOrDirectByte(PARAM_2);
- warning("o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
+ debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number);
break;
default:
- warning("Unknown o5_resourceRoutines: %d", op);
- break;
+ error("o5_resourceRoutines: default case %d", op);
}
}
@@ -1944,7 +1943,7 @@ void ScummEngine_v5::o5_roomOps() {
case 20: // disable palette operations
case 21: // disable clearing of screen 0x1C:0x5000 sizeof(640 * 320) in initScreens()
case 22: // enable clearing of screen 0x1C:0x5000 sizeof(640 * 320) in initScreens()
- warning("o5_roomOps: unhandled FM-TOWNS fadeEffect %d", a);
+ debug(0, "o5_roomOps: unhandled FM-TOWNS fadeEffect %d", a);
return;
break;
}
@@ -2178,7 +2177,7 @@ void ScummEngine_v5::o5_startSound() {
// far as I can tell, this is a script bug.
if (_gameId == GID_MONKEY2 && sound == 110 && _sound->isSoundRunning(151)) {
- warning("Delaying Woodtick music until Largo's theme has finished");
+ printf("Delaying Woodtick music until Largo's theme has finished\n");
_scriptPointer = oldaddr;
o5_breakHere();
return;
@@ -2567,7 +2566,7 @@ void ScummEngine_v5::o5_walkActorToActor() {
int dist = fetchScriptByte();
if (nr == 106 && _gameId == GID_INDY4) {
- warning("Bypassing Indy4 bug");
+ printf("Bypassing Indy4 bug\n");
return;
}
@@ -2723,7 +2722,7 @@ void ScummEngine_v5::decodeParseString() {
_sound->playCDTrack(1, 0, offset, delay);
}
} else {
- warning("ScummEngine_v5::decodeParseString: Unhandled case 8");
+ error("ScummEngine_v5::decodeParseString: Unhandled case 8");
}
}
break;
@@ -2757,8 +2756,7 @@ void ScummEngine_v5::decodeParseString() {
}
return;
default:
- warning("ScummEngine_v5::decodeParseString: Unhandled case %d", _opcode & 0xF);
- return;
+ error("ScummEngine_v5::decodeParseString: Unhandled case %d", _opcode & 0xF);
}
}
@@ -2850,7 +2848,7 @@ void ScummEngine_v5::o5_pickupObjectOld() {
if (whereIsObject(obj) == WIO_INVENTORY) /* Don't take an */
return; /* object twice */
- // warning("adding %d from %d to inventoryOld", obj, _currentRoom);
+ // debug(0, "adding %d from %d to inventoryOld", obj, _currentRoom);
addObjectToInventory(obj, _roomResource);
markObjectRectAsDirty(obj);
putOwner(obj, VAR(VAR_EGO));
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 6a203df093..17fbbe4475 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -1185,7 +1185,7 @@ void ScummEngine_v6::o6_walkActorToObj() {
// FIXME: This is a hack to work around bug #742676 SAM: Fish Farm.
// Note quite sure why it happens, though, if it's normal or due to
// a bug in the ScummVM code.
- warning("o6_walkActorToObj: invalid actor %d", obj);
+ debug(0, "o6_walkActorToObj: invalid actor %d", obj);
return;
}
if (!a->isInCurrentRoom() || !a2->isInCurrentRoom())
@@ -2555,7 +2555,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
setupShadowPalette(0, args[1], args[2], args[3], args[4], args[5]);
break;
case 114:
- warning("o6_kernelSetFunctions: stub114()");
+ error("o6_kernelSetFunctions: stub114()");
break;
case 117:
freezeScripts(2);
@@ -2611,7 +2611,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
case 109:
// Case 108 and 109 share the same function
if (num != 6)
- warning("o6_kernelSetFunctions sub op %d: expected 6 params but got %d", args[0], num);
+ error("o6_kernelSetFunctions sub op %d: expected 6 params but got %d", args[0], num);
setupShadowPalette(args[3], args[4], args[5], args[1], args[2], 0, 256);
break;
case 110:
@@ -2639,7 +2639,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
// still be drawn in color.
setDirtyColors(0, 255);
} else
- warning("stub o6_kernelSetFunctions_114()");
+ error("stub o6_kernelSetFunctions_114()");
break;
case 117:
// Sam & Max uses this opcode in script-43, right
@@ -2693,7 +2693,7 @@ void ScummEngine_v6::o6_kernelGetFunctions() {
VirtScreen *vs = &virtscr[0];
if (args[1] < 0 || args[1] >= vs->w || args[2] < 0 || args[2] >= vs->h) {
// FIXME: Until we know what to do in this case...
- warning("o6_kernelGetFunctions:113: asking for pixel (%d, %d) outside of %dx%d screen", args[1], args[2], vs->w, vs->h);
+ debug(0, "o6_kernelGetFunctions:113: asking for pixel (%d, %d) outside of %dx%d screen", args[1], args[2], vs->w, vs->h);
push(0);
} else
push(*((byte *)vs->pixels + args[1] + args[2] * vs->pitch));
@@ -2953,7 +2953,7 @@ void ScummEngine_v6::o6_findAllObjects() {
int i = 1;
if (room != _currentRoom)
- warning("o6_findAllObjects: current room is not %d", room);
+ error("o6_findAllObjects: current room is not %d", room);
writeVar(0, 0);
defineArray(0, kIntArray, 0, _numLocalObjects + 1);
writeArray(0, 0, 0, _numLocalObjects);
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index db399abcdc..db75697492 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -2043,15 +2043,15 @@ void ScummEngine_v72he::redimArray(int arrayId, int newDim2start, int newDim2end
void ScummEngine_v72he::checkArrayLimits(int array, int dim2start, int dim2end, int dim1start, int dim1end) {
if (dim1end < dim1start) {
- warning("Across max %d smaller than min %d", dim1end, dim1start);
+ error("Across max %d smaller than min %d", dim1end, dim1start);
}
if (dim2end < dim2start) {
- warning("Down max %d smaller than min %d", dim2end, dim2start);
+ error("Down max %d smaller than min %d", dim2end, dim2start);
}
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
assert(ah);
if (ah->dim2start > dim2start || ah->dim2end < dim2end || ah->dim1start > dim1start || ah->dim1end < dim1end) {
- warning("Invalid array access (%d,%d,%d,%d) limit (%d,%d,%d,%d)", dim2start, dim2end, dim1start, dim1end, ah->dim2start, ah->dim2end, ah->dim1start, ah->dim1end);
+ error("Invalid array access (%d,%d,%d,%d) limit (%d,%d,%d,%d)", dim2start, dim2end, dim1start, dim1end, ah->dim2start, ah->dim2end, ah->dim1start, ah->dim1end);
}
}
@@ -2069,7 +2069,7 @@ void ScummEngine_v72he::copyArray(int array1, int a1_dim2start, int a1_dim2end,
int a22_num = a2_dim2end - a2_dim2start + 1;
int a21_num = a2_dim1end - a2_dim1start + 1;
if (a22_num != a12_num || a21_num != a11_num) {
- warning("Operation size mismatch (%d vs %d)(%d vs %d)", a12_num, a22_num, a11_num, a21_num);
+ error("Operation size mismatch (%d vs %d)(%d vs %d)", a12_num, a22_num, a11_num, a21_num);
}
if (array1 != array2) {
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index da6057548d..5437570efe 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -508,7 +508,7 @@ void ScummEngine_v8::decodeParseString(int m, int n) {
break;
case 0xD2: // SO_PRINT_WRAP Set print wordwrap
- //warning("decodeParseString: SO_PRINT_WRAP");
+ //debug(0, "decodeParseString: SO_PRINT_WRAP");
break;
default:
error("decodeParseString: default case 0x%x", b);
@@ -1051,10 +1051,10 @@ void ScummEngine_v8::o8_cameraOps() {
byte subOp = fetchScriptByte();
switch (subOp) {
case 0x32: // SO_CAMERA_PAUSE
- //warning("freezeCamera NYI");
+ //debug(0, "freezeCamera NYI");
break;
case 0x33: // SO_CAMERA_RESUME
- //warning("unfreezeCamera NYI");
+ //debug(0, "unfreezeCamera NYI");
break;
default:
error("o8_cameraOps: default case 0x%x", subOp);
@@ -1170,7 +1170,7 @@ void ScummEngine_v8::o8_verbOps() {
// scripts that place verbs for that.
// Also, var595 contains the vertical position at which to start placing verbs (330)
a = pop();
- warning("SO_VERB_LINE_SPACING %d: not yet implemented", a);
+ debug(0, "SO_VERB_LINE_SPACING %d: not yet implemented", a);
break;
default:
error("o8_verbops: default case 0x%x", subOp);
@@ -1239,7 +1239,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
setScaleSlot(args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
break;
case 22: // setBannerColors
-// warning("o8_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]);
+// debug(0, "o8_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]);
break;
case 23: // setActorChoreLimbFrame
a = derefActor(args[1], "o8_kernelSetFunctions:setActorChoreLimbFrame");
@@ -1255,7 +1255,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
char name[30];
if (!address) {
- warning("o8_kernelSetFunctions: saveGameReadName failed finding slot string %d", args[2]);
+ error("o8_kernelSetFunctions: saveGameReadName failed finding slot string %d", args[2]);
break;
}
getSavegameName(args[1] - 1, name);
@@ -1266,7 +1266,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
case 26: { // saveGame?
//char *address = (char*)getStringAddress(args[2]);
char address[30];
- warning("o8_kernelSetFunctions: saveGame?(%d, %s)", args[1], address);
+ debug(0, "o8_kernelSetFunctions: saveGame?(%d, %s)", args[1], address);
break;
}
case 27: { // FIXME: This doesn't work
@@ -1274,22 +1274,21 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
_saveLoadSlot = args[1];
_saveLoadFlag = 2;
_saveTemporaryState = false;
- warning("Sgl: %d", args[1]);
+ debug(0, "Sgl: %d", args[1]);
break;
}
case 28: // saveGameStampScreenshot
- warning("o8_kernelSetFunctions: saveGameStampScreenshot(%d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6]);
+ debug(0, "o8_kernelSetFunctions: saveGameStampScreenshot(%d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6]);
break;
case 29: // setKeyScript
_keyScriptKey = args[1];
_keyScriptNo = args[2];
break;
case 30: // killAllScriptsButMe
- warning("o8_kernelSetFunctions: killAllScriptsButMe()");
killAllScriptsExceptCurrent();
break;
case 31: // stopAllVideo
- warning("o8_kernelSetFunctions: stopAllVideo()");
+ debug(0, "o8_kernelSetFunctions: stopAllVideo()");
break;
case 32: // writeRegistryValue
{
@@ -1301,7 +1300,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
}
break;
case 33: // paletteSetIntensity
- warning("o8_kernelSetFunctions: paletteSetIntensity(%d, %d)", args[1], args[2]);
+ debug(0, "o8_kernelSetFunctions: paletteSetIntensity(%d, %d)", args[1], args[2]);
break;
case 34: // queryQuit
if (_confirmExit)
@@ -1323,7 +1322,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
break;
default:
- warning("o8_kernelSetFunctions: default case 0x%x (len = %d)", args[0], len);
+ error("o8_kernelSetFunctions: default case 0x%x (len = %d)", args[0], len);
}
}
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index de01794d46..71e388aae6 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -1753,7 +1753,7 @@ void ScummEngine_v90he::o90_getWizData() {
copyScriptString(filename, sizeof(filename));
pop();
push(0);
- warning("o90_getWizData() case 111 unhandled");
+ debug(0, "o90_getWizData() case 111 unhandled");
break;
default:
error("o90_getWizData: Unknown case %d", subOp);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 06a86f1db9..b4cdd6a4d3 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1163,7 +1163,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_copyProtection = ConfMan.getBool("copy_protection");
_demoMode = ConfMan.getBool("demo_mode");
if (ConfMan.hasKey("nosubtitles")) {
- warning("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead");
+ printf("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead\n");
if (!ConfMan.hasKey("subtitles"))
ConfMan.set("subtitles", !ConfMan.getBool("nosubtitles"));
}
@@ -1926,12 +1926,12 @@ void ScummEngine::setupMusic(int midi) {
/* Bind the mixer to the system => mixer will be invoked
* automatically when samples need to be generated */
if (!_mixer->isReady()) {
- warning("Sound mixer initialization failed");
+ printf("Sound mixer initialization failed\n");
if (_midiDriver == MD_ADLIB ||
_midiDriver == MD_PCSPK ||
_midiDriver == MD_PCJR) {
_midiDriver = MD_NULL;
- warning("MIDI driver depends on sound mixer, switching to null MIDI driver");
+ printf("MIDI driver depends on sound mixer, switching to null MIDI driver\n");
}
}
@@ -2439,7 +2439,7 @@ void ScummEngine::restart() {
}
void ScummEngine::startManiac() {
- warning("stub startManiac()");
+ debug(0, "stub startManiac()");
displayMessage(0, "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory.");
}
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index a3ea155c6f..55b629defa 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -146,7 +146,7 @@ void Sound::processSoundQueues() {
while (i < _soundQuePos) {
num = _soundQue[i++];
if (i + num > _soundQuePos) {
- warning("processSoundQues: invalid num value");
+ error("processSoundQues: invalid num value");
break;
}
memset(data, 0, sizeof(data));
@@ -335,7 +335,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
size = READ_BE_UINT32(ptr+4) - 8;
if (heOffset < 0 || heOffset > size) {
// Occurs when making fireworks in puttmoon
- warning("playSound: Invalid sound offset (%d) in sound %d", heOffset, soundID);
+ debug(0, "playSound: Invalid sound offset (%d) in sound %d", heOffset, soundID);
heOffset = 0;
}
size -= heOffset;
@@ -662,7 +662,7 @@ void Sound::startHETalkSound(uint32 offset) {
int32 size;
if (!_sfxFile->isOpen()) {
- warning("startHETalkSound: Speech file is not open");
+ error("startHETalkSound: Speech file is not open");
return;
}
@@ -1452,7 +1452,7 @@ int ScummEngine::readSoundResource(int type, int idx) {
_fileHandle->read(res.createResource(type, idx, total_size), total_size);
return 1;
}
- warning("Unrecognized base tag 0x%08x in sound %d", basetag, idx);
+ error("Unrecognized base tag 0x%08x in sound %d", basetag, idx);
}
res.roomoffs[type][idx] = 0xFFFFFFFF;
return 0;
@@ -1900,7 +1900,7 @@ void ScummEngine::convertADResource(int type, int idx, byte *src_ptr, int size)
continue;
if (instr[i*16 + 13])
- warning("Sound %d instrument %d uses percussion", idx, i);
+ debugC(DEBUG_SOUND, "Sound %d instrument %d uses percussion", idx, i);
debugC(DEBUG_SOUND, "Sound %d: instrument %d on channel %d.", idx, i, ch);
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 1ac7565e64..49c45a378b 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -303,7 +303,7 @@ void ScummEngine::CHARSET_1() {
_keepText = false;
break;
default:
- warning("CHARSET_1: invalid code %d", c);
+ error("CHARSET_1: invalid code %d", c);
}
} else if (c == 0xFE || c == 0xFF) {
// WORKAROUND to avoid korean code 0xfe treated as charset message code.
@@ -369,7 +369,7 @@ void ScummEngine::CHARSET_1() {
_charset->setColor(color);
break;
case 13:
- warning("CHARSET_1: Unknown opcode 13 %d", READ_LE_UINT16(buffer));
+ debug(0, "CHARSET_1: Unknown opcode 13 %d", READ_LE_UINT16(buffer));
buffer += 2;
break;
case 14: {
@@ -383,7 +383,7 @@ void ScummEngine::CHARSET_1() {
break;
}
default:
- warning("CHARSET_1: invalid code %d", c);
+ error("CHARSET_1: invalid code %d", c);
}
} else {
loc_avoid_ks_fe:
@@ -552,7 +552,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
// A better name for _blitAlso might be _imprintOnBackground
if (_string[a].no_talk_anim == false) {
- //warning("Would have set _charset->_blitAlso = true (wanted to print '%c' = %d)", c, c);
+ //debug(0, "Would have set _charset->_blitAlso = true (wanted to print '%c' = %d)", c, c);
_charset->_blitAlso = true;
}
}
@@ -599,7 +599,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
end = dst + dstSize;
if (msg == NULL) {
- warning("Bad message in convertMessageToString, ignoring");
+ debug(0, "Bad message in convertMessageToString, ignoring");
return 0;
}
@@ -671,8 +671,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
}
break;
default:
- warning("convertMessageToString(): string escape sequence %d unknown", chr);
- break;
+ error("convertMessageToString(): string escape sequence %d unknown", chr);
}
num += (_version == 8) ? 4 : 2;
}
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index dfcbc7103f..7f8a64524f 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -1083,10 +1083,10 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
// TODO Adding masking for flags 0x80 and 0x100
if (flags & 0x80) {
// Used in maze
- warning("drawWizImage: Unhandled flag 0x80");
+ debug(0, "drawWizImage: Unhandled flag 0x80");
} else if (flags & 0x100) {
// Used in readdemo
- warning("drawWizImage: Unhandled flag 0x100");
+ debug(0, "drawWizImage: Unhandled flag 0x100");
}
copyWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, palPtr);
break;
@@ -1095,7 +1095,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
break;
case 5:
// Used in Moonbase Commander
- warning("drawWizImage: Unhandled wiz compression type %d", comp);
+ debug(0, "drawWizImage: Unhandled wiz compression type %d", comp);
break;
default:
error("drawWizImage: Unhandled wiz compression type %d", comp);
@@ -1407,7 +1407,7 @@ void Wiz::displayWizComplexImage(const WizParameters *params) {
int sourceImage = 0;
if (params->processFlags & kWPFMaskImg) {
sourceImage = params->sourceImage;
- warning("displayWizComplexImage() unhandled flag 0x80000");
+ debug(0, "displayWizComplexImage() unhandled flag 0x80000");
}
int palette = 0;
if (params->processFlags & kWPFPaletteNum) {
@@ -1442,7 +1442,7 @@ void Wiz::displayWizComplexImage(const WizParameters *params) {
int field_390 = 0;
if (params->processFlags & 0x200000) {
field_390 = params->img.field_390;
- warning("displayWizComplexImage() unhandled flag 0x200000");
+ debug(0, "displayWizComplexImage() unhandled flag 0x200000");
}
const Common::Rect *r = NULL;
if (params->processFlags & kWPFClipBox) {
@@ -1731,7 +1731,7 @@ void Wiz::processWizImage(const WizParameters *params) {
byte *p = _vm->res.createResource(rtImage, params->img.resNum, size);
if (f.read(p, size) != size) {
_vm->res.nukeResource(rtImage, params->img.resNum);
- warning("i/o error when reading '%s'", buf);
+ error("i/o error when reading '%s'", buf);
_vm->VAR(_vm->VAR_GAME_LOADED) = -2;
_vm->VAR(119) = -2;
} else {
@@ -1747,7 +1747,7 @@ void Wiz::processWizImage(const WizParameters *params) {
} else {
_vm->VAR(_vm->VAR_GAME_LOADED) = -3;
_vm->VAR(119) = -3;
- warning("Unable to open for read '%s'", buf);
+ debug(0, "Unable to open for read '%s'", buf);
}
}
break;
@@ -1771,13 +1771,13 @@ void Wiz::processWizImage(const WizParameters *params) {
}
if (!f.open((const char *)buf, Common::File::kFileWriteMode)) {
- warning("Unable to open for write '%s'", buf);
+ debug(0, "Unable to open for write '%s'", buf);
_vm->VAR(119) = -3;
} else {
byte *p = _vm->getResourceAddress(rtImage, params->img.resNum);
uint32 size = READ_BE_UINT32(p + 4);
if (f.write(p, size) != size) {
- warning("i/o error when writing '%s'", params->filename);
+ error("i/o error when writing '%s'", params->filename);
_vm->VAR(119) = -2;
} else {
_vm->VAR(119) = 0;
@@ -1900,12 +1900,12 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags
break;
case 2:
// Used baseball2003
- warning("isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
+ debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
break;
case 4:
case 5:
// Used in Moonbase Commander
- warning("isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
+ debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
break;
default:
error("isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
@@ -1937,7 +1937,7 @@ uint8 Wiz::getWizPixelColor(int resNum, int state, int x, int y, int flags) {
case 5:
// Used in Moonbase Commander
color = 1;
- warning("getWizPixelColor: Unhandled wiz compression type %d", c);
+ debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
break;
default:
error("getWizPixelColor: Unhandled wiz compression type %d", c);