STARK: Adjust a few TODOs

This commit is contained in:
Bastien Bouclet 2018-11-22 12:54:20 +01:00
parent aa2075fc48
commit 24eda9e18d
8 changed files with 15 additions and 29 deletions

View File

@ -104,7 +104,6 @@ int Anim::getPointHotspotIndex(const Common::Point &point) const {
} }
uint32 Anim::getDuration() const { uint32 Anim::getDuration() const {
// TODO: Implement for each anim type
warning("Anim::getDuration is not implemented"); warning("Anim::getDuration is not implemented");
return 0; return 0;
} }
@ -115,13 +114,11 @@ void Anim::playAsAction(ItemVisual *item) {
} }
bool Anim::isAtTime(uint32 time) const { bool Anim::isAtTime(uint32 time) const {
// TODO: Implement for each anim type
warning("Anim::isAtTime is not implemented"); warning("Anim::isAtTime is not implemented");
return true; return true;
} }
uint32 Anim::getRemainingTime() const { uint32 Anim::getRemainingTime() const {
// TODO: Implement for each anim type
warning("Anim::getRemainingTime is not implemented"); warning("Anim::getRemainingTime is not implemented");
return 0; return 0;
} }

View File

@ -686,13 +686,13 @@ Command *Command::opScriptEnable(const ResourceReference &scriptRef, int32 enabl
} }
Command *Command::opShowPlay(Script *script, const ResourceReference &ref, int32 suspend) { Command *Command::opShowPlay(Script *script, const ResourceReference &ref, int32 suspend) {
assert(_arguments.size() == 3);
Speech *speech = ref.resolve<Speech>(); Speech *speech = ref.resolve<Speech>();
warning("(TODO: Implement) opShowPlay(%s %d) %s : %s", speech->getName().c_str(), suspend, speech->getPhrase().c_str(), ref.describe().c_str());
speech->setPlayTalkAnim(true); speech->setPlayTalkAnim(true);
StarkDialogPlayer->playSingle(speech); StarkDialogPlayer->playSingle(speech);
// TODO: Only set the anim activity if the next opcode is not going to do it
if (suspend) { if (suspend) {
script->suspend(speech); script->suspend(speech);
return this; // Stay on the same command while suspended return this; // Stay on the same command while suspended
@ -949,9 +949,6 @@ Command *Command::opLocationScrollSet(const ResourceReference &scrollRef) {
} }
Command *Command::opFullMotionVideoPlay(Script *script, const ResourceReference &movieRef, int32 unknown) { Command *Command::opFullMotionVideoPlay(Script *script, const ResourceReference &movieRef, int32 unknown) {
FMV *movie = movieRef.resolve<FMV>();
warning("(TODO: Implement) opFullMotionVideoPlay(%s) : %s - %d", movie->getName().c_str(), movieRef.describe().c_str(), unknown);
// Stop skipping frames // Stop skipping frames
StarkGlobal->setNormalSpeed(); StarkGlobal->setNormalSpeed();
@ -960,6 +957,9 @@ Command *Command::opFullMotionVideoPlay(Script *script, const ResourceReference
Location *location = current->getLocation(); Location *location = current->getLocation();
location->resetAnimationBlending(); location->resetAnimationBlending();
// TODO: Pause the engine while the video is playing
FMV *movie = movieRef.resolve<FMV>();
movie->requestPlayback(); movie->requestPlayback();
// Unconditional suspension // Unconditional suspension
@ -1160,12 +1160,9 @@ Command *Command::opItem3DSetWalkTarget(const ResourceReference &itemRef, const
} }
Command *Command::opSpeakWithoutTalking(Script *script, const ResourceReference &speechRef, int32 suspend) { Command *Command::opSpeakWithoutTalking(Script *script, const ResourceReference &speechRef, int32 suspend) {
assert(_arguments.size() == 3);
Speech *speech = speechRef.resolve<Speech>(); Speech *speech = speechRef.resolve<Speech>();
warning("(TODO: Implement) opSpeakWithoutTalking(%s, %d) : %s", speech->getName().c_str(), suspend, speechRef.describe().c_str());
// TODO: Complete
speech->setPlayTalkAnim(false); speech->setPlayTalkAnim(false);
StarkDialogPlayer->playSingle(speech); StarkDialogPlayer->playSingle(speech);
if (suspend) { if (suspend) {

View File

@ -750,7 +750,7 @@ void FloorPositionedItem::placeOnBookmark(Bookmark *target) {
// Set the z coordinate using the floor height at that position // Set the z coordinate using the floor height at that position
if (_floorFaceIndex < 0) { if (_floorFaceIndex < 0) {
warning("Item '%s' has been place out of the floor field", getName().c_str()); warning("Item '%s' has been placed out of the floor field", getName().c_str());
} }
} }

View File

@ -154,11 +154,6 @@ void Layer2D::onExitLocation() {
_items.clear(); _items.clear();
} }
Gfx::RenderEntry *Layer2D::getBackgroundRenderEntry() {
// TODO
return nullptr;
}
Gfx::RenderEntryArray Layer2D::listRenderEntries() { Gfx::RenderEntryArray Layer2D::listRenderEntries() {
Gfx::RenderEntryArray renderEntries; Gfx::RenderEntryArray renderEntries;
for (uint i = 0; i < _items.size(); i++) { for (uint i = 0; i < _items.size(); i++) {

View File

@ -64,9 +64,6 @@ public:
virtual void saveLoad(ResourceSerializer *serializer) override; virtual void saveLoad(ResourceSerializer *serializer) override;
virtual void saveLoadCurrent(ResourceSerializer *serializer) override; virtual void saveLoadCurrent(ResourceSerializer *serializer) override;
/** Obtain the render entry for the background item */
virtual Gfx::RenderEntry *getBackgroundRenderEntry() = 0;
/** Obtain the render entries for all items, including the background */ /** Obtain the render entries for all items, including the background */
virtual Gfx::RenderEntryArray listRenderEntries() = 0; virtual Gfx::RenderEntryArray listRenderEntries() = 0;
@ -112,7 +109,6 @@ public:
void onExitLocation() override; void onExitLocation() override;
// Layer API // Layer API
Gfx::RenderEntry *getBackgroundRenderEntry() override;
Gfx::RenderEntryArray listRenderEntries() override; Gfx::RenderEntryArray listRenderEntries() override;
protected: protected:
@ -137,9 +133,11 @@ public:
void onAllLoaded() override; void onAllLoaded() override;
// Layer API // Layer API
Gfx::RenderEntry *getBackgroundRenderEntry() override;
Gfx::RenderEntryArray listRenderEntries() override; Gfx::RenderEntryArray listRenderEntries() override;
/** Obtain the render entry for the background item */
Gfx::RenderEntry *getBackgroundRenderEntry();
protected: protected:
void printData() override; void printData() override;

View File

@ -46,7 +46,6 @@ MainMenuScreen::~MainMenuScreen() {
void MainMenuScreen::open() { void MainMenuScreen::open() {
StaticLocationScreen::open(); StaticLocationScreen::open();
//TODO: Implement each handler
_widgets.push_back(new StaticLocationWidget( _widgets.push_back(new StaticLocationWidget(
"BGImage", "BGImage",
nullptr, nullptr,