mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
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:
parent
0e606700d6
commit
99e21ffa94
90 changed files with 530 additions and 558 deletions
|
@ -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_
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -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<Type>
|
||||
#define TrackerCast(x) x.cast()
|
||||
|
@ -1501,4 +1501,4 @@ static inline void pop_nofog(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // __build_h__
|
||||
#endif // build_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_
|
||||
|
||||
|
|
|
@ -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 <malloc.h>
|
||||
|
||||
|
@ -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 <cstdarg>
|
||||
# ifdef __compat_h_macrodef__
|
||||
# ifdef compat_h_macrodef__
|
||||
# include <cstdio>
|
||||
# include <cstring>
|
||||
# include <cstdlib>
|
||||
|
@ -153,7 +153,7 @@
|
|||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef __compat_h_macrodef__
|
||||
#ifdef compat_h_macrodef__
|
||||
# ifndef EXTERNC
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
|
@ -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_
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __crc32_h__
|
||||
#define __crc32_h__
|
||||
#ifndef crc32_h_
|
||||
#define crc32_h_
|
||||
|
||||
#include "compat.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_
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __dynamicgtk_h__
|
||||
#define __dynamicgtk_h__
|
||||
#ifndef dynamicgtk_h_
|
||||
#define dynamicgtk_h_
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixdata.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
@ -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_ */
|
||||
|
||||
|
|
|
@ -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 <math.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __glext_h_
|
||||
#define __glext_h_
|
||||
#ifndef glext_h_
|
||||
#define glext_h_
|
||||
|
||||
#ifdef EXTERNC
|
||||
extern "C" {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __compat_h__
|
||||
#ifndef compat_h_
|
||||
#include "compat.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __mutex_h__
|
||||
#define __mutex_h__
|
||||
#ifndef mutex_h_
|
||||
#define mutex_h_
|
||||
|
||||
/* Mutual exclusion mechanism wrappers for the different platforms */
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __osxbits_h__
|
||||
#define __osxbits_h__
|
||||
#ifndef osxbits_h_
|
||||
#define osxbits_h_
|
||||
#include <sys/types.h>
|
||||
|
||||
int32_t osx_msgbox(const char *name, const char *msg);
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _polymost_h_
|
||||
# define _polymost_h_
|
||||
#ifndef polymost_h_
|
||||
# define polymost_h_
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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)); } \
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -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_ */
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _texcache_h_
|
||||
# define _texcache_h_
|
||||
#ifndef texcache_h_
|
||||
# define texcache_h_
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
|
||||
|
||||
template<typename TrackedType>
|
||||
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<typename TrackedType>
|
||||
inline __TRACKER_NAME<TrackedType>::operator TrackedType() const
|
||||
inline TRACKER_NAME_<TrackedType>::operator TrackedType() const
|
||||
{
|
||||
return this->TrackedValue;
|
||||
}
|
||||
|
||||
template<typename TrackedType>
|
||||
inline TrackedType __TRACKER_NAME<TrackedType>::cast() const
|
||||
inline TrackedType TRACKER_NAME_<TrackedType>::cast() const
|
||||
{
|
||||
return this->TrackedValue;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
|
||||
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;
|
||||
|
||||
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<TrackedType>::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;
|
||||
}
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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 <windows.h>
|
||||
|
@ -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_
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define __dynamicgtkfoo__
|
||||
#define dynamicgtkfoo__
|
||||
#include "dynamicgtk.h"
|
||||
|
||||
static void *handle = NULL;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, ...));
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue