The error() and warning() functions add ! and newline automatically. (I didn't

look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
This commit is contained in:
Torbjörn Andersson 2009-05-31 10:02:16 +00:00
parent 3b311c65d0
commit 0999534749
101 changed files with 212 additions and 209 deletions

View File

@ -54,7 +54,7 @@ Keymap::~Keymap() {
void Keymap::addAction(Action *action) {
if (findAction(action->id))
error("Action with id %s already in KeyMap!", action->id);
error("Action with id %s already in KeyMap", action->id);
_actions.push_back(action);
}

View File

@ -69,7 +69,7 @@ Keymapper::~Keymapper() {
void Keymapper::registerHardwareKeySet(HardwareKeySet *keys) {
if (_hardwareKeys)
error("Hardware key set already registered!");
error("Hardware key set already registered");
if (!keys) {
warning("No hardware keys are supplied");

View File

@ -147,7 +147,7 @@ void RemapDialog::reflowLayout() {
_colCount = (areaW - scrollbarWidth) / colWidth;
_rowCount = (areaH + spacing) / (buttonHeight + spacing);
if (_colCount <= 0 || _rowCount <= 0)
error("Remap dialog too small to display any keymaps!");
error("Remap dialog too small to display any keymaps");
_scrollBar->resize(areaX + areaW - scrollbarWidth, areaY, scrollbarWidth, areaH);
_scrollBar->_entriesPerPage = _rowCount;

View File

@ -125,7 +125,7 @@ int MidiDriver_QT::open() {
return 0;
bail:
error("Init QT failed %x %x %d\n", (int)qtNoteAllocator, (int)qtNoteChannel, (int)qtErr);
error("Init QT failed %x %x %d", (int)qtNoteAllocator, (int)qtNoteChannel, (int)qtErr);
dispose();

View File

@ -129,7 +129,7 @@ void OSystem_GP2X::initBackend() {
if (stat(savePath, &sb) == -1)
if (errno == ENOENT) // Create the dir if it does not exist
if (mkdir(savePath, 0755) != 0)
warning("mkdir for '%s' failed!", savePath);
warning("mkdir for '%s' failed", savePath);
ConfMan.registerDefault("savepath", savePath);
@ -144,7 +144,7 @@ void OSystem_GP2X::initBackend() {
if (stat(enginedataPath, &sb) == -1)
if (errno == ENOENT) // Create the dir if it does not exist
if (mkdir(enginedataPath, 0755) != 0)
warning("mkdir for '%s' failed!", enginedataPath);
warning("mkdir for '%s' failed", enginedataPath);
//FIXME: Do not use File::addDefaultDirectory, rather implement OSystem::addSysArchivesToSearchSet() !
Common::File::addDefaultDirectory(enginedataPath);

View File

@ -84,7 +84,7 @@ void POSIXSaveFileManager::checkPath(const Common::FSNode &dir) {
if (mkdir(path.c_str(), 0755) != 0) {
// mkdir could fail for various reasons: The parent dir doesn't exist,
// or is not writeable, the path could be completly bogus, etc.
warning("mkdir for '%s' failed!", path.c_str());
warning("mkdir for '%s' failed", path.c_str());
perror("mkdir");
switch (errno) {

View File

@ -830,7 +830,7 @@ void SoundMgr::playSound() {
if (_playingSound != -1) {
if (_vm->_game.sounds[_playingSound]->type() == AGI_SOUND_MIDI) {
playMidiSound();
//warning("playSound: Trying to play an Apple IIGS MIDI sound. Not yet implemented!");
//warning("playSound: Trying to play an Apple IIGS MIDI sound. Not yet implemented");
} else if (_vm->_game.sounds[_playingSound]->type() == AGI_SOUND_SAMPLE) {
//debugC(3, kDebugLevelSound, "playSound: Trying to play an Apple IIGS sample");
playSampleSound();

View File

@ -1922,7 +1922,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
src = english_simonFont + (chr - 32) * 8;
break;
default:
error("windowDrawChar: Unknown language %d\n", _language);
error("windowDrawChar: Unknown language %d", _language);
}
} else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
@ -1946,7 +1946,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
src = english_waxworksFont + (chr - 32) * 8;
break;
default:
error("windowDrawChar: Unknown language %d\n", _language);
error("windowDrawChar: Unknown language %d", _language);
}
} else if (getGameType() == GType_ELVIRA1) {
dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;

View File

@ -939,7 +939,7 @@ char *AGOSEngine_PN::unctok(char *c, int n) {
void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
if (x > _textBaseSize)
error("UNCOMSTR: TBASE over-run\n");
error("UNCOMSTR: TBASE over-run");
while (_textBase[x]) {
if (_textBase[x] < 244) {
c = unctok(c, _textBase[x]);
@ -1070,7 +1070,7 @@ void AGOSEngine_PN::pobjd(int n, int m) {
void AGOSEngine_PN::ptext(uint32 tptr) {
if (tptr > _textBaseSize)
error("ptext: attempt to print beyond end of TBASE\n");
error("ptext: attempt to print beyond end of TBASE");
while (_textBase[tptr]) {
if (_textBase[tptr] < 244) {

View File

@ -290,7 +290,7 @@ int loadFileSub1(uint8 **ptr, const char *name, uint8 *ptr2) {
for (i = 0; i < 64; i++) {
if (preloadData[i].ptr) {
if (!strcmp(preloadData[i].name, name)) {
error("Unsupported code in loadFIleSub1 !");
error("Unsupported code in loadFIleSub1");
}
}
}

View File

@ -171,7 +171,7 @@ int createResFileEntry(int width, int height, int size, int resType) {
int entryNumber;
int div = 0;
error("Executing untested createResFileEntry!");
error("Executing untested createResFileEntry");
for (i = 0; i < NUM_FILE_ENTRIES; i++) {
if (!filesDatabase[i].subData.ptr)

View File

@ -100,7 +100,7 @@ int loadOverlay(const char *scriptName) {
fileIdx = findFileInDisks(fileName);
if (fileIdx < 0) {
warning("Unable to load overlay %s !", scriptName);
warning("Unable to load overlay %s", scriptName);
//releaseScript(scriptName);
return (-18);
}

View File

@ -101,7 +101,7 @@ int32 opcodeType0(void) {
pushVar(*address);
return (0);
} else {
error("Unsupported code in opcodeType0 case 1!");
error("Unsupported code in opcodeType0 case 1");
}
return (0);
@ -194,7 +194,7 @@ int32 opcodeType1(void) {
return (0);
}
default:
error("Unsupported code in opcodeType1 case 1!");
error("Unsupported code in opcodeType1 case 1");
}
break;

View File

@ -230,7 +230,7 @@ void Game::capturePush(int16 left, int16 top, int16 width, int16 height) {
int16 right;
if (_captureCount == 20)
error("Game::capturePush(): Capture stack overflow!");
error("Game::capturePush(): Capture stack overflow");
_captureStack[_captureCount].left = left;
_captureStack[_captureCount].top = top;

View File

@ -283,7 +283,7 @@ int16 Game_v1::addNewCollision(int16 id, uint16 left, uint16 top,
return i;
}
error("Game_v1::addNewCollision(): Collision array full!\n");
error("Game_v1::addNewCollision(): Collision array full");
return 0;
}

View File

@ -341,7 +341,7 @@ int16 Game_v2::addNewCollision(int16 id, uint16 left, uint16 top,
return i;
}
error("Game_v2::addNewCollision(): Collision array full!\n");
error("Game_v2::addNewCollision(): Collision array full");
return 0;
}

View File

@ -152,7 +152,7 @@ int16 Game_v6::addNewCollision(int16 id, uint16 left, uint16 top,
return i;
}
error("Game_v6::addNewCollision(): Collision array full!\n");
error("Game_v6::addNewCollision(): Collision array full");
return 0;
}

View File

@ -136,7 +136,7 @@ void GobEngine::validateLanguage() {
void GobEngine::validateVideoMode(int16 videoMode) {
if ((videoMode != 0x10) && (videoMode != 0x13) &&
(videoMode != 0x14) && (videoMode != 0x18))
error("Video mode 0x%X is not supported!", videoMode);
error("Video mode 0x%X is not supported", videoMode);
}
Endianness GobEngine::getEndianness() const {

View File

@ -465,7 +465,7 @@ void Map::loadMapsInitGobs(void) {
int16 layer;
if (!_loadFromAvo)
error("Map::loadMapsInitGobs(): Loading .pas/.pos files is not supported!");
error("Map::loadMapsInitGobs(): Loading .pas/.pos files is not supported");
for (int i = 0; i < 3; i++)
_vm->_goblin->nextLayer(_vm->_goblin->_goblins[i]);

View File

@ -83,7 +83,7 @@ bool PalAnim::fadeStep(int16 oper) {
byte newBlue;
if (_vm->_global->_colorCount != 256)
error("PalAnim::fadeStep(): Only 256 color mode is supported!");
error("PalAnim::fadeStep(): Only 256 color mode is supported");
if (oper == 0) {
if (_vm->_global->_setAllPalette) {

View File

@ -278,7 +278,7 @@ void AdLib::setKey(byte voice, byte note, bool on, bool spec) {
writeOPL(0xB0 + voice, (freq >> 8) | (octa << 2) | 0x20 * on);
if (!freq)
warning("Voice %d, note %02X unknown\n", voice, note);
warning("Voice %d, note %02X unknown", voice, note);
}
void AdLib::setVolume(byte voice, byte volume) {

View File

@ -1513,7 +1513,7 @@ void Script::o_hotspot_outrect() {
bool contained = rect.contains(mousepos);
if (!contained) {
error("hotspot-outrect unimplemented!");
error("hotspot-outrect unimplemented");
// TODO: what to do with address?
}
}

View File

@ -484,7 +484,8 @@ void Script::makeGoewinFollow(uint16 v1, uint16 v2, uint16 v3) {
void Script::doorClose(uint16 hotspotId, uint16 v2, uint16 v3) {
RoomExitJoinData *joinRec = Resources::getReference().getExitJoin(hotspotId);
if (!joinRec) error("Tried to close a non-door");
if (!joinRec)
error("Tried to close a non-door");
joinRec->blocked = 1;
}
@ -511,7 +512,8 @@ void Script::fixGoewin(uint16 v1, uint16 v2, uint16 v3) {
void Script::doorOpen(uint16 hotspotId, uint16 v2, uint16 v3) {
RoomExitJoinData *joinRec = Resources::getReference().getExitJoin(hotspotId);
if (!joinRec) error("Tried to close a non-door");
if (!joinRec)
error("Tried to close a non-door");
joinRec->blocked = 0;
}

View File

@ -344,7 +344,7 @@ void TextviewView::processCommand() {
//TODO: Proper handling of the sound drivers/sounds
//if (!_soundDriverLoaded)
// error("Attempted to set sound without loading any driver\n");
// error("Attempted to set sound without loading any driver");
} else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') || (commandStr[5] == '1'))) {
// Set the text colors

View File

@ -236,12 +236,12 @@ void ScriptInterpreter::open(const char *filename) {
_scriptFile = new Common::File();
_scriptFile->open(filename);
if (!_scriptFile->isOpen())
error("ScriptInterpreter::open() Error opening %s.", filename);
error("ScriptInterpreter::open() Error opening %s", filename);
_scriptFile->readUint32LE(); // skip magic for now
uint32 version = _scriptFile->readUint32LE();
if (version != kScriptFileVersion) {
error("ScriptInterpreter::open() DAT file version mismatch; requested %li, got %i\n", kScriptFileVersion, version);
error("ScriptInterpreter::open() DAT file version mismatch; requested %li, got %i", kScriptFileVersion, version);
}
int functionCount = _scriptFile->readUint32LE();
@ -369,13 +369,13 @@ int ScriptInterpreter::runFunction(ScriptFunction *scriptFunction) {
void ScriptInterpreter::push(const ScriptValue &value) {
if (_stackPtr == ARRAYSIZE(_stack))
error("ScriptInterpreter::push() Stack overflow!\n");
error("ScriptInterpreter::push() Stack overflow");
_stack[_stackPtr++] = value;
}
void ScriptInterpreter::pop(ScriptValue &value) {
if (_stackPtr == 0)
error("ScriptInterpreter::pop() Stack underflow!\n");
error("ScriptInterpreter::pop() Stack underflow");
value = _stack[_stackPtr--];
}
@ -720,7 +720,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) {
derefValue(value1);
derefValue(value2);
if (value1.type != kInteger || value2.type != kInteger)
warning("ScriptInterpreter::execOpcode() Trying to compare non-integer values (%d, %d, line %d)!\n", value1.type, value2.type, _lineNum);
warning("ScriptInterpreter::execOpcode() Trying to compare non-integer values (%d, %d, line %d)", value1.type, value2.type, _lineNum);
_cmpFlags = value1.value - value2.value;
printf("-> cmp %d, %d\n", value1.value, value2.value);
printf("-> _cmpFlags = %d\n", _cmpFlags);

View File

@ -348,7 +348,7 @@ int16 GameDatabase::setObjectProperty(int16 objectIndex, int16 propertyId, int16
if (propertyFlag == 1) {
WRITE_LE_UINT16(property, value);
} else {
warning("GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property\n",
warning("GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property",
objectIndex, propertyId, value);
}
return value;

View File

@ -284,7 +284,7 @@ void LzhDecompressor::make_table(uint nchar, byte bitlen[], uint tablebits, uint
for (i = 1; i <= 16; i++)
start[i + 1] = start[i] + (count[i] << (16 - i));
if (start[17] != (uint16)(1U << 16))
error("LzhDecompressor::make_table() Bad table\n");
error("LzhDecompressor::make_table() Bad table");
jutbits = 16 - tablebits;
for (i = 1; i <= tablebits; i++) {
start[i] >>= jutbits;

View File

@ -44,7 +44,7 @@ void Parallaction_br::_c_ferrcycle(void*) {
}
void Parallaction_br::_c_lipsinc(void*) {
warning("Unexpected lipsinc routine call! Please notify the team!");
warning("Unexpected lipsinc routine call! Please notify the team");
}
void Parallaction_br::_c_albcycle(void*) {

View File

@ -427,14 +427,14 @@ DECLARE_INSTRUCTION_OPCODE(inc) {
DECLARE_INSTRUCTION_OPCODE(put) {
// NOTE: there is not a single occurrence of PUT in the scripts
warning("PUT instruction is not implemented!");
warning("PUT instruction is not implemented");
}
DECLARE_INSTRUCTION_OPCODE(wait) {
// NOTE: there is not a single occurrence of WAIT in the scripts
warning("WAIT instruction is not implemented!");
warning("WAIT instruction is not implemented");
}
@ -475,7 +475,7 @@ DECLARE_INSTRUCTION_OPCODE(mask) {
DECLARE_INSTRUCTION_OPCODE(print) {
// NOTE: there is not a single occurrence of PRINT in the scripts
// I suppose it was used for debugging
warning("PRINT instruction is not implemented!");
warning("PRINT instruction is not implemented");
}
DECLARE_INSTRUCTION_OPCODE(text) {

View File

@ -60,7 +60,7 @@ void Parallaction::runGuiFrame() {
}
if (!_menuHelper) {
error("No menu helper defined!");
error("No menu helper defined");
}
bool res = _menuHelper->run();

View File

@ -414,12 +414,12 @@ public:
break;
case 2: // save
warning("Saving is not supported yet!");
warning("Saving is not supported yet");
_vm->_saveLoad->saveGame();
break;
case 3: // load
warning("Loading is not supported yet!");
warning("Loading is not supported yet");
close = _vm->_saveLoad->loadGame();
break;

View File

@ -1083,7 +1083,7 @@ void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) {
#if 0 // disabled because no references to lip sync has been found in the scripts
v.setField(&_vm->_lipSyncVal);
#endif
warning("Lip sync instruction encountered! Please notify the team!");
warning("Lip sync instruction encountered! Please notify the team");
}
}

View File

@ -102,7 +102,7 @@ void MidiParser_MSC::parseMetaEvent(EventInfo &info) {
if (type == 0x51) {
info.ext.data = _position._play_pos;
} else {
warning("unknown meta event 0x%02X\n", type);
warning("unknown meta event 0x%02X", type);
info.ext.type = 0;
}

View File

@ -163,7 +163,7 @@ void AdlibMidiDriver::send(uint32 b) {
adlibSetPitchBend(channel, param1 | (param2 << 7));
break;
default:
// warning("Unhandled cmd %d channel %d (0x%X)\n", cmd, channel, b);
// warning("Unhandled cmd %d channel %d (0x%X)", cmd, channel, b);
break;
}
}

View File

@ -321,7 +321,7 @@ void SBSound::playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *so
headerSize = SB_HEADER_SIZE_V110;
break;
default:
warning("Unhandled SB file version %d, defaulting to 104\n", version);
warning("Unhandled SB file version %d, defaulting to 104", version);
headerSize = SB_HEADER_SIZE_V104;
break;
}

View File

@ -823,12 +823,12 @@ int DecompressorDCL::unpackDCL(byte* dest) {
if (mode == DCL_ASCII_MODE) {
//warning("DCL-INFLATE: Decompressing ASCII mode (untested)");
} else if (mode) {
warning("DCL-INFLATE: Error: Encountered mode %02x, expected 00 or 01\n", mode);
warning("DCL-INFLATE: Error: Encountered mode %02x, expected 00 or 01", mode);
return -1;
}
if (length_param < 3 || length_param > 6)
warning("Unexpected length_param value %d (expected in [3,6])\n", length_param);
warning("Unexpected length_param value %d (expected in [3,6])", length_param);
while (_dwWrote < _szUnpacked) {
if (getBitsLSB(1)) { // (length,distance) pair

View File

@ -250,7 +250,7 @@ byte *kmem(EngineState *s, reg_t handle) {
HunkTable *ht = (HunkTable *)GET_SEGMENT(*s->seg_manager, handle.segment, MEM_OBJ_HUNK);
if (!ht || !ht->isValidEntry(handle.offset)) {
warning("Error: kmem() with invalid handle\n");
warning("Error: kmem() with invalid handle");
return NULL;
}
@ -281,7 +281,7 @@ void kernel_compile_signature(const char **s) {
v = 0;
if (ellipsis) {
error("Failed compiling kernel function signature '%s': non-terminal ellipsis '%c'\n", *s, *src);
error("Failed compiling kernel function signature '%s': non-terminal ellipsis '%c'", *s, *src);
}
do {

View File

@ -592,13 +592,13 @@ reg_t kSaveGame(EngineState *s, int funct_nr, int argc, reg_t *argv) {
++i;
}
if (savedir_id >= MAX_SAVEGAME_NR) {
warning("Internal error: Free savegame ID is %d, shouldn't happen!", savedir_id);
warning("Internal error: Free savegame ID is %d, shouldn't happen", savedir_id);
return NULL_REG;
}
// This loop terminates when savedir_id is not in [x | ex. n. saves [n].id = x]
} else {
warning("Savegame ID %d is not allowed!", savedir_nr);
warning("Savegame ID %d is not allowed", savedir_nr);
return NULL_REG;
}

View File

@ -100,7 +100,7 @@ enum {
if (val == GFX_ERROR) \
warning("GFX subsystem returned error on \"" #x "\""); \
else {\
error("GFX subsystem fatal error condition on \"" #x "\"!\n"); \
error("GFX subsystem fatal error condition on \"" #x "\""); \
vm_handle_fatal_error(s, __LINE__, __FILE__); \
} \
}\
@ -109,7 +109,7 @@ enum {
#define ASSERT(x) { \
int val = !!(x); \
if (!val) { \
error("Fatal error condition on \"" #x "\"!\n"); \
error("Fatal error condition on \"" #x "\""); \
BREAKPOINT(); \
vm_handle_fatal_error(s, __LINE__, __FILE__); \
} \
@ -1801,7 +1801,7 @@ int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, in
reg_t under_bits = NULL_REG;
if (!is_object(s, obj)) {
error("Non-object %04x:%04x present in view list during delete time\n", PRINT_REG(obj));
error("Non-object %04x:%04x present in view list during delete time", PRINT_REG(obj));
obj = NULL_REG;
} else
if (widget->under_bitsp) { // Is there a bg picture left to clean?
@ -1838,7 +1838,7 @@ int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, in
if (!(signal & _K_VIEW_SIG_FLAG_HIDDEN)) {
debugC(2, kDebugLevelGraphics, "Adding view at %04x:%04x to background\n", PRINT_REG(obj));
if (!(gfxw_remove_id(widget->_parent, widget->_ID, widget->_subID) == widget)) {
error("Attempt to remove view with ID %x:%x from list failed!\n", widget->_ID, widget->_subID);
error("Attempt to remove view with ID %x:%x from list failed", widget->_ID, widget->_subID);
}
s->drop_views->add((GfxContainer *)s->drop_views, gfxw_picviewize_dynview(widget));
@ -1956,7 +1956,7 @@ static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list,
GfxDynView *widget;
if (!*widget_list) {
error("make_view_list with widget_list == ()\n");
error("make_view_list with widget_list == ()");
};
assert_primary_widget_lists(s);
@ -1964,7 +1964,7 @@ static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list,
// Yes, this _does_ happen!
if (!list) { // list sanity check
error("Attempt to make list from non-list!\n");
error("Attempt to make list from non-list");
}
reg_t next_node = list->first;
@ -2284,7 +2284,7 @@ reg_t kAddToPic(EngineState *s, int funct_nr, int argc, reg_t *argv) {
priority, -1 /* No priority */ , ALIGN_CENTER, ALIGN_BOTTOM, 0);
if (!widget) {
error("Attempt to single-add invalid picview (%d/%d/%d)\n", view, loop, cel);
error("Attempt to single-add invalid picview (%d/%d/%d)", view, loop, cel);
} else {
widget->_ID = -1;
if (control >= 0) {
@ -2348,7 +2348,7 @@ reg_t kSetPort(EngineState *s, int funct_nr, int argc, reg_t *argv) {
new_port = gfxw_find_port(s->visual, port_nr);
if (!new_port) {
error("Invalid port %04x requested\n", port_nr);
error("Invalid port %04x requested", port_nr);
return NULL_REG;
}
@ -2387,7 +2387,7 @@ reg_t kSetPort(EngineState *s, int funct_nr, int argc, reg_t *argv) {
break;
}
default :
error("SetPort was called with %d parameters\n", argc);
error("SetPort was called with %d parameters", argc);
break;
}
@ -2405,13 +2405,13 @@ reg_t kDrawCel(EngineState *s, int funct_nr, int argc, reg_t *argv) {
/*
if (!view) {
error("Attempt to draw non-existing view.%03d\n", view);
error("Attempt to draw non-existing view.%03d", view);
return;
}
*/
if (gfxop_check_cel(s->gfx_state, view, &loop, &cel)) {
error("Attempt to draw non-existing view.%03d\n", view);
error("Attempt to draw non-existing view.%03d", view);
return s->r_acc;
}
@ -2433,7 +2433,7 @@ reg_t kDisposeWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
goner = gfxw_find_port(s->visual, goner_nr);
if ((goner_nr < 3) || (goner == NULL)) {
error("Removal of invalid window %04x requested\n", goner_nr);
error("Removal of invalid window %04x requested", goner_nr);
return s->r_acc;
}
@ -2593,7 +2593,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
gfxop_set_clip_zone(s->gfx_state, gfx_rect_fullscreen);
if (!newscreen) {
error("Failed to allocate 'newscreen'!\n");
error("Failed to allocate 'newscreen'");
return;
}
@ -3160,7 +3160,7 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
}
if (!text) {
error("Display with invalid reference %04x:%04x!\n", PRINT_REG(textp));
error("Display with invalid reference %04x:%04x", PRINT_REG(textp));
return NULL_REG;
}
@ -3292,7 +3292,7 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
text_handle = gfxw_new_text(s->gfx_state, area, font_nr, text, halign, ALIGN_TOP, color0, *color1, bg_color, 0);
if (!text_handle) {
error("Display: Failed to create text widget!\n");
error("Display: Failed to create text widget");
return NULL_REG;
}

View File

@ -151,12 +151,12 @@ reg_t kDisposeList(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (!l) {
// FIXME: This should be an error, but it's turned to a warning for now
warning("Attempt to dispose non-list at %04x:%04x!\n", PRINT_REG(argv[0]));
warning("Attempt to dispose non-list at %04x:%04x", PRINT_REG(argv[0]));
return NULL_REG;
}
if (!sane_listp(s, argv[0]))
error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0]));
error("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0]));
/* if (!l->first.isNull()) {
reg_t n_addr = l->first;
@ -203,7 +203,7 @@ reg_t kFirstNode(EngineState *s, int funct_nr, int argc, reg_t *argv) {
List *l = lookup_list(s, argv[0]);
if (l && !sane_listp(s, argv[0]))
error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0]));
error("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0]));
if (l)
return l->first;
@ -215,7 +215,7 @@ reg_t kLastNode(EngineState *s, int funct_nr, int argc, reg_t *argv) {
List *l = lookup_list(s, argv[0]);
if (l && !sane_listp(s, argv[0]))
error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0]));
error("List at %04x:%04x is not sane anymore", PRINT_REG(argv[0]));
if (l)
return l->last;
@ -227,7 +227,7 @@ reg_t kEmptyList(EngineState *s, int funct_nr, int argc, reg_t *argv) {
List *l = lookup_list(s, argv[0]);
if (!l || !sane_listp(s, argv[0]))
error("List at %04x:%04x is invalid or not sane anymore!\n", PRINT_REG(argv[0]));
error("List at %04x:%04x is invalid or not sane anymore", PRINT_REG(argv[0]));
return make_reg(0, ((l) ? l->first.isNull() : 0));
}
@ -240,9 +240,9 @@ void _k_add_to_front(EngineState *s, reg_t listbase, reg_t nodebase) {
// FIXME: This should be an error, but it's turned to a warning for now
if (!new_n)
warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x", PRINT_REG(nodebase), PRINT_REG(listbase));
if (!l || !sane_listp(s, listbase))
error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(listbase));
error("List at %04x:%04x is not sane anymore", PRINT_REG(listbase));
new_n->succ = l->first;
new_n->pred = NULL_REG;
@ -264,9 +264,9 @@ void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) {
// FIXME: This should be an error, but it's turned to a warning for now
if (!new_n)
warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x\n", PRINT_REG(nodebase), PRINT_REG(listbase));
warning("Attempt to add non-node (%04x:%04x) to list at %04x:%04x", PRINT_REG(nodebase), PRINT_REG(listbase));
if (!l || !sane_listp(s, listbase))
error("List at %04x:%04x is not sane anymore!\n", PRINT_REG(listbase));
error("List at %04x:%04x is not sane anymore", PRINT_REG(listbase));
new_n->succ = NULL_REG;
new_n->pred = l->last;
@ -283,7 +283,7 @@ void _k_add_to_end(EngineState *s, reg_t listbase, reg_t nodebase) {
reg_t kNextNode(EngineState *s, int funct_nr, int argc, reg_t *argv) {
Node *n = lookup_node(s, argv[0]);
if (!sane_nodep(s, argv[0])) {
error("List node at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0]));
error("List node at %04x:%04x is not sane anymore", PRINT_REG(argv[0]));
script_error_flag = script_debug_flag = 0;
return NULL_REG;
}
@ -294,7 +294,7 @@ reg_t kNextNode(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t kPrevNode(EngineState *s, int funct_nr, int argc, reg_t *argv) {
Node *n = lookup_node(s, argv[0]);
if (!sane_nodep(s, argv[0]))
error("List node at %04x:%04x is not sane anymore!\n", PRINT_REG(argv[0]));
error("List node at %04x:%04x is not sane anymore", PRINT_REG(argv[0]));
return n->pred;
}

View File

@ -623,7 +623,7 @@ reg_t kDoAvoider(EngineState *s, int funct_nr, int argc, reg_t *argv) {
debugC(2, kDebugLevelBresen, "Doing avoider %04x:%04x (dest=%d,%d)\n", PRINT_REG(avoider), destx, desty);
if (invoke_selector(INV_SEL(mover, doit, 1) , 0)) {
error("Mover %04x:%04x of avoider %04x:%04x doesn't have a doit() funcselector\n", PRINT_REG(mover), PRINT_REG(avoider));
error("Mover %04x:%04x of avoider %04x:%04x doesn't have a doit() funcselector", PRINT_REG(mover), PRINT_REG(avoider));
return NULL_REG;
}

View File

@ -71,7 +71,7 @@ int invoke_selector(EngineState *s, reg_t object, int selector_id, int noinvalid
slc_type = lookup_selector(s, object, selector_id, NULL, &address);
if (slc_type == kSelectorNone) {
error("Selector '%s' of object at %04x:%04x could not be invoked (%s L%d)\n",
error("Selector '%s' of object at %04x:%04x could not be invoked (%s L%d)",
s->_vocabulary->_selectorNames[selector_id].c_str(), PRINT_REG(object), fname, line);
if (noinvalid == 0)
KERNEL_OOPS("Not recoverable: VM was halted\n");
@ -193,7 +193,7 @@ reg_t kClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
clone_obj = s->seg_manager->alloc_Clone(&clone_addr);
if (!clone_obj) {
error("Cloning %04x:%04x failed-- internal error!\n", PRINT_REG(parent_addr));
error("Cloning %04x:%04x failed-- internal error", PRINT_REG(parent_addr));
return NULL_REG;
}
@ -219,13 +219,13 @@ reg_t kDisposeClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
uint16 underBits;
if (!victim_obj) {
error("Attempt to dispose non-class/object at %04x:%04x\n",
error("Attempt to dispose non-class/object at %04x:%04x",
PRINT_REG(victim_addr));
return s->r_acc;
}
if (victim_obj->_variables[SCRIPT_INFO_SELECTOR].offset != SCRIPT_INFO_CLONE) {
//warning("Attempt to dispose something other than a clone at %04x\n", offset);
//warning("Attempt to dispose something other than a clone at %04x", offset);
// SCI silently ignores this behaviour; some games actually depend on it
return s->r_acc;
}
@ -268,12 +268,12 @@ reg_t kScriptID(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (!scr->exports_nr) {
// FIXME: Is this fatal? This occurs in SQ4CD
warning("Script 0x%x does not have a dispatch table\n", script);
warning("Script 0x%x does not have a dispatch table", script);
return NULL_REG;
}
if (index > scr->exports_nr) {
error("Dispatch index too big: %d > %d\n", index, scr->exports_nr);
error("Dispatch index too big: %d > %d", index, scr->exports_nr);
return NULL_REG;
}

View File

@ -161,7 +161,7 @@ reg_t kSetSynonyms(EngineState *s, int funct_nr, int argc, reg_t *argv) {
synonyms_nr, script);
if (synonyms_nr > 16384) {
error("Segtable corruption: script.%03d has %d synonyms!\n",
error("Segtable corruption: script.%03d has %d synonyms",
script, synonyms_nr);
/* We used to reset the corrupted value here. I really don't think it's appropriate.
* Lars */

View File

@ -1516,7 +1516,7 @@ static int c_is_sample(EngineState *s, const Common::Array<cmd_param_t> &cmdPara
if ((data = songit->getAudioStream())) {
/*
warning("\nIs sample (encoding %dHz/%s/%04x).", data->conf.rate, (data->conf.stereo) ?
warning("\nIs sample (encoding %dHz/%s/%04x)", data->conf.rate, (data->conf.stereo) ?
((data->conf.stereo == SFX_PCM_STEREO_LR) ? "stereo-LR" : "stereo-RL") : "mono", data->conf.format);
*/
delete data;

View File

@ -535,7 +535,7 @@ void SegManager::heapRelocate(reg_t block) {
for (k = 0; k < scr->_objects.size(); k++)
sciprintf("- obj#%d at %04x w/ %d vars\n", k, scr->_objects[k].pos.offset, scr->_objects[k]._variables.size());
sciprintf("Triggering breakpoint...\n");
error("Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("Breakpoint in %s, line %d", __FILE__, __LINE__);
}
}
}

View File

@ -629,7 +629,7 @@ void run_vm(EngineState *s, int restoring) {
scr = script_locate_by_segment(s, xs->addr.pc.segment);
if (!scr) {
// No script? Implicit return via fake instruction buffer
warning("Running on non-existant script in segment %x!", xs->addr.pc.segment);
warning("Running on non-existant script in segment %x", xs->addr.pc.segment);
code_buf = _fake_return_buffer;
#ifndef DISABLE_VALIDATIONS
code_buf_size = 2;
@ -1434,7 +1434,7 @@ void run_vm(EngineState *s, int restoring) {
//#ifndef DISABLE_VALIDATIONS
if (xs != &(s->_executionStack.back())) {
warning("xs is stale (%p vs %p); last command was %02x\n",
warning("xs is stale (%p vs %p); last command was %02x",
(void *)xs, (void *)&(s->_executionStack.back()),
opnumber);
}

View File

@ -1081,7 +1081,7 @@ int main(int argc, char **argv) {
case 'x':
set_mode = xres = atoi(optarg);
if (xres < 1) {
warning("Invalid x scale factor!");
warning("Invalid x scale factor");
return 1;
}
break;
@ -1089,7 +1089,7 @@ int main(int argc, char **argv) {
case 'y':
set_mode = yres = atoi(optarg);
if (yres < 1) {
warning("Invalid y scale factor!");
warning("Invalid y scale factor");
return 1;
}
break;
@ -1097,7 +1097,7 @@ int main(int argc, char **argv) {
case 'c':
set_mode = color_mode = atoi(optarg);
if (color_mode < 1 || color_mode > 4) {
warning("Invalid number of bytes per pixel!");
warning("Invalid number of bytes per pixel");
return 1;
}
break;
@ -1128,7 +1128,7 @@ int main(int argc, char **argv) {
}
if (init_driver(drv)) {
warning("Initialization failed!");
warning("Initialization failed");
return 1;
}
@ -1138,7 +1138,7 @@ int main(int argc, char **argv) {
warning("Something weird happened while exitting...");
}
} else {
warning("No graphics driver found!");
warning("No graphics driver found");
return 1;
}

View File

@ -258,7 +258,7 @@ void gfxw_remove_widget_from_container(GfxContainer *container, GfxWidget *widge
if (!container) {
GFXERROR("Attempt to remove widget from NULL container!\n");
error("gfxw_remove_widget_from_container() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("gfxw_remove_widget_from_container() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
}
seekerp = &(container->_contents);
@ -280,7 +280,7 @@ void gfxw_remove_widget_from_container(GfxContainer *container, GfxWidget *widge
widget->print(1);
sciprintf("Container:");
widget->print(1);
error("gfxw_remove_widget_from_container() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("gfxw_remove_widget_from_container() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
return;
}
@ -760,7 +760,7 @@ GfxDynView::GfxDynView(GfxState *state, Common::Point pos_, int z_, int view_, i
_type = GFXW_DYN_VIEW;
if (!state) {
error("Attempt to create view widget with NULL state!\n");
error("Attempt to create view widget with NULL state");
}
if (gfxop_get_cel_parameters(state, view_, loop_, cel_, &width, &height, &offset)) {
@ -820,7 +820,7 @@ GfxText::~GfxText() {
GfxState *state = _visual ? _visual->_gfxState : NULL;
if (!state) {
GFXERROR("Attempt to free text without supplying mode to free it from!\n");
error("GfxText destructor failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("GfxText destructor failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
} else {
gfxop_free_text(state, _textHandle);
_textHandle = NULL;
@ -1324,7 +1324,7 @@ int _gfxwop_ordered_add(GfxContainer *container, GfxWidget *widget, int compare_
widget->print(3);
sciprintf("\nList:");
container->print(3);
error("Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("Breakpoint in %s, line %d", __FILE__, __LINE__);
}
if (_gfxw_container_id_equals(container, widget))
@ -1512,7 +1512,7 @@ int GfxPort::draw(const Common::Point &pos) {
GfxPort::~GfxPort() {
if (_visual) {
if (_ID < 0 || _ID >= (int)_visual->_portRefs.size()) {
error("Attempt to free port #%d; allowed: [0..%d]!\n", _ID, _visual->_portRefs.size());
error("Attempt to free port #%d; allowed: [0..%d]", _ID, _visual->_portRefs.size());
}
if (_visual->_portRefs[_ID] != this) {

View File

@ -1082,7 +1082,7 @@ int gfxop_set_visible_map(GfxState *state, gfx_map_mask_t visible_map) {
break;
default:
warning("Invalid display map %d selected!", visible_map);
warning("Invalid display map %d selected", visible_map);
return GFX_ERROR;
}

View File

@ -485,7 +485,7 @@ static void _gfxr_auxplot_brush(gfxr_pic_t *pic, byte *buffer, int yoffset, int
int full_offset = (yoffset * pic->mode->yfact + offset) * pic->mode->xfact;
if (yoffset + offset >= 64000) {
error("_gfxr_auxplot_brush() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("_gfxr_auxplot_brush() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
}
switch (brush_mode) {
@ -1621,7 +1621,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size,
case PIC_OP_TERMINATE:
p0printf("Terminator\n");
//warning( "ARTIFACT REMOVAL CODE is commented out!")
//warning( "ARTIFACT REMOVAL CODE is commented out")
//_gfxr_vismap_remove_artifacts();
return;

View File

@ -264,7 +264,7 @@ void ResourceManager::loadResource(Resource *res) {
file->seek(res->file_offset, SEEK_SET);
int error = decompress(res, file);
if (error) {
warning("Error %d occured while reading %s.%03d from resource file: %s\n",
warning("Error %d occured while reading %s.%03d from resource file: %s",
error, getResourceTypeName(res->type), res->number, sci_error_types[error]);
res->unalloc();
}

View File

@ -561,7 +561,7 @@ void SfxState::updateMultiSong() {
oldseeker->next_playing = &not_playing_anymore;
if (oldseeker == oldseeker->next_playing) {
error("updateMultiSong() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("updateMultiSong() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
}
}
@ -572,7 +572,7 @@ void SfxState::updateMultiSong() {
= song_lib_find_next_active(_songlib, newseeker);
if (newseeker == newseeker->next_playing) {
error("updateMultiSong() failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("updateMultiSong() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
}
}
/* We now need to update the currently playing song list, because we're
@ -947,7 +947,7 @@ Common::Error SfxState::sfx_send_midi(song_handle_t handle, int channel,
if (command == 0xb0 &&
arg1 == SCI_MIDI_CHANNEL_MUTE) {
warning("TODO: channel mute (channel %d %s)!", channel, channel_state[arg2]);
warning("TODO: channel mute (channel %d %s)", channel, channel_state[arg2]);
/* We need to have a GET_PLAYMASK interface to use
here. SET_PLAYMASK we've got.
*/

View File

@ -69,14 +69,14 @@ BaseSongIterator::BaseSongIterator(byte *data, uint size, songit_id_t id)
#define CHECK_FOR_END_ABSOLUTE(offset) \
if (offset > self->_data.size()) { \
warning("Reached end of song without terminator (%x/%x) at %d!", offset, self->_data.size(), __LINE__); \
warning("Reached end of song without terminator (%x/%x) at %d", offset, self->_data.size(), __LINE__); \
return SI_FINISHED; \
}
#define CHECK_FOR_END(offset_augment) \
if ((channel->offset + (offset_augment)) > channel->end) { \
channel->state = SI_STATE_FINISHED; \
warning("Reached end of track %d without terminator (%x+%x/%x) at %d!", channel->id, channel->offset, offset_augment, channel->end, __LINE__); \
warning("Reached end of track %d without terminator (%x+%x/%x) at %d", channel->id, channel->offset, offset_augment, channel->end, __LINE__); \
return SI_FINISHED; \
}
@ -384,7 +384,7 @@ static int _sci_midi_process_state(BaseSongIterator *self, byte *buf, int *resul
}
case SI_STATE_UNINITIALISED:
warning("Attempt to read command from uninitialized iterator!");
warning("Attempt to read command from uninitialized iterator");
self->init();
return self->nextCommand(buf, result);
@ -440,8 +440,8 @@ static int _sci_midi_process_state(BaseSongIterator *self, byte *buf, int *resul
}
default:
warning("Invalid iterator state %d!", channel->state);
error("Breakpoint in %s, line %d\n", __FILE__, __LINE__);
warning("Invalid iterator state %d", channel->state);
error("Breakpoint in %s, line %d", __FILE__, __LINE__);
return SI_FINISHED;
}
}
@ -487,7 +487,7 @@ static int _sci0_get_pcm_data(Sci0SongIterator *self,
Common::Array<byte>::iterator iter = Common::find(self->_data.begin() + offset, self->_data.end(), SCI0_END_OF_SONG);
if (iter == self->_data.end()) {
warning("Playing unterminated song!");
warning("Playing unterminated song");
return 1;
}
@ -520,7 +520,7 @@ static int _sci0_get_pcm_data(Sci0SongIterator *self,
int d = offset + SCI0_PCM_DATA_OFFSET + size - self->_data.size();
warning("PCM advertizes %d bytes of data, but %d"
" bytes are trailing in the resource!",
" bytes are trailing in the resource",
size, self->_data.size() - (offset + SCI0_PCM_DATA_OFFSET));
if (d > 0)
@ -1290,7 +1290,7 @@ static void songit_tee_death_notification(TeeSongIterator *self, SongIterator *c
self->_status &= ~TEE_RIGHT_ACTIVE;
self->_children[TEE_RIGHT].it = NULL;
} else {
error("songit_tee_death_notification() failed: Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("songit_tee_death_notification() failed: Breakpoint in %s, line %d", __FILE__, __LINE__);
}
}
@ -1580,7 +1580,7 @@ int songit_next(SongIterator **it, byte *buf, int *result, int mask) {
if (retval == SI_MORPH) {
fprintf(stderr, " Morphing %p (stored at %p)\n", (void *)*it, (void *)it);
if (!SIMSG_SEND((*it), SIMSG_ACK_MORPH)) {
error("SI_MORPH failed. Breakpoint in %s, line %d\n", __FILE__, __LINE__);
error("SI_MORPH failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
} else
fprintf(stderr, "SI_MORPH successful\n");
}

View File

@ -184,7 +184,7 @@ void MidiDriver_Adlib::send(uint32 b) {
// Aftertouch in the OPL thing?
break;
default:
warning("ADLIB: Unknown event %02x\n", command);
warning("ADLIB: Unknown event %02x", command);
}
}

View File

@ -30,7 +30,7 @@
using namespace Sci;
#define ASSERT_S(x) if (!(x)) { error("Failed assertion in L%d: " #x "\n", __LINE__); return; }
#define ASSERT_S(x) if (!(x)) { error("Failed assertion in L%d: " #x, __LINE__); return; }
#define ASSERT(x) ASSERT_S(x)
/* Tests the song iterators */
@ -104,7 +104,7 @@ int simple_it_next(SongIterator *_self, unsigned char *buf, int *result) {
}
Audio::AudioStream *simple_it_pcm_feed(SongIterator *_self) {
error("No PCM feed!\n");
error("No PCM feed");
return NULL;
}
@ -418,6 +418,6 @@ int main(int argc, char **argv) {
test_iterator_sci0_loop();
test_iterator_sci0_mark_loop();
if (errors != 0)
warning("[ERROR] %d errors total.", errors);
warning("[ERROR] %d errors total", errors);
return (errors != 0);
}

View File

@ -596,7 +596,7 @@ bool Vocabulary::getBranches() {
int branches_nr = resource->size / 20;
if (branches_nr == 0) {
warning("Parser tree data is empty!");
warning("Parser tree data is empty");
return false;
}

View File

@ -229,7 +229,7 @@ void ScummEngine::setBoxScale(int box, int scale) {
if (_game.version == 8)
ptr->v8.scale = TO_LE_32(scale);
else if (_game.version <= 2)
error("This should not ever be called!");
error("This should not ever be called");
else
ptr->old.scale = TO_LE_16(scale);
}

View File

@ -299,7 +299,7 @@ void CharsetRendererCommon::setCurID(int32 id) {
_fontPtr = _vm->getResourceAddress(rtCharset, id);
if (_fontPtr == 0)
error("CharsetRendererCommon::setCurID: charset %d not found!", id);
error("CharsetRendererCommon::setCurID: charset %d not found", id);
if (_vm->_game.version == 4)
_fontPtr += 17;
@ -321,7 +321,7 @@ void CharsetRendererV3::setCurID(int32 id) {
_fontPtr = _vm->getResourceAddress(rtCharset, id);
if (_fontPtr == 0)
error("CharsetRendererCommon::setCurID: charset %d not found!", id);
error("CharsetRendererCommon::setCurID: charset %d not found", id);
_bitDepth = 1;
_numChars = _fontPtr[4];

View File

@ -304,7 +304,7 @@ bool ScummDiskImage::open(const Common::String &filename) {
signature = fileReadUint16LE();
if (signature != 0x0A31) {
error("ScummDiskImage::open(): signature not found in disk 1!");
error("ScummDiskImage::open(): signature not found in disk 1");
return false;
}
@ -316,12 +316,12 @@ bool ScummDiskImage::open(const Common::String &filename) {
File::seek(143104);
signature = fileReadUint16LE();
if (signature != 0x0032)
error("Error: signature not found in disk 2!\n");
error("Error: signature not found in disk 2");
} else {
File::seek(0);
signature = fileReadUint16LE();
if (signature != 0x0132)
error("Error: signature not found in disk 2!\n");
error("Error: signature not found in disk 2");
}

View File

@ -983,7 +983,7 @@ uint16 ScummNESFile::extractResource(Common::WriteStream *output, const Resource
break;
default:
error("extract_resource - unknown resource type %d specified!", type);
error("extract_resource - unknown resource type %d specified", type);
}
return reslen;
@ -1225,7 +1225,7 @@ bool ScummNESFile::generateIndex() {
lfl_index.costume_addr[78] = TO_LE_16(respos);
break;
default:
error("Unindexed entry found!");
error("Unindexed entry found");
break;
}
respos += extractResource(0, &entry->type->langs[_ROMset][entry->index], entry->type->type);

View File

@ -446,7 +446,7 @@ void LogicHEfunshop::op_1004(int32 *args) {
(int32)data[2], (int32)data[3], (int32)data[6], (int32)data[7], &x, &y);
if (s != 1) {
error("LogicHEfunshop::op_1004: Your shape has defied the laws of physics\n");
error("LogicHEfunshop::op_1004: Your shape has defied the laws of physics");
return;
}

View File

@ -101,7 +101,7 @@ bool Player::startSound(int sound, MidiDriver *midi, bool passThrough) {
// but we'll go ahead and do a similar check.
ptr = _se->findStartOfSound(sound);
if (!ptr) {
error("Player::startSound(): Couldn't find start of sound %d!", sound);
error("Player::startSound(): Couldn't find start of sound %d", sound);
return false;
}
@ -800,7 +800,7 @@ int Player::query_part_param(int param, byte chan) {
return part->_vol;
case 16:
// FIXME: Need to know where this occurs...
error("Trying to cast instrument (%d, %d) -- please tell Fingolfin\n", param, chan);
error("Trying to cast instrument (%d, %d) -- please tell Fingolfin", param, chan);
// In old versions of the code, this used to return part->_program.
// This was changed in revision 2.29 of imuse.cpp (where this code used
// to reside).

View File

@ -258,7 +258,7 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size,
assert(0 <= index && index < _numFiles);
if (_file->isOpen() == false) {
error("BundleMgr::decompressSampleByIndex() File is not open!");
error("BundleMgr::decompressSampleByIndex() File is not open");
return 0;
}
@ -335,7 +335,7 @@ int32 BundleMgr::decompressSampleByName(const char *name, int32 offset, int32 si
int32 final_size = 0;
if (!_file->isOpen()) {
error("BundleMgr::decompressSampleByName() File is not open!");
error("BundleMgr::decompressSampleByName() File is not open");
return 0;
}

View File

@ -635,7 +635,7 @@ int32 decompressCodec(int32 codec, byte *compInput, byte *compOutput, int32 inpu
break;
default:
error("BundleCodecs::decompressCodec() Unknown codec %d!", (int)codec);
error("BundleCodecs::decompressCodec() Unknown codec %d", (int)codec);
outputSize = 0;
break;
}

View File

@ -673,7 +673,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
cmpFile = soundDesc->bundle->getFile(fileName, offs, len);
if (len) {
#ifndef USE_FLAC
error("FLAC library compiled support needed!");
error("FLAC library compiled support needed");
#endif
soundMode = 3;
}
@ -682,7 +682,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
cmpFile = soundDesc->bundle->getFile(fileName, offs, len);
if (len) {
#ifndef USE_VORBIS
error("Vorbis library compiled support needed!");
error("Vorbis library compiled support needed");
#endif
soundMode = 2;
}
@ -692,7 +692,7 @@ int32 ImuseDigiSndMgr::getDataFromRegion(SoundDesc *soundDesc, int region, byte
cmpFile = soundDesc->bundle->getFile(fileName, offs, len);
if (len) {
#ifndef USE_MAD
error("Mad library compiled support needed!");
error("Mad library compiled support needed");
#endif
soundMode = 1;
}

View File

@ -412,7 +412,7 @@ void ScummEngine::getObjectXYPos(int object, int &x, int &y, int &dir) {
y = od.y_pos + (int32)READ_LE_UINT32(&imhd->v8.hotspot[state].y);
break;
default:
error("Unsupported image header version %d\n", FROM_LE_32(imhd->v8.version));
error("Unsupported image header version %d", FROM_LE_32(imhd->v8.version));
}
} else if (_game.version == 7) {
x = od.x_pos + (int16)READ_LE_UINT16(&imhd->v7.hotspot[state].x);

View File

@ -72,7 +72,7 @@ class V2A_Sound_Unsupported : public V2A_Sound {
public:
V2A_Sound_Unsupported() { }
virtual void start(Player_MOD *mod, int id, const byte *data) {
warning("player_v2a - sound %i not supported!", id);
warning("player_v2a - sound %i not supported", id);
}
virtual bool update() { return false; }
virtual void stop() { }

View File

@ -161,7 +161,7 @@ void Player_V3A::startSound(int nr) {
assert(data);
if ((_vm->_game.id != GID_INDY3) && (_vm->_game.id != GID_LOOM))
error("player_v3a - unknown game!");
error("player_v3a - unknown game");
if (!_isinit) {
int i;

View File

@ -480,7 +480,7 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
break;
default:
error("Bad ID %04X('%s') found in index file directory!", blocktype,
error("Bad ID %04X('%s') found in index file directory", blocktype,
tag2str(blocktype));
}
}

View File

@ -146,7 +146,7 @@ void ScummEngine_v4::readIndexFile() {
break;
default:
error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
error("Bad ID %c%c found in directory", blocktype & 0xFF, blocktype >> 8);
}
}
closeRoom();

View File

@ -1753,7 +1753,7 @@ void ScummEngine_v5::o5_roomOps() {
if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq")) {
filename = _targetName + ".iq";
} else {
error("SO_SAVE_STRING: Unsupported filename %s\n", filename.c_str());
error("SO_SAVE_STRING: Unsupported filename %s", filename.c_str());
}
Common::OutSaveFile *file = _saveFileMan->openForSaving(filename);
@ -1778,7 +1778,7 @@ void ScummEngine_v5::o5_roomOps() {
if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq")) {
filename = _targetName + ".iq";
} else {
error("SO_LOAD_STRING: Unsupported filename %s\n", filename.c_str());
error("SO_LOAD_STRING: Unsupported filename %s", filename.c_str());
}
Common::InSaveFile *file = _saveFileMan->openForLoading(filename);

View File

@ -1635,7 +1635,7 @@ void ScummEngine::setupMusic(int midi) {
if (_musicType == MDT_ADLIB || _musicType == MDT_PCSPK) {
midiDriver = MD_NULL;
_musicType = MDT_NONE;
warning("MIDI driver depends on sound mixer, switching to null MIDI driver\n");
warning("MIDI driver depends on sound mixer, switching to null MIDI driver");
}
}

View File

@ -162,7 +162,8 @@ void ImuseChannel::decode() {
byte *old = _tbuffer;
int new_size = remaining_size + _tbufferSize;
_tbuffer = new byte[new_size];
if (!_tbuffer) error("imuse_channel failed to allocate memory");
if (!_tbuffer)
error("imuse_channel failed to allocate memory");
memcpy(_tbuffer, old, _tbufferSize);
delete[] old;
memcpy(_tbuffer + _tbufferSize, _sbuffer + _sbufferSize - remaining_size, remaining_size);

View File

@ -1095,7 +1095,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
// Check for a buffer overflow
if (dst >= end)
error("convertMessageToString: buffer overflow!");
error("convertMessageToString: buffer overflow");
}
*dst = 0;
@ -1144,7 +1144,7 @@ int ScummEngine_v72he::convertMessageToString(const byte *msg, byte *dst, int ds
// Check for a buffer overflow
if (dst >= end)
error("convertMessageToString: buffer overflow!");
error("convertMessageToString: buffer overflow");
}
*dst = 0;
@ -1362,7 +1362,7 @@ void ScummEngine_v7::loadLanguageBundle() {
// That was another index entry
_languageIndexSize++;
} else {
error("Unknown language.bnd entry found: '%s'\n", ptr);
error("Unknown language.bnd entry found: '%s'", ptr);
}
// Skip over newlines (and turn them into null bytes)

View File

@ -1195,15 +1195,15 @@ void Control::importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems
uint16 saveType;
LODSW(*srcPos, saveType);
if ((saveType & (SAVE_EXT | SAVE_TURNP)) && (numElems < 54))
error("Cpt %s: Savedata doesn't match cpt size (%d)!\n", name, numElems);
error("Cpt %s: Savedata doesn't match cpt size (%d)", name, numElems);
if ((saveType & SAVE_MEGA0) && (numElems < 54 + 13))
error("Cpt %s: Savedata doesn't match cpt size (%d)!\n", name, numElems);
error("Cpt %s: Savedata doesn't match cpt size (%d)", name, numElems);
if ((saveType & SAVE_MEGA1) && (numElems < 54 + 13 + 13))
error("Cpt %s: Savedata doesn't match cpt size (%d)!\n", name, numElems);
error("Cpt %s: Savedata doesn't match cpt size (%d)", name, numElems);
if ((saveType & SAVE_MEGA2) && (numElems < 54 + 13 + 13 + 13))
error("Cpt %s: Savedata doesn't match cpt size (%d)!\n", name, numElems);
error("Cpt %s: Savedata doesn't match cpt size (%d)", name, numElems);
if ((saveType & SAVE_MEGA3) && (numElems < 54 + 13 + 13 + 13))
error("Cpt %s: Savedata doesn't match cpt size (%d)!\n", name, numElems);
error("Cpt %s: Savedata doesn't match cpt size (%d)", name, numElems);
if (saveType & SAVE_GRAFX) {
uint16 graphType, target, pos;
LODSW(*srcPos, graphType);

View File

@ -836,7 +836,7 @@ bool Intro::commandFlirt(uint16 *&data) {
_skySound->playSound(1, *data++, 0);
break;
default:
error("Unknown FLIRT command %X\n", command);
error("Unknown FLIRT command %X", command);
}
}
if (!escDelay(50)) {

View File

@ -1064,7 +1064,7 @@ void Sound::loadSection(uint8 pSection) {
if ((_soundData[asmOfs] != 0x3C) || (_soundData[asmOfs + 0x27] != 0x8D) ||
(_soundData[asmOfs + 0x28] != 0x1E) || (_soundData[asmOfs + 0x2F] != 0x8D) ||
(_soundData[asmOfs + 0x30] != 0x36))
error("Unknown sounddriver version!");
error("Unknown sounddriver version");
_soundsTotal = _soundData[asmOfs + 1];
uint16 sRateTabOfs = READ_LE_UINT16(_soundData + asmOfs + 0x29);

View File

@ -279,7 +279,7 @@ DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
if (pixelWidth <= lineWidth) {
if (*(lastSpace-1) == 10)
error("line width exceeded!");
error("line width exceeded");
*(lastSpace-1) = 10;
lineWidth = 0;
@ -296,7 +296,7 @@ DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
numLines++;
if (numLines > MAX_NO_LINES)
error("Maximum no. of lines exceeded!");
error("Maximum no. of lines exceeded");
uint32 dtLineSize = pixelWidth * _charHeight;
uint32 numBytes = (dtLineSize * numLines) + sizeof(DataFileHeader) + 4;

View File

@ -98,7 +98,7 @@ void EventManager::fnIssueEvent(Object *compact, int32 id, int32 event, int32 de
while (_eventPendingList[evSlot].delay)
evSlot++;
if (evSlot >= TOTAL_EVENT_SLOTS)
error("EventManager ran out of event slots!");
error("EventManager ran out of event slots");
_eventPendingList[evSlot].delay = delay;
_eventPendingList[evSlot].eventNumber = event;
}

View File

@ -256,7 +256,7 @@ void Logic::processLogic(Object *compact, uint32 id) {
break;
default:
error("Fatal error: compact %d's logic == %X!", id, compact->o_logic);
error("Fatal error: compact %d's logic == %X", id, compact->o_logic);
break;
}
} while (logicRet);
@ -447,7 +447,7 @@ int Logic::scriptManager(Object *compact, uint32 id) {
if (compact->o_tree.o_script_level)
compact->o_tree.o_script_level--;
else
error("ScriptManager: basescript %d for cpt %d ended!", script, id);
error("ScriptManager: basescript %d for cpt %d ended", script, id);
} else
compact->o_tree.o_script_pc[level] = ret;
} while (!ret);
@ -475,9 +475,9 @@ int Logic::interpretScript(Object *compact, int id, Header *scriptModule, int sc
int32 offset;
int32 pc;
if (memcmp(scriptModule->type, "Script", 6))
error("Invalid script module!");
error("Invalid script module");
if (scriptModule->version != SCRIPT_VERSION)
error("Illegal script version!");
error("Illegal script version");
if (scriptNum < 0)
error("negative script number");
if ((uint32)scriptNum >= scriptModule->decomp_length)
@ -1511,7 +1511,7 @@ int Logic::fnIsFacing(Object *cpt, int32 id, int32 targetId, int32 b, int32 c, i
y = target->o_ycoord;
dir = target->o_dir;
} else
error("fnIsFacing:: Target isn't a mega!");
error("fnIsFacing:: Target isn't a mega");
int32 lookDir = whatTarget(x, y, cpt->o_xcoord, cpt->o_ycoord);
lookDir -= dir;

View File

@ -37,7 +37,7 @@ MemMan::MemMan(void) {
MemMan::~MemMan(void) {
flush();
if (_alloced)
warning("deleting MemMan, still %d bytes alloced\n", _alloced);
warning("deleting MemMan, still %d bytes alloced", _alloced);
}
void MemMan::alloc(MemHandle *bsMem, uint32 pSize, uint16 pCond) {

View File

@ -136,7 +136,7 @@ uint32 ObjectMan::lastTextNumber(int section) {
Object *ObjectMan::fetchObject(uint32 id) {
uint8 *addr = _cptData[id / ITM_PER_SEC];
if (!addr)
error("fetchObject: section %d is not open!", id / ITM_PER_SEC);
error("fetchObject: section %d is not open", id / ITM_PER_SEC);
id &= ITM_ID;
// DON'T do endian conversion here. it's already done.
return (Object*)(addr + *(uint32*)(addr + (id + 1)*4));
@ -144,7 +144,7 @@ Object *ObjectMan::fetchObject(uint32 id) {
uint32 ObjectMan::fetchNoObjects(int section) {
if (_cptData[section] == NULL)
error("fetchNoObjects: section %d is not open!", section);
error("fetchNoObjects: section %d is not open", section);
return *(uint32*)_cptData[section];
}

View File

@ -230,7 +230,7 @@ void ResMan::dumpRes(uint32 id) {
Header *ResMan::lockScript(uint32 scrID) {
if (!_scriptList[scrID / ITM_PER_SEC])
error("Script id %d not found.\n", scrID);
error("Script id %d not found", scrID);
scrID = _scriptList[scrID / ITM_PER_SEC];
#ifdef SCUMM_BIG_ENDIAN
openScriptResourceBigEndian(scrID);
@ -266,7 +266,7 @@ void ResMan::resOpen(uint32 id) { // load resource ID into memory
clusFile->seek( resOffset(id) );
clusFile->read( memHandle->data, size);
if (clusFile->ioFailed()) {
error("Can't read %d bytes from offset %d from cluster file %s\nResource ID: %d (%08X)\n", size, resOffset(id), _prj.clu[(id >> 24) - 1].label, id, id);
error("Can't read %d bytes from offset %d from cluster file %s\nResource ID: %d (%08X)", size, resOffset(id), _prj.clu[(id >> 24) - 1].label, id, id);
}
} else
_memMan->setCondition(memHandle, MEM_DONT_FREE);
@ -282,7 +282,7 @@ void ResMan::resClose(uint32 id) {
if (!handle)
return;
if (!handle->refCount) {
warning("Resource Manager fail: unlocking object with refCount 0. Id: %d\n", id);
warning("Resource Manager fail: unlocking object with refCount 0. Id: %d", id);
} else {
handle->refCount--;
if (!handle->refCount)

View File

@ -893,7 +893,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) {
if (lastRealDir == 99) {
error("SlidyWalkAnimatorlast direction error\n");
error("SlidyWalkAnimatorlast direction error");
}
//****************************************************************************
// SLIDY

View File

@ -64,7 +64,7 @@ Text::~Text(void) {
uint32 Text::lowTextManager(uint8 *ascii, int32 width, uint8 pen) {
_textCount++;
if (_textCount > MAX_TEXT_OBS)
error("Text::lowTextManager: MAX_TEXT_OBS exceeded!");
error("Text::lowTextManager: MAX_TEXT_OBS exceeded");
uint32 textObjId = (TEXT_sect * ITM_PER_SEC) - 1;
do {
textObjId++;

View File

@ -1046,7 +1046,7 @@ void Mouse::mouseOnOff() {
setLuggage(_currentLuggageResource);
}
} else {
error("ERROR: mouse.pointer==0 for object %d (%s) - update logic script!", _mouseTouching, _vm->_resman->fetchName(_mouseTouching));
error("ERROR: mouse.pointer==0 for object %d (%s) - update logic script", _mouseTouching, _vm->_resman->fetchName(_mouseTouching));
}
} else if (_oldMouseTouching && !_mouseTouching) {
// the cursor has moved off something - reset cursor to

View File

@ -129,7 +129,7 @@ void Screen::setFullPalette(int32 palRes) {
setPalette(0, 256, _vm->fetchPalette(data), RDPAL_INSTANT);
_vm->_resman->closeResource(_thisScreen.background_layer_id);
} else
error("setFullPalette(0) called, but no current screen available!");
error("setFullPalette(0) called, but no current screen available");
}
if (palRes != CONTROL_PANEL_PALETTE)

View File

@ -478,7 +478,7 @@ void ResourceManager::readCluIndex(uint16 fileNum, Common::File *file) {
_resFiles[fileNum].numEntries = tableSize / 8;
file->read(_resFiles[fileNum].entryTab, tableSize);
if (file->ioFailed())
error("unable to read index table from file %s\n", _resFiles[fileNum].fileName);
error("unable to read index table from file %s", _resFiles[fileNum].fileName);
#ifdef SCUMM_BIG_ENDIAN
for (int tabCnt = 0; tabCnt < _resFiles[fileNum].numEntries * 2; tabCnt++)
@ -568,7 +568,7 @@ void ResourceManager::checkMemUsage() {
tmp->ptr = NULL;
_usedMem -= tmp->size;
} else {
warning("%d bytes of memory used, but cache list is empty!\n", _usedMem);
warning("%d bytes of memory used, but cache list is empty", _usedMem);
return;
}
}

View File

@ -162,7 +162,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
for (;;) {
for (int i = 0; i < bgReels; i++) {
if (StepAnimScript(&thisAnim[i]) == ScriptFinished)
error("Background animation has finished!");
error("Background animation has finished");
}
CORO_SLEEP(1);

View File

@ -740,12 +740,12 @@ static void InitialiseBMV(void) {
// Grab the data buffer
bigBuffer = (byte *)malloc(NUM_SLOTS * SLOT_SIZE);
if (bigBuffer == NULL)
error(NO_MEM, "FMV data buffer\n");
error(NO_MEM, "FMV data buffer");
// Screen buffer (2 lines more than screen
screenBuffer = (byte *)malloc(SCREEN_WIDTH * (SCREEN_HIGH + 2));
if (screenBuffer == NULL)
error(NO_MEM, "FMV screen buffer\n");
error(NO_MEM, "FMV screen buffer");
// Pass the sceen buffer to the decompresser
InitBMV(screenBuffer);

View File

@ -1107,7 +1107,7 @@ static void PrimeSceneHopper(void) {
pBuffer = (char *)malloc(size);
if (pBuffer == NULL)
// cannot alloc buffer for index
error(NO_MEM, "Scene hopper data\n");
error(NO_MEM, "Scene hopper data");
// load data
if (f.read(pBuffer, size) != size)

View File

@ -54,10 +54,10 @@ void CdCD(CORO_PARAM) {
// functions. If these functions really get called while a CD
// change is requested, this needs to be resolved.
if (coroParam == nullContext)
error("CdCD needs context!");
error("CdCD needs context");
CORO_SLEEP(1);
} else
error("No current process in CdCD()!");
error("No current process in CdCD()");
}
CORO_END_CODE;

View File

@ -299,7 +299,7 @@ void LoadFile(MEMHANDLE *pH, bool bWarn) {
char szFilename[sizeof(pH->szName) + 1];
if (pH->filesize & fCompressed) {
error("Compression handling has been removed!");
error("Compression handling has been removed");
}
// extract and zero terminate the filename
@ -383,7 +383,7 @@ byte *LockMem(SCNHANDLE offset) {
} else if (handle == cdPlayHandle) {
// Must be in currently loaded/loadable range
if (offset < cdBaseHandle || offset >= cdTopHandle)
error("Overlapping (in time) CD-plays!");
error("Overlapping (in time) CD-plays");
if (pH->pNode->pBaseAddr && (pH->filesize & fLoaded))
// already allocated and loaded

View File

@ -118,7 +118,7 @@ SCNHANDLE GetMoverTalkReel(PMOVER pActor, TFTYPE dirn) {
return pActor->talkReels[pActor->scale-1][RIGHTREEL];
default:
error("GetMoverTalkReel() - illegal direction!");
error("GetMoverTalkReel() - illegal direction");
}
}

View File

@ -1272,7 +1272,7 @@ HPOLYGON FirstPathPoly(void) {
if (Polys[i]->polyType == PATH)
return i;
}
error("FirstPathPoly() - no PATH polygons!");
error("FirstPathPoly() - no PATH polygons");
return NOPOLY;
}
@ -1460,7 +1460,7 @@ static void SetExBlocks() {
Polys[i]->polyType = EX_BLOCK;
#ifdef DEBUG
else
error("Impossible message!");
error("Impossible message");
#endif
}
}
@ -1785,7 +1785,7 @@ static void KillDeadPolygons(void) {
break;
default:
error("Impossible message!");
error("Impossible message");
}
}
}

View File

@ -635,7 +635,7 @@ void SetMoverWalkReel(PMOVER pMover, DIRECTION reel, int scale, bool force) {
if (pMover->scale != scale
&& scale <= NUM_MAINSCALES && pMover->scale <= NUM_MAINSCALES
&& (whichReel = ScalingReel(pMover->actorID, pMover->scale, scale, reel)) != 0) {
// error("Cripes!");
// error("Cripes");
; // Use what is now in 'whichReel'
} else {
whichReel = pMover->walkReels[scale-1][reel];

View File

@ -139,7 +139,7 @@ void ChangeLanguage(LANGUAGE newLang) {
// close the file
f.close();
} else { // the file must be compressed
error("Compression handling has been removed!");
error("Compression handling has been removed");
}
}

View File

@ -4244,7 +4244,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case ACTORREF:
// Common to both DW1 & DW2
if (!TinselV0)
error("actorref isn't a real function!");
error("actorref isn't a real function");
return 0;
case ACTORRGB:
@ -4377,7 +4377,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case CALLSCENE:
// DW2 only
error("CallScene isn't a real function!");
error("CallScene isn't a real function");
case CALLTAG:
// DW2 only
@ -4433,7 +4433,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case CDPLAY:
// Common to both DW1 & DW2
error("cdplay isn't a real function!");
error("cdplay isn't a real function");
case CLEARHOOKSCENE:
// Common to both DW1 & DW2
@ -4477,7 +4477,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case CUTSCENE:
// DW1 only
error("cutscene isn't a real function!");
error("cutscene isn't a real function");
case DECCONVW:
// Common to both DW1 & DW2
@ -4500,7 +4500,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case DECFLAGS:
// Common to both DW1 & DW2
if (TinselV2)
error("DecFlags() is obsolete!");
error("DecFlags() is obsolete");
DecFlags(pp[0]);
return -1;
@ -4591,7 +4591,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case DROPOUT:
// DW1 only
error("DropOut (%d)\n", pp[0]);
error("DropOut (%d)", pp[0]);
case EFFECTACTOR:
// Common to both DW1 & DW2
@ -4614,7 +4614,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case ESCAPEOFF:
case ESCAPEON:
// Common to both DW1 & DW2
error("Escape isn't a real function!");
error("Escape isn't a real function");
case EVENT:
// Common to both DW1 & DW2
@ -4666,7 +4666,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case GLOBALVAR:
// DW1 only
error("GlobalVar isn't a real function!");
error("GlobalVar isn't a real function");
case GRABMOVIE:
// DW2 only
@ -4794,7 +4794,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case KILLACTOR:
// DW1 only
if (TinselV2)
error("KillActor() was not expected to be required!");
error("KillActor() was not expected to be required");
KillActor(pp[0]);
return -1;
@ -4826,7 +4826,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case LOCALVAR:
// DW2 only
error("LocalVar isn't a real function!");
error("LocalVar isn't a real function");
case MOVECURSOR:
// Common to both DW1 & DW2
@ -4941,7 +4941,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
case PLAYRTF:
// Common to both DW1 & DW2
error("playrtf only applies to cdi!");
error("playrtf only applies to cdi");
case PLAYSAMPLE:
// Common to both DW1 & DW2

View File

@ -313,7 +313,7 @@ void ProtrackerStream::updateRow() {
_patternDelay = ey;
break;
default:
warning("Unimplemented effect %X\n", note.effect);
warning("Unimplemented effect %X", note.effect);
}
break;
@ -326,7 +326,7 @@ void ProtrackerStream::updateRow() {
}
break;
default:
warning("Unimplemented effect %X\n", note.effect);
warning("Unimplemented effect %X", note.effect);
}
}
}

View File

@ -221,7 +221,7 @@ void SoundFx::updateEffects(int ch) {
case 4: // ledoff, disable low-pass filter
case 7: // set step up
case 8: // set step down
warning("Unhandled effect %d\n", _effects[ch]);
warning("Unhandled effect %d", _effects[ch]);
break;
}
}

Some files were not shown because too many files have changed in this diff Show More