mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
Preliminary support for FT INSANE is added. To enable the code define
INSANE in config.h. But only non-interactive parts work and there is no insane scene skip. Only one choice during those scenes is Ctrl+X. svn-id: r11507
This commit is contained in:
parent
e600b3081f
commit
578d2efa77
@ -51,7 +51,8 @@ MODULE_OBJS := \
|
||||
scumm/smush/smush_player.o \
|
||||
scumm/smush/saud_channel.o \
|
||||
scumm/smush/smush_mixer.o \
|
||||
scumm/smush/smush_font.o
|
||||
scumm/smush/smush_font.o \
|
||||
scumm/smush/insane.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
scumm \
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "sound/mididrv.h"
|
||||
#include "sound/mixer.h"
|
||||
|
||||
#include "scumm/smush/insane.h"
|
||||
#include "scumm/dialogs.h" // FIXME: This is just for the FT-INSANE warning.
|
||||
// Remove when INSANE is implemented
|
||||
|
||||
@ -2404,7 +2405,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
|
||||
speed = 1000000 / _smushFrameRate;
|
||||
}
|
||||
|
||||
debug(1, "INSANE Arg: %d", args[1]);
|
||||
debug(1, "INSANE Arg: %d %d", args[1], args[2]);
|
||||
|
||||
SmushPlayer *sp = new SmushPlayer(this, speed, !_noSubtitles);
|
||||
|
||||
@ -2412,6 +2413,13 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
|
||||
if (args[1] == 0) {
|
||||
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
|
||||
} else if (_gameId == GID_FT) {
|
||||
#ifdef INSANE
|
||||
const int insaneVarNum = (_features & GF_DEMO) ? 232 : 233;
|
||||
|
||||
_insane->setSmushParams(speed, !_noSubtitles);
|
||||
_insane->runScene(insaneVarNum);
|
||||
|
||||
#else
|
||||
const int insaneVarNum = (_features & GF_DEMO) ? 232 : 233;
|
||||
const int insaneMode = readArray(insaneVarNum,0,0);
|
||||
|
||||
@ -2468,6 +2476,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
|
||||
// Other INSANE modes
|
||||
warning("Unknown insane mode for %d", args[1]);
|
||||
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
|
||||
#endif
|
||||
}
|
||||
delete sp;
|
||||
}
|
||||
@ -2733,7 +2742,6 @@ void ScummEngine_v6::o6_kernelGetFunctions() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ((args[1] == 27) && (_lastKeyHit == 27)) {
|
||||
push(1); // abort
|
||||
return;
|
||||
@ -2884,7 +2892,6 @@ int ScummEngine::getKeyState(int key) {
|
||||
return (_keyDownMap[key]) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
void ScummEngine_v6::o6_delayFrames() {
|
||||
ScriptSlot *ss = &vm.slot[_currentScript];
|
||||
if (ss->delayFrameCount == 0) {
|
||||
|
@ -45,6 +45,7 @@ class BaseCostumeRenderer;
|
||||
class CharsetRenderer;
|
||||
class IMuse;
|
||||
class IMuseDigital;
|
||||
class Insane;
|
||||
class MusicEngine;
|
||||
class ScummEngine;
|
||||
class ScummDebugger;
|
||||
@ -257,6 +258,7 @@ struct LangIndexNode {
|
||||
class ScummEngine : public Engine {
|
||||
friend class ScummDebugger;
|
||||
friend class SmushPlayer;
|
||||
friend class Insane;
|
||||
void errorString(const char *buf_input, char *buf_output);
|
||||
public:
|
||||
/* Put often used variables at the top.
|
||||
@ -970,6 +972,11 @@ protected:
|
||||
public:
|
||||
bool _silentDigitalImuse, _noDigitalSamples;
|
||||
|
||||
#ifdef INSANE
|
||||
public:
|
||||
Insane *_insane;
|
||||
#endif
|
||||
|
||||
public:
|
||||
uint16 _extraBoxFlags[65];
|
||||
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "scumm/sound.h"
|
||||
#include "scumm/verbs.h"
|
||||
|
||||
#include "scumm/smush/insane.h"
|
||||
|
||||
#include "sound/mididrv.h"
|
||||
#include "sound/mixer.h"
|
||||
|
||||
@ -803,6 +805,12 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
_costumeRenderer = new AkosRenderer(this);
|
||||
else
|
||||
_costumeRenderer = new CostumeRenderer(this);
|
||||
|
||||
#ifdef INSANE
|
||||
// Create FT INSANE object
|
||||
if (_gameId == GID_FT)
|
||||
_insane = new Insane(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
ScummEngine::~ScummEngine() {
|
||||
@ -1822,7 +1830,11 @@ void ScummEngine::processKbd() {
|
||||
// normally use F4 for this, we add in a hack that makes escape work,
|
||||
// too (just for convenience).
|
||||
if (_insaneState) {
|
||||
#ifdef INSANE
|
||||
_insane->escapeKeyHandler();
|
||||
#else
|
||||
_videoFinished = true;
|
||||
#endif
|
||||
} else
|
||||
abortCutscene();
|
||||
if (_version <= 2) {
|
||||
|
4943
scumm/smush/insane.cpp
Normal file
4943
scumm/smush/insane.cpp
Normal file
File diff suppressed because it is too large
Load Diff
491
scumm/smush/insane.h
Normal file
491
scumm/smush/insane.h
Normal file
@ -0,0 +1,491 @@
|
||||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2002-2003 The ScummVM project
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Header$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef INSANE_H
|
||||
#define INSANE_H
|
||||
|
||||
#include "base/engine.h"
|
||||
#include "scumm/scumm.h"
|
||||
|
||||
#include "scumm/smush/smush_player.h"
|
||||
|
||||
#ifdef INSANE
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
#define INV_CHAIN 0
|
||||
#define INV_CHAINSAW 1
|
||||
#define INV_MACE 2
|
||||
#define INV_2X4 3
|
||||
#define INV_WRENCH 4
|
||||
#define INV_BOOT 5
|
||||
#define INV_HAND 6
|
||||
#define INV_DUST 7
|
||||
|
||||
#define EN_ROTT1 0 // rottwheeler
|
||||
#define EN_ROTT2 1 // rottwheeler
|
||||
#define EN_ROTT3 2 // rottwheeler
|
||||
#define EN_VULTF1 3 // vulture (redhead female1)
|
||||
#define EN_VULTM1 4 // vulture (male with glasses)
|
||||
#define EN_VULTF2 5 // vulture (redhead female2)
|
||||
#define EN_VULTM2 6 // vulture (initialized as rottwheeler) (male)
|
||||
#define EN_CAVEFISH 7 // Cavefish Maximum Fish
|
||||
#define EN_TORQUE 8 // Father Torque
|
||||
#define EN_ENEMY9 9 // default, used only with handler
|
||||
|
||||
class Insane {
|
||||
public:
|
||||
Insane(ScummEngine *scumm);
|
||||
~Insane();
|
||||
|
||||
void setSmushParams(int speed, bool subtitles);
|
||||
void runScene(int arraynum);
|
||||
|
||||
void procPreRendering(void);
|
||||
void procPostRendering(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void escapeKeyHandler(void);
|
||||
|
||||
private:
|
||||
|
||||
ScummEngine *_scumm;
|
||||
SmushPlayer *_player;
|
||||
|
||||
int32 _speed;
|
||||
bool _subtitles;
|
||||
bool _insaneIsRunning;
|
||||
|
||||
int32 _numberArray;
|
||||
int32 _emulTimerId;
|
||||
int32 _emulateInterrupt;
|
||||
byte _errbuf[0x7d0];
|
||||
int32 _flag1d;
|
||||
int32 _mainTimerId;
|
||||
int32 _objArray1Idx;
|
||||
int32 _objArray1Idx2;
|
||||
int32 _objArray1[101];
|
||||
int32 _objArray2Idx;
|
||||
int32 _objArray2Idx2;
|
||||
int32 _objArray2[101];
|
||||
byte _currSceneId;
|
||||
int32 _timer1Flag;
|
||||
int32 _timer3Id;
|
||||
int32 _timer4Id;
|
||||
int32 _timer6Id;
|
||||
int32 _timer7Id;
|
||||
int32 _timerSpriteId;
|
||||
byte _temp2SceneId;
|
||||
byte _tempSceneId;
|
||||
int32 _currEnemy;
|
||||
int32 _currScenePropIdx;
|
||||
int32 _currScenePropSubIdx;
|
||||
char *_currTrsMsg;
|
||||
int16 _sceneData2Loaded;
|
||||
int16 _sceneData1Loaded;
|
||||
int16 _keyboardDisable;
|
||||
bool _needSceneSwitch;
|
||||
int32 _idx2Exceeded;
|
||||
bool _memoryAllocatedNotOK;
|
||||
int32 _lastKey;
|
||||
int32 _val4_;
|
||||
int32 _val8d;
|
||||
byte _val10b;
|
||||
int32 _val11d;
|
||||
int32 _val20d;
|
||||
int32 _val32d;
|
||||
int32 _val39d;
|
||||
int32 _val50d;
|
||||
int32 _val51d;
|
||||
int32 _val52d;
|
||||
int32 _val53d;
|
||||
int32 _val54d;
|
||||
int32 _val55d;
|
||||
int32 _val56d;
|
||||
int32 _val57d;
|
||||
int16 _val109w;
|
||||
int16 _val110w;
|
||||
int16 _val111w;
|
||||
int16 _val112w;
|
||||
int32 _val113d;
|
||||
int32 _val114d16[16];
|
||||
int16 _val115w;
|
||||
int16 _val116w;
|
||||
bool _val118_;
|
||||
bool _val119_;
|
||||
bool _val120_;
|
||||
bool _val121_;
|
||||
bool _val122_;
|
||||
bool _val123_;
|
||||
bool _val124_;
|
||||
bool _val127_;
|
||||
int32 _val128d;
|
||||
bool _val129_;
|
||||
byte _val130b;
|
||||
int16 _val131w;
|
||||
int16 _val132w;
|
||||
int16 _val133w;
|
||||
int16 _val134w;
|
||||
int16 _val135w;
|
||||
int16 _val136w;
|
||||
byte _val140b;
|
||||
int16 _val141w;
|
||||
int16 _val142w;
|
||||
int16 _val143w;
|
||||
int16 _val144w;
|
||||
int16 _val145w;
|
||||
int16 _val146w;
|
||||
byte _val150b;
|
||||
int16 _val151w;
|
||||
int16 _val152w;
|
||||
int16 _val153w;
|
||||
int16 _val154w;
|
||||
int16 _val155w;
|
||||
int16 _val156w;
|
||||
byte _val160b;
|
||||
int16 _val161w;
|
||||
int16 _val162w;
|
||||
int16 _val163w;
|
||||
int16 _val164w;
|
||||
int16 _val165w;
|
||||
int16 _val166w;
|
||||
int16 _val167w;
|
||||
int16 _val168w;
|
||||
byte _val170b;
|
||||
int16 _val171w;
|
||||
int16 _val172w;
|
||||
int16 _val173w;
|
||||
int16 _val174w;
|
||||
int16 _val175w;
|
||||
int16 _val176w;
|
||||
int32 _val180d;
|
||||
byte _val181b;
|
||||
byte _val182b;
|
||||
int32 _val183d;
|
||||
int32 _val190d;
|
||||
int16 _val191w;
|
||||
int32 _val200d;
|
||||
int32 _val201d;
|
||||
byte _val202b;
|
||||
int32 _val210d;
|
||||
int32 _val211d;
|
||||
int32 _val212_;
|
||||
int32 _trsFilePtr; // FIXME: we don't need it
|
||||
int32 _smlayer_room;
|
||||
int32 _smlayer_room2;
|
||||
byte *_smush_roadrashRip; // FIXME: combine them in array
|
||||
byte *_smush_roadrsh2Rip;
|
||||
byte *_smush_roadrsh3Rip;
|
||||
byte *_smush_goglpaltRip;
|
||||
byte *_smush_tovista1Flu;
|
||||
byte *_smush_tovista2Flu;
|
||||
byte *_smush_toranchFlu;
|
||||
byte *_smush_minedrivFlu;
|
||||
byte *_smush_minefiteFlu;
|
||||
byte *_smush_bencutNut;
|
||||
byte *_smush_bensgoggNut;
|
||||
byte *_smush_iconsNut;
|
||||
byte *_smush_icons2Nut;
|
||||
bool _smush_isSanFileSetup;
|
||||
bool _isBenCut;
|
||||
int _smush_smushState;
|
||||
bool _smush_isPauseImuse;
|
||||
int _continueFrame;
|
||||
int _continueFrame1;
|
||||
int _counter1;
|
||||
int _iactSceneId;
|
||||
int _iactSceneId2;
|
||||
int _smush_setupsan17;
|
||||
int32 _smush_setupsan1;
|
||||
int16 _smush_setupsan2;
|
||||
int32 _smush_setupsan4;
|
||||
int16 _smush_numFrames;
|
||||
int16 _smush_frameStep;
|
||||
int16 _smush_curFrame;
|
||||
int16 _smush_frameNum1;
|
||||
int16 _smush_frameNum2;
|
||||
byte _smush_earlyFluContents[0x31a];
|
||||
int16 _enemyState[9][10];
|
||||
|
||||
|
||||
struct enemy {
|
||||
int32 handler;
|
||||
int32 initializer;
|
||||
int32 field_8;
|
||||
int32 maxdamage;
|
||||
int32 field_10;
|
||||
int32 weapon;
|
||||
int32 sound;
|
||||
char filename[20];
|
||||
int32 costume4;
|
||||
int32 costume6;
|
||||
int32 costume5;
|
||||
int16 field_2C;
|
||||
int32 field_30;
|
||||
int32 field_34;
|
||||
};
|
||||
|
||||
struct enemy _enemy[9];
|
||||
|
||||
struct act {
|
||||
int32 actor;
|
||||
byte state;
|
||||
int32 room;
|
||||
int32 facing;
|
||||
int32 speedX;
|
||||
int32 frame;
|
||||
};
|
||||
|
||||
struct fluConf {
|
||||
int sceneId;
|
||||
byte *fluPtr;
|
||||
const char *filenamePtr;
|
||||
int startFrame;
|
||||
int numFrames;
|
||||
};
|
||||
|
||||
struct fluConf _fluConf[21];
|
||||
|
||||
struct sceneProp {
|
||||
int32 actor; // main actor number, -1 if not applicable
|
||||
int32 sound;
|
||||
int32 trsId;
|
||||
byte r;
|
||||
byte g;
|
||||
byte b;
|
||||
int32 counter;
|
||||
int32 maxCounter;
|
||||
int32 index;
|
||||
};
|
||||
|
||||
struct sceneProp _sceneProp[139];
|
||||
|
||||
struct actor {
|
||||
int32 damage;
|
||||
int32 maxdamage;
|
||||
int32 field_8;
|
||||
int32 field_C;
|
||||
int32 speed;
|
||||
int32 field_14;
|
||||
int32 field_18;
|
||||
int32 x;
|
||||
int32 y;
|
||||
int32 y1;
|
||||
int32 x1;
|
||||
int32 field_2C;
|
||||
int32 field_30;
|
||||
int32 field_34;
|
||||
int32 field_38;
|
||||
bool dead;
|
||||
bool field_40;
|
||||
bool field_44;
|
||||
int32 field_48;
|
||||
int32 field_4C;
|
||||
int32 scenePropSubIdx;
|
||||
int32 field_54;
|
||||
int32 runningSound;
|
||||
int32 weapon;
|
||||
bool inventory[8];
|
||||
int32 field_80;
|
||||
int32 enemyHandler;
|
||||
struct act act[4];
|
||||
};
|
||||
|
||||
struct actor _actor[2];
|
||||
|
||||
void initvars(void);
|
||||
void readFileToMem(const char *name, byte **buf);
|
||||
void startVideo(const char *filename, int num, int argC, int frameRate, int doMainLoop);
|
||||
void startVideo1(const char *filename, int num, int argC, int frameRate,
|
||||
int doMainLoop, byte *fluPtr, int32 numFrames);
|
||||
void smush_proc39(void);
|
||||
void smush_proc40(void);
|
||||
void smush_proc41(void);
|
||||
void imuseCode04(void);
|
||||
void smush_setupSomething(int x, int y, int flag);
|
||||
void putActors(void);
|
||||
void readState(void);
|
||||
void setTrsFile(int file); // FIXME: we don't need it
|
||||
void resetTrsFilePtr(void); // FIXME: we don't need it
|
||||
int initScene(int sceneId);
|
||||
void stopSceneSounds(int sceneId);
|
||||
void shutCurrentScene(void);
|
||||
int loadSceneData(int scene, int flag, int phase);
|
||||
void setSceneCostumes(int sceneId);
|
||||
void setupValues(void);
|
||||
void setOtherCostumes (void);
|
||||
void smlayer_stopSound (int idx);
|
||||
int smlayer_loadSound(int id, int flag, int phase);
|
||||
int smlayer_loadCostume(int id, int phase);
|
||||
void smlayer_setActorCostume(int actornum, int act, int costume);
|
||||
void smlayer_putActor(int actornum, int act, int x, int y, byte room);
|
||||
void smlayer_setActorLayer(int actornum, int act, int layer);
|
||||
void smlayer_setFluPalette(byte *pal, int shut_flag);
|
||||
int readArray (int field, int number);
|
||||
void setWordInString(int field, int number, int value);
|
||||
int smlayer_mainLoop(void);
|
||||
void mainLoop(void);
|
||||
bool idx1Compare(void);
|
||||
bool idx2Compare(void);
|
||||
int32 idx1Tweak(void);
|
||||
int32 idx2Tweak(void);
|
||||
void smush_setToFinish(void);
|
||||
void postCase11(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase0(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase17(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase16(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase2(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase20(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase5(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase6(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase8(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase9(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase10(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase12(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase23(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCase14(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCaseAll(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void postCaseMore(byte *renderBitmap, int32 codecparam, int32 setupsan12,
|
||||
int32 setupsan13, int32 curFrame, int32 maxFrame);
|
||||
void switchSceneIfNeeded(void);
|
||||
int smush_changeState(int state);
|
||||
void init_actStruct(int actornum, int actnum, int32 actorval, byte state,
|
||||
int32 room, int32 facing, int32 speedX, int32 frame);
|
||||
void init_enemyStruct(int n, int32 handler, int32 initializer,
|
||||
int32 field_8, int32 maxdamage, int32 field_10,
|
||||
int32 field_14, int32 sound, const char *filename,
|
||||
int32 costume4, int32 costume6, int32 costume5,
|
||||
int16 field_2C, int32 field_30, int32 field_34);
|
||||
int32 enemyHandler(int n, int32, int32, int32);
|
||||
int32 enemyInitializer(int n, int32, int32, int32);
|
||||
int32 enemy0handler(int32, int32, int32);
|
||||
int32 enemy0initializer(int32, int32, int32);
|
||||
int32 enemy1handler(int32, int32, int32);
|
||||
int32 enemy1initializer(int32, int32, int32);
|
||||
int32 enemy2handler(int32, int32, int32);
|
||||
int32 enemy2initializer(int32, int32, int32);
|
||||
int32 enemy3handler(int32, int32, int32);
|
||||
int32 enemy3initializer(int32, int32, int32);
|
||||
int32 enemy4handler(int32, int32, int32);
|
||||
int32 enemy4initializer(int32, int32, int32);
|
||||
int32 enemy5handler(int32, int32, int32);
|
||||
int32 enemy5initializer(int32, int32, int32);
|
||||
int32 enemy6handler(int32, int32, int32);
|
||||
int32 enemy6initializer(int32, int32, int32);
|
||||
int32 enemy7handler(int32, int32, int32);
|
||||
int32 enemy7initializer(int32, int32, int32);
|
||||
int32 enemy8handler(int32, int32, int32);
|
||||
int32 enemy8initializer(int32, int32, int32);
|
||||
int32 enemyDefHandler(int32, int32, int32);
|
||||
void IMUSE_shutVolume(void);
|
||||
void IMUSE_restoreVolume(void);
|
||||
bool smlayer_isSoundRunning(int32 sound);
|
||||
bool smlayer_startSound1(int32 sound);
|
||||
bool smlayer_startSound2(int32 sound);
|
||||
void smlayer_soundSetPan(int32 sound, int32 pan);
|
||||
void smlayer_soundSetPriority(int32 sound, int32 priority);
|
||||
void smlayer_drawSomething(byte *renderBitmap, int32 codecparam,
|
||||
int32 arg_8, int32 arg_C, int32 arg_10, byte *nutfileptr,
|
||||
int32 arg_18, int32 arg_1C, int32 arg_20);
|
||||
void smlayer_overrideDrawActorAt(byte *, byte, byte);
|
||||
void queueSceneSwitch(int32 sceneId, byte *fluPtr, const char *filename,
|
||||
int32 arg_C, int32 arg_10, int32 startFrame, int32 numFrames);
|
||||
void actorsReaction(bool flag);
|
||||
void smush_rewindCurrentSan(int arg_0, int arg_4, int arg_8);
|
||||
void smlayer_showStatusMsg(int32 arg_0, byte *renderBitmap, int32 codecparam,
|
||||
int32 x, int32 y, int32 arg_14, int32 arg_18,
|
||||
int32 arg_1C, const char *formatString, char *str);
|
||||
void init_fluConfStruct(int n, int sceneId, byte *fluPtr,
|
||||
const char *filenamePtr, int startFrame, int numFrames);
|
||||
int32 func10(bool flag);
|
||||
void func11(int32 arg_0);
|
||||
void actor1Reaction(int32 arg_4);
|
||||
void actor2Reaction(int32 arg_4);
|
||||
void actor3Reaction(int32 arg_4);
|
||||
void actor8Reaction(int32 arg_4);
|
||||
void checkEnemyDeath(int);
|
||||
int32 func5(void);
|
||||
void proc12(int arg_0);
|
||||
void proc23(int actornum, int arg_4);
|
||||
int speedTranslator(int value);
|
||||
bool smush_eitherNotStartNewFrame(void);
|
||||
void smlayer_setActorFacing(int actornum, int actnum, int frame, int direction);
|
||||
int32 weaponMaxRange(int32 actornum);
|
||||
int32 weaponMinRange(int32 actornum);
|
||||
void switchWeapon(void);
|
||||
void prepareScenePropScene(int32 scenePropNum, bool arg_4, bool arg_8);
|
||||
int32 calcDamage(bool arg_0, bool arg_4);
|
||||
int32 weaponDamage(int32 actornum);
|
||||
void proc47(int32 actornum, int32 val);
|
||||
int32 func48(void);
|
||||
bool actor1StateFlags(int state);
|
||||
bool actor0StateFlags1(int state);
|
||||
bool actor0StateFlags2(int state);
|
||||
bool loadScenePropSounds(int32 scenePropNum);
|
||||
void init_scenePropStruct(int32 n, int32 n1, int32 actornum, int32 sound, int32 trsId,
|
||||
byte r, byte g, byte b, int32 counter, int32 maxCounter,
|
||||
int32 index);
|
||||
int32 setProperActorState(void);
|
||||
bool smlayer_actorNeedRedraw(int actornum, int actnum);
|
||||
void reinitActors(void);
|
||||
void smush_setPaletteValue(int where, int r, int g, int b);
|
||||
char *handleTrsTag(int32 trsFilePtr, int32 trsId);
|
||||
void enemyOuchSound(void);
|
||||
void smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1,
|
||||
int32 step2, int32 setupsan1, byte *fluPtr, int32 numFrames);
|
||||
void smush_setupSanFromStart(const char *filename, int32 setupsan2, int32 step1,
|
||||
int32 step2, int32 setupsan1);
|
||||
void smush_setFrameSteps(int32 step1, int32 step2);
|
||||
void smush_setupSanFile(const char *filename, int32 offset);
|
||||
int32 smush_func23(bool arg_0);
|
||||
void drawSpeedyActor(int32 arg_0);
|
||||
void proc59(int32 actornum, int32 actnum, int32 arg_8);
|
||||
void proc51(int32 actornum, int32 actnum, int32 arg_8);
|
||||
void proc54(int32 actornum, int32 actnum, int32 arg_8);
|
||||
void proc55(int32 actornum, int32 actnum, int32 arg_8);
|
||||
int32 func60(void);
|
||||
|
||||
void blah(void);
|
||||
|
||||
};
|
||||
} // End of namespace Insane
|
||||
|
||||
#endif // INSANE
|
||||
|
||||
#endif
|
@ -38,6 +38,7 @@
|
||||
#include "scumm/smush/smush_font.h"
|
||||
#include "scumm/smush/smush_mixer.h"
|
||||
#include "scumm/smush/smush_player.h"
|
||||
#include "scumm/smush/insane.h"
|
||||
|
||||
#include "sound/mixer.h"
|
||||
|
||||
@ -243,6 +244,7 @@ SmushPlayer::SmushPlayer(ScummEngine *scumm, int speed, bool subtitles) {
|
||||
_soundFrequency = 22050;
|
||||
_speed = speed;
|
||||
_smushProcessFrame = false;
|
||||
_insanity = false;
|
||||
}
|
||||
|
||||
SmushPlayer::~SmushPlayer() {
|
||||
@ -754,6 +756,13 @@ void SmushPlayer::handleFrame(Chunk &b) {
|
||||
uint32 start_time, end_time;
|
||||
start_time = _scumm->_system->get_msecs();
|
||||
|
||||
#ifdef INSANE
|
||||
// FIXME: Check either it is proper place for the call
|
||||
if (_insanity) {
|
||||
_scumm->_insane->procPreRendering();
|
||||
}
|
||||
#endif
|
||||
|
||||
while (!b.eof()) {
|
||||
Chunk *sub = b.subBlock();
|
||||
if (sub->getSize() & 1) b.seek(1);
|
||||
@ -794,6 +803,14 @@ void SmushPlayer::handleFrame(Chunk &b) {
|
||||
delete sub;
|
||||
}
|
||||
|
||||
#ifdef INSANE
|
||||
// FIXME: Check either it is proper place for the call
|
||||
// Check either parameters are valid
|
||||
if (_insanity) {
|
||||
_scumm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
end_time = _scumm->_system->get_msecs();
|
||||
|
||||
updateScreen();
|
||||
@ -825,6 +842,9 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) {
|
||||
checkBlock(*sub, TYPE_AHDR);
|
||||
handleAnimHeader(*sub);
|
||||
|
||||
if (_insanity)
|
||||
readString("mineroad.trs", directory);
|
||||
else
|
||||
readString(file, directory);
|
||||
|
||||
if (_scumm->_gameId == GID_FT) {
|
||||
@ -947,6 +967,10 @@ void SmushPlayer::updateScreen() {
|
||||
debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time);
|
||||
}
|
||||
|
||||
void SmushPlayer::insanity(bool flag) {
|
||||
_insanity = flag;
|
||||
}
|
||||
|
||||
void SmushPlayer::play(const char *filename, const char *directory) {
|
||||
|
||||
// Verify the specified file exists
|
||||
|
@ -35,6 +35,7 @@ class SmushMixer;
|
||||
class StringResource;
|
||||
|
||||
class SmushPlayer {
|
||||
friend class Insane;
|
||||
private:
|
||||
ScummEngine *_scumm;
|
||||
int _version;
|
||||
@ -66,6 +67,7 @@ private:
|
||||
int _width, _height;
|
||||
byte *_dst;
|
||||
bool _updateNeeded;
|
||||
bool _insanity;
|
||||
|
||||
volatile bool _smushProcessFrame;
|
||||
|
||||
@ -75,6 +77,10 @@ public:
|
||||
|
||||
void play(const char *filename, const char *directory);
|
||||
|
||||
protected:
|
||||
void insanity(bool);
|
||||
void setPalette(const byte *palette);
|
||||
|
||||
private:
|
||||
void updatePalette(void);
|
||||
void parseNextFrame();
|
||||
@ -82,7 +88,6 @@ private:
|
||||
void deinit();
|
||||
void setupAnim(const char *file, const char *directory);
|
||||
void updateScreen();
|
||||
void setPalette(const byte *palette);
|
||||
|
||||
bool readString(const char *file, const char *directory);
|
||||
void checkBlock(const Chunk &, Chunk::type, uint32 = 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user