mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
ULTIMA4: Replace errorFatal/errorWarning to error/warning
This commit is contained in:
parent
6e1f2f39c0
commit
722016ef49
@ -162,7 +162,6 @@ MODULE_OBJS := \
|
||||
ultima4/core/config.o \
|
||||
ultima4/core/debugger.o \
|
||||
ultima4/core/debugger_actions.o \
|
||||
ultima4/core/error.o \
|
||||
ultima4/core/settings.o \
|
||||
ultima4/core/utils.o \
|
||||
ultima4/events/event.o \
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "ultima/ultima4/game/menu.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
#include "ultima/ultima4/filesys/savegame.h"
|
||||
@ -1468,14 +1467,12 @@ void IntroController::getTitleSourceData() {
|
||||
// individually. Afterward, the BKGD_INTRO image
|
||||
// will be scaled appropriately.
|
||||
ImageInfo *info = imageMgr->get(BKGD_INTRO, true);
|
||||
if (!info) {
|
||||
errorFatal("ERROR 1007: Unable to load the image \"%s\".\t\n\nIs %s installed?\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", BKGD_INTRO, settings._game.c_str());
|
||||
}
|
||||
if (!info)
|
||||
error("ERROR 1007: Unable to load the image \"%s\"", BKGD_INTRO);
|
||||
|
||||
if (info->_width / info->_prescale != 320 || info->_height / info->_prescale != 200) {
|
||||
// the image appears to have been scaled already
|
||||
errorWarning("ERROR 1008: The title image (\"%s\") has been scaled too early!\t\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", BKGD_INTRO);
|
||||
}
|
||||
if (info->_width / info->_prescale != 320 || info->_height / info->_prescale != 200)
|
||||
// The image appears to have been scaled already
|
||||
warning("ERROR 1008: The title image (\"%s\") has been scaled too early", BKGD_INTRO);
|
||||
|
||||
// get the transparent color
|
||||
_transparentColor = info->_image->getPaletteColor(_transparentIndex);
|
||||
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/filesys/u4file.h"
|
||||
|
||||
|
@ -1,49 +0,0 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "common/textconsole.h"
|
||||
#include "common/str.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima4 {
|
||||
|
||||
void errorFatal(const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
Common::String msg = Common::String::vformat(fmt, args);
|
||||
va_end(args);
|
||||
|
||||
error("%s", msg.c_str());
|
||||
}
|
||||
|
||||
void errorWarning(const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
Common::String msg = Common::String::vformat(fmt, args);
|
||||
va_end(args);
|
||||
|
||||
warning("%s", msg.c_str());
|
||||
}
|
||||
|
||||
} // End of namespace Ultima4
|
||||
} // End of namespace Ultima
|
@ -1,37 +0,0 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA4_CORE_ERROR_H
|
||||
#define ULTIMA4_CORE_ERROR_H
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima4 {
|
||||
|
||||
#define PRINTF_LIKE(x,y) /* nothing */
|
||||
|
||||
void errorFatal(const char *fmt, ...) PRINTF_LIKE(1, 2);
|
||||
void errorWarning(const char *fmt, ...) PRINTF_LIKE(1, 2);
|
||||
|
||||
} // End of namespace Ultima4
|
||||
} // End of namespace Ultima
|
||||
|
||||
#endif
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
#include "ultima/ultima4/filesys/filesystem.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "ultima/ultima4/ultima4.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
#include "ultima/ultima4/game/context.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/gfx/screen.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ultima/ultima4/game/armor.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/game/names.h"
|
||||
#include "ultima/ultima4/map/tile.h"
|
||||
#include "common/algorithm.h"
|
||||
@ -77,7 +76,7 @@ Armor::Armor(const ConfigElement &conf) {
|
||||
if (useMask == 0 && scumm_stricmp(i->getString("class").c_str(), "all") == 0)
|
||||
useMask = 0xFF;
|
||||
if (useMask == 0) {
|
||||
errorFatal("malformed armor.xml file: constraint has unknown class %s",
|
||||
error("malformed armor.xml file: constraint has unknown class %s",
|
||||
i->getString("class").c_str());
|
||||
}
|
||||
if (i->getBool("canuse"))
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "ultima/ultima4/game/player.h"
|
||||
#include "ultima/ultima4/controllers/combat_controller.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/filesys/savegame.h"
|
||||
@ -918,7 +917,7 @@ Creature *CreatureMgr::getByTile(MapTile tile) {
|
||||
}
|
||||
|
||||
// if (tile.id)
|
||||
// errorWarning("Did not find creature for tile %d", tile.id);
|
||||
// warning("Did not find creature for tile %d", tile.id);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -974,8 +973,6 @@ Creature *CreatureMgr::randomForTile(const Tile *tile) {
|
||||
}
|
||||
|
||||
Creature *CreatureMgr::randomForDungeon(int dngLevel) {
|
||||
// Based on u4dos observations, see:
|
||||
// https://sourceforge.net/p/xu4/patches/37/
|
||||
int adjustedDngLevel = dngLevel + 1;
|
||||
size_t range = adjustedDngLevel < 5 ? 3 : 4;
|
||||
CreatureId monster = STORM_ID + adjustedDngLevel + xu4_random(range);
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "ultima/ultima4/conversation/conversation.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/debugger.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/game/menu.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
#include "ultima/ultima4/game/textview.h"
|
||||
|
||||
@ -235,7 +234,7 @@ void Menu::activateItem(int id, MenuEvent::Type action) {
|
||||
else mi = *getCurrent();
|
||||
|
||||
if (!mi)
|
||||
errorFatal("Error: Unable to find menu item with id '%d'", id);
|
||||
error("Error: Unable to find menu item with id '%d'", id);
|
||||
|
||||
/* make sure the action given will activate the menu item */
|
||||
if (mi->getClosesMenu())
|
||||
|
@ -20,7 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/game/menu.h"
|
||||
#include "ultima/ultima4/game/menuitem.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
@ -148,7 +147,7 @@ void StringMenuItem::activate(MenuEvent &event) {
|
||||
find(_validSettings.begin(), _validSettings.end(), *_val);
|
||||
|
||||
if (current == _validSettings.end())
|
||||
errorFatal("Error: menu Common::String '%s' not a valid choice", _val->c_str());
|
||||
error("Error: menu Common::String '%s' not a valid choice", _val->c_str());
|
||||
|
||||
if (event.getType() == MenuEvent::INCREMENT || event.getType() == MenuEvent::ACTIVATE) {
|
||||
/* move to the next valid choice, wrapping if necessary */
|
||||
|
@ -20,7 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/coords.h"
|
||||
#include "ultima/ultima4/game/moongate.h"
|
||||
#include "ultima/ultima4/core/types.h"
|
||||
@ -35,7 +34,7 @@ MoongateList gates;
|
||||
|
||||
void moongateAdd(int phase, const Coords &coords) {
|
||||
if (gates.contains(phase))
|
||||
errorFatal("Error: A moongate for phase %d already exists", phase);
|
||||
error("Error: A moongate for phase %d already exists", phase);
|
||||
|
||||
gates[phase] = coords;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "ultima/ultima4/game/context.h"
|
||||
#include "ultima/ultima4/controllers/inn_controller.h"
|
||||
#include "ultima/ultima4/conversation/conversation.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
@ -244,8 +243,8 @@ bool Script::load(const Common::String &filename, const Common::String &baseId,
|
||||
debug("\n<Loaded subscript '%s' where id='%s' for script '%s'>\n", subNodeName.c_str(), subNodeId.c_str(), baseId.c_str());
|
||||
} else {
|
||||
if (subNodeName.empty())
|
||||
errorFatal("Couldn't find script '%s' in %s", baseId.c_str(), filename.c_str());
|
||||
else errorFatal("Couldn't find subscript '%s' where id='%s' in script '%s' in %s", subNodeName.c_str(), subNodeId.c_str(), baseId.c_str(), filename.c_str());
|
||||
error("Couldn't find script '%s' in %s", baseId.c_str(), filename.c_str());
|
||||
else error("Couldn't find subscript '%s' where id='%s' in script '%s' in %s", subNodeName.c_str(), subNodeId.c_str(), baseId.c_str(), filename.c_str());
|
||||
}
|
||||
|
||||
_state = STATE_UNLOADED;
|
||||
@ -273,7 +272,7 @@ void Script::run(const Common::String &script) {
|
||||
scriptNode = find(_scriptNode, script, search_id);
|
||||
|
||||
if (!scriptNode)
|
||||
errorFatal("Script '%s' not found in vendorScript.xml", script.c_str());
|
||||
error("Script '%s' not found in vendorScript.xml", script.c_str());
|
||||
|
||||
execute(scriptNode);
|
||||
}
|
||||
@ -535,7 +534,7 @@ void Script::translate(Common::String *text) {
|
||||
close = current.findFirstOf("}");
|
||||
|
||||
if (close == current.size())
|
||||
errorFatal("Error: no closing } found in script.");
|
||||
error("Error: no closing } found in script.");
|
||||
|
||||
if (open < close) {
|
||||
num_embedded++;
|
||||
@ -682,7 +681,7 @@ void Script::translate(Common::String *text) {
|
||||
/* perform the <math> function on the content */
|
||||
if (funcName == "math") {
|
||||
if (content.empty())
|
||||
errorWarning("Error: empty math() function");
|
||||
warning("Error: empty math() function");
|
||||
|
||||
prop = xu4_to_string(mathValue(content));
|
||||
}
|
||||
@ -897,7 +896,7 @@ Script::ReturnCode Script::redirect(Shared::XMLNode *script, Shared::XMLNode *cu
|
||||
|
||||
Shared::XMLNode *newScript = find(_scriptNode, target, search_id);
|
||||
if (!newScript)
|
||||
errorFatal("Error: redirect failed -- could not find target script '%s' with %s=\"%s\"", target.c_str(), _idPropName.c_str(), search_id.c_str());
|
||||
error("Error: redirect failed -- could not find target script '%s' with %s=\"%s\"", target.c_str(), _idPropName.c_str(), search_id.c_str());
|
||||
|
||||
if (_debug) {
|
||||
debugN("Redirected to <%s", target.c_str());
|
||||
@ -916,7 +915,7 @@ Script::ReturnCode Script::include(Shared::XMLNode *script, Shared::XMLNode *cur
|
||||
|
||||
Shared::XMLNode *newScript = find(_scriptNode, scriptName, id);
|
||||
if (!newScript)
|
||||
errorFatal("Error: include failed -- could not find target script '%s' with %s=\"%s\"", scriptName.c_str(), _idPropName.c_str(), id.c_str());
|
||||
error("Error: include failed -- could not find target script '%s' with %s=\"%s\"", scriptName.c_str(), _idPropName.c_str(), id.c_str());
|
||||
|
||||
if (_debug) {
|
||||
debugN("Included script <%s", scriptName.c_str());
|
||||
@ -1020,7 +1019,7 @@ Script::ReturnCode Script::pay(Shared::XMLNode *script, Shared::XMLNode *current
|
||||
Common::String cantpay = getPropAsStr(current, "cantpay");
|
||||
|
||||
if (price < 0)
|
||||
errorFatal("Error: could not find price for item");
|
||||
error("Error: could not find price for item");
|
||||
|
||||
if (_debug) {
|
||||
debug("Pay: price(%d) quantity(%d)", price, quant);
|
||||
@ -1168,7 +1167,7 @@ Script::ReturnCode Script::add(Shared::XMLNode *script, Shared::XMLNode *current
|
||||
g_context->_party->notifyOfChange(0, PartyEvent::INVENTORY_ADDED);
|
||||
g_context->_stats->resetReagentsMenu();
|
||||
} else {
|
||||
errorWarning("Error: reagent '%s' not found", subtype.c_str());
|
||||
warning("Error: reagent '%s' not found", subtype.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1450,7 +1449,7 @@ int Script::math(int lval, int rval, Common::String &op) {
|
||||
else if (op == "<=")
|
||||
return lval <= rval;
|
||||
else
|
||||
errorFatal("Error: invalid 'math' operation attempted in vendorScript.xml");
|
||||
error("Error: invalid 'math' operation attempted in vendorScript.xml");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1529,7 +1528,7 @@ void Script::funcParse(const Common::String &str, Common::String *funcName, Comm
|
||||
*contents = str.substr(pos + 1);
|
||||
pos = contents->findFirstOf(")");
|
||||
if (pos >= contents->size())
|
||||
errorWarning("Error: No closing ) in function %s()", funcName->c_str());
|
||||
warning("Error: No closing ) in function %s()", funcName->c_str());
|
||||
else
|
||||
*contents = contents->substr(0, pos);
|
||||
} else {
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ultima/ultima4/game/weapon.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/game/names.h"
|
||||
|
||||
namespace Ultima {
|
||||
@ -84,7 +83,7 @@ Weapon::Weapon(const ConfigElement &conf)
|
||||
_flags |= WEAP_ABSOLUTERANGE;
|
||||
}
|
||||
if (range.empty())
|
||||
errorFatal("malformed weapons.xml file: range or absolute_range not found for weapon %s", _name.c_str());
|
||||
error("malformed weapons.xml file: range or absolute_range not found for weapon %s", _name.c_str());
|
||||
|
||||
_range = atoi(range.c_str());
|
||||
|
||||
@ -122,7 +121,7 @@ Weapon::Weapon(const ConfigElement &conf)
|
||||
if (mask == 0 && scumm_stricmp(i->getString("class").c_str(), "all") == 0)
|
||||
mask = 0xFF;
|
||||
if (mask == 0) {
|
||||
errorFatal("malformed weapons.xml file: constraint has unknown class %s",
|
||||
error("malformed weapons.xml file: constraint has unknown class %s",
|
||||
i->getString("class").c_str());
|
||||
}
|
||||
if (i->getBool("canuse"))
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "ultima/ultima4/gfx/image.h"
|
||||
#include "ultima/ultima4/gfx/screen.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/shared/std/containers.h"
|
||||
#include "ultima/shared/std/misc.h"
|
||||
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/gfx/image.h"
|
||||
#include "ultima/ultima4/gfx/imageloader.h"
|
||||
@ -35,7 +34,7 @@ using Std::vector;
|
||||
|
||||
Image *FMTOWNSImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (width == -1 || height == -1 || bpp == -1) {
|
||||
errorFatal("dimensions not set for fmtowns image");
|
||||
error("dimensions not set for fmtowns image");
|
||||
}
|
||||
|
||||
ASSERT((bpp == 16) | (bpp == 4), "invalid bpp: %d", bpp);
|
||||
@ -49,7 +48,7 @@ Image *FMTOWNSImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (rawLen < requiredLength) {
|
||||
if (raw)
|
||||
free(raw);
|
||||
errorWarning("FMTOWNS Image of size %d does not fit anticipated size %d", rawLen, requiredLength);
|
||||
warning("FMTOWNS Image of size %d does not fit anticipated size %d", rawLen, requiredLength);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -65,7 +64,7 @@ Image *FMTOWNSImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
image->setPalette(pal.loadEgaPalette(), 16);
|
||||
setFromRawData(image, width, height, bpp, raw);
|
||||
// if (width % 2)
|
||||
// errorFatal("FMTOWNS 4bit images cannot handle widths not divisible by 2!");
|
||||
// error("FMTOWNS 4bit images cannot handle widths not divisible by 2!");
|
||||
// byte nibble_mask = 0x0F;
|
||||
// for (int y = 0; y < height; y++)
|
||||
// {
|
||||
|
@ -20,7 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/gfx/image.h"
|
||||
#include "ultima/ultima4/gfx/imageloader.h"
|
||||
#include "ultima/ultima4/gfx/imageloader_png.h"
|
||||
@ -32,7 +31,7 @@ namespace Ultima4 {
|
||||
|
||||
Image *PngImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (width != -1 || height != -1 || bpp != -1) {
|
||||
errorWarning("dimensions set for PNG image, will be ignored");
|
||||
warning("dimensions set for PNG image, will be ignored");
|
||||
}
|
||||
|
||||
size_t fileSize = file->length();
|
||||
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/core/lzw/u4decode.h"
|
||||
#include "ultima/ultima4/gfx/image.h"
|
||||
@ -40,7 +39,7 @@ RGBA *U4PaletteLoader::_vgaPalette = nullptr;
|
||||
|
||||
Image *U4RawImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (width == -1 || height == -1 || bpp == -1) {
|
||||
errorFatal("dimensions not set for u4raw image");
|
||||
error("dimensions not set for u4raw image");
|
||||
}
|
||||
|
||||
ASSERT(bpp == 1 || bpp == 4 || bpp == 8 || bpp == 24 || bpp == 32, "invalid bpp: %d", bpp);
|
||||
@ -53,7 +52,7 @@ Image *U4RawImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (rawLen < requiredLength) {
|
||||
if (raw)
|
||||
free(raw);
|
||||
errorWarning("u4Raw Image of size %ld does not fit anticipated size %ld", rawLen, requiredLength);
|
||||
warning("u4Raw Image of size %ld does not fit anticipated size %ld", rawLen, requiredLength);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -85,7 +84,7 @@ Image *U4RawImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
*/
|
||||
Image *U4RleImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (width == -1 || height == -1 || bpp == -1) {
|
||||
errorFatal("dimensions not set for u4rle image");
|
||||
error("dimensions not set for u4rle image");
|
||||
}
|
||||
|
||||
ASSERT(bpp == 1 || bpp == 4 || bpp == 8 || bpp == 24 || bpp == 32, "invalid bpp: %d", bpp);
|
||||
@ -132,7 +131,7 @@ Image *U4RleImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
*/
|
||||
Image *U4LzwImageLoader::load(U4FILE *file, int width, int height, int bpp) {
|
||||
if (width == -1 || height == -1 || bpp == -1) {
|
||||
errorFatal("dimensions not set for u4lzw image");
|
||||
error("dimensions not set for u4lzw image");
|
||||
}
|
||||
|
||||
ASSERT(bpp == 1 || bpp == 4 || bpp == 8 || bpp == 24 || bpp == 32, "invalid bpp: %d", bpp);
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "ultima/ultima4/gfx/imagemgr.h"
|
||||
#include "ultima/ultima4/controllers/intro_controller.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/filesys/u4file.h"
|
||||
#include "ultima/ultima4/ultima4.h"
|
||||
@ -328,7 +327,7 @@ void ImageMgr::fixupIntro(Image *im, int prescale) {
|
||||
ImageInfo *borderInfo = imageMgr->get(BKGD_BORDERS, true);
|
||||
// ImageInfo *charsetInfo = imageMgr->get(BKGD_CHARSET);
|
||||
if (!borderInfo)
|
||||
errorFatal("ERROR 1001: Unable to load the \"%s\" data file.\t\n\nIs %s installed?\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", BKGD_BORDERS, settings._game.c_str());
|
||||
error("ERROR 1001: Unable to load the \"%s\" data file", BKGD_BORDERS);
|
||||
|
||||
delete borderInfo->_image;
|
||||
borderInfo->_image = nullptr;
|
||||
@ -496,7 +495,7 @@ ImageInfo *ImageMgr::getInfoFromSet(const Common::String &name, ImageSet *images
|
||||
return getInfoFromSet(name, imageset);
|
||||
}
|
||||
|
||||
//errorWarning("Searched recursively from imageset %s through to %s and couldn't find %s", baseSet->name.c_str(), imageset->name.c_str(), name.c_str());
|
||||
//warning("Searched recursively from imageset %s through to %s and couldn't find %s", baseSet->name.c_str(), imageset->name.c_str(), name.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -570,7 +569,7 @@ ImageInfo *ImageMgr::get(const Common::String &name, bool returnUnscaled) {
|
||||
Common::String filetype = info->_filetype;
|
||||
ImageLoader *loader = g_ultima->_imageLoaders->getLoader(filetype);
|
||||
if (loader == nullptr)
|
||||
errorWarning("can't find loader to load image \"%s\" with type \"%s\"", info->_filename.c_str(), filetype.c_str());
|
||||
warning("can't find loader to load image \"%s\" with type \"%s\"", info->_filename.c_str(), filetype.c_str());
|
||||
else {
|
||||
unscaled = loader->load(file, info->_width, info->_height, info->_depth);
|
||||
if (info->_width == -1) {
|
||||
@ -582,7 +581,7 @@ ImageInfo *ImageMgr::get(const Common::String &name, bool returnUnscaled) {
|
||||
}
|
||||
u4fclose(file);
|
||||
} else {
|
||||
errorWarning("Failed to open file %s for reading.", info->_filename.c_str());
|
||||
warning("Failed to open file %s for reading.", info->_filename.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -643,7 +642,7 @@ ImageInfo *ImageMgr::get(const Common::String &name, bool returnUnscaled) {
|
||||
int orig_scale = settings._scale;
|
||||
settings._scale = info->_prescale;
|
||||
settings.write();
|
||||
errorFatal("image %s is prescaled to an incompatible size: %d\nResetting the scale to %d. Sorry about the inconvenience, please restart.", info->_filename.c_str(), orig_scale, settings._scale);
|
||||
error("image %s is prescaled to an incompatible size: %d\nResetting the scale to %d. Sorry about the inconvenience, please restart.", info->_filename.c_str(), orig_scale, settings._scale);
|
||||
}
|
||||
imageScale /= info->_prescale;
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/gfx/image.h"
|
||||
#include "ultima/ultima4/gfx/imagemgr.h"
|
||||
#include "ultima/ultima4/gfx/imageview.h"
|
||||
@ -56,7 +55,7 @@ void ImageView::draw(const Common::String &imageName, int x, int y) {
|
||||
}
|
||||
}
|
||||
|
||||
errorFatal("ERROR 1005: Unable to load the image \"%s\"", imageName.c_str());
|
||||
error("ERROR 1005: Unable to load the image \"%s\"", imageName.c_str());
|
||||
}
|
||||
|
||||
} // End of namespace Ultima4
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ultima/ultima4/controllers/intro_controller.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
@ -61,7 +60,7 @@ Screen::Screen() : _filterScaler(nullptr), _currentMouseCursor(-1),
|
||||
_continueScreenRefresh(true) {
|
||||
g_screen = this;
|
||||
Common::fill(&_mouseCursors[0], &_mouseCursors[5], (MouseCursorSurface *)nullptr);
|
||||
Common::fill(&_los[0][0], &_los[VIEWPORT_W][0], 0);
|
||||
Common::fill(&_los[0][0], &_los[0][0] + (VIEWPORT_W * VIEWPORT_H), 0);
|
||||
|
||||
Graphics::PixelFormat SCREEN_FORMAT(2, 5, 6, 5, 0, 11, 5, 0, 0);
|
||||
Common::Point size(SCREEN_WIDTH * settings._scale, SCREEN_HEIGHT * settings._scale);
|
||||
@ -110,7 +109,7 @@ void Screen::init() {
|
||||
_tileAnims = set;
|
||||
}
|
||||
if (!_tileAnims)
|
||||
errorFatal("unable to find tile animations for \"%s\" video mode in graphics.xml", settings._videoType.c_str());
|
||||
error("unable to find tile animations for \"%s\" video mode in graphics.xml", settings._videoType.c_str());
|
||||
|
||||
_dungeonTileChars.clear();
|
||||
_dungeonTileChars["brick_floor"] = CHARSET_FLOOR;
|
||||
@ -161,7 +160,7 @@ void Screen::loadMouseCursors() {
|
||||
|
||||
_filterScaler = scalerGet(settings._filter);
|
||||
if (!_filterScaler)
|
||||
errorFatal("%s is not a valid filter", settings._filter.c_str());
|
||||
error("%s is not a valid filter", settings._filter.c_str());
|
||||
}
|
||||
|
||||
void Screen::setMouseCursor(MouseCursor cursor) {
|
||||
@ -212,7 +211,7 @@ MouseCursorSurface *Screen::loadMouseCursor(Shared::File &src) {
|
||||
|
||||
// Read in the hotspot position
|
||||
line = src.readLine();
|
||||
sscanf(line.c_str(), "%d,%d", &hotX, &hotY);
|
||||
(void)sscanf(line.c_str(), "%d,%d", &hotX, &hotY);
|
||||
c->_hotspot.x = hotX;
|
||||
c->_hotspot.y = hotY;
|
||||
|
||||
@ -370,7 +369,7 @@ void Screen::screenLoadGraphicsFromConf() {
|
||||
}
|
||||
}
|
||||
if (!_gemLayout)
|
||||
errorFatal("no gem layout named %s found!\n", settings._gemLayout.c_str());
|
||||
error("no gem layout named %s found!\n", settings._gemLayout.c_str());
|
||||
}
|
||||
|
||||
Layout *Screen::screenLoadLayoutFromConf(const ConfigElement &conf) {
|
||||
@ -524,7 +523,7 @@ void Screen::screenDrawImage(const Common::String &name, int x, int y) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
errorFatal("ERROR 1006: Unable to load the image \"%s\".\t\n\nIs %s installed?\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", name.c_str(), settings._game.c_str());
|
||||
error("ERROR 1006: Unable to load the image \"%s\"", name.c_str());
|
||||
}
|
||||
|
||||
void Screen::screenDrawImageInMapArea(const Common::String &name) {
|
||||
@ -532,19 +531,19 @@ void Screen::screenDrawImageInMapArea(const Common::String &name) {
|
||||
|
||||
info = imageMgr->get(name);
|
||||
if (!info)
|
||||
errorFatal("ERROR 1004: Unable to load data files.\t\n\nIs %s installed?\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", settings._game.c_str());
|
||||
error("ERROR 1004: Unable to load data files");
|
||||
|
||||
info->_image->drawSubRect(BORDER_WIDTH * settings._scale, BORDER_HEIGHT * settings._scale,
|
||||
BORDER_WIDTH * settings._scale, BORDER_HEIGHT * settings._scale,
|
||||
VIEWPORT_W * TILE_WIDTH * settings._scale,
|
||||
VIEWPORT_H * TILE_HEIGHT * settings._scale);
|
||||
BORDER_WIDTH * settings._scale, BORDER_HEIGHT * settings._scale,
|
||||
VIEWPORT_W * TILE_WIDTH * settings._scale,
|
||||
VIEWPORT_H * TILE_HEIGHT * settings._scale);
|
||||
}
|
||||
|
||||
void Screen::screenTextColor(int color) {
|
||||
if (_charSetInfo == nullptr) {
|
||||
_charSetInfo = imageMgr->get(BKGD_CHARSET);
|
||||
if (!_charSetInfo)
|
||||
errorFatal("ERROR 1003: Unable to load the \"%s\" data file.\t\n\nIs %s installed?\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", BKGD_CHARSET, settings._game.c_str());
|
||||
error("ERROR 1003: Unable to load the \"%s\" data file", BKGD_CHARSET);
|
||||
}
|
||||
|
||||
if (!settings._enhancements || !settings._enhancementsOptions._textColorization) {
|
||||
@ -715,7 +714,7 @@ void Screen::screenFindLineOfSight(Std::vector <MapTile> viewportTiles[VIEWPORT_
|
||||
else if (settings._lineOfSight == "Enhanced")
|
||||
screenFindLineOfSightEnhanced(viewportTiles);
|
||||
else
|
||||
errorFatal("unknown line of sight style %s!\n", settings._lineOfSight.c_str());
|
||||
error("unknown line of sight style %s!\n", settings._lineOfSight.c_str());
|
||||
}
|
||||
|
||||
void Screen::screenFindLineOfSightDOS(Std::vector <MapTile> viewportTiles[VIEWPORT_W][VIEWPORT_H]) {
|
||||
@ -1181,7 +1180,7 @@ void Screen::screenShowGemTile(Layout *layout, Map *map, MapTile &t, bool focus,
|
||||
if (_gemTilesInfo == nullptr) {
|
||||
_gemTilesInfo = imageMgr->get(BKGD_GEMTILES);
|
||||
if (!_gemTilesInfo)
|
||||
errorFatal("ERROR 1002: Unable to load the \"%s\" data file.\t\n\nIs %s installed?\n\nVisit the XU4 website for additional information.\n\thttp://xu4.sourceforge.net/", BKGD_GEMTILES, settings._game.c_str());
|
||||
error("ERROR 1002: Unable to load the \"%s\" data file", BKGD_GEMTILES);
|
||||
}
|
||||
|
||||
if (tile < 128) {
|
||||
@ -1211,7 +1210,7 @@ Layout *Screen::screenGetGemLayout(const Map *map) {
|
||||
if (layout->_type == LAYOUT_DUNGEONGEM)
|
||||
return layout;
|
||||
}
|
||||
errorFatal("no dungeon gem layout found!\n");
|
||||
error("no dungeon gem layout found!\n");
|
||||
return nullptr;
|
||||
} else
|
||||
return _gemLayout;
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ultima/ultima4/map/annotation.h"
|
||||
#include "ultima/ultima4/game/context.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
#include "ultima/ultima4/map/map.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "ultima/ultima4/map/tileanim.h"
|
||||
#include "ultima/ultima4/map/tileset.h"
|
||||
#include "ultima/ultima4/ultima4.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/shared/std/misc.h"
|
||||
|
||||
namespace Ultima {
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "ultima/ultima4/conversation/conversation.h"
|
||||
#include "ultima/ultima4/conversation/dialogueloader.h"
|
||||
#include "ultima/ultima4/map/dungeon.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/filesys/filesystem.h"
|
||||
#include "ultima/ultima4/map/map.h"
|
||||
#include "ultima/ultima4/map/maploader.h"
|
||||
@ -66,7 +65,7 @@ MapLoader *MapLoader::registerLoader(MapLoader *loader, Map::Type type) {
|
||||
loaderMap = new Std::map<Map::Type, MapLoader *, MapType_Hash>();
|
||||
|
||||
if (loaderMap->find(type) != loaderMap->end())
|
||||
errorFatal("map loader already registered for type %d", type);
|
||||
error("map loader already registered for type %d", type);
|
||||
|
||||
(*loaderMap)[type] = loader;
|
||||
return loader;
|
||||
@ -138,7 +137,7 @@ bool CityMapLoader::load(Map *map) {
|
||||
U4FILE *ult = u4fopen(city->_fname);
|
||||
U4FILE *tlk = u4fopen(city->_tlkFname);
|
||||
if (!ult || !tlk)
|
||||
errorFatal("unable to load map data");
|
||||
error("unable to load map data");
|
||||
|
||||
/* the map must be 32x32 to be read from an .ULT file */
|
||||
ASSERT(city->_width == CITY_WIDTH, "map width is %d, should be %d", city->_width, CITY_WIDTH);
|
||||
@ -250,7 +249,7 @@ bool ConMapLoader::load(Map *map) {
|
||||
|
||||
U4FILE *con = u4fopen(map->_fname);
|
||||
if (!con)
|
||||
errorFatal("unable to load map data");
|
||||
error("unable to load map data");
|
||||
|
||||
/* the map must be 11x11 to be read from an .CON file */
|
||||
ASSERT(map->_width == CON_WIDTH, "map width is %d, should be %d", map->_width, CON_WIDTH);
|
||||
@ -287,7 +286,7 @@ bool DngMapLoader::load(Map *map) {
|
||||
|
||||
U4FILE *dng = u4fopen(dungeon->_fname);
|
||||
if (!dng)
|
||||
errorFatal("unable to load map data");
|
||||
error("unable to load map data");
|
||||
|
||||
/* the map must be 11x11 to be read from an .CON file */
|
||||
ASSERT(dungeon->_width == DNG_WIDTH, "map width is %d, should be %d", dungeon->_width, DNG_WIDTH);
|
||||
@ -439,7 +438,7 @@ void DngMapLoader::initDungeonRoom(Dungeon *dng, int room) {
|
||||
bool WorldMapLoader::load(Map *map) {
|
||||
U4FILE *world = u4fopen(map->_fname);
|
||||
if (!world)
|
||||
errorFatal("unable to load map data");
|
||||
error("unable to load map data");
|
||||
|
||||
if (!loadData(map, world))
|
||||
return false;
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "ultima/ultima4/map/city.h"
|
||||
#include "ultima/ultima4/controllers/combat_controller.h"
|
||||
#include "ultima/ultima4/map/dungeon.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/map/map.h"
|
||||
#include "ultima/ultima4/map/maploader.h"
|
||||
#include "ultima/ultima4/map/mapmgr.h"
|
||||
@ -133,7 +132,7 @@ Map *MapMgr::get(MapId id) {
|
||||
if (!_mapList[id]->_data.size()) {
|
||||
MapLoader *loader = MapLoader::getLoader(_mapList[id]->_type);
|
||||
if (loader == nullptr)
|
||||
errorFatal("can't load map of type \"%d\"", _mapList[id]->_type);
|
||||
error("can't load map of type \"%d\"", _mapList[id]->_type);
|
||||
|
||||
loader->load(_mapList[id]);
|
||||
}
|
||||
@ -145,7 +144,7 @@ void MapMgr::registerMap(Map *map) {
|
||||
_mapList.resize(map->_id + 1, nullptr);
|
||||
|
||||
if (_mapList[map->_id] != nullptr)
|
||||
errorFatal("Error: A map with id '%d' already exists", map->_id);
|
||||
error("Error: A map with id '%d' already exists", map->_id);
|
||||
|
||||
_mapList[map->_id] = map;
|
||||
}
|
||||
@ -278,7 +277,7 @@ Portal *MapMgr::initPortalFromConf(const ConfigElement &portalConf) {
|
||||
else if (prop == "exit_west")
|
||||
portal->_triggerAction = ACTION_EXIT_WEST;
|
||||
else
|
||||
errorFatal("unknown trigger_action: %s", prop.c_str());
|
||||
error("unknown trigger_action: %s", prop.c_str());
|
||||
|
||||
prop = portalConf.getString("condition");
|
||||
if (!prop.empty()) {
|
||||
@ -287,7 +286,7 @@ Portal *MapMgr::initPortalFromConf(const ConfigElement &portalConf) {
|
||||
else if (prop == "abyss")
|
||||
portal->_portalConditionsMet = &isAbyssOpened;
|
||||
else
|
||||
errorFatal("unknown portalConditionsMet: %s", prop.c_str());
|
||||
error("unknown portalConditionsMet: %s", prop.c_str());
|
||||
}
|
||||
|
||||
portal->_saveLocation = portalConf.getBool("savelocation");
|
||||
@ -300,7 +299,7 @@ Portal *MapMgr::initPortalFromConf(const ConfigElement &portalConf) {
|
||||
else if (prop == "footorhorse")
|
||||
portal->_portalTransportRequisites = TRANSPORT_FOOT_OR_HORSE;
|
||||
else
|
||||
errorFatal("unknown transport: %s", prop.c_str());
|
||||
error("unknown transport: %s", prop.c_str());
|
||||
|
||||
portal->_exitPortal = portalConf.getBool("exits");
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/game/context.h"
|
||||
#include "ultima/ultima4/game/creature.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/gfx/image.h"
|
||||
#include "ultima/ultima4/gfx/imagemgr.h"
|
||||
#include "ultima/ultima4/gfx/screen.h"
|
||||
@ -100,7 +99,7 @@ void Tile::loadProperties(const ConfigElement &conf) {
|
||||
if (conf.exists("directions")) {
|
||||
Common::String dirs = conf.getString("directions");
|
||||
if (dirs.size() != (unsigned) _frames)
|
||||
errorFatal("Error: %ld directions for tile but only %d frames", (long) dirs.size(), _frames);
|
||||
error("Error: %ld directions for tile but only %d frames", (long) dirs.size(), _frames);
|
||||
for (unsigned i = 0; i < dirs.size(); i++) {
|
||||
if (dirs[i] == 'w')
|
||||
_directions.push_back(DIR_WEST);
|
||||
@ -111,7 +110,7 @@ void Tile::loadProperties(const ConfigElement &conf) {
|
||||
else if (dirs[i] == 's')
|
||||
_directions.push_back(DIR_SOUTH);
|
||||
else
|
||||
errorFatal("Error: unknown direction specified by %c", dirs[i]);
|
||||
error("Error: unknown direction specified by %c", dirs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,7 +134,7 @@ void Tile::loadImage() {
|
||||
info = imageMgr->get(subimage->_srcImageName);
|
||||
}
|
||||
if (!info) { //IF still no info loaded
|
||||
errorWarning("Error: couldn't load image for tile '%s'", _name.c_str());
|
||||
warning("Error: couldn't load image for tile '%s'", _name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -173,7 +172,7 @@ void Tile::loadImage() {
|
||||
if (g_screen->_tileAnims)
|
||||
_anim = g_screen->_tileAnims->getByName(_animationRule);
|
||||
if (_anim == nullptr)
|
||||
errorWarning("Warning: animation style '%s' not found", _animationRule.c_str());
|
||||
warning("Warning: animation style '%s' not found", _animationRule.c_str());
|
||||
}
|
||||
|
||||
/* if we have animations, we always used 'animated' to draw from */
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "ultima/ultima4/map/tilemap.h"
|
||||
#include "ultima/ultima4/map/tile.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/map/tileset.h"
|
||||
|
||||
namespace Ultima {
|
||||
@ -91,7 +90,7 @@ void TileMap::load(const ConfigElement &tilemapConf) {
|
||||
/* find the tile this references */
|
||||
Tile *t = Tileset::get(tileset)->getByName(tile);
|
||||
if (!t)
|
||||
errorFatal("Error: tile '%s' from '%s' was not found in tileset %s", tile.c_str(), name.c_str(), tileset.c_str());
|
||||
error("Error: tile '%s' from '%s' was not found in tileset %s", tile.c_str(), name.c_str(), tileset.c_str());
|
||||
|
||||
if (i->exists("index"))
|
||||
index = i->getInt("index");
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ultima/ultima4/map/tileset.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/gfx/screen.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/map/tile.h"
|
||||
@ -56,7 +55,7 @@ void TileRule::load() {
|
||||
}
|
||||
|
||||
if (TileRule::findByName("default") == nullptr)
|
||||
errorFatal("no 'default' rule found in tile rules");
|
||||
error("no 'default' rule found in tile rules");
|
||||
}
|
||||
|
||||
bool TileRule::initFromConf(const ConfigElement &conf) {
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "ultima/ultima4/map/tileset.h"
|
||||
#include "ultima/ultima4/map/tileview.h"
|
||||
#include "ultima/ultima4/ultima4.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima4 {
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "ultima/ultima4/sound/music.h"
|
||||
#include "ultima/ultima4/sound/sound.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
@ -280,14 +279,14 @@ void Music::setMusicVolume_sys(int volume) {
|
||||
void Music::fadeIn_sys(int msecs, bool loadFromMap) {
|
||||
#ifdef TODO
|
||||
if (Mix_FadeInMusic(playing, NLOOPS, msecs) == -1)
|
||||
errorWarning("Mix_FadeInMusic: %s\n", Mix_GetError());
|
||||
warning("Mix_FadeInMusic: %s\n", Mix_GetError());
|
||||
#endif
|
||||
}
|
||||
|
||||
void Music::fadeOut_sys(int msecs) {
|
||||
#ifdef TODO
|
||||
if (Mix_FadeOutMusic(msecs) == -1)
|
||||
errorWarning("Mix_FadeOutMusic: %s\n", Mix_GetError());
|
||||
warning("Mix_FadeOutMusic: %s\n", Mix_GetError());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "ultima/ultima4/sound/sound.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/sound/music.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "ultima/ultima4/sound/sound_p.h"
|
||||
#include "ultima/ultima4/sound/sound.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/sound/music.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/filesys/u4file.h"
|
||||
@ -35,7 +34,7 @@ bool SoundManager::load_sys(Sound sound, const Common::String &pathname) {
|
||||
#ifdef TODO
|
||||
soundChunk[sound] = Mix_LoadWAV(pathname.c_str());
|
||||
if (!soundChunk[sound]) {
|
||||
errorWarning("Unable to load sound effect file %s: %s", soundFilenames[sound].c_str(), Mix_GetError());
|
||||
warning("Unable to load sound effect file %s: %s", soundFilenames[sound].c_str(), Mix_GetError());
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "ultima/ultima4/conversation/dialogueloader.h"
|
||||
#include "ultima/ultima4/core/config.h"
|
||||
#include "ultima/ultima4/core/debugger.h"
|
||||
#include "ultima/ultima4/core/error.h"
|
||||
#include "ultima/ultima4/core/settings.h"
|
||||
#include "ultima/ultima4/core/utils.h"
|
||||
#include "ultima/ultima4/events/event.h"
|
||||
|
Loading…
Reference in New Issue
Block a user