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

global.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_SERVICES_GLOBAL_H
00024 #define STARK_SERVICES_GLOBAL_H
00025 
00026 #include "common/scummsys.h"
00027 #include "common/array.h"
00028 
00029 namespace Stark {
00030 
00031 namespace Resources {
00032 class Camera;
00033 class Floor;
00034 class GlobalItemTemplate;
00035 class ModelItem;
00036 class KnowledgeSet;
00037 class Level;
00038 class Location;
00039 class Root;
00040 }
00041 
00045 class Current {
00046 public:
00047     Current() :
00048         _level(nullptr),
00049         _location(nullptr),
00050         _floor(nullptr),
00051         _camera(nullptr),
00052         _interactive(nullptr) {
00053     }
00054 
00055     Resources::Level *getLevel() const { return _level; }
00056     Resources::Location *getLocation() const { return _location; }
00057     Resources::Floor *getFloor() const { return _floor; }
00058     Resources::Camera *getCamera() const { return _camera; }
00059     Resources::ModelItem *getInteractive() const { return _interactive; }
00060 
00061     void setLevel(Resources::Level *level) { _level = level; }
00062     void setLocation(Resources::Location *location) { _location = location; }
00063     void setFloor(Resources::Floor *floor) { _floor = floor; }
00064     void setCamera(Resources::Camera *camera) { _camera = camera; }
00065     void setInteractive(Resources::ModelItem *interactive) { _interactive = interactive; }
00066 
00067 private:
00068     Resources::Level *_level;
00069     Resources::Location *_location;
00070     Resources::ModelItem *_interactive;
00071     Resources::Floor *_floor;
00072     Resources::Camera *_camera;
00073 };
00074 
00078 class Global {
00079 public:
00080     Global();
00081 
00082     Resources::Root *getRoot() const { return _root; }
00083     Resources::Level *getLevel() const { return _level; }
00084     Current *getCurrent() const { return _current; }
00085     bool isFastForward() const { return _fastForward; }
00086     uint getMillisecondsPerGameloop() const { return _millisecondsPerGameloop; }
00087     Resources::GlobalItemTemplate *getApril() const { return _april; }
00088     Resources::KnowledgeSet *getInventory() const { return _inventory; }
00089 
00090     void setRoot(Resources::Root *root) { _root = root; }
00091     void setLevel(Resources::Level *level) { _level = level; }
00092     void setCurrent(Current *current) { _current = current; }
00093     void setFastForward() { _fastForward = true; }
00094     void setNormalSpeed() { _fastForward = false; }
00095     void setMillisecondsPerGameloop(uint millisecondsPerGameloop) { _millisecondsPerGameloop = millisecondsPerGameloop; }
00096     void setApril(Resources::GlobalItemTemplate *april) { _april = april; }
00097     void setInventory(Resources::KnowledgeSet *inventory) { _inventory = inventory; }
00098 
00100     int32 getCurrentChapter();
00101 
00103     bool hasInventoryItem(const Common::String &itemName) const;
00104 
00106     void setCurrentChapter(int32 value);
00107 
00109     Common::String getCharacterName(int32 id);
00110 
00111 private:
00112     uint _millisecondsPerGameloop;
00113     Resources::Root *_root;
00114     Resources::Level *_level;
00115     Resources::KnowledgeSet *_inventory;
00116     Resources::GlobalItemTemplate *_april;
00117     Current *_current;
00118     bool _fastForward;
00119 };
00120 
00121 } // End of namespace Stark
00122 
00123 #endif // STARK_SERVICES_GLOBAL_H


Generated on Sat Jul 13 2019 05:01:13 for ResidualVM by doxygen 1.7.1
curved edge   curved edge