diff options
author | Eugene Sandulenko | 2014-12-20 21:39:27 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | 62ceb496a926d4b906f3c276797bb3ab4c47829c (patch) | |
tree | 48ab4241ebc88b739e73b0a8ceed1a9636d2a425 /engines/lab | |
parent | bff3cc390f56defe9b2e7debc046e0a1673fe413 (diff) | |
download | scummvm-rg350-62ceb496a926d4b906f3c276797bb3ab4c47829c.tar.gz scummvm-rg350-62ceb496a926d4b906f3c276797bb3ab4c47829c.tar.bz2 scummvm-rg350-62ceb496a926d4b906f3c276797bb3ab4c47829c.zip |
LAB: Cleanup
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/labmusic.cpp | 16 | ||||
-rw-r--r-- | engines/lab/storage.cpp | 33 | ||||
-rw-r--r-- | engines/lab/storage.h | 4 |
3 files changed, 6 insertions, 47 deletions
diff --git a/engines/lab/labmusic.cpp b/engines/lab/labmusic.cpp index d7edc2b746..9fcee09c20 100644 --- a/engines/lab/labmusic.cpp +++ b/engines/lab/labmusic.cpp @@ -270,21 +270,17 @@ bool Music::initMusic(void) { else filename = "Music:BackGrou"; - mem = true; - if (_musicBuffer[0] == NULL) { for (counter = 0; counter < _manyBuffers; counter++) - mem = mem && allocatedos((void **) & (_musicBuffer[counter]), MUSICBUFSIZE); + _musicBuffer[counter] = malloc(MUSICBUFSIZE); } - if (mem) { - _filelength = sizeOfFile(filename); - _file = openPartial(filename); + _filelength = sizeOfFile(filename); + _file = openPartial(filename); - if (_file) { - startMusic(true); - return true; - } + if (_file) { + startMusic(true); + return true; } _musicOn = false; diff --git a/engines/lab/storage.cpp b/engines/lab/storage.cpp index 0d21b937c9..a94d21c7ea 100644 --- a/engines/lab/storage.cpp +++ b/engines/lab/storage.cpp @@ -45,39 +45,6 @@ bool allocate(void **Ptr, uint32 Size) { } - - -/*****************************************************************************/ -/* Allocates a piece of chip memory. */ -/*****************************************************************************/ -bool allocatechip(void **Ptr, uint32 Size) { - return allocate(Ptr, Size); -} - -/*****************************************************************************/ -/* Allocates a chunk of dos memory. */ -/*****************************************************************************/ -bool allocatedos(void **Ptr, uint32 Size) { -#if defined(DOSCODE) - static union REGS regs; - - regs.x.eax = 0x100; - regs.x.ebx = (Size >> 4); - int386(0x31, ®s, ®s); - - if (regs.x.cflag) { - *Ptr = NULL; - return false; - } - - *Ptr = (char *)((regs.x.eax & 0xFFFF) << 4); - return (*Ptr != NULL); -#else - *Ptr = malloc(Size); - return (*Ptr != NULL); -#endif -} - /*****************************************************************************/ /* Deallocates a piece of memory. */ /*****************************************************************************/ diff --git a/engines/lab/storage.h b/engines/lab/storage.h index bb14bef23c..c93c58c79a 100644 --- a/engines/lab/storage.h +++ b/engines/lab/storage.h @@ -37,10 +37,6 @@ namespace Lab { bool allocate(void **Ptr, uint32 Size); -bool allocatechip(void **Ptr, uint32 Size); - -bool allocatedos(void **Ptr, uint32 Size); - void deallocate(void *Ptr, uint32 Size); } // End of namespace Lab |