Add key bindings for pause, message refresh.
[chocolate-doom.git] / src / deh_defs.h
bloba6650544b1b9ddb47b365d70489b05e0500bf8c6
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // Copyright(C) 2005 Simon Howard
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 // 02111-1307, USA.
21 //-----------------------------------------------------------------------------
23 // Definitions for use in the dehacked code
25 //-----------------------------------------------------------------------------
27 #ifndef DEH_DEFS_H
28 #define DEH_DEFS_H
30 #include "md5.h"
32 typedef struct deh_context_s deh_context_t;
33 typedef struct deh_section_s deh_section_t;
34 typedef void (*deh_section_init_t)(void);
35 typedef void *(*deh_section_start_t)(deh_context_t *context, char *line);
36 typedef void (*deh_section_end_t)(deh_context_t *context, void *tag);
37 typedef void (*deh_line_parser_t)(deh_context_t *context, char *line, void *tag);
38 typedef void (*deh_md5_hash_t)(md5_context_t *context);
40 struct deh_section_s
42 char *name;
44 // Called on startup to initialise code
46 deh_section_init_t init;
48 // This is called when a new section is started. The pointer
49 // returned is used as a tag for the following calls.
51 deh_section_start_t start;
53 // This is called for each line in the section
55 deh_line_parser_t line_parser;
57 // This is called at the end of the section for any cleanup
59 deh_section_end_t end;
61 // Called when generating an MD5 sum of the dehacked state
63 deh_md5_hash_t md5_hash;
66 #endif /* #ifndef DEH_DEFS_H */