replaced glib function calls to g_list_*()
[rocksndiamonds.git] / src / game_bd / bd_c64import.h
1 /*
2  * Copyright (c) 2007, 2008, 2009, Czirkos Zoltan <cirix@fw.hu>
3  *
4  * Permission to use, copy, modify, and distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 #ifndef BD_CAVEIMPORT_H
18 #define BD_CAVEIMPORT_H
19
20 #include <glib.h>
21
22 #include "bd_cave.h"
23
24
25 extern const char gd_bd_internal_chars[];
26 extern const GdElement gd_crazylight_import_table[];
27
28 /* file formats */
29 typedef enum _gd_cavefile_format
30 {
31   GD_FORMAT_UNKNOWN,    /* unknown format */
32   GD_FORMAT_BD1,        /* boulder dash 1 */
33   GD_FORMAT_BD1_ATARI,  /* boulder dash 1 atari version */
34   GD_FORMAT_DC1,        /* boulder dash 1, deluxe caves 1 extension -
35                            non-sloped brick wall. */
36   GD_FORMAT_BD2,        /* boulder dash 2 with rockford's extensions */
37   GD_FORMAT_BD2_ATARI,  /* boulder dash 2, atari version */
38   GD_FORMAT_PLC,        /* peter liepa construction kit */
39   GD_FORMAT_PLC_ATARI,  /* peter liepa construction kit, atari version */
40   GD_FORMAT_DLB,        /* no one's delight boulder dash */
41   GD_FORMAT_CRLI,       /* crazy light construction kit */
42   GD_FORMAT_CRDR_7,     /* crazy dream 7 */
43   GD_FORMAT_CRDR_9,     /* crazy dream 9 - is a crli caveset with hardcoded mazes */
44   GD_FORMAT_FIRSTB,     /* first boulder */
45 } GdCavefileFormat;
46
47 /* engines */
48 typedef enum _gd_engine
49 {
50   GD_ENGINE_BD1,
51   GD_ENGINE_BD2,
52   GD_ENGINE_PLCK,
53   GD_ENGINE_1STB,
54   GD_ENGINE_CRDR7,
55   GD_ENGINE_CRLI,
56   GD_ENGINE_INVALID,    /* fake */
57 } GdEngine;
58
59 extern const char *gd_engines[];
60
61 GdCavefileFormat gd_caveset_imported_get_format(const guint8 *buf);
62 List* gd_caveset_import_from_buffer (const guint8 *buf, gsize length);
63
64 void gd_cave_set_engine_defaults(GdCave *cave, GdEngine engine);
65 GdEngine gd_cave_get_engine_from_string(const char *param);
66 GdPropertyDefault *gd_get_engine_default_array(GdEngine engine);
67
68 void gd_c64_import_init_tables(void);
69
70 #endif  // BD_CAVEIMPORT_H