mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Merge branch 'master' into sci_midiparser
Conflicts: engines/sci/sound/midiparser_sci.cpp
This commit is contained in:
@@ -146,6 +146,7 @@ public:
|
||||
#define CORO_BEGIN_CODE(x) \
|
||||
if (&coroParam == &Common::nullContext) assert(!Common::nullContext); \
|
||||
if (!x) { coroParam = x = new CoroContextTag(); } \
|
||||
x->DUMMY = 0; \
|
||||
Common::CoroContextHolder tmpHolder(coroParam); \
|
||||
switch (coroParam->_line) { case 0:;
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ SceneTag::SceneTag() {
|
||||
_field_4 = 0;
|
||||
_scene = 0;
|
||||
_tag = 0;
|
||||
_sceneId = 0;
|
||||
}
|
||||
|
||||
bool SceneTag::load(MfcArchive &file) {
|
||||
|
||||
@@ -29,7 +29,6 @@ class Sound : public MemoryObject {
|
||||
int _id;
|
||||
char *_description;
|
||||
int16 _objectId;
|
||||
int16 _field_32;
|
||||
int _directSoundBuffer;
|
||||
int _directSoundBuffers[7];
|
||||
byte *_soundData;
|
||||
|
||||
@@ -98,9 +98,6 @@ class MemoryObject : CObject {
|
||||
int _mfield_C;
|
||||
int _mfield_10;
|
||||
char _mfield_14;
|
||||
char _mfield_15;
|
||||
char _mfield_16;
|
||||
char _mfield_17;
|
||||
byte *_data;
|
||||
int _dataSize;
|
||||
int _mflags;
|
||||
|
||||
@@ -354,8 +354,8 @@ MainMenu::MainMenu(NeverhoodEngine *vm, Module *parentModule)
|
||||
setPalette(0x08C0020C);
|
||||
insertScreenMouse(0x00208084);
|
||||
|
||||
insertStaticSprite(0x41137051, 100);
|
||||
insertStaticSprite(0xC10B2015, 100);
|
||||
insertStaticSprite(0x41137051, 100); // "Options" header text
|
||||
insertStaticSprite(0xC10B2015, 100); // Button texts
|
||||
|
||||
if (!_vm->musicIsEnabled())
|
||||
insertStaticSprite(0x0C24C0EE, 100); // "Music is off" button
|
||||
|
||||
@@ -33,6 +33,7 @@ MODULE_OBJS = \
|
||||
modules/module2600.o \
|
||||
modules/module2700.o \
|
||||
modules/module2800.o \
|
||||
modules/module2800_sprites.o \
|
||||
modules/module2900.o \
|
||||
modules/module3000.o \
|
||||
mouse.o \
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "neverhood/modules/module2100.h"
|
||||
#include "neverhood/modules/module2200.h"
|
||||
#include "neverhood/modules/module2800.h"
|
||||
#include "neverhood/modules/module2800_sprites.h"
|
||||
#include "neverhood/diskplayerscene.h"
|
||||
|
||||
namespace Neverhood {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,38 +70,7 @@ protected:
|
||||
void changeTuneStatus(int prevTuneStatus, int newTuneStatus);
|
||||
};
|
||||
|
||||
class AsScene2803LightCord : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2803LightCord(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int16 x, int16 y);
|
||||
void stPulled();
|
||||
void stIdle();
|
||||
void setFileHashes(uint32 fileHash1, uint32 fileHash2);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 _fileHash1, _fileHash2;
|
||||
bool _isPulled, _isBusy;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmPulled(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2803TestTubeOne : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2803TestTubeOne(NeverhoodEngine *vm, uint32 fileHash1, uint32 fileHash2);
|
||||
protected:
|
||||
uint32 _fileHash1, _fileHash2;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2803Rope : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2803Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmReleased(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
void stReleased();
|
||||
void stHide();
|
||||
};
|
||||
class AsScene2803LightCord;
|
||||
|
||||
class Scene2803 : public Scene {
|
||||
public:
|
||||
@@ -158,101 +127,8 @@ protected:
|
||||
void updatePaletteArea(bool instantly);
|
||||
};
|
||||
|
||||
class Scene2804;
|
||||
|
||||
class SsScene2804RedButton : public StaticSprite {
|
||||
public:
|
||||
SsScene2804RedButton(NeverhoodEngine *vm, Scene2804 *parentScene);
|
||||
protected:
|
||||
Scene2804 *_parentScene;
|
||||
int _countdown;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2804LightCoil : public StaticSprite {
|
||||
public:
|
||||
SsScene2804LightCoil(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2804BeamCoilBody : public StaticSprite {
|
||||
public:
|
||||
SsScene2804BeamCoilBody(NeverhoodEngine *vm);
|
||||
};
|
||||
|
||||
class SsScene2804LightTarget : public StaticSprite {
|
||||
public:
|
||||
SsScene2804LightTarget(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2804Flash : public StaticSprite {
|
||||
public:
|
||||
SsScene2804Flash(NeverhoodEngine *vm);
|
||||
void show();
|
||||
};
|
||||
|
||||
class AsScene2804CrystalWaves : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804CrystalWaves(NeverhoodEngine *vm, uint crystalIndex);
|
||||
void show();
|
||||
void hide();
|
||||
protected:
|
||||
uint _crystalIndex;
|
||||
};
|
||||
|
||||
class AsScene2804Crystal : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804Crystal(NeverhoodEngine *vm, AsScene2804CrystalWaves *asCrystalWaves, uint crystalIndex);
|
||||
void show();
|
||||
void hide();
|
||||
void activate();
|
||||
int16 getColorNum() const { return _colorNum; }
|
||||
protected:
|
||||
AsScene2804CrystalWaves *_asCrystalWaves;
|
||||
uint _crystalIndex;
|
||||
int16 _colorNum;
|
||||
bool _isLightOn;
|
||||
bool _isShowing;
|
||||
};
|
||||
|
||||
class SsScene2804CrystalButton : public StaticSprite {
|
||||
public:
|
||||
SsScene2804CrystalButton(NeverhoodEngine *vm, Scene2804 *parentScene, AsScene2804Crystal *asCrystal, uint crystalIndex);
|
||||
protected:
|
||||
Scene2804 *_parentScene;
|
||||
AsScene2804Crystal *_asCrystal;
|
||||
uint _crystalIndex;
|
||||
int _countdown;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2804BeamCoil : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804BeamCoil(NeverhoodEngine *vm, Scene *parentScene, SsScene2804BeamCoilBody *ssBeamCoilBody);
|
||||
virtual ~AsScene2804BeamCoil();
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
SsScene2804BeamCoilBody *_ssBeamCoilBody;
|
||||
int _countdown;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
void show();
|
||||
void hide();
|
||||
void stBeaming();
|
||||
uint32 hmBeaming(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2804BeamTarget : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804BeamTarget(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
class SsScene2804Flash;
|
||||
class AsScene2804Crystal;
|
||||
|
||||
class Scene2804 : public Scene {
|
||||
public:
|
||||
@@ -284,13 +160,6 @@ protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2806Spew : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2806Spew(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class Scene2806 : public Scene {
|
||||
public:
|
||||
Scene2806(NeverhoodEngine *vm, Module *parentModule, int which);
|
||||
@@ -315,63 +184,8 @@ protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2808Dispenser : public StaticSprite {
|
||||
public:
|
||||
SsScene2808Dispenser(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum, int testTubeIndex);
|
||||
void startCountdown(int index);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
int _countdown;
|
||||
int _testTubeSetNum, _testTubeIndex;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808TestTube : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808TestTube(NeverhoodEngine *vm, int testTubeSetNum, int testTubeIndex, SsScene2808Dispenser *ssDispenser);
|
||||
void fill();
|
||||
void flush();
|
||||
uint32 getFillLevel() const { return _fillLevel; }
|
||||
protected:
|
||||
SsScene2808Dispenser *_ssDispenser;
|
||||
int _testTubeSetNum;
|
||||
uint32 _fillLevel;
|
||||
int _testTubeIndex;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808Handle : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808Handle(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum);
|
||||
void activate();
|
||||
void stActivated();
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
int _testTubeSetNum;
|
||||
bool _isActivated;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmActivating(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808Flow : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808Flow(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum);
|
||||
void start();
|
||||
void stKeepFlowing();
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
int _testTubeSetNum;
|
||||
uint32 hmFlowing(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808LightEffect : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808LightEffect(NeverhoodEngine *vm, int which);
|
||||
protected:
|
||||
int _countdown;
|
||||
void update();
|
||||
};
|
||||
class AsScene2808Flow;
|
||||
class AsScene2808TestTube;
|
||||
|
||||
class Scene2808 : public Scene {
|
||||
public:
|
||||
@@ -389,13 +203,6 @@ protected:
|
||||
bool isAnyTestTubeFilled();
|
||||
};
|
||||
|
||||
class AsScene2809Spew : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2809Spew(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class Scene2809 : public Scene {
|
||||
public:
|
||||
Scene2809(NeverhoodEngine *vm, Module *parentModule, int which);
|
||||
@@ -413,14 +220,6 @@ protected:
|
||||
void findClosestPoint();
|
||||
};
|
||||
|
||||
class AsScene2810Rope : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2810Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class Scene2810 : public Scene {
|
||||
public:
|
||||
Scene2810(NeverhoodEngine *vm, Module *parentModule, int which);
|
||||
@@ -440,31 +239,6 @@ protected:
|
||||
void insertKlaymenLadder();
|
||||
};
|
||||
|
||||
class AsScene2812Winch : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2812Winch(NeverhoodEngine *vm);
|
||||
virtual ~AsScene2812Winch();
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2812Rope : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2812Rope(NeverhoodEngine *vm, Scene *parentScene);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmRopingDown(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
void stRopingDown();
|
||||
};
|
||||
|
||||
class AsScene2812TrapDoor : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2812TrapDoor(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class Scene2812 : public Scene {
|
||||
public:
|
||||
Scene2812(NeverhoodEngine *vm, Module *parentModule, int which);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,268 @@
|
||||
/* 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 NEVERHOOD_MODULES_MODULE2800_SPRITES_H
|
||||
#define NEVERHOOD_MODULES_MODULE2800_SPRITES_H
|
||||
|
||||
#include "neverhood/neverhood.h"
|
||||
#include "neverhood/module.h"
|
||||
#include "neverhood/scene.h"
|
||||
|
||||
namespace Neverhood {
|
||||
|
||||
class AsScene2803LightCord : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2803LightCord(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int16 x, int16 y);
|
||||
void stPulled();
|
||||
void stIdle();
|
||||
void setFileHashes(uint32 fileHash1, uint32 fileHash2);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 _fileHash1, _fileHash2;
|
||||
bool _isPulled, _isBusy;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmPulled(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2803TestTubeOne : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2803TestTubeOne(NeverhoodEngine *vm, uint32 fileHash1, uint32 fileHash2);
|
||||
protected:
|
||||
uint32 _fileHash1, _fileHash2;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2803Rope : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2803Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmReleased(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
void stReleased();
|
||||
void stHide();
|
||||
};
|
||||
|
||||
class Scene2804;
|
||||
|
||||
class SsScene2804RedButton : public StaticSprite {
|
||||
public:
|
||||
SsScene2804RedButton(NeverhoodEngine *vm, Scene2804 *parentScene);
|
||||
protected:
|
||||
Scene2804 *_parentScene;
|
||||
int _countdown;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2804LightCoil : public StaticSprite {
|
||||
public:
|
||||
SsScene2804LightCoil(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2804BeamCoilBody : public StaticSprite {
|
||||
public:
|
||||
SsScene2804BeamCoilBody(NeverhoodEngine *vm);
|
||||
};
|
||||
|
||||
class SsScene2804LightTarget : public StaticSprite {
|
||||
public:
|
||||
SsScene2804LightTarget(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2804Flash : public StaticSprite {
|
||||
public:
|
||||
SsScene2804Flash(NeverhoodEngine *vm);
|
||||
void show();
|
||||
};
|
||||
|
||||
class AsScene2804CrystalWaves : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804CrystalWaves(NeverhoodEngine *vm, uint crystalIndex);
|
||||
void show();
|
||||
void hide();
|
||||
protected:
|
||||
uint _crystalIndex;
|
||||
};
|
||||
|
||||
class AsScene2804Crystal : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804Crystal(NeverhoodEngine *vm, AsScene2804CrystalWaves *asCrystalWaves, uint crystalIndex);
|
||||
void show();
|
||||
void hide();
|
||||
void activate();
|
||||
int16 getColorNum() const { return _colorNum; }
|
||||
protected:
|
||||
AsScene2804CrystalWaves *_asCrystalWaves;
|
||||
uint _crystalIndex;
|
||||
int16 _colorNum;
|
||||
bool _isLightOn;
|
||||
bool _isShowing;
|
||||
};
|
||||
|
||||
class SsScene2804CrystalButton : public StaticSprite {
|
||||
public:
|
||||
SsScene2804CrystalButton(NeverhoodEngine *vm, Scene2804 *parentScene, AsScene2804Crystal *asCrystal, uint crystalIndex);
|
||||
protected:
|
||||
Scene2804 *_parentScene;
|
||||
AsScene2804Crystal *_asCrystal;
|
||||
uint _crystalIndex;
|
||||
int _countdown;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2804BeamCoil : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804BeamCoil(NeverhoodEngine *vm, Scene *parentScene, SsScene2804BeamCoilBody *ssBeamCoilBody);
|
||||
virtual ~AsScene2804BeamCoil();
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
SsScene2804BeamCoilBody *_ssBeamCoilBody;
|
||||
int _countdown;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
void show();
|
||||
void hide();
|
||||
void stBeaming();
|
||||
uint32 hmBeaming(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2804BeamTarget : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2804BeamTarget(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2806Spew : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2806Spew(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class SsScene2808Dispenser : public StaticSprite {
|
||||
public:
|
||||
SsScene2808Dispenser(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum, int testTubeIndex);
|
||||
void startCountdown(int index);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
int _countdown;
|
||||
int _testTubeSetNum, _testTubeIndex;
|
||||
void update();
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808TestTube : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808TestTube(NeverhoodEngine *vm, int testTubeSetNum, int testTubeIndex, SsScene2808Dispenser *ssDispenser);
|
||||
void fill();
|
||||
void flush();
|
||||
uint32 getFillLevel() const { return _fillLevel; }
|
||||
protected:
|
||||
SsScene2808Dispenser *_ssDispenser;
|
||||
int _testTubeSetNum;
|
||||
uint32 _fillLevel;
|
||||
int _testTubeIndex;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808Handle : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808Handle(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum);
|
||||
void activate();
|
||||
void stActivated();
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
int _testTubeSetNum;
|
||||
bool _isActivated;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmActivating(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808Flow : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808Flow(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum);
|
||||
void start();
|
||||
void stKeepFlowing();
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
int _testTubeSetNum;
|
||||
uint32 hmFlowing(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2808LightEffect : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2808LightEffect(NeverhoodEngine *vm, int which);
|
||||
protected:
|
||||
int _countdown;
|
||||
void update();
|
||||
};
|
||||
|
||||
class AsScene2809Spew : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2809Spew(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2810Rope : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2810Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2812Winch : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2812Winch(NeverhoodEngine *vm);
|
||||
virtual ~AsScene2812Winch();
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
class AsScene2812Rope : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2812Rope(NeverhoodEngine *vm, Scene *parentScene);
|
||||
protected:
|
||||
Scene *_parentScene;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
uint32 hmRopingDown(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
void stRopingDown();
|
||||
};
|
||||
|
||||
class AsScene2812TrapDoor : public AnimatedSprite {
|
||||
public:
|
||||
AsScene2812TrapDoor(NeverhoodEngine *vm);
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
||||
} // End of namespace Neverhood
|
||||
|
||||
#endif /* NEVERHOOD_MODULES_MODULE2800_SPRITES_H */
|
||||
@@ -3297,6 +3297,17 @@ static const struct ADGameDescription SciGameDescriptions[] = {
|
||||
AD_LISTEND},
|
||||
Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
|
||||
|
||||
// RAMA - German Windows CD (from farmboy0, in pull request 397)
|
||||
{"rama", "", {
|
||||
{"resmap.001", 0, "f68cd73308c46977a9632dfc618e1e38", 8338},
|
||||
{"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70595521},
|
||||
{"resmap.002", 0, "891fc2f5d9e23e7d9a9454acc7aaae52", 12082},
|
||||
{"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128508558},
|
||||
{"resmap.003", 0, "222096000bd83a1d56577114a452cccf", 1636},
|
||||
{"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6954219},
|
||||
AD_LISTEND},
|
||||
Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
|
||||
|
||||
// RAMA - Italian Windows CD (from glorifindel)
|
||||
// SCI interpreter version 3.000.000 (a guess?)
|
||||
{"rama", "", {
|
||||
|
||||
@@ -600,7 +600,10 @@ void MusicEntry::saveLoadWithSerializer(Common::Serializer &s) {
|
||||
s.syncAsSint16LE(dataInc);
|
||||
s.syncAsSint16LE(ticker);
|
||||
s.syncAsSint16LE(signal, VER(17));
|
||||
s.syncAsByte(priority);
|
||||
if (s.getVersion() >= 31) // FE sound/music.h -> priority
|
||||
s.syncAsSint16LE(priority);
|
||||
else
|
||||
s.syncAsByte(priority);
|
||||
s.syncAsSint16LE(loop, VER(17));
|
||||
s.syncAsByte(volume);
|
||||
s.syncAsByte(hold, VER(17));
|
||||
|
||||
@@ -37,6 +37,7 @@ struct EngineState;
|
||||
*
|
||||
* Version - new/changed feature
|
||||
* =============================
|
||||
* 31 - priority for sound effects/music is now a signed int16, instead of a byte
|
||||
* 30 - synonyms
|
||||
* 29 - system strings
|
||||
* 28 - heap
|
||||
@@ -55,7 +56,7 @@ struct EngineState;
|
||||
*/
|
||||
|
||||
enum {
|
||||
CURRENT_SAVEGAME_VERSION = 30,
|
||||
CURRENT_SAVEGAME_VERSION = 31,
|
||||
MINIMUM_SAVEGAME_VERSION = 14
|
||||
};
|
||||
|
||||
|
||||
@@ -611,7 +611,6 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {
|
||||
error("unsupported _soundVersion");
|
||||
}
|
||||
_pSnd->dataInc += inc;
|
||||
_pSnd->signal = 0x7f + inc;
|
||||
debugC(4, kDebugLevelSound, "datainc %04x", inc);
|
||||
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
uint16 dataInc;
|
||||
uint16 ticker;
|
||||
uint16 signal;
|
||||
byte priority;
|
||||
int16 priority; // must be int16, at least in Laura Bow 1, main music (object conMusic) uses priority -1
|
||||
uint16 loop;
|
||||
int16 volume;
|
||||
int16 hold;
|
||||
|
||||
@@ -116,7 +116,10 @@ void SoundCommandParser::processInitSound(reg_t obj) {
|
||||
newSound->resourceId = resourceId;
|
||||
newSound->soundObj = obj;
|
||||
newSound->loop = readSelectorValue(_segMan, obj, SELECTOR(loop));
|
||||
newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF;
|
||||
if (_soundVersion <= SCI_VERSION_0_LATE)
|
||||
newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority));
|
||||
else
|
||||
newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF;
|
||||
if (_soundVersion >= SCI_VERSION_1_EARLY)
|
||||
newSound->volume = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, MUSIC_VOLUME_MAX);
|
||||
newSound->reverb = -1; // initialize to SCI invalid, it'll be set correctly in soundInitSnd() below
|
||||
@@ -428,7 +431,7 @@ reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) {
|
||||
int16 objVol = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, 255);
|
||||
if (objVol != musicSlot->volume)
|
||||
_music->soundSetVolume(musicSlot, objVol);
|
||||
uint32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority));
|
||||
int16 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority));
|
||||
if (objPrio != musicSlot->priority)
|
||||
_music->soundSetPriority(musicSlot, objPrio);
|
||||
return acc;
|
||||
|
||||
+29
-21
@@ -427,29 +427,29 @@ void Ringworld2Globals::reset() {
|
||||
_spillLocation[12] = 27;
|
||||
_spillLocation[13] = 31;
|
||||
|
||||
// Initialise the vampire data within the Flub maze
|
||||
for (int i = 0; i < 18; i++) {
|
||||
_v56613[(i * 4) ] = 1;
|
||||
_v56613[(i * 4) + 2] = 0;
|
||||
_v56613[(i * 4) + 3] = 0;
|
||||
_vampireData[i]._isAlive = true;
|
||||
_vampireData[i]._position = Common::Point();
|
||||
}
|
||||
_v56613[( 0 * 4) + 1] = 1;
|
||||
_v56613[( 1 * 4) + 1] = 2;
|
||||
_v56613[( 2 * 4) + 1] = 2;
|
||||
_v56613[( 3 * 4) + 1] = 3;
|
||||
_v56613[( 4 * 4) + 1] = 2;
|
||||
_v56613[( 5 * 4) + 1] = 2;
|
||||
_v56613[( 6 * 4) + 1] = 3;
|
||||
_v56613[( 7 * 4) + 1] = 1;
|
||||
_v56613[( 8 * 4) + 1] = 1;
|
||||
_v56613[( 9 * 4) + 1] = 3;
|
||||
_v56613[(10 * 4) + 1] = 3;
|
||||
_v56613[(11 * 4) + 1] = 1;
|
||||
_v56613[(12 * 4) + 1] = 2;
|
||||
_v56613[(13 * 4) + 1] = 3;
|
||||
_v56613[(14 * 4) + 1] = 2;
|
||||
_v56613[(15 * 4) + 1] = 3;
|
||||
_v56613[(16 * 4) + 1] = 1;
|
||||
_v56613[(17 * 4) + 1] = 1;
|
||||
_vampireData[0].var2 = 1;
|
||||
_vampireData[1].var2 = 2;
|
||||
_vampireData[2].var2 = 2;
|
||||
_vampireData[3].var2 = 3;
|
||||
_vampireData[4].var2 = 2;
|
||||
_vampireData[5].var2 = 2;
|
||||
_vampireData[6].var2 = 3;
|
||||
_vampireData[7].var2 = 1;
|
||||
_vampireData[8].var2 = 1;
|
||||
_vampireData[9].var2 = 3;
|
||||
_vampireData[10].var2 = 3;
|
||||
_vampireData[11].var2 = 1;
|
||||
_vampireData[12].var2 = 2;
|
||||
_vampireData[13].var2 = 3;
|
||||
_vampireData[14].var2 = 2;
|
||||
_vampireData[15].var2 = 3;
|
||||
_vampireData[16].var2 = 1;
|
||||
_vampireData[17].var2 = 1;
|
||||
|
||||
_v566A6 = 3800;
|
||||
_landerSuitNumber = 2;
|
||||
@@ -580,6 +580,14 @@ void Ringworld2Globals::synchronize(Serializer &s) {
|
||||
|
||||
s.syncAsSint16LE(_balloonPosition.x);
|
||||
s.syncAsSint16LE(_balloonPosition.y);
|
||||
|
||||
// Synchronise Flub maze vampire data
|
||||
for (i = 0; i < 18; ++i) {
|
||||
s.syncAsSint16LE(_vampireData[i]._isAlive);
|
||||
s.syncAsSint16LE(_vampireData[i].var2);
|
||||
s.syncAsSint16LE(_vampireData[i]._position.x);
|
||||
s.syncAsSint16LE(_vampireData[i]._position.y);
|
||||
}
|
||||
}
|
||||
|
||||
} // end of namespace Ringworld2
|
||||
|
||||
@@ -244,6 +244,12 @@ namespace Ringworld2 {
|
||||
|
||||
class ScannerDialog;
|
||||
|
||||
struct VampireData {
|
||||
bool _isAlive;
|
||||
int var2;
|
||||
Common::Point _position;
|
||||
};
|
||||
|
||||
class Ringworld2Globals: public TsAGE2Globals {
|
||||
public:
|
||||
ASoundExt _sound1, _sound2, _sound3, _sound4;
|
||||
@@ -270,7 +276,7 @@ public:
|
||||
int _v5657C;
|
||||
byte _v565AE;
|
||||
byte _spillLocation[14];
|
||||
int _v56613[76];
|
||||
VampireData _vampireData[18];
|
||||
byte _flubMazeArea;
|
||||
byte _flubMazeEntryDirection;
|
||||
int _v566A6;
|
||||
|
||||
@@ -13784,11 +13784,9 @@ bool Scene1950::Actor5::startAction(CursorType action, Event &event) {
|
||||
}
|
||||
|
||||
Scene1950::Vampire::Vampire() {
|
||||
_fieldA4 = 0;
|
||||
_fieldA6 = 0;
|
||||
_fieldA8 = 0;
|
||||
_fieldAA = 0;
|
||||
_fieldAC = 0;
|
||||
_vampireMode = 0;
|
||||
_fieldAE = 0;
|
||||
_fieldAF = 0;
|
||||
}
|
||||
@@ -13796,11 +13794,11 @@ Scene1950::Vampire::Vampire() {
|
||||
void Scene1950::Vampire::synchronize(Serializer &s) {
|
||||
SceneActor::synchronize(s);
|
||||
|
||||
s.syncAsSint16LE(_fieldA4);
|
||||
s.syncAsSint16LE(_fieldA6);
|
||||
s.syncAsSint16LE(_deadPosition.x);
|
||||
s.syncAsSint16LE(_deadPosition.y);
|
||||
s.syncAsSint16LE(_fieldA8);
|
||||
s.syncAsSint16LE(_fieldAA);
|
||||
s.syncAsSint16LE(_fieldAC);
|
||||
s.syncAsSint16LE(_vampireMode);
|
||||
s.syncAsByte(_fieldAE);
|
||||
s.syncAsByte(_fieldAF);
|
||||
}
|
||||
@@ -13808,9 +13806,9 @@ void Scene1950::Vampire::synchronize(Serializer &s) {
|
||||
void Scene1950::Vampire::signal() {
|
||||
Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (_fieldAC) {
|
||||
switch (_vampireMode) {
|
||||
case 19: {
|
||||
_fieldAC = 0;
|
||||
_vampireMode = 0;
|
||||
setVisage(1960);
|
||||
if (R2_GLOBALS._flubMazeEntryDirection == 3)
|
||||
setStrip(2);
|
||||
@@ -13822,21 +13820,21 @@ void Scene1950::Vampire::signal() {
|
||||
}
|
||||
break;
|
||||
case 20: {
|
||||
_fieldAC = 19;
|
||||
_vampireMode = 19;
|
||||
R2_GLOBALS._player.setVisage(22);
|
||||
if (R2_GLOBALS._flubMazeEntryDirection == 3)
|
||||
R2_GLOBALS._player.setStrip(1);
|
||||
else
|
||||
R2_GLOBALS._player.setStrip(2);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
R2_GLOBALS._v56613[((scene->_vampireIndex - 1) * 4) + 1]--;
|
||||
R2_GLOBALS._vampireData[scene->_vampireIndex - 1].var2--;
|
||||
|
||||
if (R2_GLOBALS._flubMazeEntryDirection == 3)
|
||||
_fieldA4 = _position.x + 10;
|
||||
_deadPosition.x = _position.x + 10;
|
||||
else
|
||||
_fieldA4 = _position.x - 10;
|
||||
_deadPosition.x = _position.x - 10;
|
||||
_deadPosition.y = _position.y - 4;
|
||||
|
||||
_fieldA6 = _position.y -4;
|
||||
setVisage(1961);
|
||||
|
||||
if (R2_GLOBALS._flubMazeEntryDirection == 3)
|
||||
@@ -13845,7 +13843,7 @@ void Scene1950::Vampire::signal() {
|
||||
setStrip(1);
|
||||
|
||||
animate(ANIM_MODE_2, NULL);
|
||||
Common::Point pt(_fieldA4, _fieldA6);
|
||||
Common::Point pt = _deadPosition;
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
addMover(mover, &pt, this);
|
||||
|
||||
@@ -13871,26 +13869,26 @@ void Scene1950::Vampire::signal() {
|
||||
R2_GLOBALS._sound2.play(226);
|
||||
animate(ANIM_MODE_5, NULL);
|
||||
fixPriority(10);
|
||||
R2_GLOBALS._v56613[((scene->_vampireIndex - 1) * 4) ]--;
|
||||
R2_GLOBALS._v56613[((scene->_vampireIndex - 1) * 4) + 1]--;
|
||||
R2_GLOBALS._v56613[((scene->_vampireIndex - 1) * 4) + 2] = _position.x;
|
||||
R2_GLOBALS._v56613[((scene->_vampireIndex - 1) * 4) + 3] = _position.y;
|
||||
|
||||
R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive = false;
|
||||
R2_GLOBALS._vampireData[scene->_vampireIndex - 1].var2--;
|
||||
R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._position = _position;
|
||||
_fieldA8 = (_position.x - R2_GLOBALS._player._position.x) / 2;
|
||||
_fieldAA = (_position.y - R2_GLOBALS._player._position.y) / 2;
|
||||
|
||||
_fieldAE = 0;
|
||||
for (_fieldAF = 0; _fieldAF < 18; ++_fieldAF)
|
||||
if (R2_GLOBALS._v56613[4 * _fieldAF] == 0)
|
||||
if (!R2_GLOBALS._vampireData[_fieldAF]._isAlive)
|
||||
++_fieldAE;
|
||||
|
||||
if (_fieldAE == 18) {
|
||||
R2_GLOBALS.setFlag(36);
|
||||
_fieldAC = 23;
|
||||
_vampireMode = 23;
|
||||
Common::Point pt(R2_GLOBALS._player._position.x + _fieldA8, R2_GLOBALS._player._position.y + _fieldAA);
|
||||
NpcMover *mover = new NpcMover();
|
||||
R2_GLOBALS._player.addMover(mover, &pt, this);
|
||||
} else if (_fieldAE == 1) {
|
||||
_fieldAC = 22;
|
||||
_vampireMode = 22;
|
||||
Common::Point pt(R2_GLOBALS._player._position.x + _fieldA8, R2_GLOBALS._player._position.y + _fieldAA);
|
||||
NpcMover *mover = new NpcMover();
|
||||
R2_GLOBALS._player.addMover(mover, &pt, this);
|
||||
@@ -13922,16 +13920,16 @@ void Scene1950::Vampire::signal() {
|
||||
bool Scene1950::Vampire::startAction(CursorType action, Event &event) {
|
||||
Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
if ((R2_GLOBALS._v56613[(scene->_vampireIndex - 1) * 4] == 0) ||
|
||||
if (!R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive ||
|
||||
(action != R2_PHOTON_STUNNER))
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
R2_GLOBALS._player.disableControl();
|
||||
|
||||
if (R2_GLOBALS._v56613[((scene->_vampireIndex - 1) * 4) + 1] <= 1)
|
||||
_fieldAC = 21;
|
||||
if (R2_GLOBALS._vampireData[scene->_vampireIndex - 1].var2 <= 1)
|
||||
_vampireMode = 21;
|
||||
else
|
||||
_fieldAC = 20;
|
||||
_vampireMode = 20;
|
||||
|
||||
R2_GLOBALS._player.setVisage(25);
|
||||
if (R2_GLOBALS._flubMazeEntryDirection == 3)
|
||||
@@ -14788,6 +14786,7 @@ void Scene1950::enterArea() {
|
||||
_field416 = 0;
|
||||
_vampireIndex = 0;
|
||||
|
||||
// Certain areas have a vampire in them
|
||||
switch (R2_GLOBALS._flubMazeArea) {
|
||||
case 10:
|
||||
_vampireIndex = 1;
|
||||
@@ -14853,8 +14852,10 @@ void Scene1950::enterArea() {
|
||||
_vampire._moveRate = 6;
|
||||
_vampire._moveDiff = Common::Point(3, 2);
|
||||
_vampire._effect = 1;
|
||||
if (R2_GLOBALS._v56613[(_vampireIndex - 1) * 4] == 0) {
|
||||
_vampire.setPosition(Common::Point(R2_GLOBALS._v56613[((_vampireIndex - 1) * 4) + 2], R2_GLOBALS._v56613[((_vampireIndex - 1) * 4) + 3]));
|
||||
|
||||
if (!R2_GLOBALS._vampireData[_vampireIndex - 1]._isAlive) {
|
||||
// Show vampire ashes
|
||||
_vampire.setPosition(Common::Point(R2_GLOBALS._vampireData[_vampireIndex - 1]._position));
|
||||
_vampire.animate(ANIM_MODE_NONE, NULL);
|
||||
_vampire.addMover(NULL);
|
||||
_vampire.setVisage(1961);
|
||||
@@ -14863,6 +14864,7 @@ void Scene1950::enterArea() {
|
||||
_vampire.fixPriority(10);
|
||||
_vampire.setDetails(1950, 15, -1, 17, 2, (SceneItem *) NULL);
|
||||
} else {
|
||||
// Start the vampire
|
||||
_vampire.setVisage(1960);
|
||||
_vampire.setPosition(Common::Point(160, 130));
|
||||
_vampire.animate(ANIM_MODE_2, NULL);
|
||||
|
||||
@@ -1164,11 +1164,10 @@ class Scene1950 : public SceneExt {
|
||||
};
|
||||
class Vampire : public SceneActor {
|
||||
public:
|
||||
int _fieldA4;
|
||||
int _fieldA6;
|
||||
Common::Point _deadPosition;
|
||||
int _fieldA8;
|
||||
int _fieldAA;
|
||||
int _fieldAC;
|
||||
int _vampireMode;
|
||||
byte _fieldAE;
|
||||
byte _fieldAF;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user