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 
00029 struct ADGameDescription;
00030 
00031 namespace Common {
00032 class RandomSource;
00033 }
00034 
00035 namespace Stark {
00036 
00037 namespace Gfx {
00038 class Driver;
00039 class FrameLimiter;
00040 }
00041 
00042 class ArchiveLoader;
00043 class Console;
00044 class DialogPlayer;
00045 class Diary;
00046 class FontProvider;
00047 class Global;
00048 class GameInterface;
00049 class Scene;
00050 class StateProvider;
00051 class StaticProvider;
00052 class ResourceProvider;
00053 class UserInterface;
00054 class Settings;
00055 class GameChapter;
00056 class GameMessage;
00057 
00058 class StarkEngine : public Engine {
00059 public:
00060     StarkEngine(OSystem *syst, const ADGameDescription *gameDesc);
00061     ~StarkEngine() override;
00062 
00064     static Common::String formatSaveName(const char *target, int slot);
00065 
00066 protected:
00067     // Engine APIs
00068     Common::Error run() override;
00069     GUI::Debugger *getDebugger() override { return (GUI::Debugger *)_console; }
00070     bool hasFeature(EngineFeature f) const override;
00071     bool canLoadGameStateCurrently() override;
00072     bool canSaveGameStateCurrently() override;
00073     Common::Error loadGameState(int slot) override;
00074     Common::Error saveGameState(int slot, const Common::String &desc) override;
00075     void pauseEngineIntern(bool pause) override;
00076 
00077 private:
00078     void mainLoop();
00079     void updateDisplayScene();
00080     void processEvents();
00081     void onScreenChanged() const;
00082     void addModsToSearchPath() const;
00083     static void checkRecommendedDatafiles();
00084     void tryAutoSaving();
00085 
00086     Gfx::FrameLimiter *_frameLimiter;
00087     Console *_console;
00088 
00089     const ADGameDescription *_gameDescription;
00090 
00091     // Double click handling
00092     static const uint _doubleClickDelay = 500; // ms
00093     uint _lastClickTime;
00094 
00095     uint32 _lastAutoSaveTime;
00096 };
00097 
00098 } // End of namespace Stark
00099 
00100 #endif // STARK_H


Generated on Sat Apr 20 2019 05:03:57 for ResidualVM by doxygen 1.7.1
curved edge   curved edge