source: abuse/trunk/src/imlib/tools.h @ 555

Last change on this file since 555 was 555, checked in by Sam Hocevar, 12 years ago

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#ifndef __TOOLS_HPP_
12#define __TOOLS_HPP_
13
14#include "jwindow.h"
15#include "input.h"
16#include "specs.h"
17#include "scroller.h"
18#include "visobj.h"
19
20class tool_picker : public spicker
21{
22  filter *map;
23  visual_object **icons;
24  int *ids;
25  int total_icons;
26  int iw,ih;
27  palette *old_pal;
28
29  public :
30
31  // you are expected keep image and id list in memory, tool_picker does not copy them
32  tool_picker(int X, int Y, int ID,
33          int show_h, visual_object **Icons, int *Ids, int total_ic,
34          palette *icon_palette, palette *pal, ifield *Next);
35
36  virtual void draw_item(image *screen, int x, int y, int num, int active);
37  virtual int total() { return total_icons; }
38  virtual int item_width() { return iw; }
39  virtual int item_height() { return ih; }
40  virtual void note_new_current(image *screen, InputManager *inm, int x)
41  { wm->push_event(new event(ids[x],NULL)); }
42
43  void remap(palette *pal, image *screen);
44  ~tool_picker();
45} ;
46
47
48#endif
49
50
51
52
53
54
55
Note: See TracBrowser for help on using the repository browser.