diff options
author | Torbjörn Andersson | 2003-09-30 14:37:42 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-09-30 14:37:42 +0000 |
commit | da1b4f1e3627a6baf242457cb9c69328a7f899f0 (patch) | |
tree | b523a0e56d0122620062b206fc02d642f2c66b85 /sword2/maketext.cpp | |
parent | 457f888ea7c6dc7cefc7491c5fc74b057f7ef1eb (diff) | |
download | scummvm-rg350-da1b4f1e3627a6baf242457cb9c69328a7f899f0.tar.gz scummvm-rg350-da1b4f1e3627a6baf242457cb9c69328a7f899f0.tar.bz2 scummvm-rg350-da1b4f1e3627a6baf242457cb9c69328a7f899f0.zip |
Moved the memory manager functions into an object of its own (and enabled
debugging levels). This needs further cleanups, but I believe I have
reached a stable point where I can commit it without too much anxiety.
svn-id: r10502
Diffstat (limited to 'sword2/maketext.cpp')
-rw-r--r-- | sword2/maketext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp index ad97f4c38a..84e198a8a7 100644 --- a/sword2/maketext.cpp +++ b/sword2/maketext.cpp @@ -133,7 +133,7 @@ mem* MakeTextSprite(uint8 *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes) // allocate memory for array of lineInfo structures - line = Twalloc(MAX_LINES * sizeof(_lineInfo), MEM_locked, UID_temp); + line = memory.allocMemory(MAX_LINES * sizeof(_lineInfo), MEM_locked, UID_temp); // get details of sentence breakdown into array of _lineInfo structures // and get the no of lines involved @@ -146,7 +146,7 @@ mem* MakeTextSprite(uint8 *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes) textSprite = BuildTextSprite(sentence, fontRes, pen, (_lineInfo *) line->ad, noOfLines); // free up the lineInfo array now - Free_mem(line); + memory.freeMemory(line); return textSprite; } @@ -259,7 +259,7 @@ mem* BuildTextSprite(uint8 *sentence, uint32 fontRes, uint8 pen, _lineInfo *line // allocate memory for sprite, and lock it ready for use // NB. 'textSprite' is the given pointer to the handle to be used - textSprite = Twalloc(sizeof(_frameHeader) + sizeOfSprite, MEM_locked, UID_text_sprite); + textSprite = memory.allocMemory(sizeof(_frameHeader) + sizeOfSprite, MEM_locked, UID_text_sprite); // the handle (*textSprite) now points to UNMOVABLE memory block // set up the frame header @@ -320,7 +320,7 @@ mem* BuildTextSprite(uint8 *sentence, uint32 fontRes, uint8 pen, _lineInfo *line res_man.close(fontRes); // unlock the sprite memory block, so it's movable - Float_mem(textSprite); + memory.floatMemory(textSprite); return textSprite; } @@ -601,7 +601,7 @@ void Kill_text_bloc(uint32 bloc_number) { if (text_sprite_list[bloc_number].text_mem) { // release the floating memory and mark it as free - Free_mem(text_sprite_list[bloc_number].text_mem); + memory.freeMemory(text_sprite_list[bloc_number].text_mem); text_sprite_list[bloc_number].text_mem = 0; } else { // illegal kill - stop the system |