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

staticprovider.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_STATIC_PROVIDER_H
00024 #define STARK_SERVICES_STATIC_PROVIDER_H
00025 
00026 #include "common/array.h"
00027 #include "common/scummsys.h"
00028 
00029 namespace Stark {
00030 
00031 namespace Resources {
00032 class Anim;
00033 class Image;
00034 class Level;
00035 class Location;
00036 class Sound;
00037 }
00038 
00039 class ArchiveLoader;
00040 class Global;
00041 class VisualImageXMG;
00042 
00049 class StaticProvider {
00050 public:
00051     explicit StaticProvider(ArchiveLoader *archiveLoader);
00052 
00053     enum UIElement {
00054         kInventoryScrollUpArrow = 1,
00055         kInventoryScrollDownArrow = 2,
00056         kImages = 4,
00057         kActionMenuBg = 5,
00058         kTextScrollUpArrow = 6,
00059         kTextScrollDownArrow = 7,
00060         kQuit = 8,
00061         kCheckMark = 13,
00062         kVolume = 14,
00063         kDiaryNormal = 15,
00064         kInventory = 16,
00065         kExitArrow = 17,
00066         kExitArrowLeft = 18,
00067         kExitArrowRight = 19,
00068         kTextBackgroundActive = 20,
00069         kTextBackgroundPassive = 21,
00070         kDiaryTabbed = 22
00071     };
00072 
00073     enum UIImage {
00074         kInventoryBg = 0,
00075         kDialogOptionBullet = 4
00076     };
00077 
00078     enum UISound {
00079         kInventoryNewItem = 2
00080     };
00081 
00083     void init();
00084 
00086     void onGameLoop();
00087 
00089     void shutdown();
00090 
00092     Resources::Level *getLevel() const { return _level; }
00093 
00095     VisualImageXMG *getCursorImage(uint32 cursor) const;
00096 
00098     VisualImageXMG *getUIElement(UIElement element) const;
00099     VisualImageXMG *getUIElement(UIElement element, uint32 index) const;
00100 
00102     VisualImageXMG *getUIImage(UIImage image) const;
00103 
00105     Resources::Sound *getUISound(UISound sound) const;
00106 
00108     void goToAnimScriptStatement(UIElement stockUIElement, int animScriptItemIndex);
00109 
00111     Resources::Location *loadLocation(const char *locationName);
00112 
00114     bool isStaticLocation() const;
00115 
00117     Resources::Location *getLocation() const;
00118 
00120     Resources::Sound *getLocationSound(uint16 index) const;
00121 
00123     void unloadLocation(Resources::Location *location);
00124 
00125 private:
00126     ArchiveLoader *_archiveLoader;
00127 
00128     Resources::Level *_level;
00129     Resources::Location *_location;
00130     Common::Array<Resources::Anim *> _stockAnims;
00131     Common::Array<Resources::Image *> _stockImages;
00132 
00133     Common::String buildLocationArchiveName(const char *locationName) const;
00134 };
00135 
00136 } // End of namespace Stark
00137 
00138 #endif // STARK_SERVICES_STATIC_PROVIDER_H


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