diff options
author | Max Horn | 2006-09-23 11:29:32 +0000 |
---|---|---|
committer | Max Horn | 2006-09-23 11:29:32 +0000 |
commit | d02e4d7f7c7affb4e6f52c0e5a9a8b5a0ca0c610 (patch) | |
tree | 0752b64d29cf738449839c587e9dcd0b1d2d35c7 | |
parent | 847c145810919e6670a6d67e29b9e53b39502ca8 (diff) | |
download | scummvm-rg350-d02e4d7f7c7affb4e6f52c0e5a9a8b5a0ca0c610.tar.gz scummvm-rg350-d02e4d7f7c7affb4e6f52c0e5a9a8b5a0ca0c610.tar.bz2 scummvm-rg350-d02e4d7f7c7affb4e6f52c0e5a9a8b5a0ca0c610.zip |
Removed CHECK_HEAP
svn-id: r23979
-rw-r--r-- | common/scummsys.h | 14 | ||||
-rw-r--r-- | common/util.cpp | 8 | ||||
-rw-r--r-- | common/util.h | 2 | ||||
-rw-r--r-- | engines/scumm/actor.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/costume.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/gfx.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/object.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/resource.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/room.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/saveload.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/script.cpp | 1 | ||||
-rw-r--r-- | engines/scumm/sound.cpp | 2 |
12 files changed, 0 insertions, 63 deletions
diff --git a/common/scummsys.h b/common/scummsys.h index 89621458b4..50226ce51e 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -97,11 +97,6 @@ // explains the reasons briefly. #define SCUMMVM_USE_LONG_INT - #if defined(CHECK_HEAP) - #undef CHECK_HEAP - #define CHECK_HEAP checkHeap(); - #endif - #define FORCEINLINE __forceinline #define NORETURN _declspec(noreturn) #define PLUGIN_EXPORT __declspec(dllexport) @@ -320,11 +315,6 @@ #define SCUMM_LITTLE_ENDIAN - #if defined(CHECK_HEAP) - #undef CHECK_HEAP - #define CHECK_HEAP checkHeap(); - #endif - #define FORCEINLINE __forceinline #define NORETURN _declspec(noreturn) #define PLUGIN_EXPORT __declspec(dllexport) @@ -368,10 +358,6 @@ #define FORCEINLINE inline #endif -#ifndef CHECK_HEAP -#define CHECK_HEAP -#endif - #ifndef CDECL #define CDECL #endif diff --git a/common/util.cpp b/common/util.cpp index 6f4f3f1a67..694bd7fdfb 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -534,11 +534,3 @@ void CDECL warning(const char *s, ...) { #endif #endif } - -void checkHeap() { -#if defined(WIN32) && !defined(__SYMBIAN32__) - if (_heapchk() != _HEAPOK) { - error("Heap is invalid!"); - } -#endif -} diff --git a/common/util.h b/common/util.h index c55bee6c1d..6fb0e68a90 100644 --- a/common/util.h +++ b/common/util.h @@ -274,8 +274,6 @@ void CDECL debug(const char *s, ...) GCC_PRINTF(1, 2); void CDECL debugN(int level, const char *s, ...) GCC_PRINTF(2, 3); void CDECL debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF(3, 4); -void checkHeap(); - extern int gDebugLevel; diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index db43d00cca..023fd3e1d0 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -1082,9 +1082,7 @@ void ScummEngine::processUpperActors() { for (i = 1; i < _numActors; i++) { if (_actors[i].isInCurrentRoom() && _actors[i]._costume && _actors[i]._layer < 0) { - CHECK_HEAP _actors[i].drawActorCostume(); - CHECK_HEAP _actors[i].animateCostume(); } } diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index f6ff669611..5d81cdc441 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -92,8 +92,6 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { const int scaletableSize = 128; const bool newAmiCost = (_vm->_game.version == 5) && (_vm->_game.platform == Common::kPlatformAmiga); - CHECK_HEAP - v1.scaletable = smallCostumeScaleTable; if (_loaded._numColors == 32) { @@ -298,7 +296,6 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { _draw_bottom = rect.bottom; if (_height + rect.top >= 256) { - CHECK_HEAP return 2; } @@ -306,8 +303,6 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { v1.mask_ptr = _vm->getMaskBuffer(0, v1.y, _zbuf); - CHECK_HEAP - if (_loaded._format == 0x57) { // The v1 costume renderer needs the actor number, which is // the same thing as the costume renderer's _actorID. @@ -317,7 +312,6 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) { else proc3(v1); - CHECK_HEAP return drawFlag; } diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 5a952e73f0..6f1a102c86 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1496,7 +1496,6 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const // Check whether lights are turned on or not const bool lightsOn = _vm->isLightOn(); - CHECK_HEAP; if (_vm->_game.features & GF_SMALL_HEADER) { smap_ptr = ptr; } else if (_vm->_game.version == 8) { @@ -1542,8 +1541,6 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const if (limit > _numStrips - sx) limit = _numStrips - sx; for (int k = 0; k < limit; ++k, ++stripnr, ++sx, ++x) { - CHECK_HEAP; - if (y < vs->tdirty[sx]) vs->tdirty[sx] = y; @@ -1563,7 +1560,6 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const if (_vm->_game.version == 8 || _vm->_game.heversion >= 60) transpStrip = true; - CHECK_HEAP; if (vs->hasTwoBuffers) { byte *frontBuf = (byte *)vs->pixels + y * vs->pitch + x * 8; if (lightsOn) @@ -1571,7 +1567,6 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const else clear8Col(frontBuf, vs->pitch, height); } - CHECK_HEAP; decodeMask(x, y, width, height, stripnr, numzbuf, zplane_list, transpStrip, flag, tmsk_ptr); diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 0ab786bbc4..6a7c31b85c 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -566,7 +566,6 @@ void ScummEngine::resetRoomObjects() { const byte *room, *searchptr, *rootptr; const CodeHeader *cdhd; - CHECK_HEAP room = getResourceAddress(rtRoom, _roomResource); if (_numObjectsInRoom == 0) @@ -628,8 +627,6 @@ void ScummEngine::resetRoomObjects() { if (_objs[i].obj_nr && !_objs[i].fl_object_index) resetRoomObject(&_objs[i], room); } - - CHECK_HEAP } void ScummEngine_v3old::resetRoomObjects() { @@ -637,7 +634,6 @@ void ScummEngine_v3old::resetRoomObjects() { ObjectData *od; const byte *room, *ptr; - CHECK_HEAP room = getResourceAddress(rtRoom, _roomResource); if (_numObjectsInRoom == 0) @@ -673,8 +669,6 @@ void ScummEngine_v3old::resetRoomObjects() { dumpResource(buf, od->obj_nr, room + od->OBCDoffset); } } - - CHECK_HEAP } void ScummEngine_v4::resetRoomObjects() { @@ -684,7 +678,6 @@ void ScummEngine_v4::resetRoomObjects() { uint16 obim_id; const byte *room; - CHECK_HEAP room = getResourceAddress(rtRoom, _roomResource); if (_numObjectsInRoom == 0) @@ -729,8 +722,6 @@ void ScummEngine_v4::resetRoomObjects() { resetRoomObject(&_objs[i], room); } } - - CHECK_HEAP } void ScummEngine_c64::resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr) { @@ -1234,7 +1225,6 @@ void ScummEngine::addObjectToInventory(uint obj, uint room) { debug(1, "Adding object %d from room %d into inventory", obj, room); - CHECK_HEAP if (whereIsObject(obj) == WIO_FLOBJECT) { idx = getObjectIndex(obj); assert(idx >= 0); @@ -1256,8 +1246,6 @@ void ScummEngine::addObjectToInventory(uint obj, uint room) { dst = _res->createResource(rtInventory, slot, size); assert(dst); memcpy(dst, ptr, size); - - CHECK_HEAP } void ScummEngine::findObjectInRoom(FindObjectInRoom *fo, byte findWhat, uint id, uint room) { diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index dff9c8fd1f..064195de0e 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -729,8 +729,6 @@ int ScummEngine::getResourceSize(int type, int idx) { byte *ScummEngine::getResourceAddress(int type, int idx) { byte *ptr; - CHECK_HEAP - if (_game.heversion >= 80 && type == rtString) idx &= ~0x33539000; @@ -804,7 +802,6 @@ void ResourceManager::setResourceCounter(int type, int idx, byte flag) { byte *ResourceManager::createResource(int type, int idx, uint32 size) { byte *ptr; - CHECK_HEAP debugC(DEBUG_RESOURCE, "_res->createResource(%s,%d,%d)", resTypeFromId(type), idx, size); if (!validateResource("allocating", type, idx)) @@ -823,7 +820,6 @@ byte *ResourceManager::createResource(int type, int idx, uint32 size) { expireResources(size); - CHECK_HEAP ptr = (byte *)calloc(size + sizeof(MemBlkHeader) + SAFETY_AREA, 1); if (ptr == NULL) { error("Out of memory while allocating %d", size); @@ -865,7 +861,6 @@ bool ResourceManager::validateResource(const char *str, int type, int idx) const void ResourceManager::nukeResource(int type, int idx) { byte *ptr; - CHECK_HEAP if (!address[type]) return; diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp index 78858423f9..9635fda27d 100644 --- a/engines/scumm/room.cpp +++ b/engines/scumm/room.cpp @@ -44,7 +44,6 @@ namespace Scumm { void ScummEngine::startScene(int room, Actor *a, int objectNr) { int i, where; - CHECK_HEAP; debugC(DEBUG_GENERAL, "Loading room %d", room); stopTalk(); @@ -212,8 +211,6 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) { } _doEffect = true; - - CHECK_HEAP; } /** diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index c3444b5117..d47701c0ee 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -233,8 +233,6 @@ bool ScummEngine::loadState(int slot, bool compat) { _sound->pauseSounds(true); - CHECK_HEAP - closeRoom(); memset(_inventory, 0, sizeof(_inventory[0]) * _numInventory); @@ -372,7 +370,6 @@ bool ScummEngine::loadState(int slot, bool compat) { if (VAR_VOICE_MODE != 0xFF) VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles"); - CHECK_HEAP debug(1, "State loaded from '%s'", filename); _sound->pauseSounds(false); diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 691342464e..537a736fee 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -470,7 +470,6 @@ void ScummEngine::executeScript() { executeOpcode(_opcode); } - CHECK_HEAP; } byte ScummEngine::fetchScriptByte() { diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index d57e954bf4..34b758f72a 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -1655,8 +1655,6 @@ static void convertADResource(ResourceManager *res, const GameSettings& game, in src_ptr += 0x11 + 8 * 16; size -= 0x11 + 8 * 16; - CHECK_HEAP - track = src_ptr; // Convert the ticks into a MIDI tempo. |