2011-12-11 01:57:03 +01:00
|
|
|
/* 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.
|
2014-02-18 02:34:21 +01:00
|
|
|
*
|
2011-12-11 01:57:03 +01:00
|
|
|
* 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.
|
2014-02-18 02:34:21 +01:00
|
|
|
*
|
2011-12-11 01:57:03 +01:00
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef ENABLE_EOB
|
|
|
|
|
|
|
|
#ifndef KYRA_EOB1_H
|
|
|
|
#define KYRA_EOB1_H
|
|
|
|
|
|
|
|
#include "kyra/eobcommon.h"
|
|
|
|
|
|
|
|
namespace Kyra {
|
|
|
|
|
2011-12-12 16:23:01 +01:00
|
|
|
class EoBEngine : public EoBCoreEngine {
|
|
|
|
friend class GUI_EoB;
|
2012-01-17 23:11:00 +01:00
|
|
|
friend class EoBIntroPlayer;
|
2011-12-11 01:57:03 +01:00
|
|
|
public:
|
2011-12-12 16:23:01 +01:00
|
|
|
EoBEngine(OSystem *system, const GameFlags &flags);
|
|
|
|
~EoBEngine();
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Init / Release
|
|
|
|
Common::Error init();
|
|
|
|
void initStaticResource();
|
|
|
|
void initSpells();
|
|
|
|
|
|
|
|
// Main Menu
|
|
|
|
int mainMenu();
|
|
|
|
int mainMenuLoop();
|
2011-06-19 00:00:48 +02:00
|
|
|
int _menuChoiceInit;
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
// Main loop
|
|
|
|
void startupNew();
|
2011-07-18 01:22:58 +02:00
|
|
|
void startupLoad();
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
// Intro/Outro
|
|
|
|
void seq_playIntro();
|
|
|
|
void seq_playFinale();
|
2011-08-14 18:29:45 +02:00
|
|
|
void seq_xdeath();
|
|
|
|
|
|
|
|
const char *const *_finBonusStrings;
|
|
|
|
|
2011-12-11 01:57:03 +01:00
|
|
|
// characters
|
2011-08-01 22:50:51 +02:00
|
|
|
void drawNpcScene(int npcIndex);
|
|
|
|
void encodeDrawNpcSeqShape(int npcIndex, int drawX, int drawY);
|
|
|
|
void runNpcDialogue(int npcIndex);
|
|
|
|
|
|
|
|
const uint8 *_npcShpData;
|
|
|
|
const uint8 *_npcSubShpIndex1;
|
|
|
|
const uint8 *_npcSubShpIndex2;
|
|
|
|
const uint8 *_npcSubShpY;
|
2011-11-28 18:44:40 +01:00
|
|
|
const char *const *_npcStrings[11];
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
// items
|
|
|
|
void updateUsedCharacterHandItem(int charIndex, int slot);
|
|
|
|
|
|
|
|
// Monsters
|
|
|
|
void replaceMonster(int unit, uint16 block, int d, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem);
|
2013-04-20 20:43:38 +02:00
|
|
|
bool killMonsterExtra(EoBMonsterInPlay *m);
|
2011-08-06 00:40:53 +02:00
|
|
|
void updateScriptTimersExtra();
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
// Level
|
2011-12-29 16:56:56 +01:00
|
|
|
const uint8 *loadDoorShapes(const char *filename, int doorIndex, const uint8 *shapeDefs) { return 0; }
|
2011-12-11 01:57:03 +01:00
|
|
|
void loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2);
|
|
|
|
void drawDoorIntern(int type, int index, int x, int y, int w, int wall, int mDim, int16 y1, int16 y2);
|
|
|
|
|
|
|
|
const int16 *_dscDoorCoordsExt;
|
|
|
|
const uint8 *_dscDoorScaleMult4;
|
|
|
|
const uint8 *_dscDoorScaleMult5;
|
|
|
|
const uint8 *_dscDoorScaleMult6;
|
|
|
|
const uint8 *_dscDoorY3;
|
|
|
|
const uint8 *_dscDoorY4;
|
|
|
|
const uint8 *_dscDoorY5;
|
|
|
|
const uint8 *_dscDoorY6;
|
2011-08-06 00:40:53 +02:00
|
|
|
const uint8 *_dscDoorY7;
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
const uint8 *_doorShapeEncodeDefs;
|
|
|
|
const uint8 *_doorSwitchShapeEncodeDefs;
|
|
|
|
const uint8 *_doorSwitchCoords;
|
|
|
|
|
2011-07-29 15:57:02 +02:00
|
|
|
// Magic
|
|
|
|
void turnUndeadAuto();
|
|
|
|
void turnUndeadAutoHit();
|
|
|
|
|
2012-11-19 12:40:29 +01:00
|
|
|
const char *const *_turnUndeadString;
|
2011-07-29 15:57:02 +02:00
|
|
|
|
2011-12-11 01:57:03 +01:00
|
|
|
// Misc
|
2011-07-28 17:56:59 +02:00
|
|
|
bool checkPartyStatusExtra();
|
2011-08-01 22:50:51 +02:00
|
|
|
int resurrectionSelectDialogue();
|
|
|
|
void healParty();
|
2011-12-27 16:42:05 +01:00
|
|
|
|
|
|
|
const KyraRpgGUISettings *guiSettings();
|
|
|
|
|
2012-02-13 17:04:05 +01:00
|
|
|
static const KyraRpgGUISettings _guiSettingsVGA;
|
|
|
|
static const KyraRpgGUISettings _guiSettingsEGA;
|
2012-02-13 18:39:50 +01:00
|
|
|
static const uint8 _egaDefaultPalette[];
|
2011-12-11 01:57:03 +01:00
|
|
|
};
|
|
|
|
|
2012-11-19 12:40:29 +01:00
|
|
|
} // End of namespace Kyra
|
2011-12-11 01:57:03 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // ENABLE_EOB
|