[56] | 1 | /* |
---|
| 2 | * Abuse - dark 2D side-scrolling platform game |
---|
| 3 | * Copyright (c) 1995 Crack dot Com |
---|
[494] | 4 | * Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net> |
---|
[56] | 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 or |
---|
| 8 | * Jonathan Clark. |
---|
| 9 | */ |
---|
| 10 | |
---|
[2] | 11 | #ifndef __TOOLS_HPP_ |
---|
| 12 | #define __TOOLS_HPP_ |
---|
| 13 | |
---|
[481] | 14 | #include "jwindow.h" |
---|
| 15 | #include "input.h" |
---|
| 16 | #include "specs.h" |
---|
| 17 | #include "scroller.h" |
---|
| 18 | #include "visobj.h" |
---|
[2] | 19 | |
---|
| 20 | class tool_picker : public spicker |
---|
| 21 | { |
---|
| 22 | filter *map; |
---|
[124] | 23 | visual_object **icons; |
---|
[2] | 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 |
---|
[124] | 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); |
---|
[2] | 35 | |
---|
[106] | 36 | virtual void draw_item(image *screen, int x, int y, int num, int active); |
---|
[2] | 37 | virtual int total() { return total_icons; } |
---|
[124] | 38 | virtual int item_width() { return iw; } |
---|
[106] | 39 | virtual int item_height() { return ih; } |
---|
[124] | 40 | virtual void note_new_current(image *screen, InputManager *inm, int x) |
---|
[2] | 41 | { wm->push_event(new event(ids[x],NULL)); } |
---|
| 42 | |
---|
[106] | 43 | void remap(palette *pal, image *screen); |
---|
[2] | 44 | ~tool_picker(); |
---|
| 45 | } ; |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | #endif |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | |
---|