diff options
author | Vincent Hamm | 2007-12-20 14:30:51 +0000 |
---|---|---|
committer | Vincent Hamm | 2007-12-20 14:30:51 +0000 |
commit | 564fc06cf7196f44c46be24d15c18da0c4992795 (patch) | |
tree | 664974b88411aee15b30751b7a22ce9ee4e68c9d /engines/cruise/function.cpp | |
parent | 6d37f5ccd8a2f5859ec69bd4924bc50eb4293464 (diff) | |
download | scummvm-rg350-564fc06cf7196f44c46be24d15c18da0c4992795.tar.gz scummvm-rg350-564fc06cf7196f44c46be24d15c18da0c4992795.tar.bz2 scummvm-rg350-564fc06cf7196f44c46be24d15c18da0c4992795.zip |
Multiple fix/cleanup
One bug remains before the game is completable without hack
svn-id: r29920
Diffstat (limited to 'engines/cruise/function.cpp')
-rw-r--r-- | engines/cruise/function.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 320b38afc8..69d62cab5f 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -54,7 +54,7 @@ int16 Op_LoadOverlay(void) { updateAllScriptsImports(); - strcpy(currentOverlay, overlayName); + strcpy(nextOverlay, overlayName); return(overlayLoadResult); } @@ -123,10 +123,10 @@ int16 Op_AddProc(void) { int pop1 = popVar(); int pop2; int overlay; + int param[160]; - if (pop1 - 1 > 0) { - printf("Unsuported arg pop in Op_6!\n"); - exit(1); + for(long int i=0; i<pop1; i++) { + param[i] = popVar(); } pop2 = popVar(); @@ -138,11 +138,14 @@ int16 Op_AddProc(void) { if (!overlay) return (0); - attacheNewScriptToTail(&procHead, overlay, pop2, currentScriptPtr->type, currentScriptPtr->scriptNumber, currentScriptPtr->overlayNumber, scriptType_PROC); + uint8* procBss = attacheNewScriptToTail(&procHead, overlay, pop2, currentScriptPtr->type, currentScriptPtr->scriptNumber, currentScriptPtr->overlayNumber, scriptType_PROC); - if (pop1 > 0) { - printf("Unsupported art send in op6!\n"); - exit(1); + if (procBss) { + for(long int i=0; i<pop1; i++) { + int16* ptr = (int16*)(procBss+i*2); + *ptr = param[i]; + flipShort(ptr); + } } return (0); @@ -773,7 +776,7 @@ int16 Op_AutoCell(void) { objectParamsQuery params; getMultipleObjectParam(overlay, obj, ¶ms); - pObject->animCounter = params.var6 - 1; + pObject->animCounter = params.state2 - 1; } return 0; @@ -789,7 +792,7 @@ int16 Op_66(void) { getMultipleObjectParam(overlay, index, ¶ms); - return params.var7 - 1; + return params.nbState - 1; } int16 Op_SetActiveBackgroundPlane(void) { |