ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

stark.h

Go to the documentation of this file.
00001 /* ResidualVM - A 3D game interpreter
00002  *
00003  * ResidualVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the AUTHORS
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef STARK_H
00024 #define STARK_H
00025 
00026 #include "engines/engine.h"
00027 #include "common/events.h"
00028 #include "common/str-array.h"
00029 
00030 struct ADGameDescription;
00031 
00032 namespace Common {
00033 class RandomSource;
00034 }
00035 
00036 namespace Stark {
00037 
00038 namespace Gfx {
00039 class Driver;
00040 class FrameLimiter;
00041 }
00042 
00043 class ArchiveLoader;
00044 class Console;
00045 class DialogPlayer;
00046 class Diary;
00047 class FontProvider;
00048 class Global;
00049 class GameInterface;
00050 class Scene;
00051 class StateProvider;
00052 class StaticProvider;
00053 class ResourceProvider;
00054 class UserInterface;
00055 class Settings;
00056 class GameChapter;
00057 class GameMessage;
00058 
00059 class StarkEngine : public Engine {
00060 public:
00061     StarkEngine(OSystem *syst, const ADGameDescription *gameDesc);
00062     ~StarkEngine() override;
00063 
00065     static Common::String formatSaveName(const char *target, int slot);
00066 
00068     static Common::StringArray listSaveNames(const char *target);
00069 
00071     static int getSaveNameSlot(const char *target, const Common::String &saveName);
00072 
00073 protected:
00074     // Engine APIs
00075     Common::Error run() override;
00076     GUI::Debugger *getDebugger() override { return (GUI::Debugger *)_console; }
00077     bool hasFeature(EngineFeature f) const override;
00078     bool canLoadGameStateCurrently() override;
00079     bool canSaveGameStateCurrently() override;
00080     Common::Error loadGameState(int slot) override;
00081     Common::Error saveGameState(int slot, const Common::String &desc) override;
00082     void pauseEngineIntern(bool pause) override;
00083 
00084 private:
00085     void mainLoop();
00086     void updateDisplayScene();
00087     void processEvents();
00088     void onScreenChanged() const;
00089     void addModsToSearchPath() const;
00090     static void checkRecommendedDatafiles();
00091     void tryAutoSaving();
00092 
00093     Gfx::FrameLimiter *_frameLimiter;
00094     Console *_console;
00095 
00096     const ADGameDescription *_gameDescription;
00097 
00098     // Double click handling
00099     static const uint _doubleClickDelay = 500; // ms
00100     uint _lastClickTime;
00101 
00102     uint32 _lastAutoSaveTime;
00103 };
00104 
00105 } // End of namespace Stark
00106 
00107 #endif // STARK_H


Generated on Sat Oct 12 2019 05:01:03 for ResidualVM by doxygen 1.7.1
curved edge   curved edge