]>
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 */
30 int s
; /* spawn time (for bonus) */
57 void snake_advance (void);
58 void spawn_item (int type
, int value
, struct item
* p_item
);
59 void consume_item (struct item
* i
);
60 void show_playfield (void);
61 void draw_sprites (int erase_r
, int erase_c
);
62 void snake_append (struct snake
** s
, int row
, int col
);
65 int getctrlseq (void);
66 void append_movement (int d
);
67 void move_ph (int line
, int col
);
68 void clamp_fieldsize (void);
69 void timer_setup (int enable
);
70 void signal_setup (void);
71 void signal_handler (int signum
);
72 void screen_setup (int enable
);
73 void raw_mode(int enable
);
75 /* for getctrlseq() */
80 CTRSEQ_CURSOR_LEFT
= -7,
81 CTRSEQ_CURSOR_DOWN
= -8,
82 CTRSEQ_CURSOR_UP
= -9,
83 CTRSEQ_CURSOR_RIGHT
= -10,