Debian Codegraph @

src/game_choice.h

raw
1 /**
2 * Talk interface for DinkC
3
4 * Copyright (C) 2014, 2015 Sylvain Beucler
5
6 * This file is part of GNU FreeDink
7
8 * GNU FreeDink is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 3 of the
11 * License, or (at your option) any later version.
12
13 * GNU FreeDink is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
21 */
22
23 #ifndef _TALK_H
24 #define _TALK_H
25
26 #include "SDL.h"
27
28 /* Talk choices */
29 #define TALK_TITLE_BUFSIZ 3000
30 #define TALK_LINE_BUFSIZ 101
31 struct game_choice_struct {
32 /*bool*/int active;
33 int script;
34
35 char buffer[TALK_TITLE_BUFSIZ]; /* title */
36 int color;
37
38 char line[21][TALK_LINE_BUFSIZ]; /* dialog choices */
39 int line_return[21]; /* return this number if chosen */
40
41 int cur;
42 int last;
43
44 int cur_view;
45 int cur_view_end;
46 int page;
47
48 int newy;
49 int choices_y;
50
51 int curf;
52 Uint32 timer;
53 };
54
55
56 extern struct game_choice_struct game_choice;
57 extern void game_choice_start(int script, int nb_choices);
58 extern void game_choice_stop();
59 extern void game_choice_clear();
60
61 extern void game_choice_logic();
62
63 #endif