2005-05-08 03:08:11 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2006-01-18 17:39:49 +00:00
|
|
|
* Copyright (C) 2005-2006 The ScummVM project
|
2005-05-08 03:08:11 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-05-08 03:08:11 +00:00
|
|
|
*
|
2006-02-11 09:55:41 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2005-05-08 03:08:11 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-05-14 23:28:22 +00:00
|
|
|
#if !defined(LOGIC_HE_H) && !defined(DISABLE_HE)
|
|
|
|
#define LOGIC_HE_H
|
|
|
|
|
2005-06-24 15:23:51 +00:00
|
|
|
#include "common/stdafx.h"
|
2005-05-08 03:08:11 +00:00
|
|
|
|
|
|
|
namespace Scumm {
|
|
|
|
|
2006-02-04 12:11:10 +00:00
|
|
|
class ScummEngine_v90he;
|
|
|
|
|
2005-05-08 03:08:11 +00:00
|
|
|
class LogicHE {
|
2005-05-10 22:31:48 +00:00
|
|
|
public:
|
2005-05-08 03:08:11 +00:00
|
|
|
float *_userData;
|
2005-05-09 02:30:31 +00:00
|
|
|
double *_userDataD;
|
2005-05-11 21:35:19 +00:00
|
|
|
ScummEngine_v90he *_vm;
|
2005-05-08 03:08:11 +00:00
|
|
|
|
2005-05-11 21:35:19 +00:00
|
|
|
LogicHE(ScummEngine_v90he *vm);
|
2005-05-10 22:31:48 +00:00
|
|
|
virtual ~LogicHE();
|
|
|
|
|
2006-02-04 12:11:10 +00:00
|
|
|
void writeScummVar(int var, int32 value);
|
2005-05-11 21:35:19 +00:00
|
|
|
int getFromArray(int arg0, int idx2, int idx1);
|
|
|
|
void putInArray(int arg0, int idx2, int idx1, int val);
|
2005-05-10 22:31:48 +00:00
|
|
|
|
|
|
|
void beforeBootScript(void) {};
|
|
|
|
void initOnce() {};
|
|
|
|
void startOfFrame() {};
|
|
|
|
void endOfFrame() {};
|
2005-05-11 21:35:19 +00:00
|
|
|
void processKeyStroke(int keyPressed) {};
|
2005-05-11 10:09:06 +00:00
|
|
|
|
2005-05-10 22:31:48 +00:00
|
|
|
virtual int versionID();
|
|
|
|
virtual int32 dispatch(int op, int numArgs, int32 *args);
|
|
|
|
};
|
|
|
|
|
|
|
|
class LogicHErace : public LogicHE {
|
|
|
|
public:
|
2005-05-11 21:35:19 +00:00
|
|
|
LogicHErace(ScummEngine_v90he *vm) : LogicHE(vm) {}
|
2005-05-08 03:08:11 +00:00
|
|
|
|
|
|
|
int versionID();
|
|
|
|
int32 dispatch(int op, int numArgs, int32 *args);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int32 op_1003(int32 *args);
|
|
|
|
int32 op_1004(int32 *args);
|
|
|
|
int32 op_1100(int32 *args);
|
|
|
|
int32 op_1101(int32 *args);
|
|
|
|
int32 op_1102(int32 *args);
|
|
|
|
int32 op_1103(int32 *args);
|
|
|
|
int32 op_1110();
|
|
|
|
int32 op_1120(int32 *args);
|
|
|
|
int32 op_1130(int32 *args);
|
|
|
|
int32 op_1140(int32 *args);
|
|
|
|
|
|
|
|
void op_sub1(float arg);
|
|
|
|
void op_sub2(float arg);
|
|
|
|
void op_sub3(float arg);
|
|
|
|
};
|
|
|
|
|
2005-05-10 22:31:48 +00:00
|
|
|
class LogicHEfunshop : public LogicHE {
|
|
|
|
public:
|
2005-05-11 21:35:19 +00:00
|
|
|
LogicHEfunshop(ScummEngine_v90he *vm) : LogicHE(vm) {}
|
2005-05-10 22:31:48 +00:00
|
|
|
|
|
|
|
int versionID();
|
|
|
|
int32 dispatch(int op, int numArgs, int32 *args);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void op_1004(int32 *args);
|
|
|
|
void op_1005(int32 *args);
|
2005-05-17 23:03:25 +00:00
|
|
|
int checkShape(int32 data0, int32 data1, int32 data4, int32 data5, int32 data2, int32 data3, int32 data6, int32 data7, int32 *x, int32 *y);
|
2005-05-10 22:31:48 +00:00
|
|
|
};
|
|
|
|
|
2005-05-12 01:21:04 +00:00
|
|
|
class LogicHEfootball : public LogicHE {
|
|
|
|
public:
|
|
|
|
LogicHEfootball(ScummEngine_v90he *vm) : LogicHE(vm) {}
|
|
|
|
|
|
|
|
int versionID();
|
|
|
|
int32 dispatch(int op, int numArgs, int32 *args);
|
|
|
|
|
|
|
|
private:
|
2005-05-14 00:32:40 +00:00
|
|
|
int op_1004(int32 *args);
|
2005-05-12 01:21:04 +00:00
|
|
|
int op_1006(int32 *args);
|
2005-05-14 00:32:40 +00:00
|
|
|
int op_1007(int32 *args);
|
2005-05-12 01:21:04 +00:00
|
|
|
int op_1010(int32 *args);
|
|
|
|
int op_1022(int32 *args);
|
2005-05-14 01:28:02 +00:00
|
|
|
int op_1023(int32 *args);
|
2005-05-14 00:32:40 +00:00
|
|
|
int op_1024(int32 *args);
|
2005-05-12 01:21:04 +00:00
|
|
|
};
|
|
|
|
|
2006-02-12 13:45:57 +00:00
|
|
|
class LogicHEsoccer : public LogicHE {
|
|
|
|
public:
|
|
|
|
LogicHEsoccer(ScummEngine_v90he *vm) : LogicHE(vm) {}
|
|
|
|
|
|
|
|
int versionID();
|
|
|
|
int32 dispatch(int op, int numArgs, int32 *args);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int op_1001(int32 *args);
|
|
|
|
int op_1002(int32 *args);
|
|
|
|
int op_1004(int32 *args);
|
|
|
|
};
|
|
|
|
|
2005-05-08 03:08:11 +00:00
|
|
|
} // End of namespace Scumm
|
2005-05-14 23:28:22 +00:00
|
|
|
|
|
|
|
#endif
|