aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-20 13:25:37 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitd97a8905cc18ccf9d036f7708d8e2cf8dfba6067 (patch)
tree335e7a51be994e20af51d92413b7e56c968cbb69 /engines
parentca267da97c14268f8c650d7dac727182062129d0 (diff)
downloadscummvm-rg350-d97a8905cc18ccf9d036f7708d8e2cf8dfba6067.tar.gz
scummvm-rg350-d97a8905cc18ccf9d036f7708d8e2cf8dfba6067.tar.bz2
scummvm-rg350-d97a8905cc18ccf9d036f7708d8e2cf8dfba6067.zip
DM: Remove some warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/champion.cpp2
-rw-r--r--engines/dm/dm.cpp10
-rw-r--r--engines/dm/dm.h8
-rw-r--r--engines/dm/eventman.cpp11
-rw-r--r--engines/dm/gfx.cpp6
-rw-r--r--engines/dm/group.cpp7
-rw-r--r--engines/dm/group.h1
-rw-r--r--engines/dm/inventory.cpp4
-rw-r--r--engines/dm/loadsave.cpp8
-rw-r--r--engines/dm/menus.cpp1
10 files changed, 8 insertions, 50 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 2af6889a05..6359f42ce5 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -1449,7 +1449,6 @@ void ChampionMan::f319_championKill(uint16 champIndex) {
if (_vm->M0_indexToOrdinal(curChampionIconIndex) == _vm->_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap) {
_vm->_eventMan->_g598_mousePointerBitmapUpdated = true;
_vm->_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap = _vm->M0_indexToOrdinal(kM1_ChampionNone);
- warning(false, "IGNORED CODE:G0592_B_BuildMousePointerScreenAreaRequested = true");
}
if (curChampion->_poisonEventCount)
@@ -2052,7 +2051,6 @@ uint16 ChampionMan::f306_getStaminaAdjustedValue(Champion *champ, int16 val) {
int16 currStamina = champ->_currStamina;
int16 halfMaxStamina = champ->_maxStamina / 2;
if (currStamina < halfMaxStamina) {
- warning(false, "Possible undefined behavior in the original code");
val /= 2;
return val + ((uint32)val * (uint32)currStamina) / halfMaxStamina;
}
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 43f9c27580..bdbbb1b89d 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -147,16 +147,6 @@ int16 M38_distance(int16 mapx1, int16 mapy1, int16 mapx2, int16 mapy2) {
}
DMEngine::DMEngine(OSystem *syst, const ADGameDescription *desc) : Engine(syst), _console(nullptr), _gameVersion(desc) {
-// Do not load data files
-// Do not initialize graphics here
-// Do not initialize audio devices here
-// Do these from run
-
-//Specify all default directories
-//const Common::FSNode gameDataDir(ConfMan.get("example"));
-//SearchMan.addSubDirectoryMatching(gameDataDir, "example2");
- DebugMan.addDebugChannel(kDMDebugExample, "example", "example desc");
-
// register random source
_rnd = new Common::RandomSource("dm");
diff --git a/engines/dm/dm.h b/engines/dm/dm.h
index edc54c17b3..20b7bf8f29 100644
--- a/engines/dm/dm.h
+++ b/engines/dm/dm.h
@@ -166,14 +166,6 @@ enum Cell {
#define k255_mapIndexEntrance 255 // @ C255_MAP_INDEX_ENTRANCE
-enum {
- // engine debug channels
- kDMDebugExample = 1 << 0,
- kDMDebugUselessCode = 1 << 1,
- kDMDebugOftenCalledWarning = 2 << 2
-};
-
-
//TODO: Directly use CLIP
template<typename T>
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index c0e3ff282a..805e5c9fdc 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -399,14 +399,6 @@ void EventManager::f68_setPointerToObject(byte* bitmap) {
_vm->_displayMan->f129_blitToBitmapShrinkWithPalChange(bitmap, _gK190_mousePointerTempBuffer, 16, 16, 16, 16, palChangesMousePointerIcon);
_vm->_displayMan->f132_blitToBitmap(_gK190_mousePointerTempBuffer, L0051_puc_Bitmap, boxMousePointerObject, 0, 0, 8, 16, k0_ColorBlack, 16, 18);
-
- /*
- warning(false, "TODO - Call f129_blitToBitmapShrinkWithPalChange");
- // dummy code
- _vm->_displayMan->f132_blitToBitmap(bitmap, L0051_puc_Bitmap, boxMousePointerObjectShadow, 0, 0, 8, 16, kM1_ColorNoTransparency, 16, 18);
- _vm->_displayMan->f132_blitToBitmap(bitmap, L0051_puc_Bitmap, boxMousePointerObject, 0, 0, 8, 16, k0_ColorBlack, 16, 18);
- */
-
_gK100_preventBuildPointerScreenArea = false;
f73_buildpointerScreenArea(_mousePos.x, _mousePos.y);
}
@@ -464,9 +456,6 @@ void EventManager::f73_buildpointerScreenArea(int16 mousePosX, int16 mousePosY)
0x07, 0xFF, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
- // if (_gK100_preventBuildPointerScreenArea)
- // return;
-
_gK100_preventBuildPointerScreenArea = true;
if (_g599_useChampionIconOrdinalAsMousePointerBitmap) {
if ((mousePosY > 28) || (mousePosX < 274)) {
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 6060d9f3f0..07b3b61f52 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -2738,14 +2738,16 @@ bool DisplayMan::f107_isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWall
void DisplayMan::f129_blitToBitmapShrinkWithPalChange(byte *srcBitmap, byte *destBitmap,
int16 srcPixelWidth, int16 srcHeight,
int16 destPixelWidth, int16 destHeight, byte *palChange) {
+ warning(false, "DUMMY CODE: f129_blitToBitmapShrinkWithPalChange");
+ warning(false, "MISSING CODE: No palette change takes place in f129_blitToBitmapShrinkWithPalChange");
+
+
if (destPixelWidth % 8)
destPixelWidth = (destPixelWidth / 8) * 8 + 8;
uint32 scaleX = (kScaleThreshold * srcPixelWidth) / destPixelWidth;
uint32 scaleY = (kScaleThreshold * srcHeight) / destHeight;
- warning(false, "MISSING CODE: No palette change takes place in f129_blitToBitmapShrinkWithPalChange");
-
// Loop through drawing output lines
for (uint32 destY = 0, scaleYCtr = 0; destY < (uint32)destHeight; ++destY, scaleYCtr += scaleY) {
diff --git a/engines/dm/group.cpp b/engines/dm/group.cpp
index a66ca0528f..5bd4539f09 100644
--- a/engines/dm/group.cpp
+++ b/engines/dm/group.cpp
@@ -63,6 +63,7 @@ GroupMan::GroupMan(DMEngine *vm) : _vm(vm) {
_g376_maxActiveGroupCount = 60;
_g375_activeGroups = nullptr;
_g377_currActiveGroupCount = 0;
+ _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime = 0;
}
GroupMan::~GroupMan() {
@@ -1342,11 +1343,9 @@ int32 GroupMan::f179_getCreatureAspectUpdateTime(ActiveGroup *activeGroup, int16
void GroupMan::f205_setDirection(ActiveGroup *activeGroup, int16 dir, int16 creatureIndex, bool twoHalfSquareSizedCreatures) {
uint16 L0435_ui_GroupDirections;
- static int32 G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime; /* These two variables are used to prevent setting direction of half square sized creatures twice at the same game time */
static ActiveGroup *G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup;
- warning(false, "TODO: Move G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime to GroupMan so it's properly initialized");
- if (twoHalfSquareSizedCreatures && (_vm->_g313_gameTime == G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime) && (activeGroup == G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup)) {
+ if (twoHalfSquareSizedCreatures && (_vm->_g313_gameTime == _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime) && (activeGroup == G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup)) {
return;
}
if (M21_normalizeModulo4(M50_getCreatureValue(L0435_ui_GroupDirections = activeGroup->_directions, creatureIndex) - dir) == 2) { /* If current and new direction are opposites then change direction only one step at a time */
@@ -1356,7 +1355,7 @@ void GroupMan::f205_setDirection(ActiveGroup *activeGroup, int16 dir, int16 crea
}
if (twoHalfSquareSizedCreatures) {
L0435_ui_GroupDirections = f178_getGroupValueUpdatedWithCreatureValue(L0435_ui_GroupDirections, creatureIndex ^ 1, dir); /* Set direction of the second half square sized creature */
- G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime = _vm->_g313_gameTime;
+ _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime = _vm->_g313_gameTime;
G0396_ps_TwoHalfSquareSizedCreaturesGroupLastDirectionSetActiveGroup = activeGroup;
}
activeGroup->_directions = (Direction)L0435_ui_GroupDirections;
diff --git a/engines/dm/group.h b/engines/dm/group.h
index 804b562c43..8fe1eba3ef 100644
--- a/engines/dm/group.h
+++ b/engines/dm/group.h
@@ -171,6 +171,7 @@ class GroupMan {
bool _g389_groupMovementBlockedByDoor; // @ G0389_B_GroupMovementBlockedByDoor
bool _g390_groupMovementBlockedByParty; // @ G0390_B_GroupMovementBlockedByParty
bool _g387_groupMovBlockedByWallStairsPitFakeWalFluxCageTeleporter; // @ G0387_B_GroupMovementBlockedByWallStairsPitFakeWallFluxcageTeleporter
+ int32 _g395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime; // @ G0395_l_TwoHalfSquareSizedCreaturesGroupLastDirectionSetTime
public:
uint16 _g376_maxActiveGroupCount; // @ G0376_ui_MaximumActiveGroupCount
ActiveGroup *_g375_activeGroups; // @ G0375_ps_ActiveGroups
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index dc6b6a1e46..3d0415efc2 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -303,7 +303,6 @@ void InventoryMan::f334_closeChest() {
}
void InventoryMan::f340_drawPanelScrollTextLine(int16 yPos, char* text) {
- warning(false, "CHANGE5_03_IMPROVEMENT");
for (char* iter = text; *iter != '\0'; ++iter) {
if ((*iter >= 'A') && (*iter <= 'Z')) {
*iter -= 64;
@@ -330,7 +329,6 @@ void InventoryMan::f341_drawPanelScroll(Scroll* scroll) {
charRed++;
char *charGreen = charRed; // first char of the second line
while (*charGreen) {
- warning(false, "BUG0_47");
/* BUG0_47 Graphical glitch when you open a scroll. If there is a single line of text in a scroll
(with no carriage return) then charGreen points to undefined data. This may result in a graphical
glitch and also corrupt other memory. This is not an issue in the original dungeons where all
@@ -369,7 +367,6 @@ void InventoryMan::f333_openAndDrawChest(Thing thingToOpen, Container* chest, bo
if (_g426_openChest == thingToOpen)
return;
- warning(false, "CHANGE8_09_FIX");
if (_g426_openChest != Thing::_none)
f334_closeChest(); // CHANGE8_09_FIX
@@ -383,7 +380,6 @@ void InventoryMan::f333_openAndDrawChest(Thing thingToOpen, Container* chest, bo
Thing thing = chest->getSlot();
int16 thingCount = 0;
while (thing != Thing::_endOfList) {
- warning(false, "CHANGE8_08_FIX");
if (++thingCount > 8)
break; // CHANGE8_08_FIX, make sure that no more than the first 8 objects in a chest are drawn
diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp
index a84a0b6624..7857d498d2 100644
--- a/engines/dm/loadsave.cpp
+++ b/engines/dm/loadsave.cpp
@@ -79,19 +79,11 @@ LoadgameResponse DMEngine::f435_loadgame(int16 slot) {
_championMan->_g414_leaderHandObject = Thing::_none;
_g525_gameId = ((int32)getRandomNumber(65536)) * getRandomNumber(65536);
} else {
- warning(false, "MISSING CODE: missing check for matching _g525_gameId in f435_loadgame");
- /*if (_vm->_g523_restartGameRequest && (L1372_s_SaveHeader.GameID != _vm->_g525_gameId)) {
- L1367_pc_Message = G0546_pc_THATSNOTTHESAMEGAME;
- goto T0435004;
- }*/
-
-
SaveGameHeader header;
readSaveGameHeader(file, &header);
warning(false, "MISSING CODE: missing check for matching format and platform in save in f435_loadgame");
-
dmSaveHeader._saveFormat = file->readSint16BE();
dmSaveHeader._saveAndPlayChoice = file->readSint16BE();
dmSaveHeader._gameId = file->readSint32BE();
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index d17286fbf4..c60fb79696 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -880,7 +880,6 @@ bool MenuMan::f391_didClickTriggerAction(int16 actionListIndex) {
L1199_ps_Champion = &_vm->_championMan->_gK71_champions[L1196_ui_ChampionIndex = _vm->M1_ordinalToIndex(_vm->_championMan->_g506_actingChampionOrdinal)];
if (actionListIndex == -1) {
- warning(false, "possible bug in f391_didClickTriggerAction");
// L1198_B_ClickTriggeredAction is set to -1 since booleans are stored in int16 in the original
L1198_B_ClickTriggeredAction = true;
} else {