33 #include "gob/variables.h" 34 #include "gob/sound/sounddesc.h" 39 #define TYPE_AMORPHOUS 1 46 #include "common/pack-start.h" 61 typedef Gob_PState Gob_StateLine[6];
80 int16 actionStartState;
84 Gob_StateLine *stateMach;
85 Gob_StateLine *realStateMach;
103 #include "common/pack-end.h" 106 int16 _currentGoblin;
108 int16 _gobStateLayer;
174 int16 _destItemState;
175 int16 _itemToObject[20];
179 int16 _itemIndInPocket;
180 int16 _itemIdInPocket;
183 int16 _destActionItem;
185 int16 _forceNextState[10];
187 int16 _positionedGob;
191 int16 _soundSlotsCount;
192 int16 _soundSlots[60];
195 int16 _gob1RelaxTimeVar;
196 int16 _gob2RelaxTimeVar;
201 char rotateState(int16 from, int16 to);
202 void playSound(
SoundDesc &snd, int16 repCount, int16 freq);
204 void animateObjects();
209 void showBoredom(int16 gobIndex);
210 void switchGoblin(int16 index);
212 void freeAllObjects();
213 void loadObjects(
const char *source);
214 void initVarPointers();
215 void saveGobDataToVars(int16 xPos, int16 yPos, int16 someVal);
216 void loadGobDataFromVars();
217 void pickItem(int16 indexToPocket, int16 idToPocket);
218 void placeItem(int16 indexInPocket, int16 idInPocket);
219 void swapItems(int16 indexToPick, int16 idToPick);
220 void treatItemPick(int16 itemId);
221 int16 treatItem(int16 action);
222 int16 doMove(
Gob_Object *gobDesc, int16 cont, int16 action);
224 void setState(int16 index, int16 state);
227 void move(int16 destX, int16 destY, int16 objIndex);
230 virtual void handleGoblins() = 0;
231 virtual void placeObject(
Gob_Object * objDesc,
char animated,
232 int16 index, int16 x, int16 y, int16 state) = 0;
233 virtual void freeObjects() = 0;
236 int16 nextAct, int16 framesCount) = 0;
244 int16 _rotStates[4][4];
251 void adjustDest(int16 posX, int16 posY);
255 void moveFindItem(int16 posX, int16 posY);
256 void moveCheckSelect(int16 framesCount,
Gob_Object * gobDesc,
257 int16 *pGobIndex, int16 *nextAct);
258 void moveInitStep(int16 framesCount, int16 action, int16 cont,
259 Gob_Object *gobDesc, int16 *pGobIndex, int16 *pNextAct);
260 void moveTreatRopeStairs(
Gob_Object *gobDesc);
263 virtual bool isMovement(int8 state) = 0;
271 void handleGoblins()
override {}
272 void placeObject(
Gob_Object * objDesc,
char animated,
273 int16 index, int16 x, int16 y, int16 state)
override;
274 void freeObjects()
override;
277 int16 nextAct, int16 framesCount)
override;
283 bool isMovement(int8 state)
override {
return false; }
291 void handleGoblins()
override;
292 void placeObject(
Gob_Object * objDesc,
char animated,
293 int16 index, int16 x, int16 y, int16 state)
override;
294 void freeObjects()
override;
297 int16 nextAct, int16 framesCount)
override;
303 bool isMovement(int8 state)
override;
311 void placeObject(
Gob_Object * objDesc,
char animated,
312 int16 index, int16 x, int16 y, int16 state)
override;
318 bool isMovement(int8 state)
override;
327 int16 nextAct, int16 framesCount)
override;
333 int16 turnState(int16 state, uint16 dir);
346 int32 findPath(int8 x, int8 y, int8 destX, int8 destY);
347 bool directionWalkable(int8 x, int8 y, int8 direction);
348 int32 bestWalkableDirectionFromOriginAndDest(int8 x, int8 y, int8 destX, int8 destY);
353 #endif // GOB_GOBLIN_H
Definition: variables.h:133
Definition: sounddesc.h:43