From 99e21ffa94e1d0b122e6a15e9ceca74c25a8f379 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 22 Nov 2014 12:32:56 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/include/a.h | 6 +- polymer/eduke32/build/include/baselayer.h | 6 +- polymer/eduke32/build/include/build.h | 30 +-- polymer/eduke32/build/include/cache1d.h | 6 +- polymer/eduke32/build/include/compat.h | 18 +- polymer/eduke32/build/include/crc32.h | 4 +- polymer/eduke32/build/include/dxdidf.h | 6 +- polymer/eduke32/build/include/dynamicgtk.h | 8 +- polymer/eduke32/build/include/editor.h | 4 +- polymer/eduke32/build/include/glext.h | 4 +- polymer/eduke32/build/include/gtkbits.h | 4 +- polymer/eduke32/build/include/kplib.h | 2 +- polymer/eduke32/build/include/libdivide.h | 4 +- polymer/eduke32/build/include/mdsprite.h | 6 +- polymer/eduke32/build/include/mmulti.h | 6 +- polymer/eduke32/build/include/mutex.h | 4 +- polymer/eduke32/build/include/osd.h | 6 +- polymer/eduke32/build/include/osxbits.h | 4 +- polymer/eduke32/build/include/polymer.h | 6 +- polymer/eduke32/build/include/polymost.h | 4 +- polymer/eduke32/build/include/pragmas.h | 6 +- polymer/eduke32/build/include/pragmas_arm.h | 4 +- polymer/eduke32/build/include/pragmas_ppc.h | 10 +- .../eduke32/build/include/pragmas_x86_gcc.h | 10 +- .../eduke32/build/include/pragmas_x86_msvc.h | 10 +- polymer/eduke32/build/include/prlights.h | 4 +- polymer/eduke32/build/include/rawinput.h | 6 +- polymer/eduke32/build/include/sdl_inc.h | 6 +- polymer/eduke32/build/include/sdlayer.h | 10 +- polymer/eduke32/build/include/texcache.h | 4 +- polymer/eduke32/build/include/tracker.hpp | 26 +-- .../build/include/tracker_operator.hpp | 14 +- .../build/include/tracker_operators.hpp | 80 +++---- polymer/eduke32/build/include/winlayer.h | 10 +- polymer/eduke32/build/src/compat.c | 2 +- polymer/eduke32/build/src/dynamicgtk.c | 2 +- polymer/eduke32/source/_functio.h | 4 +- polymer/eduke32/source/_rts.h | 4 +- polymer/eduke32/source/actors.c | 2 +- polymer/eduke32/source/actors.h | 4 +- polymer/eduke32/source/actors_inline.c | 4 +- polymer/eduke32/source/actors_inline.h | 4 +- polymer/eduke32/source/android.h | 4 +- polymer/eduke32/source/anim.h | 4 +- polymer/eduke32/source/config.h | 4 +- polymer/eduke32/source/demo.h | 4 +- polymer/eduke32/source/duke3d.h | 4 +- polymer/eduke32/source/function.h | 4 +- polymer/eduke32/source/game.h | 4 +- polymer/eduke32/source/game_inline.c | 4 +- polymer/eduke32/source/game_inline.h | 4 +- polymer/eduke32/source/gamedef.h | 8 +- polymer/eduke32/source/gamedefs.h | 4 +- polymer/eduke32/source/gameexec.h | 4 +- polymer/eduke32/source/gamestructures.c | 4 +- polymer/eduke32/source/gamevars.c | 2 +- polymer/eduke32/source/gamevars.h | 4 +- polymer/eduke32/source/global.c | 2 +- polymer/eduke32/source/global.h | 8 +- polymer/eduke32/source/grpscan.h | 4 +- polymer/eduke32/source/input.h | 4 +- .../eduke32/source/jaudiolib/include/fx_man.h | 4 +- .../source/jaudiolib/include/sndcards.h | 4 +- .../eduke32/source/jaudiolib/src/_multivc.h | 4 +- .../eduke32/source/jaudiolib/src/linklist.h | 145 ++++++------ polymer/eduke32/source/jaudiolib/src/ll_man.h | 61 +++--- .../eduke32/source/jaudiolib/src/multivoc.h | 207 +++++++++--------- polymer/eduke32/source/jaudiolib/src/pitch.h | 4 +- polymer/eduke32/source/jmact/_control.h | 127 ++++++----- polymer/eduke32/source/jmact/_scrplib.h | 4 +- polymer/eduke32/source/jmact/animlib.h | 4 +- polymer/eduke32/source/jmact/control.h | 4 +- polymer/eduke32/source/jmact/file_lib.h | 4 +- polymer/eduke32/source/jmact/keyboard.h | 4 +- polymer/eduke32/source/jmact/mouse.h | 4 +- polymer/eduke32/source/jmact/scriplib.h | 4 +- polymer/eduke32/source/m32def.h | 4 +- polymer/eduke32/source/menus.h | 4 +- polymer/eduke32/source/net.h | 6 +- polymer/eduke32/source/osdcmds.h | 6 +- polymer/eduke32/source/player.h | 4 +- polymer/eduke32/source/premap.h | 4 +- polymer/eduke32/source/quotes.h | 4 +- polymer/eduke32/source/rts.h | 4 +- polymer/eduke32/source/savegame.h | 4 +- polymer/eduke32/source/sector.h | 4 +- polymer/eduke32/source/sector_inline.c | 4 +- polymer/eduke32/source/sector_inline.h | 4 +- polymer/eduke32/source/sounds.h | 4 +- polymer/eduke32/source/sounds_mapster32.h | 4 +- 90 files changed, 530 insertions(+), 558 deletions(-) diff --git a/polymer/eduke32/build/include/a.h b/polymer/eduke32/build/include/a.h index a686024fd..d04421447 100644 --- a/polymer/eduke32/build/include/a.h +++ b/polymer/eduke32/build/include/a.h @@ -3,8 +3,8 @@ // by Jonathon Fowler (jf@jonof.id.au) -#ifndef __a_h__ -#define __a_h__ +#ifndef a_h_ +#define a_h_ #include "compat.h" @@ -140,4 +140,4 @@ void mmxoverlay(); #endif // else -#endif // __a_h__ +#endif // a_h_ diff --git a/polymer/eduke32/build/include/baselayer.h b/polymer/eduke32/build/include/baselayer.h index a400a5d2c..99b255ee6 100644 --- a/polymer/eduke32/build/include/baselayer.h +++ b/polymer/eduke32/build/include/baselayer.h @@ -2,8 +2,8 @@ // for the Build Engine // by Jonathon Fowler (jf@jonof.id.au) -#ifndef __baselayer_h__ -#define __baselayer_h__ +#ifndef baselayer_h_ +#define baselayer_h_ #include "compat.h" #include "osd.h" @@ -213,5 +213,5 @@ void maybe_redirect_outputs(void); } #endif -#endif // __baselayer_h__ +#endif // baselayer_h_ diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 295738189..656ac9dfd 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -6,8 +6,8 @@ // by Jonathon Fowler (jf@jonof.id.au) -#ifndef __build_h__ -#define __build_h__ +#ifndef build_h_ +#define build_h_ #include "compat.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 sprite_tracker_hook(uintptr_t address); -#define __TRACKER_NAME SectorTracker -#define __TRACKER_GLOBAL_HOOK sector_tracker_hook +#define TRACKER_NAME_ SectorTracker +#define TRACKER_GLOBAL_HOOK_ sector_tracker_hook #include "tracker.hpp" -#undef __TRACKER_NAME -#undef __TRACKER_GLOBAL_HOOK +#undef TRACKER_NAME_ +#undef TRACKER_GLOBAL_HOOK_ -#define __TRACKER_NAME WallTracker -#define __TRACKER_GLOBAL_HOOK wall_tracker_hook +#define TRACKER_NAME_ WallTracker +#define TRACKER_GLOBAL_HOOK_ wall_tracker_hook #include "tracker.hpp" -#undef __TRACKER_NAME -#undef __TRACKER_GLOBAL_HOOK +#undef TRACKER_NAME_ +#undef TRACKER_GLOBAL_HOOK_ -#define __TRACKER_NAME SpriteTracker -#define __TRACKER_GLOBAL_HOOK sprite_tracker_hook +#define TRACKER_NAME_ SpriteTracker +#define TRACKER_GLOBAL_HOOK_ sprite_tracker_hook #include "tracker.hpp" -#undef __TRACKER_NAME -#undef __TRACKER_GLOBAL_HOOK +#undef TRACKER_NAME_ +#undef TRACKER_GLOBAL_HOOK_ #define Tracker(Container, Type) Container##Tracker #define TrackerCast(x) x.cast() @@ -1501,4 +1501,4 @@ static inline void pop_nofog(void) } #endif -#endif // __build_h__ +#endif // build_h_ diff --git a/polymer/eduke32/build/include/cache1d.h b/polymer/eduke32/build/include/cache1d.h index 71f769c1e..54804dadb 100644 --- a/polymer/eduke32/build/include/cache1d.h +++ b/polymer/eduke32/build/include/cache1d.h @@ -1,7 +1,7 @@ // cache1d.h -#ifndef __cache1d_h__ -#define __cache1d_h__ +#ifndef cache1d_h_ +#define cache1d_h_ #include "compat.h" #include "mutex.h" @@ -76,5 +76,5 @@ void dfwrite(const void *buffer, bsize_t dasizeof, bsize_t count, BFILE *fil); } #endif -#endif // __cache1d_h__ +#endif // cache1d_h_ diff --git a/polymer/eduke32/build/include/compat.h b/polymer/eduke32/build/include/compat.h index e2e90bce6..90300cbab 100644 --- a/polymer/eduke32/build/include/compat.h +++ b/polymer/eduke32/build/include/compat.h @@ -2,8 +2,8 @@ // certain build environments. It also levels the playing field caused // by different platforms. -#ifndef __compat_h__ -#define __compat_h__ +#ifndef compat_h_ +#define compat_h_ #include @@ -138,11 +138,11 @@ // 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 // library will need to wrap these functions with suitable emulations. -#define __compat_h_macrodef__ +#define compat_h_macrodef__ #ifdef EXTERNC # include -# ifdef __compat_h_macrodef__ +# ifdef compat_h_macrodef__ # include # include # include @@ -153,7 +153,7 @@ # include #endif -#ifdef __compat_h_macrodef__ +#ifdef compat_h_macrodef__ # ifndef EXTERNC # include # include @@ -449,7 +449,7 @@ FORCE_INLINE int32_t Blrintf(const float x) # define FP_OFF(__p) ((uintptr_t)(__p)) #endif -#ifdef __compat_h_macrodef__ +#ifdef compat_h_macrodef__ # ifndef O_BINARY # define O_BINARY 0 @@ -577,7 +577,7 @@ int32_t Bclosedir(BDIR *dir); typedef intptr_t ssize_t; #endif -#ifdef __compat_h_macrodef__ +#ifdef compat_h_macrodef__ typedef FILE BFILE; # define bsize_t size_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 #endif -#ifdef __compat_h_macrodef__ +#ifdef compat_h_macrodef__ # define Bassert assert # define Brand rand # 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_ diff --git a/polymer/eduke32/build/include/crc32.h b/polymer/eduke32/build/include/crc32.h index 3029128b9..217c3f7c7 100644 --- a/polymer/eduke32/build/include/crc32.h +++ b/polymer/eduke32/build/include/crc32.h @@ -1,5 +1,5 @@ -#ifndef __crc32_h__ -#define __crc32_h__ +#ifndef crc32_h_ +#define crc32_h_ #include "compat.h" diff --git a/polymer/eduke32/build/include/dxdidf.h b/polymer/eduke32/build/include/dxdidf.h index 838a6e730..74324113f 100644 --- a/polymer/eduke32/build/include/dxdidf.h +++ b/polymer/eduke32/build/include/dxdidf.h @@ -1,5 +1,5 @@ -#ifndef __dxdidf_h__ -#define __dxdidf_h__ +#ifndef dxdidf_h_ +#define dxdidf_h_ // Joystick @@ -52,4 +52,4 @@ static DIOBJECTDATAFORMAT c_dfDIJoystick_odf[] = { const DIDATAFORMAT c_dfDIJoystick = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), 0x00000001, 80, 44, c_dfDIJoystick_odf }; -#endif // __dxdidf_h__ +#endif // dxdidf_h_ diff --git a/polymer/eduke32/build/include/dynamicgtk.h b/polymer/eduke32/build/include/dynamicgtk.h index fd9ab1f8c..4cfced73a 100644 --- a/polymer/eduke32/build/include/dynamicgtk.h +++ b/polymer/eduke32/build/include/dynamicgtk.h @@ -1,5 +1,5 @@ -#ifndef __dynamicgtk_h__ -#define __dynamicgtk_h__ +#ifndef dynamicgtk_h_ +#define dynamicgtk_h_ #include #include @@ -401,7 +401,7 @@ extern struct _dynamicgtksyms dynamicgtksyms; int32_t dynamicgtk_init(void); void dynamicgtk_uninit(void); -#ifndef __dynamicgtkfoo__ +#ifndef dynamicgtkfoo__ // glib.h #define g_free dynamicgtksyms.g_free @@ -625,5 +625,5 @@ void dynamicgtk_uninit(void); #endif /* LINKED_GTK */ -#endif /* __dynamicgtk_h__ */ +#endif /* dynamicgtk_h_ */ diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index aa492fe16..b704afa31 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -2,8 +2,8 @@ // Ken Silverman's official web site: "http://www.advsys.net/ken" // See the included license file "BUILDLIC.TXT" for license info. -#ifndef __editor_h__ -#define __editor_h__ +#ifndef editor_h_ +#define editor_h_ #include diff --git a/polymer/eduke32/build/include/glext.h b/polymer/eduke32/build/include/glext.h index e04537b1c..fbca37673 100644 --- a/polymer/eduke32/build/include/glext.h +++ b/polymer/eduke32/build/include/glext.h @@ -1,5 +1,5 @@ -#ifndef __glext_h_ -#define __glext_h_ +#ifndef glext_h_ +#define glext_h_ #ifdef EXTERNC extern "C" { diff --git a/polymer/eduke32/build/include/gtkbits.h b/polymer/eduke32/build/include/gtkbits.h index 57fae76bb..97582337d 100644 --- a/polymer/eduke32/build/include/gtkbits.h +++ b/polymer/eduke32/build/include/gtkbits.h @@ -1,5 +1,5 @@ -#ifndef __gtkbits_h__ -#define __gtkbits_h__ +#ifndef gtkbits_h_ +#define gtkbits_h_ extern void gtkbuild_init(int32_t *argc, char ***argv); extern void gtkbuild_exit(int32_t r); diff --git a/polymer/eduke32/build/include/kplib.h b/polymer/eduke32/build/include/kplib.h index c430500d6..cb880d535 100644 --- a/polymer/eduke32/build/include/kplib.h +++ b/polymer/eduke32/build/include/kplib.h @@ -2,7 +2,7 @@ extern "C" { #endif -#ifndef __compat_h__ +#ifndef compat_h_ #include "compat.h" #endif diff --git a/polymer/eduke32/build/include/libdivide.h b/polymer/eduke32/build/include/libdivide.h index 429904ce9..3b94cbf4e 100644 --- a/polymer/eduke32/build/include/libdivide.h +++ b/polymer/eduke32/build/include/libdivide.h @@ -4,8 +4,8 @@ Modified for EDuke32. zlib license. */ -#ifndef __libdivide_h__ -#define __libdivide_h__ +#ifndef libdivide_h_ +#define libdivide_h_ #if defined(_WIN32) || defined(WIN32) #define LIBDIVIDE_WINDOWS 1 diff --git a/polymer/eduke32/build/include/mdsprite.h b/polymer/eduke32/build/include/mdsprite.h index 84aaaa25f..1d464fdfe 100644 --- a/polymer/eduke32/build/include/mdsprite.h +++ b/polymer/eduke32/build/include/mdsprite.h @@ -1,5 +1,5 @@ -#ifndef _mdsprite_h_ -# define _mdsprite_h_ +#ifndef mdsprite_h_ +# define mdsprite_h_ #ifdef USE_OPENGL #include "hightile.h" @@ -228,4 +228,4 @@ enum { HUDFLAG_NODEPTH = 8, }; -#endif // !_mdsprite_h_ +#endif // !mdsprite_h_ diff --git a/polymer/eduke32/build/include/mmulti.h b/polymer/eduke32/build/include/mmulti.h index d0382d510..63ec3f4eb 100644 --- a/polymer/eduke32/build/include/mmulti.h +++ b/polymer/eduke32/build/include/mmulti.h @@ -1,7 +1,7 @@ // mmulti.h -#ifndef __mmulti_h__ -#define __mmulti_h__ +#ifndef mmulti_h_ +#define mmulti_h_ #define MAXMULTIPLAYERS 16 @@ -25,5 +25,5 @@ void flushpackets(void); void genericmultifunction(int other, unsigned char *bufptr, int messleng, int command); int isvalidipaddress(const char *st); -#endif // __mmulti_h__ +#endif // mmulti_h_ diff --git a/polymer/eduke32/build/include/mutex.h b/polymer/eduke32/build/include/mutex.h index 9ef53dfab..d54cc6387 100644 --- a/polymer/eduke32/build/include/mutex.h +++ b/polymer/eduke32/build/include/mutex.h @@ -1,5 +1,5 @@ -#ifndef __mutex_h__ -#define __mutex_h__ +#ifndef mutex_h_ +#define mutex_h_ /* Mutual exclusion mechanism wrappers for the different platforms */ diff --git a/polymer/eduke32/build/include/osd.h b/polymer/eduke32/build/include/osd.h index 5620315f4..c32388415 100644 --- a/polymer/eduke32/build/include/osd.h +++ b/polymer/eduke32/build/include/osd.h @@ -2,8 +2,8 @@ // for the Build Engine // by Jonathon Fowler (jf@jonof.id.au) -#ifndef __osd_h__ -#define __osd_h__ +#ifndef osd_h_ +#define osd_h_ #ifdef EXTERNC extern "C" { @@ -306,5 +306,5 @@ extern int32_t osdcmd_restartvid(const osdfuncparm_t *parm); } #endif -#endif // __osd_h__ +#endif // osd_h_ diff --git a/polymer/eduke32/build/include/osxbits.h b/polymer/eduke32/build/include/osxbits.h index 074f36dbd..8bfcc4638 100644 --- a/polymer/eduke32/build/include/osxbits.h +++ b/polymer/eduke32/build/include/osxbits.h @@ -1,5 +1,5 @@ -#ifndef __osxbits_h__ -#define __osxbits_h__ +#ifndef osxbits_h_ +#define osxbits_h_ #include int32_t osx_msgbox(const char *name, const char *msg); diff --git a/polymer/eduke32/build/include/polymer.h b/polymer/eduke32/build/include/polymer.h index cdbc5457c..d0b6eeb94 100644 --- a/polymer/eduke32/build/include/polymer.h +++ b/polymer/eduke32/build/include/polymer.h @@ -1,7 +1,7 @@ // Here lies the slow as shit renderer! -#ifndef _polymer_h_ -# define _polymer_h_ +#ifndef polymer_h_ +# define polymer_h_ # include "compat.h" # include "baselayer.h" @@ -568,4 +568,4 @@ static inline void relvec2f(GLfloat *v1, GLfloat *v2, GLfloat *out) # endif // !POLYMER_C -#endif // !_polymer_h_ +#endif // !polymer_h_ diff --git a/polymer/eduke32/build/include/polymost.h b/polymer/eduke32/build/include/polymost.h index c42720a53..ca3f86e91 100644 --- a/polymer/eduke32/build/include/polymost.h +++ b/polymer/eduke32/build/include/polymost.h @@ -1,5 +1,5 @@ -#ifndef _polymost_h_ -# define _polymost_h_ +#ifndef polymost_h_ +# define polymost_h_ #ifdef USE_OPENGL diff --git a/polymer/eduke32/build/include/pragmas.h b/polymer/eduke32/build/include/pragmas.h index 341d0ba73..40564f43b 100644 --- a/polymer/eduke32/build/include/pragmas.h +++ b/polymer/eduke32/build/include/pragmas.h @@ -2,8 +2,8 @@ // by Jonathon Fowler (jf@jonof.id.au) -#ifndef __pragmas_h__ -#define __pragmas_h__ +#ifndef pragmas_h_ +#define pragmas_h_ #ifdef EXTERNC extern "C" { @@ -263,4 +263,4 @@ static inline void swapbufreverse(void *s, void *d, int32_t c) } #endif -#endif // __pragmas_h__ +#endif // pragmas_h_ diff --git a/polymer/eduke32/build/include/pragmas_arm.h b/polymer/eduke32/build/include/pragmas_arm.h index f24e2d4b5..20900ebb5 100644 --- a/polymer/eduke32/build/include/pragmas_arm.h +++ b/polymer/eduke32/build/include/pragmas_arm.h @@ -2,8 +2,8 @@ // GCC Inline Assembler version (ARM) // -#ifndef __pragmas_arm_h__ -#define __pragmas_arm_h__ +#ifndef pragmas_arm_h_ +#define pragmas_arm_h_ #define EDUKE32_SCALER_PRAGMA(a) \ static inline int32_t mulscale##a(int32_t eax, int32_t edx) { return dw((qw(eax) * edx) >> by(a)); } \ diff --git a/polymer/eduke32/build/include/pragmas_ppc.h b/polymer/eduke32/build/include/pragmas_ppc.h index 67ed89320..8bb9025dc 100644 --- a/polymer/eduke32/build/include/pragmas_ppc.h +++ b/polymer/eduke32/build/include/pragmas_ppc.h @@ -1,8 +1,8 @@ // GCC Inline Assembler version (PowerPC) -#ifdef __pragmas_h__ -#ifndef __pragmas_ppc_h__ -#define __pragmas_ppc_h__ +#ifdef pragmas_h_ +#ifndef pragmas_ppc_h_ +#define pragmas_ppc_h_ #define EDUKE32_SCALER_PRAGMA(x) \ 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)); } -#endif // __pragmas_ppc_h__ -#endif // __pragmas_h__ +#endif // pragmas_ppc_h_ +#endif // pragmas_h_ diff --git a/polymer/eduke32/build/include/pragmas_x86_gcc.h b/polymer/eduke32/build/include/pragmas_x86_gcc.h index e5095f701..64cdeec72 100644 --- a/polymer/eduke32/build/include/pragmas_x86_gcc.h +++ b/polymer/eduke32/build/include/pragmas_x86_gcc.h @@ -4,9 +4,9 @@ //{{{ -#ifdef __pragmas_h__ -#ifndef __pragmas_x86_h__ -#define __pragmas_x86_h__ +#ifdef pragmas_h_ +#ifndef pragmas_x86_h_ +#define pragmas_x86_h_ #ifndef UNDERSCORES #define _DMVAL "dmval" @@ -564,5 +564,5 @@ void copybufreverse(const void *S, void *D, int32_t c); //}}} -#endif // __pragmas_x86_h__ -#endif // __pragmas_h__ +#endif // pragmas_x86_h_ +#endif // pragmas_h_ diff --git a/polymer/eduke32/build/include/pragmas_x86_msvc.h b/polymer/eduke32/build/include/pragmas_x86_msvc.h index cdbea4b33..8a92fbe07 100644 --- a/polymer/eduke32/build/include/pragmas_x86_msvc.h +++ b/polymer/eduke32/build/include/pragmas_x86_msvc.h @@ -4,9 +4,9 @@ //{{{ -#ifdef __pragmas_h__ -#ifndef __pragmas_x86_h__ -#define __pragmas_x86_h__ +#ifdef pragmas_h_ +#ifndef pragmas_x86_h_ +#define pragmas_x86_h_ 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_h__ +#endif // pragmas_x86_h_ +#endif // pragmas_h_ diff --git a/polymer/eduke32/build/include/prlights.h b/polymer/eduke32/build/include/prlights.h index f87a34857..f06b28fc1 100644 --- a/polymer/eduke32/build/include/prlights.h +++ b/polymer/eduke32/build/include/prlights.h @@ -1,6 +1,6 @@ // LIGHTS -#ifndef _prlight_h_ -# define _prlight_h_ +#ifndef prlight_h_ +# define prlight_h_ #define PR_MAXLIGHTS 1024 #define SHADOW_DEPTH_OFFSET 30 diff --git a/polymer/eduke32/build/include/rawinput.h b/polymer/eduke32/build/include/rawinput.h index b0c6678d7..942e1ad8d 100644 --- a/polymer/eduke32/build/include/rawinput.h +++ b/polymer/eduke32/build/include/rawinput.h @@ -1,5 +1,5 @@ -#ifndef rawinput_h__ -#define rawinput_h__ +#ifndef rawinput_h_ +#define rawinput_h_ #include "compat.h" @@ -20,5 +20,5 @@ BOOL RI_CaptureInput(BOOL grab, HWND target); #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */ #endif -#endif // rawinput_h__ +#endif // rawinput_h_ diff --git a/polymer/eduke32/build/include/sdl_inc.h b/polymer/eduke32/build/include/sdl_inc.h index 6d31144a1..9efad1d5a 100644 --- a/polymer/eduke32/build/include/sdl_inc.h +++ b/polymer/eduke32/build/include/sdl_inc.h @@ -1,5 +1,5 @@ -#ifndef __SDL_INC_H -#define __SDL_INC_H +#ifndef SDL_INC_H_ +#define SDL_INC_H_ // Workaround for i686-MinGW-w64. #if defined __MINGW64_VERSION_MAJOR && !defined __MINGW64__ @@ -76,5 +76,5 @@ Minimum required SDL versions: #endif /* end of bad version error */ #endif /* end of SDL_mixer checks */ -#endif /* __SDL_INC_H */ +#endif /* SDL_INC_H_ */ diff --git a/polymer/eduke32/build/include/sdlayer.h b/polymer/eduke32/build/include/sdlayer.h index 855c44fab..f68e4cf1e 100644 --- a/polymer/eduke32/build/include/sdlayer.h +++ b/polymer/eduke32/build/include/sdlayer.h @@ -2,8 +2,8 @@ // for the Build Engine // by Jonathon Fowler (jf@jonof.id.au) -#ifndef __build_interface_layer__ -#define __build_interface_layer__ SDL +#ifndef build_interface_layer_ +#define build_interface_layer_ SDL #include "sdl_inc.h" #include "compat.h" @@ -40,8 +40,8 @@ static inline void idle(void) } #else -#if (__build_interface_layer__ != SDL) -#error "Already using the " __build_interface_layer__ ". Can't now use SDL." +#if (build_interface_layer_ != SDL) +#error "Already using the " build_interface_layer_ ". Can't now use SDL." #endif -#endif // __build_interface_layer__ +#endif // build_interface_layer_ diff --git a/polymer/eduke32/build/include/texcache.h b/polymer/eduke32/build/include/texcache.h index 11936c6c3..3d22abd04 100644 --- a/polymer/eduke32/build/include/texcache.h +++ b/polymer/eduke32/build/include/texcache.h @@ -1,5 +1,5 @@ -#ifndef _texcache_h_ -# define _texcache_h_ +#ifndef texcache_h_ +# define texcache_h_ #ifdef USE_OPENGL diff --git a/polymer/eduke32/build/include/tracker.hpp b/polymer/eduke32/build/include/tracker.hpp index 008b46be1..3b6c8f383 100644 --- a/polymer/eduke32/build/include/tracker.hpp +++ b/polymer/eduke32/build/include/tracker.hpp @@ -1,38 +1,38 @@ template -class __TRACKER_NAME +class TRACKER_NAME_ { public: TrackedType TrackedValue; inline TrackedType* operator & () { - __TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); + TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue); return &this->TrackedValue; } inline TrackedType operator ++ () { - __TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); + TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue); return ++this->TrackedValue; } inline TrackedType operator ++ (int) { - __TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); + TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue); return this->TrackedValue++; } inline TrackedType operator -- () { - __TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); + TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue); return --this->TrackedValue; } inline TrackedType operator -- (int) { - __TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); + TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue); return this->TrackedValue--; } @@ -61,13 +61,13 @@ class __TRACKER_NAME inline TrackedType cast() const; }; -#ifndef __tracker_hpp -#define __tracker_hpp +#ifndef tracker_hpp_ +#define tracker_hpp_ enum { - __TRACKER_NOOP_RIGHTHAND_EQUAL = 0, - __TRACKER_NOOP_RIGHTHAND_ZERO, - __TRACKER_NOOP_RIGHTHAND_ONE, + TRACKER_NOOP_RIGHTHAND_EQUAL_ = 0, + TRACKER_NOOP_RIGHTHAND_ZERO_, + TRACKER_NOOP_RIGHTHAND_ONE_, __TRACKER_NEVER, }; @@ -80,13 +80,13 @@ enum { #undef __TRACKER_RIGHTHAND template -inline __TRACKER_NAME::operator TrackedType() const +inline TRACKER_NAME_::operator TrackedType() const { return this->TrackedValue; } template -inline TrackedType __TRACKER_NAME::cast() const +inline TrackedType TRACKER_NAME_::cast() const { return this->TrackedValue; } diff --git a/polymer/eduke32/build/include/tracker_operator.hpp b/polymer/eduke32/build/include/tracker_operator.hpp index 57f4c38f2..803cde661 100644 --- a/polymer/eduke32/build/include/tracker_operator.hpp +++ b/polymer/eduke32/build/include/tracker_operator.hpp @@ -1,17 +1,17 @@ template -inline TrackedType __TRACKER_NAME::operator __TRACKER_OPERATOR (__TRACKER_RIGHTHAND_TYPE) +inline TrackedType TRACKER_NAME_::operator TRACKER_OPERATOR_ (__TRACKER_RIGHTHAND_TYPE) { bool isNoop; - switch (__TRACKER_NOOP) { - case __TRACKER_NOOP_RIGHTHAND_EQUAL: + switch (TRACKER_NOOP_) { + case TRACKER_NOOP_RIGHTHAND_EQUAL_: isNoop = this->TrackedValue == __TRACKER_RIGHTHAND; break; - case __TRACKER_NOOP_RIGHTHAND_ZERO: + case TRACKER_NOOP_RIGHTHAND_ZERO_: isNoop = __TRACKER_RIGHTHAND == 0; break; - case __TRACKER_NOOP_RIGHTHAND_ONE: + case TRACKER_NOOP_RIGHTHAND_ONE_: isNoop = __TRACKER_RIGHTHAND == 1; break; default: @@ -22,8 +22,8 @@ inline TrackedType __TRACKER_NAME::operator __TRACKER_OPERATOR (__T if (!isNoop) { - __TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue); - return (this->TrackedValue __TRACKER_OPERATOR __TRACKER_RIGHTHAND); + TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue); + return (this->TrackedValue TRACKER_OPERATOR_ __TRACKER_RIGHTHAND); } else { return this->TrackedValue; } diff --git a/polymer/eduke32/build/include/tracker_operators.hpp b/polymer/eduke32/build/include/tracker_operators.hpp index 00528a71a..cca8e4ae5 100644 --- a/polymer/eduke32/build/include/tracker_operators.hpp +++ b/polymer/eduke32/build/include/tracker_operators.hpp @@ -1,59 +1,59 @@ -#define __TRACKER_OPERATOR = -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_EQUAL +#define TRACKER_OPERATOR_ = +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_EQUAL_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR += -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO +#define TRACKER_OPERATOR_ += +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR -= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO +#define TRACKER_OPERATOR_ -= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR *= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ONE +#define TRACKER_OPERATOR_ *= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ONE_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR /= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ONE +#define TRACKER_OPERATOR_ /= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ONE_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR |= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO +#define TRACKER_OPERATOR_ |= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR &= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_EQUAL +#define TRACKER_OPERATOR_ &= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_EQUAL_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR ^= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO +#define TRACKER_OPERATOR_ ^= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR <<= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO +#define TRACKER_OPERATOR_ <<= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ -#define __TRACKER_OPERATOR >>= -#define __TRACKER_NOOP __TRACKER_NOOP_RIGHTHAND_ZERO +#define TRACKER_OPERATOR_ >>= +#define TRACKER_NOOP_ TRACKER_NOOP_RIGHTHAND_ZERO_ #include "tracker_operator.hpp" -#undef __TRACKER_OPERATOR -#undef __TRACKER_NOOP +#undef TRACKER_OPERATOR_ +#undef TRACKER_NOOP_ diff --git a/polymer/eduke32/build/include/winlayer.h b/polymer/eduke32/build/include/winlayer.h index ec31b4f11..4994a0d47 100644 --- a/polymer/eduke32/build/include/winlayer.h +++ b/polymer/eduke32/build/include/winlayer.h @@ -1,8 +1,8 @@ // Windows DIB/DirectDraw interface layer for the Build Engine // Originally by Jonathon Fowler (jf@jonof.id.au) -#ifndef __build_interface_layer__ -#define __build_interface_layer__ WIN +#ifndef build_interface_layer_ +#define build_interface_layer_ WIN #define WIN32_LEAN_AND_MEAN #include @@ -31,8 +31,8 @@ static inline void idle(void) #include "baselayer.h" #else -#if (__build_interface_layer__ != WIN) -#error "Already using the " __build_interface_layer__ ". Can't now use Windows." +#if (build_interface_layer_ != WIN) +#error "Already using the " build_interface_layer_ ". Can't now use Windows." #endif -#endif // __build_interface_layer__ +#endif // build_interface_layer_ diff --git a/polymer/eduke32/build/src/compat.c b/polymer/eduke32/build/src/compat.c index d791114dd..2f9e5e828 100644 --- a/polymer/eduke32/build/src/compat.c +++ b/polymer/eduke32/build/src/compat.c @@ -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) { diff --git a/polymer/eduke32/build/src/dynamicgtk.c b/polymer/eduke32/build/src/dynamicgtk.c index cbfd82199..b810953f5 100644 --- a/polymer/eduke32/build/src/dynamicgtk.c +++ b/polymer/eduke32/build/src/dynamicgtk.c @@ -2,7 +2,7 @@ #include #include -#define __dynamicgtkfoo__ +#define dynamicgtkfoo__ #include "dynamicgtk.h" static void *handle = NULL; diff --git a/polymer/eduke32/source/_functio.h b/polymer/eduke32/source/_functio.h index 3a6b52e2f..7b925bc4f 100644 --- a/polymer/eduke32/source/_functio.h +++ b/polymer/eduke32/source/_functio.h @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // axis defaults are also included -#ifndef _function_private_ -#define _function_private_ +#ifndef function_private_h_ +#define function_private_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/_rts.h b/polymer/eduke32/source/_rts.h index c344b8822..33e4e6e66 100644 --- a/polymer/eduke32/source/_rts.h +++ b/polymer/eduke32/source/_rts.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __rts_private__ -#define __rts_private__ +#ifndef rts_private__ +#define rts_private__ //=============== // TYPES diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 72ccdfbe5..c408be190 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -2257,7 +2257,7 @@ DETONATE: { A_Fall(i); if (krand()&1) s->zvel -= 256; - if (klabs(s->xvel) < 48) + if ((s->xvel) < 48) s->xvel += (krand()&3); } else KILLIT(i); diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 01256439e..ac9e98282 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __actors_h__ -#define __actors_h__ +#ifndef actors_h_ +#define actors_h_ #include "player.h" diff --git a/polymer/eduke32/source/actors_inline.c b/polymer/eduke32/source/actors_inline.c index 55d626694..620b8af8f 100644 --- a/polymer/eduke32/source/actors_inline.c +++ b/polymer/eduke32/source/actors_inline.c @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __actors_inline_c__ -#define __actors_inline_c__ +#ifndef actors_inline_c_ +#define actors_inline_c_ #include "compat.h" #include "build.h" diff --git a/polymer/eduke32/source/actors_inline.h b/polymer/eduke32/source/actors_inline.h index 9a1ec2919..edf173bd7 100644 --- a/polymer/eduke32/source/actors_inline.h +++ b/polymer/eduke32/source/actors_inline.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __actors_inline_h__ -#define __actors_inline_h__ +#ifndef actors_inline_h_ +#define actors_inline_h_ #if KRANDDEBUG # define ACTOR_INLINE __fastcall diff --git a/polymer/eduke32/source/android.h b/polymer/eduke32/source/android.h index b5b2a47fd..3d8794033 100644 --- a/polymer/eduke32/source/android.h +++ b/polymer/eduke32/source/android.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __android_h__ -#define __android_h__ +#ifndef android_h_ +#define android_h_ #ifdef __ANDROID__ #include "compat.h" diff --git a/polymer/eduke32/source/anim.h b/polymer/eduke32/source/anim.h index 2267b82a2..42564280b 100644 --- a/polymer/eduke32/source/anim.h +++ b/polymer/eduke32/source/anim.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __anim_h__ -#define __anim_h__ +#ifndef anim_h_ +#define anim_h_ #define NUM_HARDCODED_ANIMS 12 diff --git a/polymer/eduke32/source/config.h b/polymer/eduke32/source/config.h index 1a653fe76..eb1eda50d 100644 --- a/polymer/eduke32/source/config.h +++ b/polymer/eduke32/source/config.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef _config_public -#define _config_public +#ifndef config_public_h_ +#define config_public_h_ #define SETUPNAMEPARM "SETUPFILE" diff --git a/polymer/eduke32/source/demo.h b/polymer/eduke32/source/demo.h index c7bf7733d..d4ad2054c 100644 --- a/polymer/eduke32/source/demo.h +++ b/polymer/eduke32/source/demo.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __demo_h__ -#define __demo_h__ +#ifndef demo_h_ +#define demo_h_ #define DEMOFN_FMT "edemo%03d.edm" #define MAXDEMOS 1000 diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 55655d4e8..6f4def489 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __duke3d_h__ -#define __duke3d_h__ +#ifndef duke3d_h_ +#define duke3d_h_ #ifdef EXTERNC { diff --git a/polymer/eduke32/source/function.h b/polymer/eduke32/source/function.h index dc5d353c4..22a9109b1 100644 --- a/polymer/eduke32/source/function.h +++ b/polymer/eduke32/source/function.h @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // axis defaults are also included -#ifndef _function_public_ -#define _function_public_ +#ifndef function_public_h_ +#define function_public_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index 8944edd2f..aa7a52882 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __game_h__ -#define __game_h__ +#ifndef game_h_ +#define game_h_ #include "premap.h" diff --git a/polymer/eduke32/source/game_inline.c b/polymer/eduke32/source/game_inline.c index e9bfc8700..65300535e 100644 --- a/polymer/eduke32/source/game_inline.c +++ b/polymer/eduke32/source/game_inline.c @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __game_inline_c__ -#define __game_inline_c__ +#ifndef game_inline_c_ +#define game_inline_c_ #include "compat.h" #include "duke3d.h" diff --git a/polymer/eduke32/source/game_inline.h b/polymer/eduke32/source/game_inline.h index 36d09350b..fea78414b 100644 --- a/polymer/eduke32/source/game_inline.h +++ b/polymer/eduke32/source/game_inline.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __game_inline_h__ -#define __game_inline_h__ +#ifndef game_inline_h_ +#define game_inline_h_ EXTERN_INLINE_HEADER void G_SetStatusBarScale(int32_t sc); diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 862a6c0d8..2f931e8b5 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef _gamedef_h_ -#define _gamedef_h_ +#ifndef gamedef_h_ +#define gamedef_h_ #include "build.h" // hashtable_t #include "common.h" // tokenlist @@ -948,6 +948,4 @@ enum ScriptKeywords_t }; // KEEPINSYNC with the keyword list in lunatic/con_lang.lua #endif - - -#endif +#endif // gamedef_h_ diff --git a/polymer/eduke32/source/gamedefs.h b/polymer/eduke32/source/gamedefs.h index b33d639ff..cdde40a7e 100644 --- a/polymer/eduke32/source/gamedefs.h +++ b/polymer/eduke32/source/gamedefs.h @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //**************************************************************************** -#ifndef _gamedefs_public_ -#define _gamedefs_public_ +#ifndef gamedefs_public_h_ +#define gamedefs_public_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/gameexec.h b/polymer/eduke32/source/gameexec.h index 6360aed48..a26a0dc33 100644 --- a/polymer/eduke32/source/gameexec.h +++ b/polymer/eduke32/source/gameexec.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __gameexec_h__ -#define __gameexec_h__ +#ifndef gameexec_h_ +#define gameexec_h_ #include "build.h" #include "sector.h" // mapstate_t diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 167e9048c..7e9c14886 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -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 // 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) { int32_t lValue=0; @@ -3980,4 +3980,4 @@ static int32_t __fastcall VM_AccessWallX(int32_t iWall, int32_t lLabelID) return -1; } } -#endif // _gamevars_c_ +#endif // gamevars_c_ diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 14543b3fd..acd0a76f4 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "savegame.h" #include "menus.h" -#define _gamevars_c_ +#define gamevars_c_ #ifdef LUNATIC int32_t g_noResetVars; diff --git a/polymer/eduke32/source/gamevars.h b/polymer/eduke32/source/gamevars.h index 9c5cdbbb1..2be45a30d 100644 --- a/polymer/eduke32/source/gamevars.h +++ b/polymer/eduke32/source/gamevars.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __gamevars_h__ -#define __gamevars_h__ +#ifndef gamevars_h_ +#define gamevars_h_ #include "gamedef.h" diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index faa6bc463..2e5945e0b 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -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 "duke3d.h" diff --git a/polymer/eduke32/source/global.h b/polymer/eduke32/source/global.h index 549fc0434..3276247c5 100644 --- a/polymer/eduke32/source/global.h +++ b/polymer/eduke32/source/global.h @@ -20,10 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __global_h__ -#define __global_h__ +#ifndef global_h_ +#define global_h_ -#ifdef __global_c__ +#ifdef global_c_ #define G_EXTERN #else #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_noEnemies; -#ifndef __global_c__ +#ifndef global_c_ G_EXTERN const char *s_buildDate; G_EXTERN int32_t g_spriteGravity; G_EXTERN int16_t g_spriteDeleteQueueSize; diff --git a/polymer/eduke32/source/grpscan.h b/polymer/eduke32/source/grpscan.h index 8087a57b8..187300d8e 100644 --- a/polymer/eduke32/source/grpscan.h +++ b/polymer/eduke32/source/grpscan.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __grpscan_h__ -#define __grpscan_h__ +#ifndef grpscan_h_ +#define grpscan_h_ #define MAXLISTNAMELEN 32 diff --git a/polymer/eduke32/source/input.h b/polymer/eduke32/source/input.h index 9d86fcc4b..c926ebeae 100644 --- a/polymer/eduke32/source/input.h +++ b/polymer/eduke32/source/input.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __input_h__ -#define __input_h__ +#ifndef input_h_ +#define input_h_ extern int32_t I_CheckAllInput(void); extern void I_ClearAllInput(void); diff --git a/polymer/eduke32/source/jaudiolib/include/fx_man.h b/polymer/eduke32/source/jaudiolib/include/fx_man.h index 96ebc6507..e0a75ac2c 100644 --- a/polymer/eduke32/source/jaudiolib/include/fx_man.h +++ b/polymer/eduke32/source/jaudiolib/include/fx_man.h @@ -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. **********************************************************************/ -#ifndef __FX_MAN_H -#define __FX_MAN_H +#ifndef FX_MAN_H_ +#define FX_MAN_H_ #include "inttypes.h" #include "limits.h" diff --git a/polymer/eduke32/source/jaudiolib/include/sndcards.h b/polymer/eduke32/source/jaudiolib/include/sndcards.h index 676818045..957bd81d5 100644 --- a/polymer/eduke32/source/jaudiolib/include/sndcards.h +++ b/polymer/eduke32/source/jaudiolib/include/sndcards.h @@ -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. **********************************************************************/ -#ifndef __SNDCARDS_H -#define __SNDCARDS_H +#ifndef SNDCARDS_H_ +#define SNDCARDS_H_ typedef enum { diff --git a/polymer/eduke32/source/jaudiolib/src/_multivc.h b/polymer/eduke32/source/jaudiolib/src/_multivc.h index 6c1f94885..b57712a37 100644 --- a/polymer/eduke32/source/jaudiolib/src/_multivc.h +++ b/polymer/eduke32/source/jaudiolib/src/_multivc.h @@ -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. **********************************************************************/ -#ifndef ___MULTIVC_H -#define ___MULTIVC_H +#ifndef MULTIVC_H_ +#define MULTIVC_H_ #include "limits.h" #include "inttypes.h" diff --git a/polymer/eduke32/source/jaudiolib/src/linklist.h b/polymer/eduke32/source/jaudiolib/src/linklist.h index 871b822f2..4c29e77d6 100644 --- a/polymer/eduke32/source/jaudiolib/src/linklist.h +++ b/polymer/eduke32/source/jaudiolib/src/linklist.h @@ -17,99 +17,94 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __linklist_h -#define __linklist_h +#ifndef linklist_h_ +#define linklist_h_ #ifdef EXTERNC { #endif -#define NewNode(type) ((type*)Bmalloc(sizeof(type))) +#define NewNode(type) ((type *)Bmalloc(sizeof(type))) -#define LL_CreateNewLinkedList(rootnode,type,next,prev) \ - { \ - (rootnode) = NewNode(type); \ - (rootnode)->prev = (rootnode); \ - (rootnode)->next = (rootnode); \ - } +#define LL_CreateNewLinkedList(rootnode, type, next, prev) \ + { \ + (rootnode) = NewNode(type); \ + (rootnode)->prev = (rootnode); \ + (rootnode)->next = (rootnode); \ + } +#define LL_AddNode(rootnode, newnode, next, prev) \ + { \ + (newnode)->next = (rootnode); \ + (newnode)->prev = (rootnode)->prev; \ + (rootnode)->prev->next = (newnode); \ + (rootnode)->prev = (newnode); \ + } -#define LL_AddNode(rootnode, newnode, next, prev) \ - { \ - (newnode)->next = (rootnode); \ - (newnode)->prev = (rootnode)->prev; \ - (rootnode)->prev->next = (newnode); \ - (rootnode)->prev = (newnode); \ - } +#define LL_TransferList(oldroot, newroot, next, prev) \ + { \ + if ((oldroot)->prev != (oldroot)) \ + { \ + (oldroot)->prev->next = (newroot); \ + (oldroot)->next->prev = (newroot)->prev; \ + (newroot)->prev->next = (oldroot)->next; \ + (newroot)->prev = (oldroot)->prev; \ + (oldroot)->next = (oldroot); \ + (oldroot)->prev = (oldroot); \ + } \ + } -#define LL_TransferList(oldroot,newroot,next,prev) \ - { \ - if ((oldroot)->prev != (oldroot)) \ - { \ - (oldroot)->prev->next = (newroot); \ - (oldroot)->next->prev = (newroot)->prev; \ - (newroot)->prev->next = (oldroot)->next; \ - (newroot)->prev = (oldroot)->prev; \ - (oldroot)->next = (oldroot); \ - (oldroot)->prev = (oldroot); \ - } \ - } - -#define LL_ReverseList(root,type,next,prev) \ - { \ - type *newend,*trav,*tprev; \ - \ - newend = (root)->next; \ - for(trav = (root)->prev; trav != newend; trav = tprev) \ - { \ - tprev = trav->prev; \ - LL_MoveNode(trav,newend,next,prev); \ - } \ - } +#define LL_ReverseList(root, type, next, prev) \ + { \ + type *newend, *trav, *tprev; \ + \ + newend = (root)->next; \ + for (trav = (root)->prev; trav != newend; trav = tprev) \ + { \ + tprev = trav->prev; \ + LL_MoveNode(trav, newend, next, prev); \ + } \ + } -#define LL_RemoveNode(node,next,prev) \ - { \ - (node)->prev->next = (node)->next; \ - (node)->next->prev = (node)->prev; \ - (node)->next = (node); \ - (node)->prev = (node); \ - } +#define LL_RemoveNode(node, next, prev) \ + { \ + (node)->prev->next = (node)->next; \ + (node)->next->prev = (node)->prev; \ + (node)->next = (node); \ + (node)->prev = (node); \ + } -#define LL_SortedInsertion(rootnode,insertnode,next,prev,type,sortparm) \ - { \ - type *hoya; \ - \ - hoya = (rootnode)->next; \ - while((hoya != (rootnode)) && ((insertnode)->sortparm > hoya->sortparm)) \ - { \ - hoya = hoya->next; \ - } \ - LL_AddNode(hoya,(insertnode),next,prev); \ - } +#define LL_SortedInsertion(rootnode, insertnode, next, prev, type, sortparm) \ + { \ + type *hoya; \ + \ + hoya = (rootnode)->next; \ + while ((hoya != (rootnode)) && ((insertnode)->sortparm > hoya->sortparm)) \ + { \ + hoya = hoya->next; \ + } \ + LL_AddNode(hoya, (insertnode), next, prev); \ + } -#define LL_MoveNode(node,newroot,next,prev) \ - { \ - LL_RemoveNode((node),next,prev); \ - LL_AddNode((newroot),(node),next,prev); \ - } +#define LL_MoveNode(node, newroot, next, prev) \ + { \ + LL_RemoveNode((node), next, prev); \ + LL_AddNode((newroot), (node), next, prev); \ + } -#define LL_ListEmpty(list,next,prev) \ - ( \ - ((list)->next == (list)) && \ - ((list)->prev == (list)) \ - ) +#define LL_ListEmpty(list, next, prev) (((list)->next == (list)) && ((list)->prev == (list))) -#define LL_Free(list) Bfree(list) -#define LL_Reset(list,next,prev) (list)->next = (list)->prev = (list) -#define LL_New LL_CreateNewLinkedList -#define LL_Remove LL_RemoveNode -#define LL_Add LL_AddNode -#define LL_Empty LL_ListEmpty -#define LL_Move LL_MoveNode +#define LL_Free(list) Bfree(list) +#define LL_Reset(list, next, prev) (list)->next = (list)->prev = (list) +#define LL_New LL_CreateNewLinkedList +#define LL_Remove LL_RemoveNode +#define LL_Add LL_AddNode +#define LL_Empty LL_ListEmpty +#define LL_Move LL_MoveNode #ifdef EXTERNC diff --git a/polymer/eduke32/source/jaudiolib/src/ll_man.h b/polymer/eduke32/source/jaudiolib/src/ll_man.h index 6e10a0f6d..621d19887 100644 --- a/polymer/eduke32/source/jaudiolib/src/ll_man.h +++ b/polymer/eduke32/source/jaudiolib/src/ll_man.h @@ -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. **********************************************************************/ -#ifndef __LL_MAN_H -#define __LL_MAN_H +#ifndef LL_MAN_H_ +#define LL_MAN_H_ enum LL_Errors - { - LL_Warning = -2, - LL_Error = -1, - LL_Ok = 0 - }; +{ + LL_Warning = -2, + LL_Error = -1, + LL_Ok = 0 +}; typedef struct list - { - void *start; - void *end; - } list; +{ + void *start; + void *end; +} list; -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_UnlockMemory( void ); -int32_t LL_LockMemory( void ); +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_UnlockMemory(void); +int32_t LL_LockMemory(void); -#define LL_AddToHead( type, listhead, node ) \ - LL_AddNode( ( char * )( node ), \ - ( char ** )&( ( listhead )->start ), \ - ( char ** )&( ( listhead )->end ), \ - ( int32_t )&( ( type * ) 0 )->next, \ - ( int32_t )&( ( type * ) 0 )->prev ) +#define LL_AddToHead(type, listhead, node) \ + LL_AddNode((char *)(node), (char **)&((listhead)->start), (char **)&((listhead)->end), \ + (int32_t) & ((type *)0)->next, (int32_t) & ((type *)0)->prev) -#define LL_AddToTail( type, listhead, node ) \ - LL_AddNode( ( char * )( node ), \ - ( char ** )&( ( listhead )->end ), \ - ( char ** )&( ( listhead )->start ), \ - ( int32_t )&( ( type * ) 0 )->prev, \ - ( int32_t )&( ( type * ) 0 )->next ) +#define LL_AddToTail(type, listhead, node) \ + LL_AddNode((char *)(node), (char **)&((listhead)->end), (char **)&((listhead)->start), \ + (int32_t) & ((type *)0)->prev, (int32_t) & ((type *)0)->next) -#define LL_Remove( type, listhead, node ) \ - LL_RemoveNode( ( char * )( node ), \ - ( char ** )&( ( listhead )->start ), \ - ( char ** )&( ( listhead )->end ), \ - ( int32_t )&( ( type * ) 0 )->next, \ - ( int32_t )&( ( type * ) 0 )->prev ) +#define LL_Remove(type, listhead, node) \ + LL_RemoveNode((char *)(node), (char **)&((listhead)->start), (char **)&((listhead)->end), \ + (int32_t) & ((type *)0)->next, (int32_t) & ((type *)0)->prev) -#define LL_NextNode( node ) ( ( node )->next ) -#define LL_PreviousNode( node ) ( ( node )->prev ) +#define LL_NextNode(node) ((node)->next) +#define LL_PreviousNode(node) ((node)->prev) #endif diff --git a/polymer/eduke32/source/jaudiolib/src/multivoc.h b/polymer/eduke32/source/jaudiolib/src/multivoc.h index 003df65ed..e989165c0 100644 --- a/polymer/eduke32/source/jaudiolib/src/multivoc.h +++ b/polymer/eduke32/source/jaudiolib/src/multivoc.h @@ -28,153 +28,142 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. (c) Copyright 1993 James R. Dose. All Rights Reserved. **********************************************************************/ -#ifndef __MULTIVOC_H -#define __MULTIVOC_H +#ifndef MULTIVOC_H_ +#define MULTIVOC_H_ #ifndef UNREFERENCED_PARAMETER -# define UNREFERENCED_PARAMETER(x) x=x +#define UNREFERENCED_PARAMETER(x) x = x #endif #ifdef _MSC_VER -# define inline __inline +#define inline __inline #endif #if defined __POWERPC__ || defined GEKKO -static inline uint16_t SWAP16(uint16_t s) -{ - return (s >> 8) | (s << 8); -} +static inline uint16_t SWAP16(uint16_t s) { return (s >> 8) | (s << 8); } 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 LITTLE32(s) SWAP32(s) +#define LITTLE16(s) SWAP16(s) +#define LITTLE32(s) SWAP32(s) #else -# define LITTLE16 -# define LITTLE32 +#define LITTLE16 +#define LITTLE32 #endif #ifndef TRUE -# define TRUE ( 1 == 1 ) +#define TRUE (1 == 1) #endif #ifndef FALSE -# define FALSE ( !TRUE ) +#define FALSE (!TRUE) #endif #ifndef min -# define min(x,y) ((x) < (y) ? (x) : (y)) +#define min(x, y) ((x) < (y) ? (x) : (y)) #endif #ifndef max -# define max(x,y) ((x) > (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) #endif #if defined(_MSC_VER) -# define strcasecmp _stricmp -# define strncasecmp _strnicmp +#define strcasecmp _stricmp +#define strncasecmp _strnicmp #elif defined(__QNX__) -# define strcasecmp stricmp -# define strncasecmp strnicmp +#define strcasecmp stricmp +#define strncasecmp strnicmp #endif typedef enum { - Unknown, - Raw, - VOC, - DemandFeed, - WAV, - Vorbis, - FLAC, - XA, + Unknown, + Raw, + VOC, + DemandFeed, + WAV, + Vorbis, + FLAC, + XA, } wavedata; -#define MV_MINVOICEHANDLE 1 +#define MV_MINVOICEHANDLE 1 extern int32_t MV_ErrorCode; enum MV_Errors - { - MV_Warning = -2, - MV_Error = -1, - MV_Ok = 0, - MV_UnsupportedCard, - MV_NotInstalled, - MV_DriverError, - MV_NoVoices, - MV_NoMem, - MV_VoiceNotFound, - MV_InvalidVOCFile, - MV_InvalidWAVFile, - MV_InvalidVorbisFile, - MV_InvalidFLACFile, - MV_InvalidXAFile, - MV_InvalidMixMode, - MV_NullRecordFunction - }; +{ + MV_Warning = -2, + MV_Error = -1, + MV_Ok = 0, + MV_UnsupportedCard, + MV_NotInstalled, + MV_DriverError, + MV_NoVoices, + MV_NoMem, + MV_VoiceNotFound, + MV_InvalidVOCFile, + MV_InvalidWAVFile, + MV_InvalidVorbisFile, + MV_InvalidFLACFile, + MV_InvalidXAFile, + MV_InvalidMixMode, + MV_NullRecordFunction +}; extern void (*MV_Printf)(const char *fmt, ...); -const char *MV_ErrorString( int32_t ErrorNumber ); -int32_t MV_VoicePlaying( int32_t handle ); -int32_t MV_KillAllVoices( void ); -int32_t MV_Kill( int32_t handle ); -int32_t MV_VoicesPlaying( void ); -int32_t MV_VoiceAvailable( int32_t priority ); -int32_t MV_SetPitch( int32_t handle, int32_t pitchoffset ); -int32_t MV_SetFrequency( int32_t handle, int32_t frequency ); -int32_t MV_PauseVoice( int32_t handle, int32_t pause ); -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_Pan3D( int32_t handle, int32_t angle, int32_t distance ); -void MV_SetReverb( int32_t reverb ); -void MV_SetFastReverb( int32_t reverb ); -int32_t MV_GetMaxReverbDelay( void ); -int32_t MV_GetReverbDelay( void ); -void MV_SetReverbDelay( int32_t delay ); -//int32_t MV_SetMixMode( int32_t numchannels, int32_t samplebits ); -//int32_t MV_StartPlayback( void ); -//void MV_StopPlayback( void ); -int32_t MV_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *length ), - int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, - 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 vol, int32_t left, int32_t right, int32_t priority, - uint32_t callbackval ); -int32_t MV_PlayWAV3D( 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 MV_PlayWAV( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, - int32_t pitchoffset, int32_t vol, 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 priority, uint32_t callbackval ); -int32_t MV_PlayVOC( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, - int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, - uint32_t callbackval ); -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 MV_PlayVorbis( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, - int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, 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 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 left, int32_t right, int32_t priority, - uint32_t callbackval ); -int32_t MV_PlayXA3D( 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 MV_PlayXA( char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, - int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, - uint32_t callbackval ); -//void MV_CreateVolumeTable( int32_t index, int32_t volume, int32_t MaxVolume ); -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 ); +const char *MV_ErrorString(int32_t ErrorNumber); +int32_t MV_VoicePlaying(int32_t handle); +int32_t MV_KillAllVoices(void); +int32_t MV_Kill(int32_t handle); +int32_t MV_VoicesPlaying(void); +int32_t MV_VoiceAvailable(int32_t priority); +int32_t MV_SetPitch(int32_t handle, int32_t pitchoffset); +int32_t MV_SetFrequency(int32_t handle, int32_t frequency); +int32_t MV_PauseVoice(int32_t handle, int32_t pause); +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_Pan3D(int32_t handle, int32_t angle, int32_t distance); +void MV_SetReverb(int32_t reverb); +void MV_SetFastReverb(int32_t reverb); +int32_t MV_GetMaxReverbDelay(void); +int32_t MV_GetReverbDelay(void); +void MV_SetReverbDelay(int32_t delay); +// int32_t MV_SetMixMode( int32_t numchannels, int32_t samplebits ); +// int32_t MV_StartPlayback( void ); +// void MV_StopPlayback( void ); +int32_t MV_StartDemandFeedPlayback(void (*function)(char **ptr, uint32_t *length), int32_t rate, int32_t pitchoffset, + int32_t vol, int32_t left, int32_t right, 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 vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval); +int32_t MV_PlayWAV3D(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 MV_PlayWAV(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, + 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 priority, uint32_t callbackval); +int32_t MV_PlayVOC(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, + int32_t left, int32_t right, int32_t priority, uint32_t callbackval); +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 MV_PlayVorbis(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, + int32_t left, int32_t right, 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 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 left, int32_t right, int32_t priority, uint32_t callbackval); +int32_t MV_PlayXA3D(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 MV_PlayXA(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, + int32_t left, int32_t right, int32_t priority, uint32_t callbackval); +// void MV_CreateVolumeTable( int32_t index, int32_t volume, int32_t MaxVolume ); +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); void MV_SetPrintf(void (*function)(const char *fmt, ...)); diff --git a/polymer/eduke32/source/jaudiolib/src/pitch.h b/polymer/eduke32/source/jaudiolib/src/pitch.h index 01fe62d31..54e994b55 100644 --- a/polymer/eduke32/source/jaudiolib/src/pitch.h +++ b/polymer/eduke32/source/jaudiolib/src/pitch.h @@ -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. **********************************************************************/ -#ifndef __PITCH_H -#define __PITCH_H +#ifndef PITCH_H_ +#define PITCH_H_ #include "inttypes.h" diff --git a/polymer/eduke32/source/jmact/_control.h b/polymer/eduke32/source/jmact/_control.h index 404b4c664..e888da046 100644 --- a/polymer/eduke32/source/jmact/_control.h +++ b/polymer/eduke32/source/jmact/_control.h @@ -32,8 +32,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms // //**************************************************************************** -#ifndef _control_private -#define _control_private +#ifndef control_private_h_ +#define control_private_h_ #ifdef EXTERNC { #endif @@ -78,24 +78,23 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms // NORMAL axis scale #define NORMALAXISSCALE 65536 -#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x)))) -#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((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 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)\ - {\ - if ((*x)>MAXCONTROLVALUE) \ - {\ - (*x) = MAXCONTROLVALUE;\ - }\ - if ((*x)<-MAXCONTROLVALUE) \ - {\ - (*x) = -MAXCONTROLVALUE;\ - }\ +#define LIMITCONTROL(x) \ + { \ + if ((*x) > MAXCONTROLVALUE) \ + { \ + (*x) = MAXCONTROLVALUE; \ + } \ + if ((*x) < -MAXCONTROLVALUE) \ + { \ + (*x) = -MAXCONTROLVALUE; \ + } \ } -#define SGN(x) \ - ( ( (x) > 0 ) ? 1 : ( (x) < 0 ) ? -1 : 0 ) +#define SGN(x) (((x) > 0) ? 1 : ((x) < 0) ? -1 : 0) //**************************************************************************** // @@ -104,30 +103,30 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms //**************************************************************************** typedef enum - { - motion_Left = -1, - motion_Up = -1, - motion_None = 0, - motion_Right = 1, - motion_Down = 1 - } motion; +{ + motion_Left = -1, + motion_Up = -1, + motion_None = 0, + motion_Right = 1, + motion_Down = 1 +} motion; typedef struct - { - int32_t joyMinX; - int32_t joyMinY; - int32_t threshMinX; - int32_t threshMinY; - int32_t threshMaxX; - int32_t threshMaxY; - int32_t joyMaxX; - int32_t joyMaxY; - int32_t joyMultXL; - int32_t joyMultYL; - int32_t joyMultXH; - int32_t joyMultYH; - } JoystickDef; +{ + int32_t joyMinX; + int32_t joyMinY; + int32_t threshMinX; + int32_t threshMinY; + int32_t threshMaxX; + int32_t threshMaxY; + int32_t joyMaxX; + int32_t joyMaxY; + int32_t joyMultXL; + int32_t joyMultYL; + int32_t joyMultXH; + int32_t joyMultYH; +} JoystickDef; // int32_t ThrottleMin; // int32_t RudderMin; @@ -144,40 +143,40 @@ typedef struct typedef struct - { - uint8_t active ; - uint8_t used ; - uint8_t toggle ; - uint8_t buttonheld ; - int32_t cleared ; - } controlflags; +{ + uint8_t active; + uint8_t used; + uint8_t toggle; + uint8_t buttonheld; + int32_t cleared; +} controlflags; typedef struct - { - kb_scancode key1; - kb_scancode key2; - } controlkeymaptype; +{ + kb_scancode key1; + kb_scancode key2; +} controlkeymaptype; typedef struct - { - uint8_t singleclicked; - uint8_t doubleclicked; - uint16_t extra; - } controlbuttontype; +{ + uint8_t singleclicked; + uint8_t doubleclicked; + uint16_t extra; +} controlbuttontype; typedef struct - { - uint8_t analogmap; - uint8_t minmap; - uint8_t maxmap; - uint8_t extra; - } controlaxismaptype; +{ + uint8_t analogmap; + uint8_t minmap; + uint8_t maxmap; + uint8_t extra; +} controlaxismaptype; typedef struct - { - int32_t analog; - int32_t digital; - } controlaxistype; +{ + int32_t analog; + int32_t digital; +} controlaxistype; //*************************************************************************** diff --git a/polymer/eduke32/source/jmact/_scrplib.h b/polymer/eduke32/source/jmact/_scrplib.h index 375decc22..663a6cecf 100644 --- a/polymer/eduke32/source/jmact/_scrplib.h +++ b/polymer/eduke32/source/jmact/_scrplib.h @@ -29,8 +29,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) // scrplib.h -#ifndef _scriplib_private -#define _scriplib_private +#ifndef scriplib_private_h_ +#define scriplib_private_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/jmact/animlib.h b/polymer/eduke32/source/jmact/animlib.h index d1f9727fe..25289e908 100644 --- a/polymer/eduke32/source/jmact/animlib.h +++ b/polymer/eduke32/source/jmact/animlib.h @@ -31,8 +31,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) // ///////////////////////////////////////////////////////////////////////////// -#ifndef _animlib_public_ -#define _animlib_public_ +#ifndef animlib_public_h_ +#define animlib_public_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/jmact/control.h b/polymer/eduke32/source/jmact/control.h index 9eac4b1dc..9293a5e57 100644 --- a/polymer/eduke32/source/jmact/control.h +++ b/polymer/eduke32/source/jmact/control.h @@ -31,8 +31,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) // //*************************************************************************** -#ifndef _control_public -#define _control_public +#ifndef control_public_h_ +#define control_public_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/jmact/file_lib.h b/polymer/eduke32/source/jmact/file_lib.h index 4456108d4..cb4f52756 100644 --- a/polymer/eduke32/source/jmact/file_lib.h +++ b/polymer/eduke32/source/jmact/file_lib.h @@ -24,8 +24,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- -#ifndef _file_lib_public -#define _file_lib_public +#ifndef file_lib_public_ +#define file_lib_public_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/jmact/keyboard.h b/polymer/eduke32/source/jmact/keyboard.h index bf90571f8..20844eecc 100644 --- a/polymer/eduke32/source/jmact/keyboard.h +++ b/polymer/eduke32/source/jmact/keyboard.h @@ -25,8 +25,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) */ //------------------------------------------------------------------------- -#ifndef _keyboard_public -#define _keyboard_public +#ifndef keyboard_public_h_ +#define keyboard_public_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/jmact/mouse.h b/polymer/eduke32/source/jmact/mouse.h index c1790bb29..4cc25890f 100644 --- a/polymer/eduke32/source/jmact/mouse.h +++ b/polymer/eduke32/source/jmact/mouse.h @@ -25,8 +25,8 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) */ //------------------------------------------------------------------------- -#ifndef __mouse_h -#define __mouse_h +#ifndef mouse_h_ +#define mouse_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/jmact/scriplib.h b/polymer/eduke32/source/jmact/scriplib.h index 3a6684bce..0d8247bb1 100644 --- a/polymer/eduke32/source/jmact/scriplib.h +++ b/polymer/eduke32/source/jmact/scriplib.h @@ -26,8 +26,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms // scriplib.h -#ifndef _scriplib_public -#define _scriplib_public +#ifndef scriplib_public_h_ +#define scriplib_public_h_ #ifdef EXTERNC { #endif diff --git a/polymer/eduke32/source/m32def.h b/polymer/eduke32/source/m32def.h index b56ead993..05d2d0bbb 100644 --- a/polymer/eduke32/source/m32def.h +++ b/polymer/eduke32/source/m32def.h @@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef _m32def_h_ -#define _m32def_h_ +#ifndef m32def_h_ +#define m32def_h_ // the parsing routines aren't good at error recovery yet... #define ABORTERRCNT 1 diff --git a/polymer/eduke32/source/menus.h b/polymer/eduke32/source/menus.h index ed8424904..2b75b3abd 100644 --- a/polymer/eduke32/source/menus.h +++ b/polymer/eduke32/source/menus.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __menus_h__ -#define __menus_h__ +#ifndef menus_h_ +#define menus_h_ #include "compat.h" diff --git a/polymer/eduke32/source/net.h b/polymer/eduke32/source/net.h index 5d0ee2951..fe28e887d 100644 --- a/polymer/eduke32/source/net.h +++ b/polymer/eduke32/source/net.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __netplay_h__ -#define __netplay_h__ +#ifndef netplay_h_ +#define netplay_h_ #include "enet/enet.h" @@ -345,4 +345,4 @@ void faketimerhandler(void); #endif -#endif // __netplay_h__ +#endif // netplay_h_ diff --git a/polymer/eduke32/source/osdcmds.h b/polymer/eduke32/source/osdcmds.h index b178265c6..2be78e39d 100644 --- a/polymer/eduke32/source/osdcmds.h +++ b/polymer/eduke32/source/osdcmds.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __osdcmds_h__ -#define __osdcmds_h__ +#ifndef osdcmds_h_ +#define osdcmds_h_ struct osdcmd_cheatsinfo { int32_t cheatnum; // -1 = none, else = see DoCheats() @@ -44,5 +44,5 @@ typedef struct { extern const keydef_t ConsoleKeys[]; extern const char *const ConsoleButtons[]; -#endif // __osdcmds_h__ +#endif // osdcmds_h_ diff --git a/polymer/eduke32/source/player.h b/polymer/eduke32/source/player.h index e976c114b..605b73a5a 100644 --- a/polymer/eduke32/source/player.h +++ b/polymer/eduke32/source/player.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __player_h__ -#define __player_h__ +#ifndef player_h_ +#define player_h_ extern int32_t playerswhenstarted; diff --git a/polymer/eduke32/source/premap.h b/polymer/eduke32/source/premap.h index 04ee26585..d874d8687 100644 --- a/polymer/eduke32/source/premap.h +++ b/polymer/eduke32/source/premap.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __premap_h__ -#define __premap_h__ +#ifndef premap_h_ +#define premap_h_ typedef struct { int32_t x1, y1; diff --git a/polymer/eduke32/source/quotes.h b/polymer/eduke32/source/quotes.h index b5bcaa638..96605ee23 100644 --- a/polymer/eduke32/source/quotes.h +++ b/polymer/eduke32/source/quotes.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __quotes_h__ -#define __quotes_h__ +#ifndef quotes_h_ +#define quotes_h_ #define MAXQUOTES 16384 #define MAXQUOTELEN 128 diff --git a/polymer/eduke32/source/rts.h b/polymer/eduke32/source/rts.h index ee9a13e4f..d4e8c193b 100644 --- a/polymer/eduke32/source/rts.h +++ b/polymer/eduke32/source/rts.h @@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //*************************************************************************** -#ifndef __rts_public__ -#define __rts_public__ +#ifndef rts_public_ +#define rts_public_ extern char rts_lumplockbyte[11]; diff --git a/polymer/eduke32/source/savegame.h b/polymer/eduke32/source/savegame.h index 6a61a3a88..21d24c8c0 100644 --- a/polymer/eduke32/source/savegame.h +++ b/polymer/eduke32/source/savegame.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __savegame_h__ -#define __savegame_h__ +#ifndef savegame_h_ +#define savegame_h_ #include "game.h" diff --git a/polymer/eduke32/source/sector.h b/polymer/eduke32/source/sector.h index d02b1ddec..c3a275a4f 100644 --- a/polymer/eduke32/source/sector.h +++ b/polymer/eduke32/source/sector.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __sector_h__ -#define __sector_h__ +#ifndef sector_h_ +#define sector_h_ #include "gamevars.h" #include "actors.h" // actor_t diff --git a/polymer/eduke32/source/sector_inline.c b/polymer/eduke32/source/sector_inline.c index a7902c9b6..5c337d132 100644 --- a/polymer/eduke32/source/sector_inline.c +++ b/polymer/eduke32/source/sector_inline.c @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __sector_inline_c__ -#define __sector_inline_c__ +#ifndef sector_inline_c_ +#define sector_inline_c_ #include "compat.h" #include "build.h" diff --git a/polymer/eduke32/source/sector_inline.h b/polymer/eduke32/source/sector_inline.h index 17d1f17f0..90952effb 100644 --- a/polymer/eduke32/source/sector_inline.h +++ b/polymer/eduke32/source/sector_inline.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __sector_inline_h__ -#define __sector_inline_h__ +#ifndef sector_inline_h_ +#define sector_inline_h_ EXTERN_INLINE_HEADER int32_t G_CheckPlayerInSector(int32_t sect); diff --git a/polymer/eduke32/source/sounds.h b/polymer/eduke32/source/sounds.h index 8abb532a9..1f3ccef0b 100644 --- a/polymer/eduke32/source/sounds.h +++ b/polymer/eduke32/source/sounds.h @@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // //**************************************************************************** -#ifndef _sounds_public_ -#define _sounds_public_ +#ifndef sounds_public_h_ +#define sounds_public_h_ #include "sounds_common.h" diff --git a/polymer/eduke32/source/sounds_mapster32.h b/polymer/eduke32/source/sounds_mapster32.h index 21f05d044..d6ec03bfd 100644 --- a/polymer/eduke32/source/sounds_mapster32.h +++ b/polymer/eduke32/source/sounds_mapster32.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#ifndef __sounds_mapster32_h__ -#define __sounds_mapster32_h__ +#ifndef sounds_mapster32_h_ +#define sounds_mapster32_h_ #include "build.h" #include "sounds_common.h"