diff options
| -rw-r--r-- | engines/scumm/he/logic_he.cpp | 15 | ||||
| -rw-r--r-- | engines/scumm/he/logic_he.h | 1 | 
2 files changed, 16 insertions, 0 deletions
| diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index ca2058fea7..b99459d80d 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -894,6 +894,10 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) {  		res = op_1016(args);  		break; +	case 1017: +		res = op_1017(args); +		break; +  	case 1019:  		res = op_1019(args);  		break; @@ -2221,6 +2225,17 @@ int LogicHEsoccer::op_1016(int32 *args) {  	return result;  } +int LogicHEsoccer::op_1017(int32 *args) { +	// Used sporadically during a match (out of bounds?) +	if (!args[1]) +		args[1] = 1; + +	double v3 = asin((double)args[0] / (double)args[1]); +	writeScummVar(108, (int32)(v3 / 0.01745329251994328 * (double)args[1])); + +	return 1; +} +  int LogicHEsoccer::op_1019(int32 *args) {  	// Used at the beginning of a match  	// Initializes some arrays. Player positions? diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h index 27b06a797d..db6397e830 100644 --- a/engines/scumm/he/logic_he.h +++ b/engines/scumm/he/logic_he.h @@ -135,6 +135,7 @@ private:  	int op_1013(int32 a1, int32 a2, int32 a3);  	int op_1014(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7, int32 a8, int32 a9, int32 a10, int32 a11, int32 a12, int32 a13, int32 a14);  	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); | 
