diff options
-rw-r--r-- | engines/cruise/delphine-unpack.cpp | 14 | ||||
-rw-r--r-- | engines/cruise/function.cpp | 46 |
2 files changed, 33 insertions, 27 deletions
diff --git a/engines/cruise/delphine-unpack.cpp b/engines/cruise/delphine-unpack.cpp index 796753656d..6d21527481 100644 --- a/engines/cruise/delphine-unpack.cpp +++ b/engines/cruise/delphine-unpack.cpp @@ -65,13 +65,13 @@ uint16 swap16(uint16 r) } int32 decomp(uint8 * in, uint8 * out, int32 size) { - uint8 bit; // Carry flag - uint8 nbits; // cl - uint8 byte; // ch - uint16 counter; // bp - uint16 var; // variable at 5C58 - uint16 ptr; - uint16 flags; + uint8 bit = 0; // Carry flag + uint8 nbits = 0; // cl + uint8 byte = 0; // ch + uint16 counter = 0; // bp + uint16 var = 0; // variable at 5C58 + uint16 ptr = 0; + uint16 flags = 0; enum { DO_COPY, DO_UNPACK diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 72030b7359..63186fef5a 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -1047,13 +1047,13 @@ int16 Op_removeBackgroundIncrust(void) int16 Op_D(void) // TODO: palette manipulation { - /* - int var_4 = popVar(); - int var_6 = popVar(); - int var_8 = popVar(); - int si = popVar(); - int di = popVar(); - */ + var_4 = popVar(); + var_6 = popVar(); + var_8 = popVar(); + //int si = popVar(); + //int di = popVar(); + popVar(); + popVar(); return 0; } @@ -1091,6 +1091,12 @@ int16 Op_drawLine(void) uint8* ptr = (uint8*)popPtr(); */ + popVar(); + popVar(); + popVar(); + popVar(); + popPtr(); + //drawLinePtr(var_6, var_4, var_2, ptr); // flipGen(ptr); @@ -1451,21 +1457,21 @@ int16 Op_6C(void) return temp; } -void configureAllObjects(int overlayIdx, objectStruct* pObject, int var4, int var0, int var1, int var2, int var3) +void configureAllObjects(int overlayIdx, objectStruct* pObject, int _var4, int _var0, int _var1, int _var2, int _var3) { while(pObject) { if((pObject->overlay == overlayIdx) || (overlayIdx == -1)) { - if((pObject->idx == var4) || (var4 == -1)) + if((pObject->idx == _var4) || (_var4 == -1)) { - if((pObject->type == var3) || (var3 == -1)) + if((pObject->type == _var3) || (_var3 == -1)) { - if((pObject->backgroundPlane == var2) || (var2 == -1)) + if((pObject->backgroundPlane == _var2) || (_var2 == -1)) { - if((pObject->hide == var1) || (var1 == -1)) + if((pObject->hide == _var1) || (_var1 == -1)) { - pObject->hide = var0; + pObject->hide = _var0; } } } @@ -1504,15 +1510,15 @@ int16 Op_16(void) return 0; } -void Op_60Sub(int overlayIdx, actorStruct* pActorHead, int var0, int var1, int var2, int var3) +void Op_60Sub(int overlayIdx, actorStruct* pActorHead, int _var0, int _var1, int _var2, int _var3) { - actorStruct* pActor = findActor(overlayIdx, var0, pActorHead, var3); + actorStruct* pActor = findActor(overlayIdx, _var0, pActorHead, _var3); if(pActor) { - if((pActor->freeze == var2) || (var2 == -1)) + if((pActor->freeze == _var2) || (_var2 == -1)) { - pActor->freeze = var1; + pActor->freeze = _var1; } } } @@ -1550,7 +1556,7 @@ int16 Op_6F(void) assert(numArgs == 0); { - int var = popVar(); + popVar(); char* string = (char*)popPtr(); printf("partial opcode 6F sprintf (%s)\n", string); @@ -1571,9 +1577,9 @@ int16 Op_6E(void) int16 Op_72(void) { - int var0 = popVar(); + var0 = popVar(); char* ptr = (char*)popPtr(); - int var1 = popVar(); + var1 = popVar(); if(!var1) var1 = currentScriptPtr->overlayNumber; |