]>
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) */
50 void snake_advance (void);
51 void spawn_item (int type
);
52 void consume_item (struct item
* i
);
53 void show_playfield (void);
54 void snake_append (struct snake
* s
, int row
, int col
);
57 int getctrlseq (void);
58 void move_ph (int line
, int col
);
59 void clamp_fieldsize (void);
60 void timer_setup (int enable
);
61 void signal_setup (void);
62 void signal_handler (int signum
);
63 void screen_setup (int enable
);
64 void raw_mode(int enable
);
66 /* for getctrlseq() */
71 CTRSEQ_CURSOR_LEFT
= -7,
72 CTRSEQ_CURSOR_DOWN
= -8,
73 CTRSEQ_CURSOR_UP
= -9,
74 CTRSEQ_CURSOR_RIGHT
= -10,