~ubuntu-branches/ubuntu/raring/scummvm/raring

« back to all changes in this revision

Viewing changes to engines/hugo/inventory.h

  • Committer: Bazaar Package Importer
  • Author(s): Moritz Muehlenhoff
  • Date: 2011-05-25 19:02:23 UTC
  • mto: (21.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: james.westby@ubuntu.com-20110525190223-fiqm0oaec714xk31
Tags: upstream-1.3.0
ImportĀ upstreamĀ versionĀ 1.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/tags/release-1-2-1/engines/hugo/inventory.h $
22
 
 * $Id: inventory.h 52406 2010-08-27 09:48:53Z strangerke $
 
21
 * $URL$
 
22
 * $Id$
23
23
 *
24
24
 */
25
25
 
34
34
#define HUGO_INVENTORY_H
35
35
namespace Hugo {
36
36
 
37
 
#define NUM_ARROWS     2                            // Number of arrows (left/right)
38
 
#define LEFT_ARROW     -2                           // Cursor over Left arrow in inventory icon bar
39
 
#define RIGHT_ARROW    -3                           // Cursor over Right arrow in inventory icon bar
 
37
/**
 
38
 * Actions for Process_inventory()
 
39
 */
 
40
enum invact_t {kInventoryActionInit, kInventoryActionLeft, kInventoryActionRight, kInventoryActionGet};
40
41
 
41
42
class InventoryHandler {
42
43
public:
43
 
        InventoryHandler(HugoEngine &vm);
44
 
 
45
 
        int16 processInventory(invact_t action, ...);
46
 
        void runInventory();
 
44
        InventoryHandler(HugoEngine *vm);
 
45
 
 
46
        void     setInventoryObjId(int16 objId);
 
47
        void     setInventoryState(istate_t state);
 
48
        void     freeInvent();
 
49
 
 
50
        int16    getInventoryObjId() const;
 
51
        istate_t getInventoryState() const;
 
52
 
 
53
        int16 findIconId(int16 objId);
 
54
        void  loadInvent(Common::SeekableReadStream &in);
 
55
        int16 processInventory(const invact_t action, ...);
 
56
        void  runInventory();
47
57
 
48
58
private:
49
 
        HugoEngine &_vm;
50
 
 
51
 
        void constructInventory(int16 imageTotNumb, int displayNumb, bool scrollFl, int16 firstObjId);
 
59
        HugoEngine *_vm;
 
60
 
 
61
        static const int kStepDy = 8;                   // Pixels per step movement
 
62
        
 
63
        int16    _firstIconId;                          // Index of first icon to display
 
64
        int16   *_invent;
 
65
        istate_t _inventoryState;                       // Inventory icon bar state
 
66
        int16    _inventoryHeight;                      // Inventory icon bar height
 
67
        int16    _inventoryObjId;                       // Inventory object selected, or -1
 
68
        byte     _maxInvent;
 
69
 
 
70
        void constructInventory(const int16 imageTotNumb, int displayNumb, const bool scrollFl, int16 firstObjId);
52
71
};
53
72
 
54
73
} // End of namespace Hugo