Public Attributes | |
uint16 | code |
uint32 | roomImagePointer |
uint16 | roomImageSize |
byte | walkAreasGrid [40][28] |
byte | mouseGrid [40][28] |
Common::Point | trajectories [9][30][5] |
DoorRegistry | doors [5] |
RoomBitmapRegister | screenLayers [15] |
RoomObjectListEntry * | screenObjectIndex [51] = { nullptr } |
bool | animationFlag |
Common::String | animationName |
bool | paletteAnimationFlag |
uint16 | palettePointer |
Common::Point | secondaryAnimTrajectory [300] |
uint16 | secondaryAnimDirections [300] |
uint16 | secondaryTrajectoryLength |
Common::Point Tot::RoomFileRegister::trajectories[9][30][5] |
This is a preset matrix of trajectories from different areas of the game.action Each room is divided into a number of areas according to the screen grid [rejapantalla].action
A given coordinate in the game (x,y) is mapped into a grid position by dividing the x with factorx (8) and the y coordinate by factory (5). With each room being 320x140 this results in 40 horizontal divisions and 28 vertical divisions which matches the [rejapantalla] matrix.action
When obtaining the grid position a given (x,y) coordinate matches to, [rejapantalla] returns an area number.action
trayectorias then has a precalculated route from each possible combination of two areas in the game. pixel by pixel translation within the area is done by bresenham algorithm in the trajectory function.