]>
git.gir.st - VIper.git/blob - viiper.h
4 #define SHORTHELP "%s [OPTIONS] [FIELDSIZE]\n"
9 " WxH (width 'x' height)\n" \
10 " defaults to 30x20\n" \
13 " hjkl: move left/down/up/right\n" \
14 " p: pause / unpause\n" \
15 " r: start a new game\n" \
21 struct snake
* next
; /* points to tail */
27 int v
; /* value */ //TODO: make type only differentiate between food/bonus/etc, and use value (so we can randomly select one of each)
28 int s
; /* spawn time (for bonus) */
33 int d
; /* direction */
34 struct directions
* next
;
59 void snake_advance (void);
60 void spawn_item (int type
, int value
);
61 void consume_item (struct item
* i
);
62 void show_playfield (void);
63 void snake_append (struct snake
** s
, int row
, int col
);
66 int getctrlseq (void);
67 void append_movement (int d
);
68 int get_movement (void);
69 void move_ph (int line
, int col
);
70 void clamp_fieldsize (void);
71 void timer_setup (int enable
);
72 void signal_setup (void);
73 void signal_handler (int signum
);
74 void screen_setup (int enable
);
75 void raw_mode(int enable
);
77 /* for getctrlseq() */
82 CTRSEQ_CURSOR_LEFT
= -7,
83 CTRSEQ_CURSOR_DOWN
= -8,
84 CTRSEQ_CURSOR_UP
= -9,
85 CTRSEQ_CURSOR_RIGHT
= -10,