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;
88 void load(ResourcePackId packId);
95 void enter(ResourcePackId packId);
150 bool updateSceneCoordinates(int32 targetX, int32 targetY, int32 val,
bool checkSceneCoords =
false, int32 *param = NULL);
194 bool rectIntersect(int32 x, int32 y, int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3)
const;
196 Polygons *polygons() {
return _polygons; }
198 uint32 getFrameCounter() {
return _frameCounter; }
200 const byte *getSavedPalette() {
return _savedPalette; }
206 ResourcePackId _packId;
220 uint32 _frameCounter;
223 byte _savedPalette[PALETTE_SIZE];
225 bool _debugShowVersion;
232 bool action(AsylumAction a);
260 void updateObjects();
272 void updateAdjustScreen();
277 void updateCoordinates();
285 void updateCursor(ActorDirection direction,
const Common::Rect &rect);
306 void buildUpdateList();
311 void processUpdateList();
321 static bool updateListCompare(
const UpdateItem &item1,
const UpdateItem &item2);
326 void checkVisibleActorsPriority();
333 void adjustActorPriority(ActorIndex index);
335 int32 _chapter5RainFrameIndex;
348 int32 hitTest(HitType &type);
358 int32 hitTestScene(HitType &type);
365 int32 hitTestActionArea();
372 ActorIndex hitTestActor();
379 bool hitTestPlayer();
386 int32 hitTestObject();
399 bool hitTestPixel(ResourceId resourceId, uint32 frame, int16 x, int16 y,
bool flipped);
411 void handleHit(int32 index, HitType type);
413 void clickInventory();
415 void hitAreaChapter2(int32
id);
417 int32 _hitAreaChapter7Counter;
418 void hitAreaChapter7(int32
id);
419 void hitAreaChapter11(int32
id);
421 void hitActorChapter2(ActorIndex index);
422 void hitActorChapter11(ActorIndex index);
431 void playIntroSpeech();
445 bool speak(Common::KeyCode code);
467 void debugShowActors();
468 void debugShowObjects();
469 void debugShowPolygons();
470 void debugShowPolygon(uint32 index, uint32 color = 0xFF);
471 void debugHighlightPolygon(uint32 index);
472 void debugShowSceneRects();
473 void debugScreenScrolling();
474 void debugShowWalkRegion(
Polygon *poly);
481 #endif // ASYLUM_VIEWS_SCENE_H bool updateSceneCoordinates(int32 targetX, int32 targetY, int32 val, bool checkSceneCoords=false, int32 *param=NULL)
Actor * getActor(ActorIndex index=kActorInvalid)
Definition: default_display_client.h:78
bool handleEvent(const AsylumEvent &ev)
Definition: polygons.h:33
void updateAmbientSounds()
Definition: scenetitle.h:32
Definition: polygons.h:50
ResourcePackId getPackId()
Definition: scene.h:116
Definition: worldstats.h:64
void changePlayer(ActorIndex index)
Definition: eventhandler.h:43
void load(ResourcePackId packId)
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