diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 2730e45e6b2..a87d52992bb 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -318,6 +318,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'constant', 'random', 'drawfloor', + 'allocatebuffers', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 5e0520e1ff4..04cf5559a77 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -11252,40 +11252,6 @@ void DreamGenContext::checkforemm() { STACK_CHECK; } -void DreamGenContext::allocatebuffers() { - STACK_CHECK; - bx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/16; - allocatemem(); - data.word(kExtras) = ax; - trysoundalloc(); - bx = (0+(66*60))/16; - allocatemem(); - data.word(kMapdata) = ax; - trysoundalloc(); - bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534+68-0)/16; - allocatemem(); - data.word(kBuffers) = ax; - trysoundalloc(); - bx = (16*80)/16; - allocatemem(); - data.word(kFreedat) = ax; - trysoundalloc(); - bx = (64*128)/16; - allocatemem(); - data.word(kSetdat) = ax; - trysoundalloc(); - bx = (22*8*20*8)/16; - allocatemem(); - data.word(kMapstore) = ax; - allocatework(); - bx = 2048/16; - allocatemem(); - data.word(kSounddata) = ax; - bx = 2048/16; - allocatemem(); - data.word(kSounddata2) = ax; -} - void DreamGenContext::clearbuffers() { STACK_CHECK; es = data.word(kBuffers); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index ccffb210ac1..3cd2f737e0e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -94,7 +94,6 @@ public: static const uint16 addr_clearbeforeload = 0xc978; static const uint16 addr_clearchanges = 0xc974; static const uint16 addr_clearbuffers = 0xc970; - static const uint16 addr_allocatebuffers = 0xc96c; static const uint16 addr_checkforemm = 0xc964; static const uint16 addr_removeemm = 0xc960; static const uint16 addr_setupemm = 0xc95c; @@ -1528,7 +1527,6 @@ public: void findpuztext(); void usechurchgate(); void monkandryan(); - void allocatebuffers(); void swapwithinv(); void usecontrol(); void buttonseven(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 67f7922a93c..ab574c5fab4 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2522,5 +2522,22 @@ void DreamGenContext::drawfloor() { data.byte(kNewobs) = 0; } +void DreamGenContext::allocatebuffers() { + data.word(kExtras) = allocatemem(kLengthofextra/16); + trysoundalloc(); + data.word(kMapdata) = allocatemem(kLengthofmap/16); + trysoundalloc(); + data.word(kBuffers) = allocatemem(kLengthofbuffer/16); + trysoundalloc(); + data.word(kFreedat) = allocatemem(kFreedatlen/16); + trysoundalloc(); + data.word(kSetdat) = allocatemem(kSetdatlen/16); + trysoundalloc(); + data.word(kMapstore) = allocatemem(kLenofmapstore/16); + allocatework(); + data.word(kSounddata) = allocatemem(2048/16); + data.word(kSounddata2) = allocatemem(2048/16); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 6ac7d415047..67cfe412125 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -373,4 +373,5 @@ void loadtemptext(const char *fileName); void loadtraveltext(); void drawfloor(); + void allocatebuffers();