[Scummvm-cvs-logs] SF.net SVN: scummvm: [23979] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Sep 23 13:29:53 CEST 2006
Revision: 23979
http://svn.sourceforge.net/scummvm/?rev=23979&view=rev
Author: fingolfin
Date: 2006-09-23 04:29:32 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
Removed CHECK_HEAP
Modified Paths:
--------------
scummvm/trunk/common/scummsys.h
scummvm/trunk/common/util.cpp
scummvm/trunk/common/util.h
scummvm/trunk/engines/scumm/actor.cpp
scummvm/trunk/engines/scumm/costume.cpp
scummvm/trunk/engines/scumm/gfx.cpp
scummvm/trunk/engines/scumm/object.cpp
scummvm/trunk/engines/scumm/resource.cpp
scummvm/trunk/engines/scumm/room.cpp
scummvm/trunk/engines/scumm/saveload.cpp
scummvm/trunk/engines/scumm/script.cpp
scummvm/trunk/engines/scumm/sound.cpp
Modified: scummvm/trunk/common/scummsys.h
===================================================================
--- scummvm/trunk/common/scummsys.h 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/common/scummsys.h 2006-09-23 11:29:32 UTC (rev 23979)
@@ -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
Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/common/util.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -534,11 +534,3 @@
#endif
#endif
}
-
-void checkHeap() {
-#if defined(WIN32) && !defined(__SYMBIAN32__)
- if (_heapchk() != _HEAPOK) {
- error("Heap is invalid!");
- }
-#endif
-}
Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/common/util.h 2006-09-23 11:29:32 UTC (rev 23979)
@@ -274,8 +274,6 @@
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;
Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/actor.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -1082,9 +1082,7 @@
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();
}
}
Modified: scummvm/trunk/engines/scumm/costume.cpp
===================================================================
--- scummvm/trunk/engines/scumm/costume.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/costume.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -92,8 +92,6 @@
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 @@
_draw_bottom = rect.bottom;
if (_height + rect.top >= 256) {
- CHECK_HEAP
return 2;
}
@@ -306,8 +303,6 @@
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 @@
else
proc3(v1);
- CHECK_HEAP
return drawFlag;
}
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/gfx.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -1496,7 +1496,6 @@
// 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 @@
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 @@
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 @@
else
clear8Col(frontBuf, vs->pitch, height);
}
- CHECK_HEAP;
decodeMask(x, y, width, height, stripnr, numzbuf, zplane_list, transpStrip, flag, tmsk_ptr);
Modified: scummvm/trunk/engines/scumm/object.cpp
===================================================================
--- scummvm/trunk/engines/scumm/object.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/object.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -566,7 +566,6 @@
const byte *room, *searchptr, *rootptr;
const CodeHeader *cdhd;
- CHECK_HEAP
room = getResourceAddress(rtRoom, _roomResource);
if (_numObjectsInRoom == 0)
@@ -628,8 +627,6 @@
if (_objs[i].obj_nr && !_objs[i].fl_object_index)
resetRoomObject(&_objs[i], room);
}
-
- CHECK_HEAP
}
void ScummEngine_v3old::resetRoomObjects() {
@@ -637,7 +634,6 @@
ObjectData *od;
const byte *room, *ptr;
- CHECK_HEAP
room = getResourceAddress(rtRoom, _roomResource);
if (_numObjectsInRoom == 0)
@@ -673,8 +669,6 @@
dumpResource(buf, od->obj_nr, room + od->OBCDoffset);
}
}
-
- CHECK_HEAP
}
void ScummEngine_v4::resetRoomObjects() {
@@ -684,7 +678,6 @@
uint16 obim_id;
const byte *room;
- CHECK_HEAP
room = getResourceAddress(rtRoom, _roomResource);
if (_numObjectsInRoom == 0)
@@ -729,8 +722,6 @@
resetRoomObject(&_objs[i], room);
}
}
-
- CHECK_HEAP
}
void ScummEngine_c64::resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr) {
@@ -1234,7 +1225,6 @@
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 @@
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) {
Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/resource.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -729,8 +729,6 @@
byte *ScummEngine::getResourceAddress(int type, int idx) {
byte *ptr;
- CHECK_HEAP
-
if (_game.heversion >= 80 && type == rtString)
idx &= ~0x33539000;
@@ -804,7 +802,6 @@
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 @@
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 @@
void ResourceManager::nukeResource(int type, int idx) {
byte *ptr;
- CHECK_HEAP
if (!address[type])
return;
Modified: scummvm/trunk/engines/scumm/room.cpp
===================================================================
--- scummvm/trunk/engines/scumm/room.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/room.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -44,7 +44,6 @@
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 @@
}
_doEffect = true;
-
- CHECK_HEAP;
}
/**
Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/saveload.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -233,8 +233,6 @@
_sound->pauseSounds(true);
- CHECK_HEAP
-
closeRoom();
memset(_inventory, 0, sizeof(_inventory[0]) * _numInventory);
@@ -372,7 +370,6 @@
if (VAR_VOICE_MODE != 0xFF)
VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
- CHECK_HEAP
debug(1, "State loaded from '%s'", filename);
_sound->pauseSounds(false);
Modified: scummvm/trunk/engines/scumm/script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/script.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -470,7 +470,6 @@
executeOpcode(_opcode);
}
- CHECK_HEAP;
}
byte ScummEngine::fetchScriptByte() {
Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp 2006-09-23 01:16:32 UTC (rev 23978)
+++ scummvm/trunk/engines/scumm/sound.cpp 2006-09-23 11:29:32 UTC (rev 23979)
@@ -1655,8 +1655,6 @@
src_ptr += 0x11 + 8 * 16;
size -= 0x11 + 8 * 16;
- CHECK_HEAP
-
track = src_ptr;
// Convert the ticks into a MIDI tempo.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list