mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
HOPKINS: Moved the script execution code to it's own file
This commit is contained in:
parent
c593f75296
commit
bf0290f6a4
@ -2353,11 +2353,11 @@ void GraphicsManager::OPTI_INI(const Common::String &file, int a2) {
|
||||
} else {
|
||||
v11 = 0;
|
||||
do {
|
||||
v6 = _vm->_objectsManager.Traduction(ptr + 20 * v2);
|
||||
v6 = _vm->_scriptManager.Traduction(ptr + 20 * v2);
|
||||
if (v6 == 2)
|
||||
v2 = _vm->_objectsManager.Control_Goto((ptr + 20 * v2));
|
||||
v2 = _vm->_scriptManager.Control_Goto((ptr + 20 * v2));
|
||||
if (v6 == 3)
|
||||
v2 = _vm->_objectsManager.Control_If(ptr, v2);
|
||||
v2 = _vm->_scriptManager.Control_If(ptr, v2);
|
||||
if (v2 == -1)
|
||||
error("Error, defective IFF");
|
||||
if (v6 == 1 || v6 == 4)
|
||||
|
@ -48,6 +48,7 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe
|
||||
_linesManager.setParent(this);
|
||||
_menuManager.setParent(this);
|
||||
_objectsManager.setParent(this);
|
||||
_scriptManager.setParent(this);
|
||||
_soundManager.setParent(this);
|
||||
_talkManager.setParent(this);
|
||||
}
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "hopkins/lines.h"
|
||||
#include "hopkins/menu.h"
|
||||
#include "hopkins/objects.h"
|
||||
#include "hopkins/script.h"
|
||||
#include "hopkins/sound.h"
|
||||
#include "hopkins/talk.h"
|
||||
|
||||
@ -104,6 +105,7 @@ public:
|
||||
LinesManager _linesManager;
|
||||
MenuManager _menuManager;
|
||||
ObjectsManager _objectsManager;
|
||||
ScriptManager _scriptManager;
|
||||
SoundManager _soundManager;
|
||||
TalkManager _talkManager;
|
||||
public:
|
||||
|
@ -14,6 +14,7 @@ MODULE_OBJS := \
|
||||
lines.o \
|
||||
menu.o \
|
||||
objects.o \
|
||||
script.o \
|
||||
sound.o \
|
||||
talk.o
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -109,7 +109,6 @@ public:
|
||||
int MAX_DEPA1;
|
||||
int VIRE_INVENT;
|
||||
int AFFINVEN;
|
||||
int TRAVAILOBJET;
|
||||
int CH_TETE;
|
||||
int T_RECTIF;
|
||||
int DESACTIVE;
|
||||
@ -215,7 +214,6 @@ public:
|
||||
void VALID_OBJET(int a1);
|
||||
void OPTI_OBJET();
|
||||
void SPECIAL_JEU();
|
||||
int Traduction(byte *a1);
|
||||
void BOB_VIVANT(int a1);
|
||||
void VBOB(byte *a1, int a2, int a3, int a4, int a5);
|
||||
void VBOB_OFF(int idx);
|
||||
@ -242,9 +240,6 @@ public:
|
||||
void SPECIAL_INI(const Common::String &a1);
|
||||
void OPTI_BOBON(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
|
||||
void SCI_OPTI_ONE(int a1, int a2, int a3, int a4);
|
||||
int Control_Goto(const byte *dataP);
|
||||
int Control_If(const byte *dataP, int a2);
|
||||
int Traduction2(const byte *dataP);
|
||||
void VERBE_OFF(int idx, int a2);
|
||||
void VERBE_ON(int idx, int a2);
|
||||
int CALC_PROPRE(int idx);
|
||||
|
2410
engines/hopkins/script.cpp
Normal file
2410
engines/hopkins/script.cpp
Normal file
File diff suppressed because it is too large
Load Diff
50
engines/hopkins/script.h
Normal file
50
engines/hopkins/script.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HOPKINS_SCRIPT_H
|
||||
#define HOPKINS_SCRIPT_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "common/endian.h"
|
||||
#include "common/str.h"
|
||||
#include "hopkins/globals.h"
|
||||
|
||||
namespace Hopkins {
|
||||
|
||||
class ScriptManager {
|
||||
private:
|
||||
HopkinsEngine *_vm;
|
||||
public:
|
||||
int TRAVAILOBJET;
|
||||
public:
|
||||
ScriptManager();
|
||||
void setParent(HopkinsEngine *vm);
|
||||
|
||||
int Traduction(byte *a1);
|
||||
int Traduction2(const byte *dataP);
|
||||
int Control_Goto(const byte *dataP);
|
||||
int Control_If(const byte *dataP, int a2);
|
||||
};
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
||||
#endif /* HOPKINS_SCRIPT_H */
|
@ -1013,11 +1013,11 @@ LABEL_2:
|
||||
v17 = 0;
|
||||
v13 = 1;
|
||||
do {
|
||||
v10 = _vm->_objectsManager.Traduction(ptr + 20 * v13);
|
||||
v10 = _vm->_scriptManager.Traduction(ptr + 20 * v13);
|
||||
if (v10 == 2)
|
||||
v13 = _vm->_objectsManager.Control_Goto(ptr + 20 * v13);
|
||||
v13 = _vm->_scriptManager.Control_Goto(ptr + 20 * v13);
|
||||
if (v10 == 3)
|
||||
v13 = _vm->_objectsManager.Control_If(ptr, v13);
|
||||
v13 = _vm->_scriptManager.Control_If(ptr, v13);
|
||||
if (v13 == -1)
|
||||
error("Invalid IFF function");
|
||||
if (v10 == 1 || v10 == 4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user