talk_init() : don't try to load the voice file if it won't fit in memory
[kugel-rb.git] / apps / plugins / goban / game.h
blob6a351fb67634b7095b8e26b2e5a520aa9c83bfdb
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007-2009 Joshua Simmons <mud at majidejima dot com>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef GAME_GOBAN_H
23 #define GAME_GOBAN_H
25 #include "types.h"
27 /* Call whenever anything saveable in the SGF file might have changed */
28 void set_game_modified (void);
30 /* Setup a new game, clearing anything currently in the SGF tree Returns
31 false on failure, in which case the old data is NOT guaranteed to be
32 available anymore */
33 bool setup_game (int width, int height, int handicap, int komi);
35 /* Load a game from a file, clearing anything currently in the SGF tree
36 Returns false on failure, in which case the old data is NOT guaranteed
37 to be available anymore */
38 bool load_game (const char *filename);
40 /* Save the data in the SGF tree to a file. Returns false on failure */
41 bool save_game (const char *filename);
43 /* The number of the current move (starts at 0, first move is 1) */
44 extern int move_num;
46 /* The color of the current_player, either BLACK or WHITE */
47 extern unsigned char current_player;
48 /* Where should we save to if explicitly saved? */
49 extern char save_file[];
50 /* True if there are unsaved changes in the file */
51 extern bool game_dirty;
53 /* True if there are changes that have been neither autosaved nor saved */
54 extern bool autosave_dirty;
56 /* The game metadata */
57 extern struct header_t header;
59 #endif