aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lab/labmusic.cpp16
-rw-r--r--engines/lab/storage.cpp33
-rw-r--r--engines/lab/storage.h4
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, &regs, &regs);
-
- 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