mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 02:12:14 +00:00
TITANIC: Beginnings of STVocab class, CScriptHandler constructor
This commit is contained in:
parent
74935b371f
commit
c4375b134a
@ -431,6 +431,7 @@ MODULE_OBJS := \
|
||||
star_control/star_control_sub15.o \
|
||||
support/direct_draw.o \
|
||||
support/direct_draw_surface.o \
|
||||
support/file_reader.o \
|
||||
support/files_manager.o \
|
||||
support/font.o \
|
||||
support/image.o \
|
||||
@ -458,6 +459,7 @@ MODULE_OBJS := \
|
||||
true_talk/succubus_script.o \
|
||||
true_talk/title_engine.o \
|
||||
true_talk/script_handler.o \
|
||||
true_talk/st_vocab.o \
|
||||
true_talk/true_talk_manager.o \
|
||||
true_talk/tt_script_base.o \
|
||||
true_talk/tt_room_script.o \
|
||||
|
29
engines/titanic/support/file_reader.cpp
Normal file
29
engines/titanic/support/file_reader.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/support/file_reader.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
|
||||
|
||||
} // End of namespace Titanic
|
38
engines/titanic/support/file_reader.h
Normal file
38
engines/titanic/support/file_reader.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* 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 TITANIC_FILE_READER_H
|
||||
#define TITANIC_FILE_READER_H
|
||||
|
||||
#include "common/file.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CFileReader {
|
||||
public:
|
||||
Common::File _file;
|
||||
public:
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_FILE_READER_H */
|
@ -34,6 +34,7 @@
|
||||
#include "titanic/events.h"
|
||||
#include "titanic/support/files_manager.h"
|
||||
#include "titanic/main_game_window.h"
|
||||
#include "titanic/support/file_reader.h"
|
||||
#include "titanic/support/movie.h"
|
||||
#include "titanic/support/screen_manager.h"
|
||||
#include "titanic/support/string.h"
|
||||
@ -116,6 +117,7 @@ public:
|
||||
OSScreenManager *_screenManager;
|
||||
CMainGameWindow *_window;
|
||||
Common::RandomSource _randomSource;
|
||||
CFileReader _fileReader;
|
||||
CMovieList _activeMovies;
|
||||
CString _itemNames[TOTAL_ITEMS];
|
||||
CString _itemDescriptions[TOTAL_ITEMS];
|
||||
|
@ -21,12 +21,17 @@
|
||||
*/
|
||||
|
||||
#include "titanic/true_talk/script_handler.h"
|
||||
#include "titanic/titanic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) {
|
||||
CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) :
|
||||
_owner(owner), _script(owner->_script), _reader(g_vm->_fileReader),
|
||||
_vocab(val2), _field10(0), _field14(0), _field18(0), _inputCtr(0),
|
||||
_field20(0), _field24(0), _field28(0), _field2C(0), _field30(0) {
|
||||
|
||||
}
|
||||
|
||||
int CScriptHandler::scriptChanged(TTRoomScript *roomScript, TTNpcScript *npcScript, uint dialogueId) {
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "titanic/true_talk/tt_npc_script.h"
|
||||
#include "titanic/true_talk/tt_room_script.h"
|
||||
#include "titanic/true_talk/tt_string.h"
|
||||
#include "titanic/true_talk/st_vocab.h"
|
||||
#include "titanic/support/file_reader.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
@ -35,8 +37,8 @@ class CScriptHandler {
|
||||
private:
|
||||
CTitleEngine *_owner;
|
||||
TTScriptBase *_script;
|
||||
int _field8;
|
||||
int _fieldC;
|
||||
CFileReader &_reader;
|
||||
STVocab _vocab;
|
||||
int _field10;
|
||||
int _field14;
|
||||
int _field18;
|
||||
|
37
engines/titanic/true_talk/st_vocab.cpp
Normal file
37
engines/titanic/true_talk/st_vocab.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/true_talk/st_vocab.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
STVocab::STVocab(int val): _field0(0), _field4(0), _field8(0),
|
||||
_fieldC(0), _field10(0), _field18(val) {
|
||||
_field14 = load("STvocab.txt");
|
||||
}
|
||||
|
||||
int STVocab::load(const CString &name) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
50
engines/titanic/true_talk/st_vocab.h
Normal file
50
engines/titanic/true_talk/st_vocab.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 TITANIC_ST_VOCAB_H
|
||||
#define TITANIC_ST_VOCAB_H
|
||||
|
||||
#include "titanic/support/string.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class STVocab {
|
||||
private:
|
||||
int _field0;
|
||||
int _field4;
|
||||
int _field8;
|
||||
int _fieldC;
|
||||
int _field10;
|
||||
int _field14;
|
||||
int _field18;
|
||||
private:
|
||||
/**
|
||||
* Load the vocab data
|
||||
*/
|
||||
int load(const CString &name);
|
||||
public:
|
||||
STVocab(int val);
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ST_VOCAB_H */
|
@ -33,10 +33,9 @@
|
||||
namespace Titanic {
|
||||
|
||||
class CTitleEngine {
|
||||
protected:
|
||||
TTScriptBase *_script;
|
||||
public:
|
||||
CScriptHandler *_scriptHandler;
|
||||
TTScriptBase *_script;
|
||||
public:
|
||||
CTitleEngine();
|
||||
~CTitleEngine();
|
||||
|
Loading…
Reference in New Issue
Block a user