[Scummvm-cvs-logs] SF.net SVN: scummvm:[45408] scummvm/trunk/engines/tinsel
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Oct 26 17:01:13 CET 2009
Revision: 45408
http://scummvm.svn.sourceforge.net/scummvm/?rev=45408&view=rev
Author: fingolfin
Date: 2009-10-26 16:01:12 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
TINSEL: Remove MemoryHandle(), some unneeded #includes and the return value of MemoryReAlloc()
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/bmv.cpp
scummvm/trunk/engines/tinsel/handle.cpp
scummvm/trunk/engines/tinsel/heapmem.cpp
scummvm/trunk/engines/tinsel/heapmem.h
scummvm/trunk/engines/tinsel/savescn.cpp
Modified: scummvm/trunk/engines/tinsel/bmv.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/bmv.cpp 2009-10-26 14:49:01 UTC (rev 45407)
+++ scummvm/trunk/engines/tinsel/bmv.cpp 2009-10-26 16:01:12 UTC (rev 45408)
@@ -34,7 +34,6 @@
#include "tinsel/font.h"
#include "tinsel/graphics.h"
#include "tinsel/handle.h"
-#include "tinsel/heapmem.h"
#include "tinsel/multiobj.h"
#include "tinsel/sched.h"
#include "tinsel/strres.h"
Modified: scummvm/trunk/engines/tinsel/handle.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/handle.cpp 2009-10-26 14:49:01 UTC (rev 45407)
+++ scummvm/trunk/engines/tinsel/handle.cpp 2009-10-26 16:01:12 UTC (rev 45408)
@@ -170,9 +170,7 @@
#endif
else {
// allocate a discarded memory node for other files
- pH->_node = MemoryAlloc(
- DWM_DISCARDABLE | DWM_NOALLOC,
- pH->filesize & FSIZE_MASK);
+ pH->_node = MemoryAlloc(DWM_DISCARDABLE | DWM_NOALLOC, pH->filesize & FSIZE_MASK);
pH->_ptr = NULL;
// make sure memory allocated
Modified: scummvm/trunk/engines/tinsel/heapmem.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/heapmem.cpp 2009-10-26 14:49:01 UTC (rev 45407)
+++ scummvm/trunk/engines/tinsel/heapmem.cpp 2009-10-26 16:01:12 UTC (rev 45408)
@@ -430,7 +430,7 @@
* @param size New size of block
* @param flags How to reallocate the object
*/
-MEM_NODE *MemoryReAlloc(MEM_NODE *pMemNode, long size, int flags) {
+void MemoryReAlloc(MEM_NODE *pMemNode, long size, int flags) {
MEM_NODE *pNew;
// validate mnode pointer
@@ -471,9 +471,6 @@
// free the new node
FreeMemNode(pNew);
}
-
- // return the node
- return pMemNode;
}
/**
@@ -494,21 +491,4 @@
pMemNode->lruTime = DwGetCurrentTime();
}
-/**
- * Retrieves the mnode associated with the specified pointer to a memory object.
- * @param pMem Address of memory object
- */
-MEM_NODE *MemoryHandle(void *pMem) {
- MEM_NODE *pNode;
- // search the DOS heap
- for (pNode = heapSentinel.pNext; pNode != &heapSentinel; pNode = pNode->pNext) {
- if (pNode->pBaseAddr == pMem)
- // found it
- return pNode;
- }
-
- // not found if we get to here
- return NULL;
-}
-
} // End of namespace Tinsel
Modified: scummvm/trunk/engines/tinsel/heapmem.h
===================================================================
--- scummvm/trunk/engines/tinsel/heapmem.h 2009-10-26 14:49:01 UTC (rev 45407)
+++ scummvm/trunk/engines/tinsel/heapmem.h 2009-10-26 16:01:12 UTC (rev 45408)
@@ -69,13 +69,10 @@
void MemoryDiscard( // discards the specified memory object
MEM_NODE *pMemNode); // node of the memory object
-MEM_NODE *MemoryHandle( // Retrieves the mnode associated with the specified pointer to a memory object
- void *pMem); // address of memory object
-
void *MemoryLock( // locks a memory object and returns a pointer to the first byte of the objects memory block
MEM_NODE *pMemNode); // node of the memory object
-MEM_NODE *MemoryReAlloc( // changes the size or attributes of a specified memory object
+void MemoryReAlloc( // changes the size or attributes of a specified memory object
MEM_NODE *pMemNode, // node of the memory object
long size, // new size of block
int flags); // how to reallocate the object
Modified: scummvm/trunk/engines/tinsel/savescn.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/savescn.cpp 2009-10-26 14:49:01 UTC (rev 45407)
+++ scummvm/trunk/engines/tinsel/savescn.cpp 2009-10-26 16:01:12 UTC (rev 45408)
@@ -33,7 +33,6 @@
#include "tinsel/faders.h" // FadeOutFast()
#include "tinsel/graphics.h" // ClearScreen()
#include "tinsel/handle.h"
-#include "tinsel/heapmem.h"
#include "tinsel/dialogs.h"
#include "tinsel/music.h"
#include "tinsel/pid.h"
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