22 #ifndef ASYLUM_VIEWS_SCENE_H 23 #define ASYLUM_VIEWS_SCENE_H 25 #include "common/array.h" 26 #include "common/events.h" 27 #include "common/rational.h" 29 #include "graphics/surface.h" 31 #include "asylum/system/screen.h" 33 #include "asylum/eventhandler.h" 34 #include "asylum/shared.h" 36 #define SCENE_FILE_MASK "scn.%03d" 37 #define MUSIC_FILE_MASK "mus.%03d" 48 class GraphicResource;
62 struct AmbientSoundItem;
95 void load(ResourcePackId packId);
102 void enter(ResourcePackId packId);
157 bool updateSceneCoordinates(int32 targetX, int32 targetY, int32 val,
bool checkSceneCoords =
false, int32 *param = NULL);
201 bool rectIntersect(int32 x, int32 y, int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3)
const;
203 Polygons *polygons() {
return _polygons; }
205 uint32 getFrameCounter() {
return _frameCounter; }
207 const byte *getSavedPalette() {
return _savedPalette; }
213 ResourcePackId _packId;
227 uint32 _frameCounter;
230 byte _savedPalette[PALETTE_SIZE];
232 bool _debugShowVersion;
235 bool _rightButtonDown;
242 bool actionDown(AsylumAction a);
243 bool actionUp(AsylumAction a);
271 void updateObjects();
283 void updateAdjustScreen();
288 void updateCoordinates();
296 void updateCursor(ActorDirection direction,
const Common::Rect &rect);
317 void buildUpdateList();
322 void processUpdateList();
332 static bool updateListCompare(
const UpdateItem &item1,
const UpdateItem &item2);
337 void checkVisibleActorsPriority();
344 void adjustActorPriority(ActorIndex index);
346 int32 _chapter5RainFrameIndex;
359 int32 hitTest(HitType &type);
369 int32 hitTestScene(HitType &type);
376 int32 hitTestActionArea();
383 ActorIndex hitTestActor();
390 bool hitTestPlayer();
397 int32 hitTestObject();
410 bool hitTestPixel(ResourceId resourceId, uint32 frame, int16 x, int16 y,
bool flipped);
422 void handleHit(int32 index, HitType type);
424 void clickInventory();
426 void hitAreaChapter2(int32
id);
428 int32 _hitAreaChapter7Counter;
429 void hitAreaChapter7(int32
id);
430 void hitAreaChapter11(int32
id);
432 void hitActorChapter2(ActorIndex index);
433 void hitActorChapter11(ActorIndex index);
442 void playIntroSpeech();
456 bool speak(Common::KeyCode code);
478 void debugShowActors();
479 void debugShowObjects();
480 void debugShowPolygons();
481 void debugShowPolygon(uint32 index, uint32 color = 0xFF);
482 void debugHighlightPolygon(uint32 index);
483 void debugShowSceneRects();
484 void debugScreenScrolling();
485 void debugShowWalkRegion(
Polygon *poly);
492 #endif // ASYLUM_VIEWS_SCENE_H bool updateSceneCoordinates(int32 targetX, int32 targetY, int32 val, bool checkSceneCoords=false, int32 *param=NULL)
Actor * getActor(ActorIndex index=kActorInvalid)
bool handleEvent(const AsylumEvent &ev)
Definition: atari-screen.h:60
Definition: polygons.h:33
void updateAmbientSounds()
Definition: scenetitle.h:32
Definition: polygons.h:50
ResourcePackId getPackId()
Definition: scene.h:123
Definition: worldstats.h:64
void changePlayer(ActorIndex index)
Definition: eventhandler.h:43
void load(ResourcePackId packId)
Definition: atari-cursor.h:38
Definition: eventhandler.h:61
void changePlayerUpdate(ActorIndex index)
int32 findActionArea(ActionAreaType type, const Common::Point &pt, bool highlight=false)
void enter(ResourcePackId packId)
bool rectIntersect(int32 x, int32 y, int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3) const