diff options
author | Strangerke | 2011-09-15 07:58:31 +0200 |
---|---|---|
committer | Strangerke | 2011-09-15 08:00:54 +0200 |
commit | c99310820720714083b34d7d01080c54c977eb75 (patch) | |
tree | e7ebfefba735fd1934373817f63f678130726676 /engines/cge/cge.h | |
parent | fc6fce22212fad5a9c8d15f0b8649eed3b0104b4 (diff) | |
download | scummvm-rg350-c99310820720714083b34d7d01080c54c977eb75.tar.gz scummvm-rg350-c99310820720714083b34d7d01080c54c977eb75.tar.bz2 scummvm-rg350-c99310820720714083b34d7d01080c54c977eb75.zip |
CGE: Transform some static and globals into class members
Diffstat (limited to 'engines/cge/cge.h')
-rw-r--r-- | engines/cge/cge.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/engines/cge/cge.h b/engines/cge/cge.h index c65c780f6e..f62280aabc 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -23,7 +23,6 @@ #ifndef CGE_H #define CGE_H -#include "cge/general.h" #include "common/random.h" #include "common/savefile.h" #include "common/serializer.h" @@ -57,6 +56,9 @@ class Sprite; #define kSceneNx 8 #define kSceneNy 3 #define kSceneMax kSceneNx * kSceneNy +#define kPathMax 128 +#define kCryptSeed 0xA5 +#define kMaxFile 128 // our engine debug channels @@ -90,6 +92,20 @@ struct Bar { uint8 _vert; }; +class Font { + char _path[kPathMax]; + void load(); + CGEEngine *_vm; +public: + uint8 *_widthArr; + uint16 *_pos; + uint8 *_map; + Font(CGEEngine *vm, const char *name); + ~Font(); + uint16 width(const char *text); + void save(); +}; + class CGEEngine : public Engine { private: uint32 _lastFrame, _lastTick; @@ -136,7 +152,8 @@ public: Sprite *_sprK3; Common::Point _heroXY[kSceneMax]; - Bar _barriers[kSceneMax]; + Bar _barriers[kSceneMax + 1]; + Font *_font; Common::RandomSource _randomSource; MusicPlayer _midiPlayer; @@ -209,6 +226,10 @@ public: void postMiniStep(int stp); void showBak(int ref); void initSceneValues(); + char *mergeExt(char *buf, const char *name, const char *ext); + int takeEnum(const char **tab, const char *text); + int newRandom(int range); + void sndSetVolume(); void snBackPt(Sprite *spr, int stp); void snHBarrier(const int scene, const int barX); |