From 6fc0cd791325b5e36cb486d36768b9a2a1c7dcf5 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Sat, 25 Oct 2003 01:11:14 +0000 Subject: whatever svn-id: r10959 --- queen/graphics.cpp | 16 ++++++++-------- queen/logic.cpp | 2 +- queen/resource.cpp | 4 ++-- queen/sound.cpp | 2 +- queen/talk.cpp | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'queen') diff --git a/queen/graphics.cpp b/queen/graphics.cpp index 24b05a9fb6..5d87bbf65c 100644 --- a/queen/graphics.cpp +++ b/queen/graphics.cpp @@ -126,7 +126,7 @@ void Graphics::bankOverpack(uint32 srcframe, uint32 dstframe, uint32 bankslot) { void Graphics::bankErase(uint32 bankslot) { debug(9, "Graphics::bankErase(%d)", bankslot); - delete[] _banks[bankslot].data; + free(_banks[bankslot].data); _banks[bankslot].data = 0; } @@ -135,9 +135,9 @@ void Graphics::bobSetupControl() { bankLoad("control.BBK",17); bankUnpack(1, 1, 17); // Mouse pointer - bankUnpack(3, 3, 17); // Up arrow dialogue - bankUnpack(4, 4, 17); // Down arrow dialogue - bankErase(17); + bankUnpack(3, 3, 17); // Up arrow dialogue + bankUnpack(4, 4, 17); // Down arrow dialogue + bankErase(17); } @@ -722,7 +722,7 @@ void Graphics::loadBackdrop(const char* name, uint16 room) { } uint32 size = _resource->fileSize(name); _display->pcxReadBackdrop(pcxbuf, size, room > 114); - delete[] pcxbuf; + free(pcxbuf); if (room >= 90) { _cameraBob = 0; @@ -738,7 +738,7 @@ void Graphics::loadPanel() { } uint32 size = _resource->fileSize("panel.pcx"); _display->pcxReadPanel(pcxbuf, size); - delete[] pcxbuf; + free(pcxbuf); } @@ -752,7 +752,7 @@ void Graphics::useJournal() { // GameSettings* pgs // load and unpack journal frames frameEraseAll(false); - bankLoad("journal.BBK", 8); + bankLoad("journal.BBK", 8); for(i = 1; i <= 20; ++i) { bankUnpack(i, FRAMES_JOURNAL + i, 8); // set hot spots to zero @@ -761,7 +761,7 @@ void Graphics::useJournal() { // GameSettings* pgs } // adjust info box hot spot to put it on top always _frames[FRAMES_JOURNAL + 20].yhotspot = 200; - bankErase(8); + bankErase(8); // TODO: setup zones diff --git a/queen/logic.cpp b/queen/logic.cpp index 77c6781b29..8dc219ff76 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -156,7 +156,7 @@ Logic::Logic(Resource *resource, Graphics *graphics, Display *theDisplay, Input } Logic::~Logic() { - delete[] _jas; + free(_jas); delete _walk; } diff --git a/queen/resource.cpp b/queen/resource.cpp index cc9535a32a..2b95f9566d 100644 --- a/queen/resource.cpp +++ b/queen/resource.cpp @@ -79,7 +79,7 @@ Resource::~Resource() { _resourceFile->close(); if(_resourceTable != _resourceTablePEM10) delete[] _resourceTable; - delete[] _JAS2Ptr; + free(_JAS2Ptr); } int32 Resource::resourceIndex(const char *filename) { @@ -144,7 +144,7 @@ uint32 Resource::fileOffset(const char *filename) { uint8 *Resource::loadFile(const char *filename, uint32 skipBytes, byte *dstBuf) { uint32 size = fileSize(filename); if (dstBuf == NULL) { - dstBuf = new byte[size]; + dstBuf = (byte *)malloc(size); } // skip 'skipBytes' bytes (useful for headers) _resourceFile->seek(fileOffset(filename) + skipBytes, SEEK_SET); diff --git a/queen/sound.cpp b/queen/sound.cpp index 50768ed804..15a831b89e 100644 --- a/queen/sound.cpp +++ b/queen/sound.cpp @@ -62,7 +62,7 @@ bool Sound::isPlaying() { } int SBSound::playSound(byte *sound, uint32 size) { - byte flags = 0 | SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTODELETE; + byte flags = 0 | SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE; return _mixer->playRaw(&_sfxHandle, sound, size, 11025, flags); } diff --git a/queen/talk.cpp b/queen/talk.cpp index 50b552d564..2ed77b54ed 100644 --- a/queen/talk.cpp +++ b/queen/talk.cpp @@ -78,7 +78,7 @@ Talk::Talk( } Talk::~Talk() { - delete[] _fileData; + free(_fileData); } -- cgit v1.2.3