Diffstat (limited to 'noncore/games/kbill/Bucket.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/kbill/Bucket.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/games/kbill/Bucket.cc b/noncore/games/kbill/Bucket.cc new file mode 100644 index 0000000..4b1d82a --- a/dev/null +++ b/noncore/games/kbill/Bucket.cc @@ -0,0 +1,16 @@ +#include "objects.h" + +int Bucket::clicked (int x, int y) { + return (x > 0 && y > 0 && x < width && y < height); +} + +void Bucket::draw() { + if (game.grabbed != game.BUCKET) ui.draw(picture, 0, 0); +} + +void Bucket::load_pix() { + picture.load("bucket"); + cursor.load("bucket", cursor.OWN_MASK); + width = picture.width; + height = picture.height; +} |