aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/mpal/memory.cpp
diff options
context:
space:
mode:
authorStrangerke2012-09-01 00:25:35 +0200
committerStrangerke2012-09-01 00:25:35 +0200
commitf2df769aab10e719cc4fba6cb71e1500eb3acae4 (patch)
tree6e1d574e9fe484639612f350e47f125740fbaf80 /engines/tony/mpal/memory.cpp
parent7fbfbc8e6b57729e1a5008d256b28b0571f1c3b6 (diff)
downloadscummvm-rg350-f2df769aab10e719cc4fba6cb71e1500eb3acae4.tar.gz
scummvm-rg350-f2df769aab10e719cc4fba6cb71e1500eb3acae4.tar.bz2
scummvm-rg350-f2df769aab10e719cc4fba6cb71e1500eb3acae4.zip
TONY: More renaming
Diffstat (limited to 'engines/tony/mpal/memory.cpp')
-rw-r--r--engines/tony/mpal/memory.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/tony/mpal/memory.cpp b/engines/tony/mpal/memory.cpp
index 3a68ecb559..428c07b3b7 100644
--- a/engines/tony/mpal/memory.cpp
+++ b/engines/tony/mpal/memory.cpp
@@ -39,7 +39,7 @@ const uint32 BLOCK_ID = 0x12345678;
* Allocates a new memory block
* @return Returns a MemoryItem instance for the new block
*/
-HANDLE MemoryManager::allocate(uint32 size, uint flags) {
+MpalHandle MemoryManager::allocate(uint32 size, uint flags) {
MemoryItem *newItem = (MemoryItem *)malloc(sizeof(MemoryItem) + size);
newItem->_id = BLOCK_ID;
newItem->_size = size;
@@ -51,7 +51,7 @@ HANDLE MemoryManager::allocate(uint32 size, uint flags) {
Common::fill(dataP, dataP + size, 0);
}
- return (HANDLE)newItem;
+ return (MpalHandle)newItem;
}
/**
@@ -70,7 +70,7 @@ void *MemoryManager::alloc(uint32 size, uint flags) {
* Returns a reference to the MemoryItem for a gien byte pointer
* @param block Byte pointer
*/
-MemoryItem *MemoryManager::getItem(HGLOBAL handle) {
+MemoryItem *MemoryManager::getItem(MpalHandle handle) {
MemoryItem *rec = (MemoryItem *)((byte *)handle - OFFSETOF(MemoryItem, _data));
assert(rec->_id == BLOCK_ID);
return rec;
@@ -79,7 +79,7 @@ MemoryItem *MemoryManager::getItem(HGLOBAL handle) {
/**
* Returns a size of a memory block given its pointer
*/
-uint32 MemoryManager::getSize(HANDLE handle) {
+uint32 MemoryManager::getSize(MpalHandle handle) {
MemoryItem *item = (MemoryItem *)handle;
assert(item->_id == BLOCK_ID);
return item->_size;
@@ -88,7 +88,7 @@ uint32 MemoryManager::getSize(HANDLE handle) {
/**
* Erases a given item
*/
-void MemoryManager::freeBlock(HANDLE handle) {
+void MemoryManager::freeBlock(MpalHandle handle) {
MemoryItem *item = (MemoryItem *)handle;
assert(item->_id == BLOCK_ID);
free(item);
@@ -97,7 +97,7 @@ void MemoryManager::freeBlock(HANDLE handle) {
/**
* Erases a given item
*/
-void MemoryManager::destroyItem(HANDLE handle) {
+void MemoryManager::destroyItem(MpalHandle handle) {
MemoryItem *item = getItem(handle);
assert(item->_id == BLOCK_ID);
free(item);
@@ -106,7 +106,7 @@ void MemoryManager::destroyItem(HANDLE handle) {
/**
* Locks an item for access
*/
-byte *MemoryManager::lockItem(HANDLE handle) {
+byte *MemoryManager::lockItem(MpalHandle handle) {
MemoryItem *item = (MemoryItem *)handle;
assert(item->_id == BLOCK_ID);
++item->_lockCount;
@@ -116,7 +116,7 @@ byte *MemoryManager::lockItem(HANDLE handle) {
/**
* Unlocks a locked item
*/
-void MemoryManager::unlockItem(HANDLE handle) {
+void MemoryManager::unlockItem(MpalHandle handle) {
MemoryItem *item = (MemoryItem *)handle;
assert(item->_id == BLOCK_ID);
assert(item->_lockCount > 0);