aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-01-18 20:57:46 +0000
committerPaweł Kołodziejski2004-01-18 20:57:46 +0000
commit2c3dd03d266d4cd81097ad5d4b712aeadd753333 (patch)
tree4bcd5a0b7a0cedfddea13ca8bacc55e00ebadecd /sword2
parentaa0ad9b491362f06ee2f09318a9f0003d8ca4d2a (diff)
downloadscummvm-rg350-2c3dd03d266d4cd81097ad5d4b712aeadd753333.tar.gz
scummvm-rg350-2c3dd03d266d4cd81097ad5d4b712aeadd753333.tar.bz2
scummvm-rg350-2c3dd03d266d4cd81097ad5d4b712aeadd753333.zip
fix warnings
svn-id: r12504
Diffstat (limited to 'sword2')
-rw-r--r--sword2/maketext.cpp4
-rw-r--r--sword2/memory.cpp6
-rw-r--r--sword2/resman.cpp2
-rw-r--r--sword2/router.cpp2
-rw-r--r--sword2/save_rest.cpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp
index e2ed3eea34..d489422263 100644
--- a/sword2/maketext.cpp
+++ b/sword2/maketext.cpp
@@ -84,7 +84,7 @@ Memory *FontRenderer::makeTextSprite(uint8 *sentence, uint16 maxWidth, uint8 pen
// allocate memory for array of lineInfo structures
- line = _vm->_memory->allocMemory(MAX_LINES * sizeof(LineInfo), MEM_locked, UID_temp);
+ line = _vm->_memory->allocMemory(MAX_LINES * sizeof(LineInfo), MEM_locked, (uint32)UID_temp);
// get details of sentence breakdown into array of LineInfo structures
// and get the no of lines involved
@@ -210,7 +210,7 @@ Memory *FontRenderer::buildTextSprite(uint8 *sentence, uint32 fontRes, uint8 pen
// allocate memory for sprite, and lock it ready for use
// NB. 'textSprite' is the given pointer to the handle to be used
- textSprite = _vm->_memory->allocMemory(sizeof(FrameHeader) + sizeOfSprite, MEM_locked, UID_text_sprite);
+ textSprite = _vm->_memory->allocMemory(sizeof(FrameHeader) + sizeOfSprite, MEM_locked, (uint32)UID_text_sprite);
// the handle (*textSprite) now points to UNMOVABLE memory block
// set up the frame header
diff --git a/sword2/memory.cpp b/sword2/memory.cpp
index 6785003fe2..b21bf1b621 100644
--- a/sword2/memory.cpp
+++ b/sword2/memory.cpp
@@ -72,7 +72,7 @@ MemoryManager::MemoryManager(Sword2Engine *vm) : _vm(vm) {
_memList[0].size = _totalFreeMemory;
_memList[0].parent = -1; // we are base - for now
_memList[0].child = -1; // we are the end as well
- _memList[0].uid = UID_memman; // init id
+ _memList[0].uid = (uint32)UID_memman; // init id
_baseMemBlock = 0; // for now
}
@@ -205,7 +205,7 @@ Memory *MemoryManager::lowLevelAlloc(uint32 size, uint32 type, uint32 unique_id)
}
_memList[spawn].state = MEM_free; // new block is free
- _memList[spawn].uid = UID_memman; // a memman created bloc
+ _memList[spawn].uid = (uint32)UID_memman; // a memman created bloc
// size of the existing parent free block minus the size of the new
// space Talloc'ed.
@@ -252,7 +252,7 @@ void MemoryManager::freeMemory(Memory *block) {
// once you've done this the memory may be recycled
block->state = MEM_free;
- block->uid = UID_memman; // belongs to the memory manager again
+ block->uid = (uint32)UID_memman; // belongs to the memory manager again
#ifdef MEMDEBUG
debugMemory();
diff --git a/sword2/resman.cpp b/sword2/resman.cpp
index 8c3265cf7f..77b2d4a6a1 100644
--- a/sword2/resman.cpp
+++ b/sword2/resman.cpp
@@ -82,7 +82,7 @@ ResourceManager::ResourceManager(Sword2Engine *vm) {
end = file.size();
//get some space for the incoming resource file - soon to be trashed
- temp = _vm->_memory->allocMemory(end, MEM_locked, UID_temp);
+ temp = _vm->_memory->allocMemory(end, MEM_locked, (uint32)UID_temp);
if (file.read(temp->ad, end) != end) {
file.close();
diff --git a/sword2/router.cpp b/sword2/router.cpp
index 46a9ca9d61..e91a922b56 100644
--- a/sword2/router.cpp
+++ b/sword2/router.cpp
@@ -106,7 +106,7 @@ void Router::allocateRouteMem(void) {
if (_routeSlots[slotNo])
freeRouteMem();
- _routeSlots[slotNo] = _vm->_memory->allocMemory(sizeof(WalkData) * O_WALKANIM_SIZE, MEM_locked, UID_walk_anim);
+ _routeSlots[slotNo] = _vm->_memory->allocMemory(sizeof(WalkData) * O_WALKANIM_SIZE, MEM_locked, (uint32)UID_walk_anim);
// 12000 bytes were used for this in Sword1 mega compacts, based on
// 20 bytes per 'WalkData' frame
diff --git a/sword2/save_rest.cpp b/sword2/save_rest.cpp
index 03262fdea3..d950e326d2 100644
--- a/sword2/save_rest.cpp
+++ b/sword2/save_rest.cpp
@@ -94,7 +94,7 @@ uint32 Sword2Engine::saveGame(uint16 slotNo, uint8 *desc) {
// allocate the savegame buffer
bufferSize = findBufferSize();
- saveBufferMem = _memory->allocMemory(bufferSize, MEM_locked, UID_savegame_buffer);
+ saveBufferMem = _memory->allocMemory(bufferSize, MEM_locked, (uint32)UID_savegame_buffer);
fillSaveBuffer(saveBufferMem, bufferSize, desc);
@@ -224,7 +224,7 @@ uint32 Sword2Engine::restoreGame(uint16 slotNo) {
// allocate the savegame buffer
bufferSize = findBufferSize();
- saveBufferMem = _memory->allocMemory(bufferSize, MEM_locked, UID_savegame_buffer);
+ saveBufferMem = _memory->allocMemory(bufferSize, MEM_locked, (uint32)UID_savegame_buffer);
// read the savegame file into our buffer