Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 }
00137
00138 #endif // STARK_SERVICES_STATIC_PROVIDER_H