File: unslist.h

package info (click to toggle)
tworld 1.3.0-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 6,636 kB
  • ctags: 1,407
  • sloc: ansic: 12,442; perl: 2,465; makefile: 194; sh: 18
file content (39 lines) | stat: -rw-r--r-- 1,410 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* unslist.h: Functions to manage the list of unsolvable levels.
 *
 * Copyright (C) 2001-2006 by Brian Raiter, under the GNU General Public
 * License. No warranty. See COPYING for details.
 */

#ifndef	_unslist_h_
#define	_unslist_h_

#include	"defs.h"

/* Read the list of unsolvable levels from the given filename. If the
 * filename does not contain a path, then the function looks for the
 * file in the resource directory and the user's save directory.
 */
extern int loadunslistfromfile(char const *filename);

/* Look up the given level in the list of unsolvable levels. TRUE is
 * returned if the level is found in the list, FALSE otherwise. (Since
 * the setname is not supplied, this function is potentially less
 * reliable.) If the level is in the list and note is not NULL, then
 * the buffer it points to will receive a copy of the level's
 * annotation.
 */
extern int islevelunsolvable(gamesetup const *game, char *note);

/* Look up all the levels in the given series, and mark the ones that
 * appear in the list of unsolvable levels by initializing the
 * unsolvable field. Levels that do not appear in the list will have
 * their unsolvable fields explicitly set to NULL. The number of
 * unsolvable levels is returned.
 */
extern int markunsolvablelevels(gameseries *series);

/* Free all memory associated with the list of unsolvable levels.
 */
extern void clearunslist(void);

#endif