diff options
author | Bertrand Augereau | 2011-11-30 15:19:41 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-11-30 15:30:59 +0100 |
commit | 9edd0f2903fd10dc06e22f37442d9787f964fab4 (patch) | |
tree | 867d9b6d91a5e443889be32145e7afa644e6e41e | |
parent | 17225e42e391db0f2455af78c4b390b20556cab8 (diff) | |
download | scummvm-rg350-9edd0f2903fd10dc06e22f37442d9787f964fab4.tar.gz scummvm-rg350-9edd0f2903fd10dc06e22f37442d9787f964fab4.tar.bz2 scummvm-rg350-9edd0f2903fd10dc06e22f37442d9787f964fab4.zip |
DREAMWEB: 'allocatebuffers' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 34 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 17 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 19 insertions, 36 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 2730e45e6b..a87d52992b 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 5e0520e1ff..04cf5559a7 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 ccffb210ac..3cd2f737e0 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 67f7922a93..ab574c5fab 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 6ac7d41504..67cfe41212 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(); |