2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* 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.
|
2004-04-12 21:40:49 +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
|
2008-01-05 12:45:14 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2004-04-12 21:40:49 +00:00
|
|
|
* 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.
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
2006-02-11 12:44:16 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2004-04-12 21:40:49 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-05-01 13:48:01 +00:00
|
|
|
// Scene management module private header file
|
2004-04-12 21:40:49 +00:00
|
|
|
|
|
|
|
#ifndef SAGA_SCENE_H
|
|
|
|
#define SAGA_SCENE_H
|
|
|
|
|
2005-07-14 17:46:21 +00:00
|
|
|
#include "saga/font.h"
|
2004-12-15 00:24:12 +00:00
|
|
|
#include "saga/list.h"
|
2005-01-16 19:06:04 +00:00
|
|
|
#include "saga/actor.h"
|
2005-10-08 15:20:11 +00:00
|
|
|
#include "saga/interface.h"
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2004-04-12 21:40:49 +00:00
|
|
|
namespace Saga {
|
|
|
|
|
2007-05-08 17:32:31 +00:00
|
|
|
//#define SCENE_DEBUG // for scene debugging
|
|
|
|
|
2004-12-28 21:33:46 +00:00
|
|
|
#define SCENE_DOORS_MAX 16
|
2005-08-06 18:28:43 +00:00
|
|
|
#define NO_CHAPTER_CHANGE -2
|
|
|
|
|
2008-05-26 11:10:46 +00:00
|
|
|
// Scenes
|
|
|
|
#define ITE_SCENE_INV -1
|
|
|
|
#define ITE_SCENE_PUZZLE 26
|
|
|
|
#define ITE_SCENE_LODGE 21
|
|
|
|
#define ITE_SCENE_ENDCREDIT1 295
|
|
|
|
#define ITE_SCENE_OVERMAP 226
|
|
|
|
|
|
|
|
// Default scenes
|
|
|
|
#define ITE_DEFAULT_SCENE 32
|
|
|
|
#define IHNM_DEFAULT_SCENE 151
|
|
|
|
#define ITEDEMO_DEFAULT_SCENE 68
|
|
|
|
#define IHNMDEMO_DEFAULT_SCENE 144
|
|
|
|
|
2004-10-07 23:02:19 +00:00
|
|
|
class ObjectMap;
|
|
|
|
|
2005-08-10 14:11:22 +00:00
|
|
|
struct Event;
|
2005-01-09 16:43:57 +00:00
|
|
|
|
2005-01-16 19:06:04 +00:00
|
|
|
enum SceneFlags {
|
|
|
|
kSceneFlagISO = 1,
|
|
|
|
kSceneFlagShowCursor = 2
|
|
|
|
};
|
|
|
|
|
2005-07-08 16:56:03 +00:00
|
|
|
struct BGInfo {
|
|
|
|
Rect bounds;
|
|
|
|
byte *buffer;
|
|
|
|
size_t bufferLength;
|
2004-08-04 20:28:57 +00:00
|
|
|
};
|
|
|
|
|
2005-05-08 14:04:06 +00:00
|
|
|
typedef int (SceneProc) (int, void *);
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2004-04-12 21:40:49 +00:00
|
|
|
|
|
|
|
enum SCENE_PROC_PARAMS {
|
|
|
|
SCENE_BEGIN = 0,
|
|
|
|
SCENE_END
|
|
|
|
};
|
|
|
|
|
2004-05-01 13:48:01 +00:00
|
|
|
// Resource type numbers
|
2005-01-28 19:25:41 +00:00
|
|
|
enum SAGAResourceTypes {
|
2005-07-25 17:35:35 +00:00
|
|
|
SAGA_UNKNOWN,
|
|
|
|
SAGA_ACTOR,
|
|
|
|
SAGA_OBJECT,
|
|
|
|
SAGA_BG_IMAGE,
|
|
|
|
SAGA_BG_MASK,
|
|
|
|
SAGA_STRINGS,
|
|
|
|
SAGA_OBJECT_MAP,
|
|
|
|
SAGA_ACTION_MAP,
|
|
|
|
SAGA_ISO_IMAGES,
|
|
|
|
SAGA_ISO_MAP,
|
|
|
|
SAGA_ISO_PLATFORMS,
|
|
|
|
SAGA_ISO_METATILES,
|
|
|
|
SAGA_ENTRY,
|
|
|
|
SAGA_ANIM,
|
|
|
|
SAGA_ISO_MULTI,
|
|
|
|
SAGA_PAL_ANIM,
|
|
|
|
SAGA_FACES,
|
|
|
|
SAGA_PALETTE
|
2004-04-12 21:40:49 +00:00
|
|
|
};
|
|
|
|
|
2004-04-25 14:42:14 +00:00
|
|
|
#define SAGA_RESLIST_ENTRY_LEN 4
|
|
|
|
|
2005-07-19 19:05:52 +00:00
|
|
|
struct SceneResourceData {
|
|
|
|
uint32 resourceId;
|
2005-07-25 02:38:43 +00:00
|
|
|
int resourceType;
|
2005-07-19 19:05:52 +00:00
|
|
|
byte *buffer;
|
|
|
|
size_t size;
|
|
|
|
bool invalid;
|
2004-04-25 14:42:14 +00:00
|
|
|
};
|
|
|
|
|
2004-04-12 21:40:49 +00:00
|
|
|
#define SAGA_SCENE_DESC_LEN 16
|
|
|
|
|
2005-01-15 20:12:49 +00:00
|
|
|
struct SceneDescription {
|
2004-08-11 18:02:03 +00:00
|
|
|
int16 flags;
|
2005-07-19 19:05:52 +00:00
|
|
|
int16 resourceListResourceId;
|
2004-08-11 18:02:03 +00:00
|
|
|
int16 endSlope;
|
|
|
|
int16 beginSlope;
|
2005-01-15 20:12:49 +00:00
|
|
|
uint16 scriptModuleNumber;
|
|
|
|
uint16 sceneScriptEntrypointNumber;
|
|
|
|
uint16 startScriptEntrypointNumber;
|
2005-07-19 19:05:52 +00:00
|
|
|
int16 musicResourceId;
|
|
|
|
SceneResourceData *resourceList;
|
|
|
|
size_t resourceListCount;
|
2004-04-25 14:42:14 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2005-01-16 19:06:04 +00:00
|
|
|
struct SceneEntry {
|
|
|
|
Location location;
|
|
|
|
int facing;
|
|
|
|
};
|
|
|
|
|
2005-01-18 11:55:31 +00:00
|
|
|
struct SceneEntryList {
|
|
|
|
SceneEntry *entryList;
|
|
|
|
int entryListCount;
|
|
|
|
|
2005-01-16 19:06:04 +00:00
|
|
|
const SceneEntry * getEntry(int index) {
|
2005-01-18 11:55:31 +00:00
|
|
|
if ((index < 0) || (index >= entryListCount)) {
|
2005-05-23 02:23:34 +00:00
|
|
|
error("SceneEntryList::getEntry wrong index (%d)", index);
|
2005-01-16 19:06:04 +00:00
|
|
|
}
|
2005-01-18 11:55:31 +00:00
|
|
|
return &entryList[index];
|
2005-01-16 19:06:04 +00:00
|
|
|
}
|
|
|
|
void freeMem() {
|
2005-01-18 11:55:31 +00:00
|
|
|
free(entryList);
|
|
|
|
memset(this, 0, sizeof(*this));
|
2005-01-16 19:06:04 +00:00
|
|
|
}
|
2005-01-18 11:55:31 +00:00
|
|
|
SceneEntryList() {
|
|
|
|
memset(this, 0, sizeof(*this));
|
2005-01-16 19:06:04 +00:00
|
|
|
}
|
|
|
|
~SceneEntryList() {
|
|
|
|
freeMem();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2005-07-09 16:23:45 +00:00
|
|
|
struct SceneImage {
|
2004-04-12 21:40:49 +00:00
|
|
|
int loaded;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
int p;
|
2004-04-30 23:02:23 +00:00
|
|
|
byte *buf;
|
2004-04-12 21:40:49 +00:00
|
|
|
size_t buf_len;
|
2004-04-30 23:02:23 +00:00
|
|
|
byte *res_buf;
|
2004-04-12 21:40:49 +00:00
|
|
|
size_t res_len;
|
2005-07-09 16:23:45 +00:00
|
|
|
PalEntry pal[256];
|
2004-04-25 14:42:14 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2004-12-15 00:24:12 +00:00
|
|
|
|
2005-01-15 23:46:43 +00:00
|
|
|
enum SceneTransitionType {
|
2005-05-08 14:04:06 +00:00
|
|
|
kTransitionNoFade,
|
2005-07-08 18:39:53 +00:00
|
|
|
kTransitionFade
|
2004-08-11 22:27:39 +00:00
|
|
|
};
|
|
|
|
|
2005-05-08 14:04:06 +00:00
|
|
|
enum SceneLoadFlags {
|
|
|
|
kLoadByResourceId,
|
|
|
|
kLoadBySceneNumber,
|
|
|
|
kLoadByDescription
|
|
|
|
};
|
|
|
|
|
|
|
|
struct LoadSceneParams {
|
2005-08-06 14:26:59 +00:00
|
|
|
int32 sceneDescriptor;
|
2005-05-08 14:04:06 +00:00
|
|
|
SceneLoadFlags loadFlag;
|
2005-01-15 20:12:49 +00:00
|
|
|
SceneDescription* sceneDescription;
|
2005-05-08 14:04:06 +00:00
|
|
|
SceneProc *sceneProc;
|
|
|
|
bool sceneSkipTarget;
|
|
|
|
SceneTransitionType transitionType;
|
|
|
|
int actorsEntrance;
|
2005-08-06 12:20:10 +00:00
|
|
|
int chapter;
|
2004-04-25 14:42:14 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
2005-05-08 14:04:06 +00:00
|
|
|
typedef Common::List<LoadSceneParams> SceneQueueList;
|
2004-12-15 00:24:12 +00:00
|
|
|
|
2004-08-11 23:42:02 +00:00
|
|
|
///// IHNM-specific stuff
|
2004-11-20 17:32:47 +00:00
|
|
|
#define IHNM_PALFADE_TIME 1000
|
|
|
|
#define IHNM_INTRO_FRAMETIME 80
|
|
|
|
#define IHNM_DGLOGO_TIME 8000
|
|
|
|
#define IHNM_TITLE_TIME_GM 28750
|
|
|
|
#define IHNM_TITLE_TIME_FM 19500
|
2004-08-11 23:42:02 +00:00
|
|
|
|
|
|
|
///// ITE-specific stuff
|
|
|
|
#define ITE_INTRO_FRAMETIME 90
|
|
|
|
|
|
|
|
#define INTRO_CAPTION_Y 170
|
2005-01-14 01:17:34 +00:00
|
|
|
#define INTRO_DE_CAPTION_Y 160
|
2007-12-21 02:08:30 +00:00
|
|
|
#define INTRO_IT_CAPTION_Y 160
|
2004-08-11 23:42:02 +00:00
|
|
|
#define VOICE_PAD 50
|
|
|
|
#define VOICE_LETTERLEN 90
|
|
|
|
|
|
|
|
#define PALETTE_FADE_DURATION 1000
|
|
|
|
#define DISSOLVE_DURATION 3000
|
|
|
|
#define LOGO_DISSOLVE_DURATION 1000
|
|
|
|
|
|
|
|
#define CREDIT_DURATION1 4000
|
|
|
|
|
2005-08-10 15:01:23 +00:00
|
|
|
struct IntroDialogue {
|
2004-08-11 23:42:02 +00:00
|
|
|
uint32 i_voice_rn;
|
2005-01-14 11:05:12 +00:00
|
|
|
const char *i_str;
|
2004-08-11 23:42:02 +00:00
|
|
|
};
|
|
|
|
|
2005-08-10 15:01:23 +00:00
|
|
|
struct IntroCredit {
|
2005-06-04 12:34:38 +00:00
|
|
|
Common::Language lang;
|
2005-01-09 16:43:57 +00:00
|
|
|
int game;
|
|
|
|
int type;
|
2004-08-11 23:42:02 +00:00
|
|
|
const char *string;
|
|
|
|
};
|
|
|
|
|
2005-01-04 17:15:53 +00:00
|
|
|
|
2004-08-04 20:28:57 +00:00
|
|
|
class Scene {
|
|
|
|
public:
|
|
|
|
Scene(SagaEngine *vm);
|
|
|
|
~Scene();
|
2004-12-03 19:15:44 +00:00
|
|
|
|
2004-12-24 20:44:39 +00:00
|
|
|
// Console functions
|
|
|
|
void cmdActionMapInfo();
|
|
|
|
void cmdObjectMapInfo();
|
|
|
|
|
|
|
|
void cmdSceneChange(int argc, const char **argv);
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2005-05-08 14:04:06 +00:00
|
|
|
void startScene();
|
2007-08-27 13:04:35 +00:00
|
|
|
void creditsScene();
|
2005-05-08 14:04:06 +00:00
|
|
|
void nextScene();
|
|
|
|
void skipScene();
|
|
|
|
void endScene();
|
2007-06-06 19:46:10 +00:00
|
|
|
void restoreScene();
|
2005-05-08 14:04:06 +00:00
|
|
|
void queueScene(LoadSceneParams *sceneQueue) {
|
|
|
|
_sceneQueue.push_back(*sceneQueue);
|
|
|
|
}
|
|
|
|
|
2005-05-22 11:59:22 +00:00
|
|
|
void draw();
|
2005-05-08 14:04:06 +00:00
|
|
|
int getFlags() const { return _sceneDescription.flags; }
|
|
|
|
int getScriptModuleNumber() const { return _sceneDescription.scriptModuleNumber; }
|
2005-08-13 19:41:11 +00:00
|
|
|
bool isInIntro() { return !_inGame; }
|
2005-07-08 16:56:03 +00:00
|
|
|
const Rect& getSceneClip() const { return _sceneClip; }
|
|
|
|
|
2004-12-28 21:33:46 +00:00
|
|
|
void getBGMaskInfo(int &width, int &height, byte *&buffer, size_t &bufferLength);
|
2005-01-07 21:13:26 +00:00
|
|
|
int isBGMaskPresent() { return _bgMask.loaded; }
|
2007-05-08 17:32:31 +00:00
|
|
|
|
|
|
|
int getBGMaskType(const Point &testPoint) {
|
|
|
|
uint offset;
|
|
|
|
if (!_bgMask.loaded) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
offset = testPoint.x + testPoint.y * _bgMask.w;
|
|
|
|
|
|
|
|
#ifdef SCENE_DEBUG
|
|
|
|
if (offset >= _bgMask.buf_len) {
|
|
|
|
error("Scene::getBGMaskType offset 0x%X exceed bufferLength 0x%X", offset, (int)_bgMask.buf_len);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return (_bgMask.buf[offset] >> 4) & 0x0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool validBGMaskPoint(const Point &testPoint) {
|
|
|
|
#ifdef SCENE_DEBUG
|
|
|
|
if (!_bgMask.loaded) {
|
|
|
|
error("Scene::validBGMaskPoint _bgMask not loaded");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return !((testPoint.x < 0) || (testPoint.x >= _bgMask.w) ||
|
|
|
|
(testPoint.y < 0) || (testPoint.y >= _bgMask.h));
|
|
|
|
}
|
|
|
|
|
2004-12-28 21:33:46 +00:00
|
|
|
bool canWalk(const Point &testPoint);
|
|
|
|
bool offscreenPath(Point &testPoint);
|
|
|
|
|
2007-05-08 17:32:31 +00:00
|
|
|
void setDoorState(int doorNumber, int doorState) {
|
|
|
|
#ifdef SCENE_DEBUG
|
|
|
|
if ((doorNumber < 0) || (doorNumber >= SCENE_DOORS_MAX))
|
|
|
|
error("Scene::setDoorState wrong doorNumber");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
_sceneDoors[doorNumber] = doorState;
|
|
|
|
}
|
|
|
|
|
|
|
|
int getDoorState(int doorNumber) {
|
|
|
|
#ifdef SCENE_DEBUG
|
|
|
|
if ((doorNumber < 0) || (doorNumber >= SCENE_DOORS_MAX))
|
|
|
|
error("Scene::getDoorState wrong doorNumber");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return _sceneDoors[doorNumber];
|
|
|
|
}
|
|
|
|
|
2005-01-04 16:10:43 +00:00
|
|
|
void initDoorsState();
|
2004-12-28 21:33:46 +00:00
|
|
|
|
2005-07-08 16:56:03 +00:00
|
|
|
void getBGInfo(BGInfo &bgInfo);
|
2005-07-24 17:07:16 +00:00
|
|
|
void getBGPal(PalEntry *&pal) {
|
2005-07-19 19:05:52 +00:00
|
|
|
pal = (PalEntry *)_bg.pal;
|
|
|
|
}
|
|
|
|
|
2004-12-19 13:38:11 +00:00
|
|
|
void getSlopes(int &beginSlope, int &endSlope);
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2005-05-08 14:04:06 +00:00
|
|
|
void clearSceneQueue(void) {
|
|
|
|
_sceneQueue.clear();
|
|
|
|
}
|
2005-08-06 18:28:43 +00:00
|
|
|
void changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType, int chapter = NO_CHAPTER_CHANGE);
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2005-05-18 18:28:10 +00:00
|
|
|
bool isSceneLoaded() const { return _sceneLoaded; }
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2005-05-08 14:04:06 +00:00
|
|
|
int getSceneResourceId(int sceneNumber) {
|
2007-05-08 17:32:31 +00:00
|
|
|
#ifdef SCENE_DEBUG
|
2005-07-08 18:39:53 +00:00
|
|
|
if ((sceneNumber < 0) || (sceneNumber >= _sceneCount)) {
|
2008-01-28 00:14:17 +00:00
|
|
|
error("getSceneResourceId: wrong sceneNumber %i", sceneNumber);
|
2005-05-08 14:04:06 +00:00
|
|
|
}
|
2007-05-08 17:32:31 +00:00
|
|
|
#endif
|
2005-05-08 14:04:06 +00:00
|
|
|
return _sceneLUT[sceneNumber];
|
|
|
|
}
|
2007-06-19 01:37:48 +00:00
|
|
|
int currentProtag() const { return _currentProtag; }
|
|
|
|
void setProtag(int pr) { _currentProtag = pr; }
|
2005-04-02 20:04:39 +00:00
|
|
|
int currentSceneNumber() const { return _sceneNumber; }
|
2005-10-04 23:38:19 +00:00
|
|
|
int currentChapterNumber() const { return _chapterNumber; }
|
|
|
|
void setChapterNumber(int ch) { _chapterNumber = ch; }
|
2005-04-21 01:30:07 +00:00
|
|
|
int getOutsetSceneNumber() const { return _outsetSceneNumber; }
|
2005-04-02 20:04:39 +00:00
|
|
|
int currentSceneResourceId() const { return _sceneResourceId; }
|
2007-06-19 02:42:59 +00:00
|
|
|
int getCurrentMusicTrack() const { return _currentMusicTrack; }
|
|
|
|
void setCurrentMusicTrack(int tr) { _currentMusicTrack = tr; }
|
|
|
|
int getCurrentMusicRepeat() const { return _currentMusicRepeat; }
|
|
|
|
void setCurrentMusicRepeat(int rp) { _currentMusicRepeat = rp; }
|
2007-06-19 11:23:20 +00:00
|
|
|
bool haveChapterPointsChanged() const { return _chapterPointsChanged; }
|
|
|
|
void setChapterPointsChanged(bool cp) { _chapterPointsChanged = cp; }
|
2007-06-19 02:42:59 +00:00
|
|
|
|
2005-09-28 15:41:21 +00:00
|
|
|
void cutawaySkip() {
|
|
|
|
if (_vm->_scene->isInIntro())
|
2005-09-28 15:49:20 +00:00
|
|
|
_vm->_framesEsc = 2;
|
2005-09-28 15:41:21 +00:00
|
|
|
else
|
2005-09-28 15:49:20 +00:00
|
|
|
_vm->_framesEsc = 1;
|
2005-09-28 15:41:21 +00:00
|
|
|
}
|
2004-10-27 22:17:11 +00:00
|
|
|
|
2008-12-06 14:24:40 +00:00
|
|
|
void drawTextList();
|
2005-10-08 15:20:11 +00:00
|
|
|
|
2007-11-05 23:40:30 +00:00
|
|
|
int getHeight(bool speech = false) const {
|
2008-12-21 15:59:05 +00:00
|
|
|
if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 8 && !speech)
|
2007-06-03 15:50:25 +00:00
|
|
|
return _vm->getDisplayInfo().logicalHeight;
|
2005-10-08 15:20:11 +00:00
|
|
|
else
|
2007-04-27 23:11:12 +00:00
|
|
|
return _vm->getDisplayInfo().sceneHeight;
|
2005-10-08 15:20:11 +00:00
|
|
|
}
|
|
|
|
|
2007-07-30 14:22:53 +00:00
|
|
|
void clearPlacard();
|
2007-08-02 01:04:44 +00:00
|
|
|
void showPsychicProfile(const char *text);
|
2007-07-30 14:22:53 +00:00
|
|
|
void clearPsychicProfile();
|
2007-07-30 23:37:18 +00:00
|
|
|
void showIHNMDemoSpecialScreen();
|
2007-07-30 14:22:53 +00:00
|
|
|
|
2007-08-24 12:05:05 +00:00
|
|
|
bool isNonInteractiveIHNMDemoPart() {
|
2008-12-21 15:59:05 +00:00
|
|
|
return _vm->getFeatures() & GF_IHNM_DEMO && (_sceneNumber >= 144 && _sceneNumber <= 149);
|
2007-08-24 12:05:05 +00:00
|
|
|
}
|
|
|
|
|
2004-08-04 20:28:57 +00:00
|
|
|
private:
|
2005-05-08 14:04:06 +00:00
|
|
|
void loadScene(LoadSceneParams *loadSceneParams);
|
2005-07-19 19:05:52 +00:00
|
|
|
void loadSceneDescriptor(uint32 resourceId);
|
|
|
|
void loadSceneResourceList(uint32 resourceId);
|
2005-01-18 11:55:31 +00:00
|
|
|
void loadSceneEntryList(const byte* resourcePointer, size_t resourceLength);
|
2005-07-19 19:05:52 +00:00
|
|
|
void processSceneResources();
|
2005-07-31 12:03:03 +00:00
|
|
|
void getResourceTypes(SAGAResourceTypes *&types, int &typesCount);
|
2004-08-04 20:28:57 +00:00
|
|
|
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-08-04 20:28:57 +00:00
|
|
|
SagaEngine *_vm;
|
|
|
|
|
2005-07-19 19:05:52 +00:00
|
|
|
ResourceContext *_sceneContext;
|
2004-08-04 20:28:57 +00:00
|
|
|
int *_sceneLUT;
|
|
|
|
int _sceneCount;
|
2004-12-15 00:24:12 +00:00
|
|
|
SceneQueueList _sceneQueue;
|
2004-08-04 20:28:57 +00:00
|
|
|
bool _sceneLoaded;
|
2007-06-19 01:37:48 +00:00
|
|
|
int _currentProtag;
|
2004-08-04 20:28:57 +00:00
|
|
|
int _sceneNumber;
|
2005-10-04 23:38:19 +00:00
|
|
|
int _chapterNumber;
|
2005-04-21 01:30:07 +00:00
|
|
|
int _outsetSceneNumber;
|
2005-04-02 20:04:39 +00:00
|
|
|
int _sceneResourceId;
|
2007-06-19 02:42:59 +00:00
|
|
|
int _currentMusicTrack;
|
|
|
|
int _currentMusicRepeat;
|
2007-06-19 11:23:20 +00:00
|
|
|
bool _chapterPointsChanged;
|
2004-08-04 20:28:57 +00:00
|
|
|
bool _inGame;
|
2005-05-08 14:04:06 +00:00
|
|
|
bool _loadDescription;
|
|
|
|
SceneDescription _sceneDescription;
|
2005-07-19 19:05:52 +00:00
|
|
|
size_t _resourceListCount;
|
|
|
|
SceneResourceData *_resourceList;
|
2005-05-08 14:04:06 +00:00
|
|
|
SceneProc *_sceneProc;
|
2005-07-09 16:23:45 +00:00
|
|
|
SceneImage _bg;
|
|
|
|
SceneImage _bgMask;
|
2005-07-08 16:56:03 +00:00
|
|
|
Common::Rect _sceneClip;
|
|
|
|
|
2004-12-28 21:33:46 +00:00
|
|
|
int _sceneDoors[SCENE_DOORS_MAX];
|
2004-08-11 23:42:02 +00:00
|
|
|
|
|
|
|
|
2004-10-07 22:31:39 +00:00
|
|
|
public:
|
2005-01-18 11:55:31 +00:00
|
|
|
ObjectMap *_actionMap;
|
2004-10-07 23:02:19 +00:00
|
|
|
ObjectMap *_objectMap;
|
2005-01-18 11:55:31 +00:00
|
|
|
SceneEntryList _entryList;
|
2005-01-18 15:01:21 +00:00
|
|
|
StringsTable _sceneStrings;
|
2005-07-14 17:46:21 +00:00
|
|
|
TextList _textList;
|
2004-10-07 22:31:39 +00:00
|
|
|
|
2004-08-11 23:42:02 +00:00
|
|
|
private:
|
2008-12-21 23:43:12 +00:00
|
|
|
int ITEStartProc();
|
2004-08-11 23:42:02 +00:00
|
|
|
int IHNMStartProc();
|
2007-08-27 13:04:35 +00:00
|
|
|
int IHNMCreditsProc();
|
2008-12-21 23:43:12 +00:00
|
|
|
int FTA2StartProc();
|
2004-08-11 23:42:02 +00:00
|
|
|
|
2007-08-30 17:55:19 +00:00
|
|
|
void IHNMLoadCutaways();
|
|
|
|
bool checkKey();
|
|
|
|
|
|
|
|
bool playTitle(int title, int time, int mode = kPanelVideo);
|
|
|
|
bool playLoopingTitle(int title, int seconds);
|
|
|
|
|
2004-08-11 23:42:02 +00:00
|
|
|
public:
|
2005-05-08 14:04:06 +00:00
|
|
|
static int SC_IHNMIntroMovieProc1(int param, void *refCon);
|
|
|
|
static int SC_IHNMIntroMovieProc2(int param, void *refCon);
|
|
|
|
static int SC_IHNMIntroMovieProc3(int param, void *refCon);
|
2007-08-27 13:04:35 +00:00
|
|
|
static int SC_IHNMCreditsMovieProc(int param, void *refCon);
|
2004-08-11 23:42:02 +00:00
|
|
|
|
|
|
|
private:
|
2005-05-08 14:04:06 +00:00
|
|
|
int IHNMIntroMovieProc1(int param);
|
|
|
|
int IHNMIntroMovieProc2(int param);
|
|
|
|
int IHNMIntroMovieProc3(int param);
|
2007-08-27 13:04:35 +00:00
|
|
|
int IHNMCreditsMovieProc(int param);
|
2004-08-11 23:42:02 +00:00
|
|
|
|
|
|
|
public:
|
2005-05-08 14:04:06 +00:00
|
|
|
static int SC_ITEIntroAnimProc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroCave1Proc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroCave2Proc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroCave3Proc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroCave4Proc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroValleyProc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroTreeHouseProc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroFairePathProc(int param, void *refCon);
|
|
|
|
static int SC_ITEIntroFaireTentProc(int param, void *refCon);
|
2004-08-11 23:42:02 +00:00
|
|
|
|
|
|
|
private:
|
2005-08-10 15:01:23 +00:00
|
|
|
Event *ITEQueueDialogue(Event *q_event, int n_dialogues, const IntroDialogue dialogue[]);
|
|
|
|
Event *ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]);
|
2005-05-08 14:04:06 +00:00
|
|
|
int ITEIntroAnimProc(int param);
|
|
|
|
int ITEIntroCave1Proc(int param);
|
|
|
|
int ITEIntroCave2Proc(int param);
|
|
|
|
int ITEIntroCave3Proc(int param);
|
|
|
|
int ITEIntroCave4Proc(int param);
|
|
|
|
int ITEIntroValleyProc(int param);
|
|
|
|
int ITEIntroTreeHouseProc(int param);
|
|
|
|
int ITEIntroFairePathProc(int param);
|
|
|
|
int ITEIntroFaireTentProc(int param);
|
2004-08-11 23:42:02 +00:00
|
|
|
|
2004-04-25 14:42:14 +00:00
|
|
|
};
|
2004-04-12 21:40:49 +00:00
|
|
|
|
|
|
|
} // End of namespace Saga
|
|
|
|
|
2004-05-01 13:48:01 +00:00
|
|
|
#endif
|