Last change
on this file since 481 was
481,
checked in by Sam Hocevar, 12 years ago
|
Fuck the history, I'm renaming all .hpp files to .h for my own sanity.
|
-
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 | * |
---|
5 | * This software was released into the Public Domain. As with most public |
---|
6 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
7 | * Jonathan Clark. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __MOUSE_HPP_ |
---|
11 | #define __MOUSE_HPP_ |
---|
12 | #include "image.h" |
---|
13 | #include "sprite.h" |
---|
14 | |
---|
15 | class JCMouse |
---|
16 | { |
---|
17 | int here,but; |
---|
18 | sprite *sp; |
---|
19 | image *screen; |
---|
20 | int lx,ly,lbut,mx,my; |
---|
21 | int cx,cy; // center of mouse cursor |
---|
22 | public : |
---|
23 | JCMouse(image *Screen, palette *pal); |
---|
24 | void set_shape(image *im, int centerx=0, int centery=0); |
---|
25 | void update(int newx=-1, int newy=-1, int new_but=-1); |
---|
26 | void set_shape(image *im) { if (here) sp->change_visual(im); } |
---|
27 | int x() { if (here) return mx; else return 0; } |
---|
28 | int y() { if (here) return my; else return 0; } |
---|
29 | int drawx() { return mx-cx; } |
---|
30 | int drawy() { return my-cy; } |
---|
31 | int lastx() { if (here) return lx; else return 0; } |
---|
32 | int lasty() { if (here) return ly; else return 0; } |
---|
33 | int last_button() { if (here) return lbut; else return 0; } |
---|
34 | int button() { return but; } |
---|
35 | int exsist() { return here; } |
---|
36 | sprite *mouse_sprite() { return sp; } |
---|
37 | void set_position(int new_mx, int new_my); |
---|
38 | ~JCMouse(); |
---|
39 | |
---|
40 | #ifdef __POWERPC__ |
---|
41 | int set_button(int b) { return (but = b); } |
---|
42 | #endif |
---|
43 | } ; |
---|
44 | |
---|
45 | #endif |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.