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     bool hasFeature(EngineFeature f) const override;
00077     bool canLoadGameStateCurrently() override;
00078     bool canSaveGameStateCurrently() override;
00079     Common::Error loadGameState(int slot) override;
00080     Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
00081     void pauseEngineIntern(bool pause) override;
00082 
00083 private:
00084     void mainLoop();
00085     void updateDisplayScene();
00086     void processEvents();
00087     void onScreenChanged() const;
00088     void addModsToSearchPath() const;
00089     static void checkRecommendedDatafiles();
00090 
00091     Gfx::FrameLimiter *_frameLimiter;
00092 
00093     const ADGameDescription *_gameDescription;
00094 
00095     // Double click handling
00096     static const uint _doubleClickDelay = 500; // ms
00097     uint _lastClickTime;
00098 };
00099 
00100 } // End of namespace Stark
00101 
00102 #endif // STARK_H


Generated on Sat May 30 2020 05:00:55 for ResidualVM by doxygen 1.7.1
curved edge   curved edge