Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4747 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-11-22 12:32:56 +00:00
parent 0e606700d6
commit 99e21ffa94
90 changed files with 530 additions and 558 deletions

View file

@ -3,8 +3,8 @@
// by Jonathon Fowler (jf@jonof.id.au) // by Jonathon Fowler (jf@jonof.id.au)
#ifndef __a_h__ #ifndef a_h_
#define __a_h__ #define a_h_
#include "compat.h" #include "compat.h"
@ -140,4 +140,4 @@ void mmxoverlay();
#endif // else #endif // else
#endif // __a_h__ #endif // a_h_

View file

@ -2,8 +2,8 @@
// for the Build Engine // for the Build Engine
// by Jonathon Fowler (jf@jonof.id.au) // by Jonathon Fowler (jf@jonof.id.au)
#ifndef __baselayer_h__ #ifndef baselayer_h_
#define __baselayer_h__ #define baselayer_h_
#include "compat.h" #include "compat.h"
#include "osd.h" #include "osd.h"
@ -213,5 +213,5 @@ void maybe_redirect_outputs(void);
} }
#endif #endif
#endif // __baselayer_h__ #endif // baselayer_h_

View file

@ -6,8 +6,8 @@
// by Jonathon Fowler (jf@jonof.id.au) // by Jonathon Fowler (jf@jonof.id.au)
#ifndef __build_h__ #ifndef build_h_
#define __build_h__ #define build_h_
#include "compat.h" #include "compat.h"
#include "pragmas.h" #include "pragmas.h"
@ -253,23 +253,23 @@ static inline void sector_tracker_hook(uintptr_t address);
static inline void wall_tracker_hook(uintptr_t address); static inline void wall_tracker_hook(uintptr_t address);
static inline void sprite_tracker_hook(uintptr_t address); static inline void sprite_tracker_hook(uintptr_t address);
#define __TRACKER_NAME SectorTracker #define TRACKER_NAME_ SectorTracker
#define __TRACKER_GLOBAL_HOOK sector_tracker_hook #define TRACKER_GLOBAL_HOOK_ sector_tracker_hook
#include "tracker.hpp" #include "tracker.hpp"
#undef __TRACKER_NAME #undef TRACKER_NAME_
#undef __TRACKER_GLOBAL_HOOK #undef TRACKER_GLOBAL_HOOK_
#define __TRACKER_NAME WallTracker #define TRACKER_NAME_ WallTracker
#define __TRACKER_GLOBAL_HOOK wall_tracker_hook #define TRACKER_GLOBAL_HOOK_ wall_tracker_hook
#include "tracker.hpp" #include "tracker.hpp"
#undef __TRACKER_NAME #undef TRACKER_NAME_
#undef __TRACKER_GLOBAL_HOOK #undef TRACKER_GLOBAL_HOOK_
#define __TRACKER_NAME SpriteTracker #define TRACKER_NAME_ SpriteTracker
#define __TRACKER_GLOBAL_HOOK sprite_tracker_hook #define TRACKER_GLOBAL_HOOK_ sprite_tracker_hook
#include "tracker.hpp" #include "tracker.hpp"
#undef __TRACKER_NAME #undef TRACKER_NAME_
#undef __TRACKER_GLOBAL_HOOK #undef TRACKER_GLOBAL_HOOK_
#define Tracker(Container, Type) Container##Tracker<Type> #define Tracker(Container, Type) Container##Tracker<Type>
#define TrackerCast(x) x.cast() #define TrackerCast(x) x.cast()
@ -1501,4 +1501,4 @@ static inline void pop_nofog(void)
} }
#endif #endif
#endif // __build_h__ #endif // build_h_

View file

@ -1,7 +1,7 @@
// cache1d.h // cache1d.h
#ifndef __cache1d_h__ #ifndef cache1d_h_
#define __cache1d_h__ #define cache1d_h_
#include "compat.h" #include "compat.h"
#include "mutex.h" #include "mutex.h"
@ -76,5 +76,5 @@ void dfwrite(const void *buffer, bsize_t dasizeof, bsize_t count, BFILE *fil);
} }
#endif #endif
#endif // __cache1d_h__ #endif // cache1d_h_

View file

@ -2,8 +2,8 @@
// certain build environments. It also levels the playing field caused // certain build environments. It also levels the playing field caused
// by different platforms. // by different platforms.
#ifndef __compat_h__ #ifndef compat_h_
#define __compat_h__ #define compat_h_
#include <malloc.h> #include <malloc.h>
@ -138,11 +138,11 @@
// is for platforms which give us a standard sort of C library so we // is for platforms which give us a standard sort of C library so we
// link directly. Platforms like PalmOS which don't have a standard C // link directly. Platforms like PalmOS which don't have a standard C
// library will need to wrap these functions with suitable emulations. // library will need to wrap these functions with suitable emulations.
#define __compat_h_macrodef__ #define compat_h_macrodef__
#ifdef EXTERNC #ifdef EXTERNC
# include <cstdarg> # include <cstdarg>
# ifdef __compat_h_macrodef__ # ifdef compat_h_macrodef__
# include <cstdio> # include <cstdio>
# include <cstring> # include <cstring>
# include <cstdlib> # include <cstdlib>
@ -153,7 +153,7 @@
# include <stddef.h> # include <stddef.h>
#endif #endif
#ifdef __compat_h_macrodef__ #ifdef compat_h_macrodef__
# ifndef EXTERNC # ifndef EXTERNC
# include <stdio.h> # include <stdio.h>
# include <string.h> # include <string.h>
@ -449,7 +449,7 @@ FORCE_INLINE int32_t Blrintf(const float x)
# define FP_OFF(__p) ((uintptr_t)(__p)) # define FP_OFF(__p) ((uintptr_t)(__p))
#endif #endif
#ifdef __compat_h_macrodef__ #ifdef compat_h_macrodef__
# ifndef O_BINARY # ifndef O_BINARY
# define O_BINARY 0 # define O_BINARY 0
@ -577,7 +577,7 @@ int32_t Bclosedir(BDIR *dir);
typedef intptr_t ssize_t; typedef intptr_t ssize_t;
#endif #endif
#ifdef __compat_h_macrodef__ #ifdef compat_h_macrodef__
typedef FILE BFILE; typedef FILE BFILE;
# define bsize_t size_t # define bsize_t size_t
# define bssize_t ssize_t # define bssize_t ssize_t
@ -598,7 +598,7 @@ FORCE_INLINE uint16_t system_15bit_rand(void) { return ((uint16_t)rand())&0x7fff
#define strtoll _strtoi64 #define strtoll _strtoi64
#endif #endif
#ifdef __compat_h_macrodef__ #ifdef compat_h_macrodef__
# define Bassert assert # define Bassert assert
# define Brand rand # define Brand rand
# define Balloca alloca # define Balloca alloca
@ -958,4 +958,4 @@ FORCE_INLINE void *xaligned_malloc(const bsize_t alignment, const bsize_t size)
////////// //////////
#endif // __compat_h__ #endif // compat_h_

View file

@ -1,5 +1,5 @@
#ifndef __crc32_h__ #ifndef crc32_h_
#define __crc32_h__ #define crc32_h_
#include "compat.h" #include "compat.h"

View file

@ -1,5 +1,5 @@
#ifndef __dxdidf_h__ #ifndef dxdidf_h_
#define __dxdidf_h__ #define dxdidf_h_
// Joystick // Joystick
@ -52,4 +52,4 @@ static DIOBJECTDATAFORMAT c_dfDIJoystick_odf[] = {
const DIDATAFORMAT c_dfDIJoystick = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), 0x00000001, 80, 44, c_dfDIJoystick_odf }; const DIDATAFORMAT c_dfDIJoystick = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), 0x00000001, 80, 44, c_dfDIJoystick_odf };
#endif // __dxdidf_h__ #endif // dxdidf_h_

View file

@ -1,5 +1,5 @@
#ifndef __dynamicgtk_h__ #ifndef dynamicgtk_h_
#define __dynamicgtk_h__ #define dynamicgtk_h_
#include <gdk-pixbuf/gdk-pixdata.h> #include <gdk-pixbuf/gdk-pixdata.h>
#include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf.h>
@ -401,7 +401,7 @@ extern struct _dynamicgtksyms dynamicgtksyms;
int32_t dynamicgtk_init(void); int32_t dynamicgtk_init(void);
void dynamicgtk_uninit(void); void dynamicgtk_uninit(void);
#ifndef __dynamicgtkfoo__ #ifndef dynamicgtkfoo__
// glib.h // glib.h
#define g_free dynamicgtksyms.g_free #define g_free dynamicgtksyms.g_free
@ -625,5 +625,5 @@ void dynamicgtk_uninit(void);
#endif /* LINKED_GTK */ #endif /* LINKED_GTK */
#endif /* __dynamicgtk_h__ */ #endif /* dynamicgtk_h_ */

View file

@ -2,8 +2,8 @@
// Ken Silverman's official web site: "http://www.advsys.net/ken" // Ken Silverman's official web site: "http://www.advsys.net/ken"
// See the included license file "BUILDLIC.TXT" for license info. // See the included license file "BUILDLIC.TXT" for license info.
#ifndef __editor_h__ #ifndef editor_h_
#define __editor_h__ #define editor_h_
#include <math.h> #include <math.h>

View file

@ -1,5 +1,5 @@
#ifndef __glext_h_ #ifndef glext_h_
#define __glext_h_ #define glext_h_
#ifdef EXTERNC #ifdef EXTERNC
extern "C" { extern "C" {

View file

@ -1,5 +1,5 @@
#ifndef __gtkbits_h__ #ifndef gtkbits_h_
#define __gtkbits_h__ #define gtkbits_h_
extern void gtkbuild_init(int32_t *argc, char ***argv); extern void gtkbuild_init(int32_t *argc, char ***argv);
extern void gtkbuild_exit(int32_t r); extern void gtkbuild_exit(int32_t r);

View file

@ -2,7 +2,7 @@
extern "C" { extern "C" {
#endif #endif
#ifndef __compat_h__ #ifndef compat_h_
#include "compat.h" #include "compat.h"
#endif #endif

View file

@ -4,8 +4,8 @@
Modified for EDuke32. zlib license. Modified for EDuke32. zlib license.
*/ */
#ifndef __libdivide_h__ #ifndef libdivide_h_
#define __libdivide_h__ #define libdivide_h_
#if defined(_WIN32) || defined(WIN32) #if defined(_WIN32) || defined(WIN32)
#define LIBDIVIDE_WINDOWS 1 #define LIBDIVIDE_WINDOWS 1

View file

@ -1,5 +1,5 @@
#ifndef _mdsprite_h_ #ifndef mdsprite_h_
# define _mdsprite_h_ # define mdsprite_h_
#ifdef USE_OPENGL #ifdef USE_OPENGL
#include "hightile.h" #include "hightile.h"
@ -228,4 +228,4 @@ enum {
HUDFLAG_NODEPTH = 8, HUDFLAG_NODEPTH = 8,
}; };
#endif // !_mdsprite_h_ #endif // !mdsprite_h_

View file

@ -1,7 +1,7 @@
// mmulti.h // mmulti.h
#ifndef __mmulti_h__ #ifndef mmulti_h_
#define __mmulti_h__ #define mmulti_h_
#define MAXMULTIPLAYERS 16 #define MAXMULTIPLAYERS 16
@ -25,5 +25,5 @@ void flushpackets(void);
void genericmultifunction(int other, unsigned char *bufptr, int messleng, int command); void genericmultifunction(int other, unsigned char *bufptr, int messleng, int command);
int isvalidipaddress(const char *st); int isvalidipaddress(const char *st);
#endif // __mmulti_h__ #endif // mmulti_h_

View file

@ -1,5 +1,5 @@
#ifndef __mutex_h__ #ifndef mutex_h_
#define __mutex_h__ #define mutex_h_
/* Mutual exclusion mechanism wrappers for the different platforms */ /* Mutual exclusion mechanism wrappers for the different platforms */

View file

@ -2,8 +2,8 @@
// for the Build Engine // for the Build Engine
// by Jonathon Fowler (jf@jonof.id.au) // by Jonathon Fowler (jf@jonof.id.au)
#ifndef __osd_h__ #ifndef osd_h_
#define __osd_h__ #define osd_h_
#ifdef EXTERNC #ifdef EXTERNC
extern "C" { extern "C" {
@ -306,5 +306,5 @@ extern int32_t osdcmd_restartvid(const osdfuncparm_t *parm);
} }
#endif #endif
#endif // __osd_h__ #endif // osd_h_

View file

@ -1,5 +1,5 @@
#ifndef __osxbits_h__ #ifndef osxbits_h_
#define __osxbits_h__ #define osxbits_h_
#include <sys/types.h> #include <sys/types.h>
int32_t osx_msgbox(const char *name, const char *msg); int32_t osx_msgbox(const char *name, const char *msg);

View file

@ -1,7 +1,7 @@
// Here lies the slow as shit renderer! // Here lies the slow as shit renderer!
#ifndef _polymer_h_ #ifndef polymer_h_
# define _polymer_h_ # define polymer_h_
# include "compat.h" # include "compat.h"
# include "baselayer.h" # include "baselayer.h"
@ -568,4 +568,4 @@ static inline void relvec2f(GLfloat *v1, GLfloat *v2, GLfloat *out)
# endif // !POLYMER_C # endif // !POLYMER_C
#endif // !_polymer_h_ #endif // !polymer_h_

View file

@ -1,5 +1,5 @@
#ifndef _polymost_h_ #ifndef polymost_h_
# define _polymost_h_ # define polymost_h_
#ifdef USE_OPENGL #ifdef USE_OPENGL

View file

@ -2,8 +2,8 @@
// by Jonathon Fowler (jf@jonof.id.au) // by Jonathon Fowler (jf@jonof.id.au)
#ifndef __pragmas_h__ #ifndef pragmas_h_
#define __pragmas_h__ #define pragmas_h_
#ifdef EXTERNC #ifdef EXTERNC
extern "C" { extern "C" {
@ -263,4 +263,4 @@ static inline void swapbufreverse(void *s, void *d, int32_t c)
} }
#endif #endif
#endif // __pragmas_h__ #endif // pragmas_h_

View file

@ -2,8 +2,8 @@
// GCC Inline Assembler version (ARM) // GCC Inline Assembler version (ARM)
// //
#ifndef __pragmas_arm_h__ #ifndef pragmas_arm_h_
#define __pragmas_arm_h__ #define pragmas_arm_h_
#define EDUKE32_SCALER_PRAGMA(a) \ #define EDUKE32_SCALER_PRAGMA(a) \
static inline int32_t mulscale##a(int32_t eax, int32_t edx) { return dw((qw(eax) * edx) >> by(a)); } \ static inline int32_t mulscale##a(int32_t eax, int32_t edx) { return dw((qw(eax) * edx) >> by(a)); } \

View file

@ -1,8 +1,8 @@
// GCC Inline Assembler version (PowerPC) // GCC Inline Assembler version (PowerPC)
#ifdef __pragmas_h__ #ifdef pragmas_h_
#ifndef __pragmas_ppc_h__ #ifndef pragmas_ppc_h_
#define __pragmas_ppc_h__ #define pragmas_ppc_h_
#define EDUKE32_SCALER_PRAGMA(x) \ #define EDUKE32_SCALER_PRAGMA(x) \
static inline int32_t mulscale##x(int32_t a, int32_t d) \ static inline int32_t mulscale##x(int32_t a, int32_t d) \
@ -249,5 +249,5 @@ static inline int32_t krecipasm(int32_t i)
return((reciptable[(i>>12)&2047]>>(((i-0x3f800000)>>23)&31))^(i>>31)); return((reciptable[(i>>12)&2047]>>(((i-0x3f800000)>>23)&31))^(i>>31));
} }
#endif // __pragmas_ppc_h__ #endif // pragmas_ppc_h_
#endif // __pragmas_h__ #endif // pragmas_h_

View file

@ -4,9 +4,9 @@
//{{{ //{{{
#ifdef __pragmas_h__ #ifdef pragmas_h_
#ifndef __pragmas_x86_h__ #ifndef pragmas_x86_h_
#define __pragmas_x86_h__ #define pragmas_x86_h_
#ifndef UNDERSCORES #ifndef UNDERSCORES
#define _DMVAL "dmval" #define _DMVAL "dmval"
@ -564,5 +564,5 @@ void copybufreverse(const void *S, void *D, int32_t c);
//}}} //}}}
#endif // __pragmas_x86_h__ #endif // pragmas_x86_h_
#endif // __pragmas_h__ #endif // pragmas_h_

View file

@ -4,9 +4,9 @@
//{{{ //{{{
#ifdef __pragmas_h__ #ifdef pragmas_h_
#ifndef __pragmas_x86_h__ #ifndef pragmas_x86_h_
#define __pragmas_x86_h__ #define pragmas_x86_h_
static __inline int32_t mulscale(int32_t a, int32_t d, int32_t c) static __inline int32_t mulscale(int32_t a, int32_t d, int32_t c)
{ {
@ -445,5 +445,5 @@ static inline int32_t krecipasm(int32_t a)
//}}} //}}}
#endif // __pragmas_x86_h__ #endif // pragmas_x86_h_
#endif // __pragmas_h__ #endif // pragmas_h_

View file

@ -1,6 +1,6 @@
// LIGHTS // LIGHTS
#ifndef _prlight_h_ #ifndef prlight_h_
# define _prlight_h_ # define prlight_h_
#define PR_MAXLIGHTS 1024 #define PR_MAXLIGHTS 1024
#define SHADOW_DEPTH_OFFSET 30 #define SHADOW_DEPTH_OFFSET 30

View file

@ -1,5 +1,5 @@
#ifndef rawinput_h__ #ifndef rawinput_h_
#define rawinput_h__ #define rawinput_h_
#include "compat.h" #include "compat.h"
@ -20,5 +20,5 @@ BOOL RI_CaptureInput(BOOL grab, HWND target);
#define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */ #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
#endif #endif
#endif // rawinput_h__ #endif // rawinput_h_

View file

@ -1,5 +1,5 @@
#ifndef __SDL_INC_H #ifndef SDL_INC_H_
#define __SDL_INC_H #define SDL_INC_H_
// Workaround for i686-MinGW-w64. // Workaround for i686-MinGW-w64.
#if defined __MINGW64_VERSION_MAJOR && !defined __MINGW64__ #if defined __MINGW64_VERSION_MAJOR && !defined __MINGW64__
@ -76,5 +76,5 @@ Minimum required SDL versions:
#endif /* end of bad version error */ #endif /* end of bad version error */
#endif /* end of SDL_mixer checks */ #endif /* end of SDL_mixer checks */
#endif /* __SDL_INC_H */ #endif /* SDL_INC_H_ */

View file

@ -2,8 +2,8 @@
// for the Build Engine // for the Build Engine
// by Jonathon Fowler (jf@jonof.id.au) // by Jonathon Fowler (jf@jonof.id.au)
#ifndef __build_interface_layer__ #ifndef build_interface_layer_
#define __build_interface_layer__ SDL #define build_interface_layer_ SDL
#include "sdl_inc.h" #include "sdl_inc.h"
#include "compat.h" #include "compat.h"
@ -40,8 +40,8 @@ static inline void idle(void)
} }
#else #else
#if (__build_interface_layer__ != SDL) #if (build_interface_layer_ != SDL)
#error "Already using the " __build_interface_layer__ ". Can't now use SDL." #error "Already using the " build_interface_layer_ ". Can't now use SDL."
#endif #endif
#endif // __build_interface_layer__ #endif // build_interface_layer_

View file

@ -1,5 +1,5 @@
#ifndef _texcache_h_ #ifndef texcache_h_
# define _texcache_h_ # define texcache_h_
#ifdef USE_OPENGL #ifdef USE_OPENGL

View file

@ -1,38 +1,38 @@
template<typename TrackedType> template<typename TrackedType>
class __TRACKER_NAME class TRACKER_NAME_
{ {
public: public:
TrackedType TrackedValue; TrackedType TrackedValue;
inline TrackedType* operator & () inline TrackedType* operator & ()
{ {
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
return &this->TrackedValue; return &this->TrackedValue;
} }
inline TrackedType operator ++ () inline TrackedType operator ++ ()
{ {
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
return ++this->TrackedValue; return ++this->TrackedValue;
} }
inline TrackedType operator ++ (int) inline TrackedType operator ++ (int)
{ {
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
return this->TrackedValue++; return this->TrackedValue++;
} }
inline TrackedType operator -- () inline TrackedType operator -- ()
{ {
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
return --this->TrackedValue; return --this->TrackedValue;
} }
inline TrackedType operator -- (int) inline TrackedType operator -- (int)
{ {
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
return this->TrackedValue--; return this->TrackedValue--;
} }
@ -61,13 +61,13 @@ class __TRACKER_NAME
inline TrackedType cast() const; inline TrackedType cast() const;
}; };
#ifndef __tracker_hpp #ifndef tracker_hpp_
#define __tracker_hpp #define tracker_hpp_
enum { enum {
__TRACKER_NOOP_RIGHTHAND_EQUAL = 0, TRACKER_NOOP_RIGHTHAND_EQUAL_ = 0,
__TRACKER_NOOP_RIGHTHAND_ZERO, TRACKER_NOOP_RIGHTHAND_ZERO_,
__TRACKER_NOOP_RIGHTHAND_ONE, TRACKER_NOOP_RIGHTHAND_ONE_,
__TRACKER_NEVER, __TRACKER_NEVER,
}; };
@ -80,13 +80,13 @@ enum {
#undef __TRACKER_RIGHTHAND #undef __TRACKER_RIGHTHAND
template<typename TrackedType> template<typename TrackedType>
inline __TRACKER_NAME<TrackedType>::operator TrackedType() const inline TRACKER_NAME_<TrackedType>::operator TrackedType() const
{ {
return this->TrackedValue; return this->TrackedValue;
} }
template<typename TrackedType> template<typename TrackedType>
inline TrackedType __TRACKER_NAME<TrackedType>::cast() const inline TrackedType TRACKER_NAME_<TrackedType>::cast() const
{ {
return this->TrackedValue; return this->TrackedValue;
} }

View file

@ -1,17 +1,17 @@
template<typename TrackedType> template<typename TrackedType>
inline TrackedType __TRACKER_NAME<TrackedType>::operator __TRACKER_OPERATOR (__TRACKER_RIGHTHAND_TYPE) inline TrackedType TRACKER_NAME_<TrackedType>::operator TRACKER_OPERATOR_ (__TRACKER_RIGHTHAND_TYPE)
{ {
bool isNoop; bool isNoop;
switch (__TRACKER_NOOP) { switch (TRACKER_NOOP_) {
case __TRACKER_NOOP_RIGHTHAND_EQUAL: case TRACKER_NOOP_RIGHTHAND_EQUAL_:
isNoop = this->TrackedValue == __TRACKER_RIGHTHAND; isNoop = this->TrackedValue == __TRACKER_RIGHTHAND;
break; break;
case __TRACKER_NOOP_RIGHTHAND_ZERO: case TRACKER_NOOP_RIGHTHAND_ZERO_:
isNoop = __TRACKER_RIGHTHAND == 0; isNoop = __TRACKER_RIGHTHAND == 0;
break; break;
case __TRACKER_NOOP_RIGHTHAND_ONE: case TRACKER_NOOP_RIGHTHAND_ONE_:
isNoop = __TRACKER_RIGHTHAND == 1; isNoop = __TRACKER_RIGHTHAND == 1;
break; break;
default: default:
@ -22,8 +22,8 @@ inline TrackedType __TRACKER_NAME<TrackedType>::operator __TRACKER_OPERATOR (__T
if (!isNoop) { if (!isNoop) {
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
return (this->TrackedValue __TRACKER_OPERATOR __TRACKER_RIGHTHAND); return (this->TrackedValue TRACKER_OPERATOR_ __TRACKER_RIGHTHAND);
} else { } else {
return this->TrackedValue; return this->TrackedValue;
} }

View file

@ -1,59 +1,59 @@
#define __TRACKER_OPERATOR = #define TRACKER_OPERATOR_ =
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_EQUAL #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_EQUAL_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR += #define TRACKER_OPERATOR_ +=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR -= #define TRACKER_OPERATOR_ -=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR *= #define TRACKER_OPERATOR_ *=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ONE #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ONE_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR /= #define TRACKER_OPERATOR_ /=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ONE #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ONE_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR |= #define TRACKER_OPERATOR_ |=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR &= #define TRACKER_OPERATOR_ &=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_EQUAL #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_EQUAL_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR ^= #define TRACKER_OPERATOR_ ^=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR <<= #define TRACKER_OPERATOR_ <<=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_
#define __TRACKER_OPERATOR >>= #define TRACKER_OPERATOR_ >>=
#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO #define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_
#include "tracker_operator.hpp" #include "tracker_operator.hpp"
#undef __TRACKER_OPERATOR #undef TRACKER_OPERATOR_
#undef __TRACKER_NOOP #undef TRACKER_NOOP_

View file

@ -1,8 +1,8 @@
// Windows DIB/DirectDraw interface layer for the Build Engine // Windows DIB/DirectDraw interface layer for the Build Engine
// Originally by Jonathon Fowler (jf@jonof.id.au) // Originally by Jonathon Fowler (jf@jonof.id.au)
#ifndef __build_interface_layer__ #ifndef build_interface_layer_
#define __build_interface_layer__ WIN #define build_interface_layer_ WIN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -31,8 +31,8 @@ static inline void idle(void)
#include "baselayer.h" #include "baselayer.h"
#else #else
#if (__build_interface_layer__ != WIN) #if (build_interface_layer_ != WIN)
#error "Already using the " __build_interface_layer__ ". Can't now use Windows." #error "Already using the " build_interface_layer_ ". Can't now use Windows."
#endif #endif
#endif // __build_interface_layer__ #endif // build_interface_layer_

View file

@ -78,7 +78,7 @@ void set_memerr_handler(void(*handlerfunc)(int32_t, const char *, const char *))
////////// //////////
#ifndef __compat_h_macrodef__ #ifndef compat_h_macrodef__
void Bassert(int expr) void Bassert(int expr)
{ {

View file

@ -2,7 +2,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#define __dynamicgtkfoo__ #define dynamicgtkfoo__
#include "dynamicgtk.h" #include "dynamicgtk.h"
static void *handle = NULL; static void *handle = NULL;

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// axis defaults are also included // axis defaults are also included
#ifndef _function_private_ #ifndef function_private_h_
#define _function_private_ #define function_private_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __rts_private__ #ifndef rts_private__
#define __rts_private__ #define rts_private__
//=============== //===============
// TYPES // TYPES

View file

@ -2257,7 +2257,7 @@ DETONATE:
{ {
A_Fall(i); A_Fall(i);
if (krand()&1) s->zvel -= 256; if (krand()&1) s->zvel -= 256;
if (klabs(s->xvel) < 48) if ((s->xvel) < 48)
s->xvel += (krand()&3); s->xvel += (krand()&3);
} }
else KILLIT(i); else KILLIT(i);

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __actors_h__ #ifndef actors_h_
#define __actors_h__ #define actors_h_
#include "player.h" #include "player.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __actors_inline_c__ #ifndef actors_inline_c_
#define __actors_inline_c__ #define actors_inline_c_
#include "compat.h" #include "compat.h"
#include "build.h" #include "build.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __actors_inline_h__ #ifndef actors_inline_h_
#define __actors_inline_h__ #define actors_inline_h_
#if KRANDDEBUG #if KRANDDEBUG
# define ACTOR_INLINE __fastcall # define ACTOR_INLINE __fastcall

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __android_h__ #ifndef android_h_
#define __android_h__ #define android_h_
#ifdef __ANDROID__ #ifdef __ANDROID__
#include "compat.h" #include "compat.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __anim_h__ #ifndef anim_h_
#define __anim_h__ #define anim_h_
#define NUM_HARDCODED_ANIMS 12 #define NUM_HARDCODED_ANIMS 12

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef _config_public #ifndef config_public_h_
#define _config_public #define config_public_h_
#define SETUPNAMEPARM "SETUPFILE" #define SETUPNAMEPARM "SETUPFILE"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __demo_h__ #ifndef demo_h_
#define __demo_h__ #define demo_h_
#define DEMOFN_FMT "edemo%03d.edm" #define DEMOFN_FMT "edemo%03d.edm"
#define MAXDEMOS 1000 #define MAXDEMOS 1000

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __duke3d_h__ #ifndef duke3d_h_
#define __duke3d_h__ #define duke3d_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// axis defaults are also included // axis defaults are also included
#ifndef _function_public_ #ifndef function_public_h_
#define _function_public_ #define function_public_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __game_h__ #ifndef game_h_
#define __game_h__ #define game_h_
#include "premap.h" #include "premap.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __game_inline_c__ #ifndef game_inline_c_
#define __game_inline_c__ #define game_inline_c_
#include "compat.h" #include "compat.h"
#include "duke3d.h" #include "duke3d.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __game_inline_h__ #ifndef game_inline_h_
#define __game_inline_h__ #define game_inline_h_
EXTERN_INLINE_HEADER void G_SetStatusBarScale(int32_t sc); EXTERN_INLINE_HEADER void G_SetStatusBarScale(int32_t sc);

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef _gamedef_h_ #ifndef gamedef_h_
#define _gamedef_h_ #define gamedef_h_
#include "build.h" // hashtable_t #include "build.h" // hashtable_t
#include "common.h" // tokenlist #include "common.h" // tokenlist
@ -948,6 +948,4 @@ enum ScriptKeywords_t
}; };
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua // KEEPINSYNC with the keyword list in lunatic/con_lang.lua
#endif #endif
#endif // gamedef_h_
#endif

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// //
//**************************************************************************** //****************************************************************************
#ifndef _gamedefs_public_ #ifndef gamedefs_public_h_
#define _gamedefs_public_ #define gamedefs_public_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __gameexec_h__ #ifndef gameexec_h_
#define __gameexec_h__ #define gameexec_h_
#include "build.h" #include "build.h"
#include "sector.h" // mapstate_t #include "sector.h" // mapstate_t

View file

@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// this is all the crap for accessing the game's structs through the CON VM // this is all the crap for accessing the game's structs through the CON VM
// I got a 3-4 fps gain by inlining these... // I got a 3-4 fps gain by inlining these...
#ifndef _gamevars_c_ #ifndef gamevars_c_
static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2) static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2)
{ {
int32_t lValue=0; int32_t lValue=0;
@ -3980,4 +3980,4 @@ static int32_t __fastcall VM_AccessWallX(int32_t iWall, int32_t lLabelID)
return -1; return -1;
} }
} }
#endif // _gamevars_c_ #endif // gamevars_c_

View file

@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "savegame.h" #include "savegame.h"
#include "menus.h" #include "menus.h"
#define _gamevars_c_ #define gamevars_c_
#ifdef LUNATIC #ifdef LUNATIC
int32_t g_noResetVars; int32_t g_noResetVars;

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __gamevars_h__ #ifndef gamevars_h_
#define __gamevars_h__ #define gamevars_h_
#include "gamedef.h" #include "gamedef.h"

View file

@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#define __global_c__ #define global_c_
#include "global.h" #include "global.h"
#include "duke3d.h" #include "duke3d.h"

View file

@ -20,10 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __global_h__ #ifndef global_h_
#define __global_h__ #define global_h_
#ifdef __global_c__ #ifdef global_c_
#define G_EXTERN #define G_EXTERN
#else #else
#define G_EXTERN extern #define G_EXTERN extern
@ -124,7 +124,7 @@ G_EXTERN int32_t g_restorePalette;
G_EXTERN int32_t g_screenCapture; G_EXTERN int32_t g_screenCapture;
G_EXTERN int32_t g_noEnemies; G_EXTERN int32_t g_noEnemies;
#ifndef __global_c__ #ifndef global_c_
G_EXTERN const char *s_buildDate; G_EXTERN const char *s_buildDate;
G_EXTERN int32_t g_spriteGravity; G_EXTERN int32_t g_spriteGravity;
G_EXTERN int16_t g_spriteDeleteQueueSize; G_EXTERN int16_t g_spriteDeleteQueueSize;

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __grpscan_h__ #ifndef grpscan_h_
#define __grpscan_h__ #define grpscan_h_
#define MAXLISTNAMELEN 32 #define MAXLISTNAMELEN 32

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __input_h__ #ifndef input_h_
#define __input_h__ #define input_h_
extern int32_t I_CheckAllInput(void); extern int32_t I_CheckAllInput(void);
extern void I_ClearAllInput(void); extern void I_ClearAllInput(void);

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(c) Copyright 1994 James R. Dose. All Rights Reserved. (c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/ **********************************************************************/
#ifndef __FX_MAN_H #ifndef FX_MAN_H_
#define __FX_MAN_H #define FX_MAN_H_
#include "inttypes.h" #include "inttypes.h"
#include "limits.h" #include "limits.h"

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(c) Copyright 1994 James R. Dose. All Rights Reserved. (c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/ **********************************************************************/
#ifndef __SNDCARDS_H #ifndef SNDCARDS_H_
#define __SNDCARDS_H #define SNDCARDS_H_
typedef enum typedef enum
{ {

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(c) Copyright 1993 James R. Dose. All Rights Reserved. (c) Copyright 1993 James R. Dose. All Rights Reserved.
**********************************************************************/ **********************************************************************/
#ifndef ___MULTIVC_H #ifndef MULTIVC_H_
#define ___MULTIVC_H #define MULTIVC_H_
#include "limits.h" #include "limits.h"
#include "inttypes.h" #include "inttypes.h"

View file

@ -17,17 +17,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef __linklist_h #ifndef linklist_h_
#define __linklist_h #define linklist_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif
#define NewNode(type) ((type*)Bmalloc(sizeof(type))) #define NewNode(type) ((type *)Bmalloc(sizeof(type)))
#define LL_CreateNewLinkedList(rootnode,type,next,prev) \ #define LL_CreateNewLinkedList(rootnode, type, next, prev) \
{ \ { \
(rootnode) = NewNode(type); \ (rootnode) = NewNode(type); \
(rootnode)->prev = (rootnode); \ (rootnode)->prev = (rootnode); \
@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
} }
#define LL_AddNode(rootnode, newnode, next, prev) \ #define LL_AddNode(rootnode, newnode, next, prev) \
{ \ { \
(newnode)->next = (rootnode); \ (newnode)->next = (rootnode); \
@ -44,7 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(rootnode)->prev = (newnode); \ (rootnode)->prev = (newnode); \
} }
#define LL_TransferList(oldroot,newroot,next,prev) \ #define LL_TransferList(oldroot, newroot, next, prev) \
{ \ { \
if ((oldroot)->prev != (oldroot)) \ if ((oldroot)->prev != (oldroot)) \
{ \ { \
@ -57,20 +56,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
} \ } \
} }
#define LL_ReverseList(root,type,next,prev) \ #define LL_ReverseList(root, type, next, prev) \
{ \ { \
type *newend,*trav,*tprev; \ type *newend, *trav, *tprev; \
\ \
newend = (root)->next; \ newend = (root)->next; \
for(trav = (root)->prev; trav != newend; trav = tprev) \ for (trav = (root)->prev; trav != newend; trav = tprev) \
{ \ { \
tprev = trav->prev; \ tprev = trav->prev; \
LL_MoveNode(trav,newend,next,prev); \ LL_MoveNode(trav, newend, next, prev); \
} \ } \
} }
#define LL_RemoveNode(node,next,prev) \ #define LL_RemoveNode(node, next, prev) \
{ \ { \
(node)->prev->next = (node)->next; \ (node)->prev->next = (node)->next; \
(node)->next->prev = (node)->prev; \ (node)->next->prev = (node)->prev; \
@ -79,32 +78,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
} }
#define LL_SortedInsertion(rootnode,insertnode,next,prev,type,sortparm) \ #define LL_SortedInsertion(rootnode, insertnode, next, prev, type, sortparm) \
{ \ { \
type *hoya; \ type *hoya; \
\ \
hoya = (rootnode)->next; \ hoya = (rootnode)->next; \
while((hoya != (rootnode)) && ((insertnode)->sortparm > hoya->sortparm)) \ while ((hoya != (rootnode)) && ((insertnode)->sortparm > hoya->sortparm)) \
{ \ { \
hoya = hoya->next; \ hoya = hoya->next; \
} \ } \
LL_AddNode(hoya,(insertnode),next,prev); \ LL_AddNode(hoya, (insertnode), next, prev); \
} }
#define LL_MoveNode(node,newroot,next,prev) \ #define LL_MoveNode(node, newroot, next, prev) \
{ \ { \
LL_RemoveNode((node),next,prev); \ LL_RemoveNode((node), next, prev); \
LL_AddNode((newroot),(node),next,prev); \ LL_AddNode((newroot), (node), next, prev); \
} }
#define LL_ListEmpty(list,next,prev) \ #define LL_ListEmpty(list, next, prev) (((list)->next == (list)) && ((list)->prev == (list)))
( \
((list)->next == (list)) && \
((list)->prev == (list)) \
)
#define LL_Free(list) Bfree(list) #define LL_Free(list) Bfree(list)
#define LL_Reset(list,next,prev) (list)->next = (list)->prev = (list) #define LL_Reset(list, next, prev) (list)->next = (list)->prev = (list)
#define LL_New LL_CreateNewLinkedList #define LL_New LL_CreateNewLinkedList
#define LL_Remove LL_RemoveNode #define LL_Remove LL_RemoveNode
#define LL_Add LL_AddNode #define LL_Add LL_AddNode

View file

@ -28,49 +28,40 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(c) Copyright 1994 James R. Dose. All Rights Reserved. (c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/ **********************************************************************/
#ifndef __LL_MAN_H #ifndef LL_MAN_H_
#define __LL_MAN_H #define LL_MAN_H_
enum LL_Errors enum LL_Errors
{ {
LL_Warning = -2, LL_Warning = -2,
LL_Error = -1, LL_Error = -1,
LL_Ok = 0 LL_Ok = 0
}; };
typedef struct list typedef struct list
{ {
void *start; void *start;
void *end; void *end;
} list; } list;
void LL_AddNode( char *node, char **head, char **tail, int32_t next, int32_t prev ); void LL_AddNode(char *node, char **head, char **tail, int32_t next, int32_t prev);
void LL_RemoveNode( char *node, char **head, char **tail, int32_t next, int32_t prev ); void LL_RemoveNode(char *node, char **head, char **tail, int32_t next, int32_t prev);
void LL_UnlockMemory( void ); void LL_UnlockMemory(void);
int32_t LL_LockMemory( void ); int32_t LL_LockMemory(void);
#define LL_AddToHead( type, listhead, node ) \ #define LL_AddToHead(type, listhead, node) \
LL_AddNode( ( char * )( node ), \ LL_AddNode((char *)(node), (char **)&((listhead)->start), (char **)&((listhead)->end), \
( char ** )&( ( listhead )->start ), \ (int32_t) & ((type *)0)->next, (int32_t) & ((type *)0)->prev)
( char ** )&( ( listhead )->end ), \
( int32_t )&( ( type * ) 0 )->next, \
( int32_t )&( ( type * ) 0 )->prev )
#define LL_AddToTail( type, listhead, node ) \ #define LL_AddToTail(type, listhead, node) \
LL_AddNode( ( char * )( node ), \ LL_AddNode((char *)(node), (char **)&((listhead)->end), (char **)&((listhead)->start), \
( char ** )&( ( listhead )->end ), \ (int32_t) & ((type *)0)->prev, (int32_t) & ((type *)0)->next)
( char ** )&( ( listhead )->start ), \
( int32_t )&( ( type * ) 0 )->prev, \
( int32_t )&( ( type * ) 0 )->next )
#define LL_Remove( type, listhead, node ) \ #define LL_Remove(type, listhead, node) \
LL_RemoveNode( ( char * )( node ), \ LL_RemoveNode((char *)(node), (char **)&((listhead)->start), (char **)&((listhead)->end), \
( char ** )&( ( listhead )->start ), \ (int32_t) & ((type *)0)->next, (int32_t) & ((type *)0)->prev)
( char ** )&( ( listhead )->end ), \
( int32_t )&( ( type * ) 0 )->next, \
( int32_t )&( ( type * ) 0 )->prev )
#define LL_NextNode( node ) ( ( node )->next ) #define LL_NextNode(node) ((node)->next)
#define LL_PreviousNode( node ) ( ( node )->prev ) #define LL_PreviousNode(node) ((node)->prev)
#endif #endif

View file

@ -28,53 +28,50 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(c) Copyright 1993 James R. Dose. All Rights Reserved. (c) Copyright 1993 James R. Dose. All Rights Reserved.
**********************************************************************/ **********************************************************************/
#ifndef __MULTIVOC_H #ifndef MULTIVOC_H_
#define __MULTIVOC_H #define MULTIVOC_H_
#ifndef UNREFERENCED_PARAMETER #ifndef UNREFERENCED_PARAMETER
# define UNREFERENCED_PARAMETER(x) x=x #define UNREFERENCED_PARAMETER(x) x = x
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
# define inline __inline #define inline __inline
#endif #endif
#if defined __POWERPC__ || defined GEKKO #if defined __POWERPC__ || defined GEKKO
static inline uint16_t SWAP16(uint16_t s) static inline uint16_t SWAP16(uint16_t s) { return (s >> 8) | (s << 8); }
{
return (s >> 8) | (s << 8);
}
static inline uint32_t SWAP32(uint32_t s) static inline uint32_t SWAP32(uint32_t s)
{ {
return (s >> 24) | (s << 24) | ((s&0xff00) << 8) | ((s & 0xff0000) >> 8); return (s >> 24) | (s << 24) | ((s & 0xff00) << 8) | ((s & 0xff0000) >> 8);
} }
# define LITTLE16(s) SWAP16(s) #define LITTLE16(s) SWAP16(s)
# define LITTLE32(s) SWAP32(s) #define LITTLE32(s) SWAP32(s)
#else #else
# define LITTLE16 #define LITTLE16
# define LITTLE32 #define LITTLE32
#endif #endif
#ifndef TRUE #ifndef TRUE
# define TRUE ( 1 == 1 ) #define TRUE (1 == 1)
#endif #endif
#ifndef FALSE #ifndef FALSE
# define FALSE ( !TRUE ) #define FALSE (!TRUE)
#endif #endif
#ifndef min #ifndef min
# define min(x,y) ((x) < (y) ? (x) : (y)) #define min(x, y) ((x) < (y) ? (x) : (y))
#endif #endif
#ifndef max #ifndef max
# define max(x,y) ((x) > (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y))
#endif #endif
#if defined(_MSC_VER) #if defined(_MSC_VER)
# define strcasecmp _stricmp #define strcasecmp _stricmp
# define strncasecmp _strnicmp #define strncasecmp _strnicmp
#elif defined(__QNX__) #elif defined(__QNX__)
# define strcasecmp stricmp #define strcasecmp stricmp
# define strncasecmp strnicmp #define strncasecmp strnicmp
#endif #endif
typedef enum typedef enum
@ -94,7 +91,7 @@ typedef enum
extern int32_t MV_ErrorCode; extern int32_t MV_ErrorCode;
enum MV_Errors enum MV_Errors
{ {
MV_Warning = -2, MV_Warning = -2,
MV_Error = -1, MV_Error = -1,
MV_Ok = 0, MV_Ok = 0,
@ -111,70 +108,62 @@ enum MV_Errors
MV_InvalidXAFile, MV_InvalidXAFile,
MV_InvalidMixMode, MV_InvalidMixMode,
MV_NullRecordFunction MV_NullRecordFunction
}; };
extern void (*MV_Printf)(const char *fmt, ...); extern void (*MV_Printf)(const char *fmt, ...);
const char *MV_ErrorString( int32_t ErrorNumber ); const char *MV_ErrorString(int32_t ErrorNumber);
int32_t MV_VoicePlaying( int32_t handle ); int32_t MV_VoicePlaying(int32_t handle);
int32_t MV_KillAllVoices( void ); int32_t MV_KillAllVoices(void);
int32_t MV_Kill( int32_t handle ); int32_t MV_Kill(int32_t handle);
int32_t MV_VoicesPlaying( void ); int32_t MV_VoicesPlaying(void);
int32_t MV_VoiceAvailable( int32_t priority ); int32_t MV_VoiceAvailable(int32_t priority);
int32_t MV_SetPitch( int32_t handle, int32_t pitchoffset ); int32_t MV_SetPitch(int32_t handle, int32_t pitchoffset);
int32_t MV_SetFrequency( int32_t handle, int32_t frequency ); int32_t MV_SetFrequency(int32_t handle, int32_t frequency);
int32_t MV_PauseVoice( int32_t handle, int32_t pause ); int32_t MV_PauseVoice(int32_t handle, int32_t pause);
int32_t MV_EndLooping( int32_t handle ); int32_t MV_EndLooping(int32_t handle);
int32_t MV_SetPan( int32_t handle, int32_t vol, int32_t left, int32_t right ); int32_t MV_SetPan(int32_t handle, int32_t vol, int32_t left, int32_t right);
int32_t MV_Pan3D( int32_t handle, int32_t angle, int32_t distance ); int32_t MV_Pan3D(int32_t handle, int32_t angle, int32_t distance);
void MV_SetReverb( int32_t reverb ); void MV_SetReverb(int32_t reverb);
void MV_SetFastReverb( int32_t reverb ); void MV_SetFastReverb(int32_t reverb);
int32_t MV_GetMaxReverbDelay( void ); int32_t MV_GetMaxReverbDelay(void);
int32_t MV_GetReverbDelay( void ); int32_t MV_GetReverbDelay(void);
void MV_SetReverbDelay( int32_t delay ); void MV_SetReverbDelay(int32_t delay);
//int32_t MV_SetMixMode( int32_t numchannels, int32_t samplebits ); // int32_t MV_SetMixMode( int32_t numchannels, int32_t samplebits );
//int32_t MV_StartPlayback( void ); // int32_t MV_StartPlayback( void );
//void MV_StopPlayback( void ); // void MV_StopPlayback( void );
int32_t MV_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *length ), int32_t MV_StartDemandFeedPlayback(void (*function)(char **ptr, uint32_t *length), int32_t rate, int32_t pitchoffset,
int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
int32_t priority, uint32_t callbackval ); int32_t MV_PlayRaw(char *ptr, uint32_t length, char *loopstart, char *loopend, unsigned rate, int32_t pitchoffset,
int32_t MV_PlayRaw( char *ptr, uint32_t length, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
char *loopstart, char *loopend, unsigned rate, int32_t pitchoffset, int32_t MV_PlayWAV3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t priority, uint32_t callbackval);
uint32_t callbackval ); int32_t MV_PlayWAV(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol,
int32_t MV_PlayWAV3D( char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
int32_t priority, uint32_t callbackval ); int32_t MV_PlayVOC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
int32_t MV_PlayWAV( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t priority, uint32_t callbackval);
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t MV_PlayVOC(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol,
uint32_t callbackval ); int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
int32_t MV_PlayVOC3D( char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t MV_PlayVorbis3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle,
int32_t priority, uint32_t callbackval ); int32_t distance, int32_t priority, uint32_t callbackval);
int32_t MV_PlayVOC( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t MV_PlayVorbis(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol,
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
uint32_t callbackval ); int32_t MV_PlayFLAC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
int32_t MV_PlayVorbis3D( char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, uint32_t callbackval);
int32_t priority, uint32_t callbackval ); int32_t MV_PlayFLAC(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol,
int32_t MV_PlayVorbis( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t MV_PlayXA3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
uint32_t callbackval ); int32_t priority, uint32_t callbackval);
int32_t MV_PlayFLAC3D( char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t MV_PlayXA(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol,
int32_t priority, uint32_t callbackval ); int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
int32_t MV_PlayFLAC( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, // void MV_CreateVolumeTable( int32_t index, int32_t volume, int32_t MaxVolume );
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, void MV_SetVolume(int32_t volume);
uint32_t callbackval ); int32_t MV_GetVolume(void);
int32_t MV_PlayXA3D( char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, void MV_SetCallBack(void (*function)(uint32_t));
int32_t priority, uint32_t callbackval ); void MV_SetReverseStereo(int32_t setting);
int32_t MV_PlayXA( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t MV_GetReverseStereo(void);
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, int32_t MV_Init(int32_t soundcard, int32_t MixRate, int32_t Voices, int32_t numchannels, int32_t samplebits,
uint32_t callbackval ); void *initdata);
//void MV_CreateVolumeTable( int32_t index, int32_t volume, int32_t MaxVolume ); int32_t MV_Shutdown(void);
void MV_SetVolume( int32_t volume );
int32_t MV_GetVolume( void );
void MV_SetCallBack( void ( *function )( uint32_t ) );
void MV_SetReverseStereo( int32_t setting );
int32_t MV_GetReverseStereo( void );
int32_t MV_Init( int32_t soundcard, int32_t MixRate, int32_t Voices, int32_t numchannels,
int32_t samplebits, void * initdata );
int32_t MV_Shutdown( void );
int32_t MV_SetVoiceCallback(int32_t handle, uint32_t callbackval); int32_t MV_SetVoiceCallback(int32_t handle, uint32_t callbackval);
void MV_SetPrintf(void (*function)(const char *fmt, ...)); void MV_SetPrintf(void (*function)(const char *fmt, ...));

View file

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(c) Copyright 1994 James R. Dose. All Rights Reserved. (c) Copyright 1994 James R. Dose. All Rights Reserved.
**********************************************************************/ **********************************************************************/
#ifndef __PITCH_H #ifndef PITCH_H_
#define __PITCH_H #define PITCH_H_
#include "inttypes.h" #include "inttypes.h"

View file

@ -32,8 +32,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
// //
//**************************************************************************** //****************************************************************************
#ifndef _control_private #ifndef control_private_h_
#define _control_private #define control_private_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif
@ -78,24 +78,23 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
// NORMAL axis scale // NORMAL axis scale
#define NORMALAXISSCALE 65536 #define NORMALAXISSCALE 65536
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x)))) #define BUTTONSET(x, value) (CONTROL_ButtonState |= ((uint64_t)value << ((uint64_t)(x))))
#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x)))) #define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1 << ((uint64_t)(x))))
#define BUTTONHELDSET(x,value) (CONTROL_ButtonHeldState |= (uint64_t)(value<<((uint64_t)(x)))) #define BUTTONHELDSET(x, value) (CONTROL_ButtonHeldState |= (uint64_t)(value << ((uint64_t)(x))))
#define LIMITCONTROL(x)\ #define LIMITCONTROL(x) \
{\ { \
if ((*x)>MAXCONTROLVALUE) \ if ((*x) > MAXCONTROLVALUE) \
{\ { \
(*x) = MAXCONTROLVALUE;\ (*x) = MAXCONTROLVALUE; \
}\ } \
if ((*x)<-MAXCONTROLVALUE) \ if ((*x) < -MAXCONTROLVALUE) \
{\ { \
(*x) = -MAXCONTROLVALUE;\ (*x) = -MAXCONTROLVALUE; \
}\ } \
} }
#define SGN(x) \ #define SGN(x) (((x) > 0) ? 1 : ((x) < 0) ? -1 : 0)
( ( (x) > 0 ) ? 1 : ( (x) < 0 ) ? -1 : 0 )
//**************************************************************************** //****************************************************************************
// //
@ -104,17 +103,17 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
//**************************************************************************** //****************************************************************************
typedef enum typedef enum
{ {
motion_Left = -1, motion_Left = -1,
motion_Up = -1, motion_Up = -1,
motion_None = 0, motion_None = 0,
motion_Right = 1, motion_Right = 1,
motion_Down = 1 motion_Down = 1
} motion; } motion;
typedef struct typedef struct
{ {
int32_t joyMinX; int32_t joyMinX;
int32_t joyMinY; int32_t joyMinY;
int32_t threshMinX; int32_t threshMinX;
@ -127,7 +126,7 @@ typedef struct
int32_t joyMultYL; int32_t joyMultYL;
int32_t joyMultXH; int32_t joyMultXH;
int32_t joyMultYH; int32_t joyMultYH;
} JoystickDef; } JoystickDef;
// int32_t ThrottleMin; // int32_t ThrottleMin;
// int32_t RudderMin; // int32_t RudderMin;
@ -144,40 +143,40 @@ typedef struct
typedef struct typedef struct
{ {
uint8_t active ; uint8_t active;
uint8_t used ; uint8_t used;
uint8_t toggle ; uint8_t toggle;
uint8_t buttonheld ; uint8_t buttonheld;
int32_t cleared ; int32_t cleared;
} controlflags; } controlflags;
typedef struct typedef struct
{ {
kb_scancode key1; kb_scancode key1;
kb_scancode key2; kb_scancode key2;
} controlkeymaptype; } controlkeymaptype;
typedef struct typedef struct
{ {
uint8_t singleclicked; uint8_t singleclicked;
uint8_t doubleclicked; uint8_t doubleclicked;
uint16_t extra; uint16_t extra;
} controlbuttontype; } controlbuttontype;
typedef struct typedef struct
{ {
uint8_t analogmap; uint8_t analogmap;
uint8_t minmap; uint8_t minmap;
uint8_t maxmap; uint8_t maxmap;
uint8_t extra; uint8_t extra;
} controlaxismaptype; } controlaxismaptype;
typedef struct typedef struct
{ {
int32_t analog; int32_t analog;
int32_t digital; int32_t digital;
} controlaxistype; } controlaxistype;
//*************************************************************************** //***************************************************************************

View file

@ -29,8 +29,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
// scrplib.h // scrplib.h
#ifndef _scriplib_private #ifndef scriplib_private_h_
#define _scriplib_private #define scriplib_private_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -31,8 +31,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _animlib_public_ #ifndef animlib_public_h_
#define _animlib_public_ #define animlib_public_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -31,8 +31,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
// //
//*************************************************************************** //***************************************************************************
#ifndef _control_public #ifndef control_public_h_
#define _control_public #define control_public_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -24,8 +24,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef _file_lib_public #ifndef file_lib_public_
#define _file_lib_public #define file_lib_public_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -25,8 +25,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef _keyboard_public #ifndef keyboard_public_h_
#define _keyboard_public #define keyboard_public_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -25,8 +25,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __mouse_h #ifndef mouse_h_
#define __mouse_h #define mouse_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -26,8 +26,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
// scriplib.h // scriplib.h
#ifndef _scriplib_public #ifndef scriplib_public_h_
#define _scriplib_public #define scriplib_public_h_
#ifdef EXTERNC #ifdef EXTERNC
{ {
#endif #endif

View file

@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef _m32def_h_ #ifndef m32def_h_
#define _m32def_h_ #define m32def_h_
// the parsing routines aren't good at error recovery yet... // the parsing routines aren't good at error recovery yet...
#define ABORTERRCNT 1 #define ABORTERRCNT 1

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __menus_h__ #ifndef menus_h_
#define __menus_h__ #define menus_h_
#include "compat.h" #include "compat.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __netplay_h__ #ifndef netplay_h_
#define __netplay_h__ #define netplay_h_
#include "enet/enet.h" #include "enet/enet.h"
@ -345,4 +345,4 @@ void faketimerhandler(void);
#endif #endif
#endif // __netplay_h__ #endif // netplay_h_

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __osdcmds_h__ #ifndef osdcmds_h_
#define __osdcmds_h__ #define osdcmds_h_
struct osdcmd_cheatsinfo { struct osdcmd_cheatsinfo {
int32_t cheatnum; // -1 = none, else = see DoCheats() int32_t cheatnum; // -1 = none, else = see DoCheats()
@ -44,5 +44,5 @@ typedef struct {
extern const keydef_t ConsoleKeys[]; extern const keydef_t ConsoleKeys[];
extern const char *const ConsoleButtons[]; extern const char *const ConsoleButtons[];
#endif // __osdcmds_h__ #endif // osdcmds_h_

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __player_h__ #ifndef player_h_
#define __player_h__ #define player_h_
extern int32_t playerswhenstarted; extern int32_t playerswhenstarted;

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __premap_h__ #ifndef premap_h_
#define __premap_h__ #define premap_h_
typedef struct { typedef struct {
int32_t x1, y1; int32_t x1, y1;

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __quotes_h__ #ifndef quotes_h_
#define __quotes_h__ #define quotes_h_
#define MAXQUOTES 16384 #define MAXQUOTES 16384
#define MAXQUOTELEN 128 #define MAXQUOTELEN 128

View file

@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// //
//*************************************************************************** //***************************************************************************
#ifndef __rts_public__ #ifndef rts_public_
#define __rts_public__ #define rts_public_
extern char rts_lumplockbyte[11]; extern char rts_lumplockbyte[11];

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __savegame_h__ #ifndef savegame_h_
#define __savegame_h__ #define savegame_h_
#include "game.h" #include "game.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __sector_h__ #ifndef sector_h_
#define __sector_h__ #define sector_h_
#include "gamevars.h" #include "gamevars.h"
#include "actors.h" // actor_t #include "actors.h" // actor_t

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __sector_inline_c__ #ifndef sector_inline_c_
#define __sector_inline_c__ #define sector_inline_c_
#include "compat.h" #include "compat.h"
#include "build.h" #include "build.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __sector_inline_h__ #ifndef sector_inline_h_
#define __sector_inline_h__ #define sector_inline_h_
EXTERN_INLINE_HEADER int32_t G_CheckPlayerInSector(int32_t sect); EXTERN_INLINE_HEADER int32_t G_CheckPlayerInSector(int32_t sect);

View file

@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// //
//**************************************************************************** //****************************************************************************
#ifndef _sounds_public_ #ifndef sounds_public_h_
#define _sounds_public_ #define sounds_public_h_
#include "sounds_common.h" #include "sounds_common.h"

View file

@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifndef __sounds_mapster32_h__ #ifndef sounds_mapster32_h_
#define __sounds_mapster32_h__ #define sounds_mapster32_h_
#include "build.h" #include "build.h"
#include "sounds_common.h" #include "sounds_common.h"