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