From dbfd703d5123459fa92410f3c33b62a9840e53b3 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Wed, 13 Apr 2005 19:48:49 +0000 Subject: Updated comment svn-id: r17590 --- TODO | 2 +- scumm/intern.h | 2 +- scumm/script_v100he.cpp | 2 +- scumm/script_v90he.cpp | 36 +++++++++++++++++++----------------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/TODO b/TODO index c5e55e8b12..f0c343ab18 100644 --- a/TODO +++ b/TODO @@ -286,7 +286,7 @@ SCUMM - Add support for o80_unknownE0 type1 (For binoculars in pajama2) - Add support for o80_unknownE0 type2 (For black board in freddi2 and paper in spyfox) - Add support for o80_readConfigFile (For loading map.ini details in mustard) - - Add support for o90_unknown39 (For chase/soccer2004) + - Add support for o90_getLinesIntersectionPoint (For chase/soccer2004) - Add support for IMA ADPCM compression for speech files (For soccer2004) - Add support for U32 library calls, triggered by case 2001 of o90_kernelGetFunctions/o90_kernelSetFunctions The U32 code controls the players movements on field.of footdemo/soccer2004 diff --git a/scumm/intern.h b/scumm/intern.h index 2f35010513..16f1504f10 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1100,7 +1100,7 @@ protected: void o90_cond(); void o90_dim2dim2Array(); void o90_redim2dimArray(); - void o90_unknown39(); + void o90_getLinesIntersectionPoint(); void o90_sortArray(); void o90_getObjectData(); void o90_getPaletteData(); diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 57e876d4be..c76d859354 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -264,7 +264,7 @@ void ScummEngine_v100he::setupOpcodes() { /* B0 */ OPCODE(o72_findObjectWithClassOf), OPCODE(o70_polygonHit), - OPCODE(o90_unknown39), + OPCODE(o90_getLinesIntersectionPoint), OPCODE(o6_invalid), /* B4 */ OPCODE(o72_getNumFreeArrays), diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 9c93cac24d..b22bb0b82d 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -113,7 +113,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o90_dim2dim2Array), /* 38 */ OPCODE(o90_redim2dimArray), - OPCODE(o90_unknown39), + OPCODE(o90_getLinesIntersectionPoint), OPCODE(o90_sortArray), OPCODE(o6_invalid), /* 3C */ @@ -1968,22 +1968,24 @@ void ScummEngine_v90he::o90_redim2dimArray() { } } -void ScummEngine_v90he::o90_unknown39() { - // TODO: Array related - - int array1 = fetchScriptWord(); - int array2 = fetchScriptWord(); - int a2_dim1end = pop(); - int a2_dim1start = pop(); - int a2_dim2end = pop(); - int a2_dim2start = pop(); - int a1_dim1end = pop(); - int a1_dim1start = pop(); - int a1_dim2end = pop(); - int a1_dim2start = pop(); - - push(1); - debug(1,"o90_unknown39 stub array1 %d (%d, %d, %d, %d) array2 %d (%d, %d, %d, %d)", array1, a2_dim2start, a2_dim2end, a2_dim1start, a2_dim1end, array2, a1_dim2start, a1_dim2end, a1_dim1start, a1_dim1end); +void ScummEngine_v90he::o90_getLinesIntersectionPoint() { + int var_ix = fetchScriptWord(); + int var_iy = fetchScriptWord(); + int line2_y2 = pop(); + int line2_x2 = pop(); + int line2_y1 = pop(); + int line2_x1 = pop(); + int line1_y2 = pop(); + int line1_x2 = pop(); + int line1_y1 = pop(); + int line1_x1 = pop(); + + // XXX compute the intersection point of the 2 lines + writeVar(var_ix, 0); + writeVar(var_iy, 0); + push(0); + + debug(1, "o90_getLinesIntersectionPoint stub var_x=%d var y=%d line1=(%d,%d,%d,%d) line2=(%d,%d,%d,%d)", var_ix, var_iy, line1_x1, line1_y1, line1_x2, line1_y2, line2_x1, line2_y1, line2_x2, line2_y2); } void ScummEngine_v90he::getArrayDim(int array, int *dim2start, int *dim2end, int *dim1start, int *dim1end) { -- cgit v1.2.3