mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 08:55:45 +00:00
MADS: Add logic for scene 103, some rework on animations
This commit is contained in:
parent
c275e304df
commit
79fbcb96c3
@ -49,6 +49,10 @@ void GameConversation::exportPointer(int *val) {
|
||||
warning("TODO GameConversation::exportPointer");
|
||||
}
|
||||
|
||||
void GameConversation::exportValue(int val) {
|
||||
warning("TODO GameConversation::exportValue");
|
||||
}
|
||||
|
||||
void GameConversation::setHeroTrigger(int val) {
|
||||
warning("TODO: GameConversation::setHeroTrigger");
|
||||
}
|
||||
@ -56,4 +60,9 @@ void GameConversation::setHeroTrigger(int val) {
|
||||
void GameConversation::setInterlocutorTrigger(int val) {
|
||||
warning("TODO: GameConversation::setInterlocutorTrigger");
|
||||
}
|
||||
|
||||
int* GameConversation::getVariable(int idx) {
|
||||
warning("TODO: GameConversation::getVariable");
|
||||
return nullptr;
|
||||
}
|
||||
} // End of namespace MADS
|
||||
|
@ -42,10 +42,13 @@ public:
|
||||
*/
|
||||
virtual ~GameConversation();
|
||||
|
||||
int* getVariable(int idx);
|
||||
|
||||
void get(int id);
|
||||
void run(int id);
|
||||
void stop();
|
||||
void exportPointer(int *val);
|
||||
void exportValue(int val);
|
||||
void setHeroTrigger(int val);
|
||||
void setInterlocutorTrigger(int val);
|
||||
|
||||
|
@ -599,4 +599,8 @@ void Game::createThumbnail() {
|
||||
::createThumbnail(_saveThumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette);
|
||||
}
|
||||
|
||||
void Game::syncTimers(int slave_type, int slave_id, int master_type, int master_id) {
|
||||
warning("TODO: Game_syncTimers");
|
||||
}
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -235,6 +235,9 @@ public:
|
||||
* Creates a temporary thumbnail for use in saving games
|
||||
*/
|
||||
void createThumbnail();
|
||||
|
||||
void syncTimers(int slave_type, int slave_id, int master_type, int master_id);
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -34,6 +34,7 @@ PhantomGlobals::PhantomGlobals()
|
||||
resize(210);
|
||||
_spriteIndexes.resize(30);
|
||||
_sequenceIndexes.resize(30);
|
||||
_animationIndexes.resize(30);
|
||||
}
|
||||
|
||||
void PhantomGlobals::synchronize(Common::Serializer &s) {
|
||||
@ -41,6 +42,7 @@ void PhantomGlobals::synchronize(Common::Serializer &s) {
|
||||
|
||||
_spriteIndexes.synchronize(s);
|
||||
_sequenceIndexes.synchronize(s);
|
||||
_animationIndexes.synchronize(s);
|
||||
}
|
||||
|
||||
|
||||
|
@ -124,6 +124,7 @@ class PhantomGlobals : public Globals {
|
||||
public:
|
||||
SynchronizedList _spriteIndexes;
|
||||
SynchronizedList _sequenceIndexes;
|
||||
SynchronizedList _animationIndexes;
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -47,7 +47,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
|
||||
case 102: // music stands
|
||||
return new Scene102(vm);
|
||||
case 103: // below stage
|
||||
return new DummyScene(vm); // TODO
|
||||
return new Scene103(vm);
|
||||
case 104: // stage
|
||||
return new DummyScene(vm); // TODO
|
||||
case 105: // ground floor, storage room
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -101,6 +101,56 @@ public:
|
||||
virtual void actions();
|
||||
};
|
||||
|
||||
class Scene103 : public Scene1xx {
|
||||
private:
|
||||
int _jacquesAction;
|
||||
int _lastRandom;
|
||||
int _standPosition;
|
||||
int _hotspotPrompt1;
|
||||
int _hotspotPrompt2;
|
||||
int _hotspotPrompt3;
|
||||
int _hotspotPrompt4;
|
||||
int _hotspotPrompt5;
|
||||
int _hotspotRightFloor1;
|
||||
int _hotspotRightFloor2;
|
||||
int _hotspotLeftFloor1;
|
||||
int _hotspotLeftFloor2;
|
||||
int _hotspotGentleman;
|
||||
int _convCount;
|
||||
int _lastStairFrame;
|
||||
int _lastJacquesFrame;
|
||||
int _talkCount;
|
||||
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _anim4ActvFl;
|
||||
bool _anim5ActvFl;
|
||||
bool _anim6ActvFl;
|
||||
bool _climbThroughTrapFl;
|
||||
bool _guardFrameFl;
|
||||
bool _sitFl;
|
||||
|
||||
void adjustRails(int variant);
|
||||
void handleJacquesAnim();
|
||||
void climbRightStairs();
|
||||
void climbLeftStairs();
|
||||
void descendRightStairs();
|
||||
void descendLeftStairs();
|
||||
void process_conv_jacques();
|
||||
|
||||
public:
|
||||
Scene103(MADSEngine *vm);
|
||||
virtual void synchronize(Common::Serializer &s);
|
||||
|
||||
virtual void setup();
|
||||
virtual void enter();
|
||||
virtual void step();
|
||||
virtual void preActions();
|
||||
virtual void actions();
|
||||
};
|
||||
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
|
@ -814,4 +814,8 @@ void Player::firstWalk(Common::Point fromPos, Facing fromFacing, Common::Point d
|
||||
void Player::setWalkTrigger(int val) {
|
||||
warning("TODO: Player::setWalkTrigger");
|
||||
}
|
||||
|
||||
void Player::resetFacing(Facing facing) {
|
||||
warning("TODO: Player::resetFacing");
|
||||
}
|
||||
} // End of namespace MADS
|
||||
|
@ -228,6 +228,9 @@ public:
|
||||
void firstWalk(Common::Point fromPos, Facing fromFacing, Common::Point destPos, Facing destFacing, bool enableFl);
|
||||
|
||||
void setWalkTrigger(int val);
|
||||
|
||||
void resetFacing(Facing facing);
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -274,4 +274,8 @@ void Rails::synchronize(Common::Serializer &s) {
|
||||
}
|
||||
}
|
||||
|
||||
void Rails::disableNode(int idx) {
|
||||
warning("TODO: Rails::disableNode");
|
||||
}
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -127,6 +127,9 @@ public:
|
||||
* Synchronize the data for the route
|
||||
*/
|
||||
void synchronize(Common::Serializer &s);
|
||||
|
||||
void disableNode(int idx);
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -60,6 +60,7 @@ Scene::Scene(MADSEngine *vm)
|
||||
_interfaceY = 0;
|
||||
_spritesCount = 0;
|
||||
_variant = 0;
|
||||
_initialVariant = 0;
|
||||
|
||||
_paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF));
|
||||
|
||||
@ -610,19 +611,24 @@ void Scene::checkKeyboard() {
|
||||
}
|
||||
}
|
||||
|
||||
void Scene::loadAnimation(const Common::String &resName, int trigger, int id) {
|
||||
int Scene::loadAnimation(const Common::String &resName, int trigger) {
|
||||
// WORKAROUND: If there's already a previous active animation used by the
|
||||
// scene, then free it before we create the new one
|
||||
if ((_vm->getGameID() == GType_RexNebular) && _animation[id])
|
||||
freeAnimation(id);
|
||||
if ((_vm->getGameID() == GType_RexNebular) && _animation[0])
|
||||
freeAnimation(0);
|
||||
|
||||
DepthSurface depthSurface;
|
||||
UserInterface interfaceSurface(_vm);
|
||||
|
||||
warning("TODO: Fix loadAnimation");
|
||||
int id = 0;
|
||||
|
||||
_animation[id] = Animation::init(_vm, this);
|
||||
_animation[id]->load(interfaceSurface, depthSurface, resName,
|
||||
_vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr);
|
||||
_animation[id]->startAnimation(trigger);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
void Scene::updateCursor() {
|
||||
@ -744,9 +750,23 @@ void Scene::synchronize(Common::Serializer &s) {
|
||||
s.syncAsByte(_roomChanged);
|
||||
s.syncAsUint16LE(_nextSceneId);
|
||||
s.syncAsUint16LE(_priorSceneId);
|
||||
s.syncAsSint16LE(_initialVariant);
|
||||
s.syncAsSint16LE(_variant);
|
||||
_dynamicHotspots.synchronize(s);
|
||||
}
|
||||
|
||||
void Scene::setAnimFrame(int id, int val) {
|
||||
if ((id >= 0) && _animation[id])
|
||||
_animation[id]->setCurrentFrame(val);
|
||||
}
|
||||
|
||||
int Scene::getAnimFrame(int id) {
|
||||
if ((id >= 0) && _animation[id])
|
||||
return _animation[id]->getCurrentFrame();
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Scene::setDynamicAnim(int id, int anim_id, int segment) {
|
||||
warning("TODO: Scene::setDynamicAnim");
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
int _textSpacing;
|
||||
Hotspots _hotspots;
|
||||
DirtyAreas _dirtyAreas;
|
||||
int _initialVariant;
|
||||
int _variant;
|
||||
SceneInfo *_sceneInfo;
|
||||
MSurface _backgroundSurface;
|
||||
@ -214,7 +215,7 @@ public:
|
||||
/**
|
||||
* Load an animation
|
||||
*/
|
||||
void loadAnimation(const Common::String &resName, int trigger = 0, int id = 0);
|
||||
int loadAnimation(const Common::String &resName, int trigger = 0);
|
||||
|
||||
/**
|
||||
* Returns a vocab entry
|
||||
@ -254,6 +255,9 @@ public:
|
||||
*/
|
||||
void synchronize(Common::Serializer &s);
|
||||
|
||||
void setAnimFrame(int id, int val);
|
||||
int getAnimFrame(int id);
|
||||
|
||||
void setDynamicAnim(int id, int anim_id, int segment);
|
||||
void setCamera(Common::Point pos);
|
||||
void drawToBackground(int series_id, int sprite_id, Common::Point pos, int depth, int scale);
|
||||
|
@ -559,4 +559,23 @@ int SequenceList::setTimingTrigger(int delay, int code) {
|
||||
warning("TODO: SequenceList::setTimingTrigger");
|
||||
return -1;
|
||||
}
|
||||
|
||||
void SequenceList::setRange(int sequence_id, int first, int last) {
|
||||
warning("TODO: SequenceList::setRange");
|
||||
}
|
||||
|
||||
int SequenceList::addBackwardSequence(int idx, bool flipped, int numTicks, int intervalTicks, int startTicks, int expire) {
|
||||
warning("TODO: SequenceList::addBackwardSequence");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int SequenceList::setTrigger(int idx, int trigger_type, int trigger_sprite, int trigger_code) {
|
||||
warning("TODO: SequenceList::setTrigger");
|
||||
return -1;
|
||||
}
|
||||
|
||||
void SequenceList::setSeqPlayer(int idx, bool flag) {
|
||||
warning("TODO: SequenceList::setSeqPlayer");
|
||||
}
|
||||
|
||||
} // End of namespace
|
||||
|
@ -128,6 +128,10 @@ public:
|
||||
|
||||
int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
|
||||
int setTimingTrigger(int delay, int code);
|
||||
void setRange(int sequence_id, int first, int last);
|
||||
int addBackwardSequence(int idx, bool flipped, int numTicks, int intervalTicks, int startTicks, int expire);
|
||||
int setTrigger(int sequence_id, int trigger_type, int trigger_sprite, int trigger_code);
|
||||
void setSeqPlayer(int idx, bool flag);
|
||||
};
|
||||
|
||||
} // End of namespace MADS
|
||||
|
Loading…
x
Reference in New Issue
Block a user