diff options
author | Matthew Hoops | 2011-08-06 13:02:43 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-08-06 13:02:43 -0400 |
commit | 6528f902fc332cf97d3ec5f6329fd4272b9bf728 (patch) | |
tree | 09e86268d7455b1538252a2b7546519701bc1929 /engines/scumm/he | |
parent | bf841e1e94f42121b0c150a93b3829c28d17c70c (diff) | |
download | scummvm-rg350-6528f902fc332cf97d3ec5f6329fd4272b9bf728.tar.gz scummvm-rg350-6528f902fc332cf97d3ec5f6329fd4272b9bf728.tar.bz2 scummvm-rg350-6528f902fc332cf97d3ec5f6329fd4272b9bf728.zip |
SCUMM: Remove soccer editor-related u32 code
The built-in editor, while could potentially be a cool feature, seems incomplete and unusable. Room 4 (the editor room) in all three games is not accessible without jumping to it.
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 54 | ||||
-rw-r--r-- | engines/scumm/he/logic_he.h | 7 |
2 files changed, 5 insertions, 56 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 2234800a4d..f2750aef1c 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -821,16 +821,12 @@ int LogicHEsoccer::versionID() { LogicHEsoccer::LogicHEsoccer(ScummEngine_v90he *vm) : LogicHE(vm) { _userDataD = (double *)calloc(1732, sizeof(double)); - _intArray1 = 0; - _intArray2 = 0; - _intArraysAllocated = false; _array1013 = 0; _array1013Allocated = false; } LogicHEsoccer::~LogicHEsoccer() { free(_userDataD); - op_1020(); // clear int arrays delete[] _array1013; } @@ -902,10 +898,6 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) { res = op_1019(args); break; - case 1020: - res = op_1020(); - break; - case 1021: res = op_1021(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); break; @@ -915,7 +907,7 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) { res = getFromArray(args[0], args[1], args[2]); break; - case 1010: case 1015: case 1018: + case 1010: case 1015: case 1018: case 1020: // Used only by the in-game editor (so, fall through) default: LogicHE::dispatch(op, numArgs, args); @@ -925,9 +917,6 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) { } void LogicHEsoccer::beforeBootScript() { - if (_intArraysAllocated) - op_1020(); - _userDataD[530] = 0; } @@ -1026,8 +1015,6 @@ int LogicHEsoccer::op_1007(int32 *args) { // Used when the HE logo is shown // This initializes the _userDataD fields that are used in op_1006/op_1011 - _intArraysAllocated = false; - float y1 = (double)args[0] / 100.0; float x1 = (double)args[1] / 100.0; float x2 = (double)args[2] / 100.0; @@ -1374,7 +1361,7 @@ int LogicHEsoccer::op_sub5(int a1, int a2, int a3) { int LogicHEsoccer::op_1013(int32 a1, int32 a2, int32 a3) { // Creates _array1013 for *some* purpose - // Seems to be used in op_1015 + // Seems to be used in op_1014 and op_1015 _array1013 = new uint32[585 * 11]; _array1013Allocated = true; @@ -2250,40 +2237,9 @@ int LogicHEsoccer::op_1019(int32 *args) { for (int i = 0; i < 585; i++) _byteArray2[i] = getFromArray(args[0], 0, i); - // The remaining code of this function is used for the - // built-in editor. - - // Deallocate the two integer arrays - if (_intArraysAllocated) - op_1020(); - - // Reallocate them - _intArray1 = new uint32[1008]; - _intArray2 = new uint32[168]; - _intArraysAllocated = true; - - memset(_intArray1, 0, 4 * 4); - memset(_intArray2, 0, 24 * 4); - - // These two arrays are used in op_1015 - for (int i = 0; i < 42; i++) { - for (int j = 0; j < 24; j++) - _intArray1[j + 24 * i] = getFromArray(args[3], 0, j + 24 * i); - - for (int j = 0; j < 4; j++) - _intArray2[j + 4 * i] = getFromArray(args[2], 0, j + 4 * i); - } - - return 1; -} - -int LogicHEsoccer::op_1020() { - // Deallocate in-game editor integer arrays - // The arrays can be allocated in op_1015 or op_1019 - - delete[] _intArray1; _intArray1 = 0; - delete[] _intArray2; _intArray2 = 0; - _intArraysAllocated = false; + // The remaining code of this function was used for the + // built-in editor. However, it is incomplete in the + // final product, so we do not need to have it. return 1; } diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h index db6397e830..a9668cd3ee 100644 --- a/engines/scumm/he/logic_he.h +++ b/engines/scumm/he/logic_he.h @@ -137,15 +137,8 @@ private: int op_1016(int32 *args); int op_1017(int32 *args); int op_1019(int32 *args); - int op_1020(); int op_1021(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7); - // Two integer arrays are used between some functions - // Originally, these pointers were in _userData, but we keep them separate - // Also, doing it that would break things on non 32-bit systems... - bool _intArraysAllocated; - uint32 *_intArray1, *_intArray2; - // op_1007 allocates some arrays // they're then filled by op_1019 byte _byteArray1[4096], _byteArray2[585]; |