2010-04-20 04:10:42 +00:00
|
|
|
#ifndef CURSOR_H
|
|
|
|
#define CURSOR_H
|
|
|
|
|
2010-04-20 17:11:16 +00:00
|
|
|
#include <stdbool.h>
|
2010-04-21 07:14:39 +00:00
|
|
|
#include "deck.h"
|
2010-04-20 17:11:16 +00:00
|
|
|
|
2010-04-20 04:10:42 +00:00
|
|
|
#define CURSOR_STARTING_X 4
|
|
|
|
#define CURSOR_STARTING_Y 7
|
|
|
|
|
|
|
|
struct cursor {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum movement { LEFT, DOWN, UP, RIGHT };
|
|
|
|
|
|
|
|
extern struct deck *deck;
|
|
|
|
|
|
|
|
void allocate_cursor(struct cursor **);
|
|
|
|
void initialize_cursor(struct cursor *);
|
|
|
|
void draw_cursor(struct cursor *);
|
|
|
|
void move_cursor(struct cursor *, enum movement);
|
2010-04-20 17:11:16 +00:00
|
|
|
bool cursor_on_stock(struct cursor *);
|
2010-04-20 04:10:42 +00:00
|
|
|
|
|
|
|
#endif
|