25 #include "common/util.h" 26 #include "queen/structs.h" 45 void readDataFrom(uint16 numObjects, uint16 numRooms, byte *&ptr);
48 void setZone(GridScreen screen, uint16 zoneNum, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
51 void setZone(GridScreen screen, uint16 zoneNum,
const Box &box);
54 uint16
findZoneForPos(GridScreen screen, uint16 x, uint16 y)
const;
57 uint16
findAreaForPos(GridScreen screen, uint16 x, uint16 y)
const;
60 void clear(GridScreen screen);
72 const Box *
zone(GridScreen screen, uint16 index)
const;
84 uint16
findScale(uint16 x, uint16 y)
const;
87 Area *
area(
int room,
int num)
const {
return &_area[room][num]; }
90 uint16
areaMax(
int room)
const {
return _areaMax[room]; }
93 uint16
objMax(
int room)
const {
return _objMax[room]; }
95 void saveState(byte *&ptr);
96 void loadState(uint32 ver, byte *&ptr);
99 MAX_ZONES_NUMBER = 32,
100 MAX_AREAS_NUMBER = 11
112 ZoneSlot _zones[GS_COUNT][MAX_ZONES_NUMBER];
121 Area (*_area)[MAX_AREAS_NUMBER];
124 uint16 _numRoomAreas;
void setupPanel()
setup panel zones
uint16 areaMax(int room) const
returns the number of areas in this room
Definition: grid.h:90
uint16 findObjectNumber(uint16 zoneNum) const
get the object for the specified zone number
uint16 findScale(uint16 x, uint16 y) const
get scale for the specified position
void clear(GridScreen screen)
clear the zones for current room
Verb findVerbUnderCursor(int16 cursorx, int16 cursory) const
get the verb for the specified cursor position
void setupNewRoom(uint16 room, uint16 firstRoomObjNum)
setup objects zones for the specified room
uint16 findZoneForPos(GridScreen screen, uint16 x, uint16 y) const
find the zone number containing the specified point
Area * area(int room, int num) const
returns a reference to the specfied room area
Definition: grid.h:87
uint16 findAreaForPos(GridScreen screen, uint16 x, uint16 y) const
find the area number containing the specified point
uint16 objMax(int room) const
returns the number of objects in this room
Definition: grid.h:93
void setZone(GridScreen screen, uint16 zoneNum, uint16 x1, uint16 y1, uint16 x2, uint16 y2)
defines a new zone
void readDataFrom(uint16 numObjects, uint16 numRooms, byte *&ptr)
read areas data from specified stream
uint16 findObjectUnderCursor(int16 cursorx, int16 cursory) const
get the object for the specified cursor position
void drawZones()
draw the zones for current room (debug only)
const Box * zone(GridScreen screen, uint16 index) const
retuns a reference to the specified zone