]>
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) */
55 void snake_advance (void);
56 void spawn_item (int type
, int value
);
57 void consume_item (struct item
* i
);
58 void show_playfield (void);
59 void snake_append (struct snake
* s
, int row
, int col
);
62 int getctrlseq (void);
63 void move_ph (int line
, int col
);
64 void clamp_fieldsize (void);
65 void timer_setup (int enable
);
66 void signal_setup (void);
67 void signal_handler (int signum
);
68 void screen_setup (int enable
);
69 void raw_mode(int enable
);
71 /* for getctrlseq() */
76 CTRSEQ_CURSOR_LEFT
= -7,
77 CTRSEQ_CURSOR_DOWN
= -8,
78 CTRSEQ_CURSOR_UP
= -9,
79 CTRSEQ_CURSOR_RIGHT
= -10,