From f753d47c714f9225c3819efc95914a3cc23d8535 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 3 Sep 2022 22:43:42 -0230 Subject: [PATCH] Add stubs to KidVid for save/load functionality (TODO). --- src/emucore/KidVid.cxx | 14 ++++++++++++++ src/emucore/KidVid.hxx | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/emucore/KidVid.cxx b/src/emucore/KidVid.cxx index adc87a140..6c9234388 100644 --- a/src/emucore/KidVid.cxx +++ b/src/emucore/KidVid.cxx @@ -138,6 +138,20 @@ void KidVid::update() } } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +bool KidVid::save(Serializer& out) const +{ + // TODO: save WAV player state + return Controller::save(out); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +bool KidVid::load(Serializer& in) +{ + // TODO: load WAV player state + return Controller::load(in); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void KidVid::openSampleFiles() { diff --git a/src/emucore/KidVid.hxx b/src/emucore/KidVid.hxx index 57743ce64..4bf02785a 100644 --- a/src/emucore/KidVid.hxx +++ b/src/emucore/KidVid.hxx @@ -67,6 +67,22 @@ class KidVid : public Controller */ void update() override; + /** + Saves the current state of this controller to the given Serializer. + + @param out The serializer device to save to. + @return The result of the save. True on success, false on failure. + */ + bool save(Serializer& out) const override; + + /** + Loads the current state of this controller from the given Serializer. + + @param in The serializer device to load from. + @return The result of the load. True on success, false on failure. + */ + bool load(Serializer& in) override; + /** Returns the name of this controller. */