22 #ifndef GNAP_GAMESYS_H 23 #define GNAP_GAMESYS_H 25 #include "gnap/gnap.h" 26 #include "gnap/resource.h" 27 #include "common/array.h" 28 #include "common/rect.h" 29 #include "graphics/surface.h" 33 const int kMaxSequenceItems = 40;
34 const int kMaxSpriteDrawItems = 30;
35 const int kMaxSoundIds = 50;
36 const int kMaxSeqItems = 50;
37 const int kMaxUpdRects = 20;
38 const int kMaxGfxItems = 50;
39 const int kMaxAnimations = 12;
69 bool _forceFrameReset;
103 void insertSequence(
int sequenceId,
int id,
int sequenceId2,
int id2,
int flags,
int totalDuration, int16 x, int16 y);
105 void removeSequence(
int sequenceId,
int id,
bool resetFl);
107 void requestClear2(
bool resetFl);
108 void requestClear1();
109 void requestRemoveSequence(
int sequenceId,
int id);
110 void waitForUpdate();
111 int isSequenceActive(
int sequenceId,
int id);
112 void setBackgroundSurface(
Graphics::Surface *surface,
int a4,
int a5,
int a6,
int a7);
113 void setScaleValues(
int a1,
int a2,
int a3,
int a4);
116 void drawSpriteToBackground(
int x,
int y,
int resourceId);
119 void drawSpriteToSurface(
Graphics::Surface *surface,
int x,
int y,
int resourceId);
120 void drawTextToSurface(
Graphics::Surface *surface,
int x,
int y, byte r, byte g, byte b,
const char *text);
121 int getTextHeight(
const char *text);
122 int getTextWidth(
const char *text);
123 void fillSurface(
Graphics::Surface *surface,
int x,
int y,
int width,
int height, byte r, byte g, byte b);
124 void setAnimation(
int sequenceId,
int id,
int animationIndex);
125 int getAnimationStatus(
int animationIndex);
126 int getSpriteWidthById(
int resourceId);
127 int getSpriteHeightById(
int resourceId);
129 void drawBitmap(
int resourceId);
136 int _newSpriteDrawItemsCount;
139 int _removeSequenceItemsCount;
142 int _removeSpriteDrawItemsCount;
146 bool _grabSpriteChanged;
149 bool _reqRemoveSequenceItem;
150 int _removeSequenceItemSequenceId, _removeSequenceItemValue;
159 GfxItem _gfxItems[kMaxGfxItems];
163 int _animationsCount;
165 int _backgroundImageValue3, _backgroundImageValue1;
166 int _backgroundImageValue4, _backgroundImageValue2;
168 int32 _gameSysClock, _lastUpdateClock;
169 bool _animationsDone;
176 Sequence *seqFind(
int sequenceId,
int id,
int *outIndex);
177 int seqLocateGfx(
int sequenceId,
int id,
int *outGfxIndex);
178 void seqInsertGfx(
int index,
int duration);
179 void seqRemoveGfx(
int sequenceId,
int id);
180 bool updateSequenceDuration(
int sequenceId,
int id,
int *outDuration);
181 void updateAnimationsStatus(
int sequenceId,
int id);
187 void blitSprite32(
Graphics::Surface *destSurface,
int x,
int y, byte *sourcePixels,
188 int sourceWidth,
Common::Rect &sourceRect, uint32 *sourcePalette,
bool transparent);
199 void handleReqRemoveSequenceItem();
200 void handleReqRemoveSequenceItems();
201 void handleReqRemoveSpriteDrawItems();
202 void fatUpdateFrame();
204 void updatePlaySounds();
212 #endif // GNAP_GAMESYS_H
Definition: resource.h:56
Definition: resource.h:47
Definition: resource.h:84
Definition: character.h:25