diff options
author | Gregory Montoir | 2004-12-31 00:25:18 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-12-31 00:25:18 +0000 |
commit | a44e8248159fc836f9d534872b0d55741f0c803c (patch) | |
tree | 47df2cacddf071f0ff1c8a761b3038acc0d8c7d1 /queen/grid.h | |
parent | f06348440fd2040cb8bf57849c7e6670db91caf0 (diff) | |
download | scummvm-rg350-a44e8248159fc836f9d534872b0d55741f0c803c.tar.gz scummvm-rg350-a44e8248159fc836f9d534872b0d55741f0c803c.tar.bz2 scummvm-rg350-a44e8248159fc836f9d534872b0d55741f0c803c.zip |
added some comments and re-indented some parts of code
svn-id: r16394
Diffstat (limited to 'queen/grid.h')
-rw-r--r-- | queen/grid.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/queen/grid.h b/queen/grid.h index b85451d5c7..7b53be6b77 100644 --- a/queen/grid.h +++ b/queen/grid.h @@ -41,25 +41,55 @@ public: Grid(QueenEngine *vm); ~Grid(); + //! read areas data from specified stream void readDataFrom(uint16 numObjects, uint16 numRooms, byte *&ptr); + //! defines a new zone void setZone(GridScreen screen, uint16 zoneNum, uint16 x1, uint16 y1, uint16 x2, uint16 y2); + + //! defines a new zone void setZone(GridScreen screen, uint16 zoneNum, const Box &box); + + //! find the zone number containing the specified point uint16 findZoneForPos(GridScreen screen, uint16 x, uint16 y) const; + + //! find the area number containing the specified point uint16 findAreaForPos(GridScreen screen, uint16 x, uint16 y) const; + + //! clear the zones for current room void clear(GridScreen screen); + + //! setup objects zones for the specified room void setupNewRoom(uint16 room, uint16 firstRoomObjNum); + + //! setup panel zones void setupPanel(); + + //! draw the zones for current room (debug only) void drawZones(); + + //! retuns a reference to the specified zone const Box *zone(GridScreen screen, uint16 index) const; + //! get the verb for the specified cursor position Verb findVerbUnderCursor(int16 cursorx, int16 cursory) const; + + //! get the object for the specified cursor position uint16 findObjectUnderCursor(int16 cursorx, int16 cursory) const; + + //! get the object for the specified zone number uint16 findObjectNumber(uint16 zoneNum) const; + + //! get scale for the specified position uint16 findScale(uint16 x, uint16 y) const; + //! returns a reference to the specfied room area Area *area(int room, int num) const { return &_area[room][num]; } + + //! returns the number of areas in this room uint16 areaMax(int room) const { return _areaMax[room]; } + + //! returns the number of objects in this room uint16 objMax(int room) const { return _objMax[room]; } void saveState(byte *&ptr); @@ -78,16 +108,22 @@ private: Box box; }; + //! current room zones ZoneSlot _zones[GS_COUNT][MAX_ZONES_NUMBER]; + //! number of objects for each room int16 *_objMax; + //! number of areas for each room int16 *_areaMax; + //! areas for each room Area (*_area)[MAX_AREAS_NUMBER]; + //! total number of room areas uint16 _numRoomAreas; + //! box/zone for each objects Box *_objectBox; QueenEngine *_vm; |