1
//------------------------------------------------------------------------
2
// SYSTEM : Bridging code
3
//------------------------------------------------------------------------
5
// GL-Friendly Node Builder (C) 2000-2007 Andrew Apted
7
// Based on 'BSP 2.3' by Colin Reed, Lee Killough and others.
9
// This program is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU General Public License
11
// as published by the Free Software Foundation; either version 2
12
// of the License, or (at your option) any later version.
14
// This program is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
19
//------------------------------------------------------------------------
21
#ifndef __GLBSP_SYSTEM_H__
22
#define __GLBSP_SYSTEM_H__
27
// use this for inlining. Usually defined in the makefile.
29
#define INLINE_G /* nothing */
33
// internal storage of node building parameters
35
extern const nodebuildinfo_t *cur_info;
36
extern const nodebuildfuncs_t *cur_funcs;
37
extern volatile nodebuildcomms_t *cur_comms;
40
/* ----- function prototypes ---------------------------- */
42
// fatal error messages (these don't return)
43
void FatalError(const char *str, ...) GCCATTR((format (printf, 1, 2)));
44
void InternalError(const char *str, ...) GCCATTR((format (printf, 1, 2)));
46
// display normal messages & warnings to the screen
47
void PrintMsg(const char *str, ...) GCCATTR((format (printf, 1, 2)));
48
void PrintVerbose(const char *str, ...) GCCATTR((format (printf, 1, 2)));
49
void PrintWarn(const char *str, ...) GCCATTR((format (printf, 1, 2)));
50
void PrintMiniWarn(const char *str, ...) GCCATTR((format (printf, 1, 2)));
52
// set message for certain errors
53
void SetErrorMsg(const char *str, ...) GCCATTR((format (printf, 1, 2)));
56
void InitEndian(void);
57
uint16_g Endian_U16(uint16_g);
58
uint32_g Endian_U32(uint32_g);
60
// these are only used for debugging
63
void PrintDebug(const char *str, ...) GCCATTR((format (printf, 1, 2)));
65
// macros for the display stuff
66
#define DisplayOpen (* cur_funcs->display_open)
67
#define DisplaySetTitle (* cur_funcs->display_setTitle)
68
#define DisplaySetBar (* cur_funcs->display_setBar)
69
#define DisplaySetBarLimit (* cur_funcs->display_setBarLimit)
70
#define DisplaySetBarText (* cur_funcs->display_setBarText)
71
#define DisplayClose (* cur_funcs->display_close)
73
#define DisplayTicker (* cur_funcs->ticker)
76
#endif /* __GLBSP_SYSTEM_H__ */