25 #include "engines/grim/pool.h" 26 #include "engines/grim/object.h" 27 #include "engines/grim/color.h" 28 #include "engines/grim/sector.h" 29 #include "engines/grim/objectstate.h" 31 #include "math/quat.h" 32 #include "math/frustum.h" 35 class SeekableReadStream;
52 static int32 getStaticTag() {
return MKTAG(
'S',
'E',
'T',
' '); }
56 void setupOverworldLights();
58 void saveState(
SaveGame *savedState)
const;
59 bool restoreState(
SaveGame *savedState);
64 static Bitmap::Ptr loadBackground(
const char *fileName);
65 void drawBackground()
const;
66 void drawBitmaps(ObjectState::Position stage);
69 void setupLights(
const Math::Vector3d &pos,
bool inOverworld);
71 void setSoundPosition(
const char *soundName,
const Math::Vector3d &pos);
72 void setSoundPosition(
const char *soundName,
const Math::Vector3d &pos,
int minVol,
int maxVol);
73 void calculateSoundPosition(
const Math::Vector3d &pos,
int minVol,
int maxVol,
int &volume,
int &balance);
74 void setSoundParameters(
int minVolume,
int maxVolume);
75 void getSoundParameters(
int *minVolume,
int *maxVolume);
79 void setLightEnableState(
bool state) {
80 _enableLights = state;
82 void setLightIntensity(
const char *light,
float intensity);
83 void setLightIntensity(
int light,
float intensity);
84 void setLightPosition(
const char *light,
const Math::Vector3d &pos);
85 void setLightPosition(
int light,
const Math::Vector3d &pos);
86 void setLightEnabled(
const char *light,
bool enabled);
87 void setLightEnabled(
int light,
bool enabled);
90 void setSetup(
int num);
91 int getSetup()
const {
return _currSetup - _setups; }
92 inline int getNumSetups()
const {
return _numSetups; }
95 int getSectorCount() {
return _numSectors; }
97 Sector *getSectorBase(
int id);
102 Sector *findPointSector(
const Math::Vector3d &p, Sector::SectorType type);
103 int findSectorSortOrder(
const Math::Vector3d &p, Sector::SectorType type);
104 void findClosestSector(
const Math::Vector3d &p,
Sector **sect, Math::Vector3d *closestPt);
105 void shrinkBoxes(
float radius);
106 void unshrinkBoxes();
108 void addObjectState(
const ObjectState::Ptr &s);
109 void deleteObjectState(
const ObjectState::Ptr &s) {
113 void moveObjectStateToFront(
const ObjectState::Ptr &s);
114 void moveObjectStateToBack(
const ObjectState::Ptr &s);
116 ObjectState *addObjectState(
int setupID, ObjectState::Position pos,
const char *bitmap,
const char *zbitmap,
bool transparency);
123 void setupCamera()
const;
124 void saveState(
SaveGame *savedState)
const;
125 bool restoreState(
SaveGame *savedState);
127 void getRotation(
float *x,
float *y,
float *z);
128 Math::Matrix4 getRotation() {
return _rot; }
129 void setPitch(Math::Angle p);
130 void setYaw(Math::Angle y);
131 void setRoll(Math::Angle r);
134 Bitmap::Ptr _bkgndBm, _bkgndZBm;
137 Math::Vector3d _pos, _interest;
139 float _roll, _fov, _nclip, _fclip;
143 if (!_cmaps || ! _numCmaps)
148 Setup *getCurrSetup() {
return _currSetup; }
149 Setup *getSetup(
int num)
const {
return _setups + num; }
150 const Common::List<Light *> &getLights(
bool inOverworld) {
return (inOverworld ? _overworldLightsList : _lightsList); }
151 const Math::Frustum &getFrustum() {
return _frustum; }
153 int getShadowCount()
const {
return _numShadows; }
162 int _numSetups, _numLights, _numSectors, _numObjectStates, _numShadows;
175 Math::Frustum _frustum;
188 void saveState(
SaveGame *savedState)
const;
189 bool restoreState(
SaveGame *savedState);
190 void setIntensity(
float intensity);
191 void setUmbra(
float angle);
192 void setPenumbra(
float angle);
203 Math::Vector3d _pos, _dir;
205 float _intensity, _umbraangle, _penumbraangle, _falloffNear, _falloffFar;
206 float _scaledintensity, _cosumbraangle, _cospenumbraangle;
219 void saveState(
SaveGame *savedState)
const;
220 void restoreState(
SaveGame *savedState);
223 Math::Vector3d _shadowPoint;
Definition: objectstate.h:34
Definition: savegame.h:33
Definition: algorithm.h:29
Definition: colormap.h:35
Definition: textsplit.h:35
#define MKTAG(a0, a1, a2, a3)
Definition: endian.h:188