remove more unused crap
parent
3a9d2a8db0
commit
16e7b4373d
|
@ -52,35 +52,6 @@ void R_TimeRefresh_f (void);
|
|||
void R_ReadPointFile_f (void);
|
||||
texture_t *R_TextureAnimation (texture_t *base, int frame);
|
||||
|
||||
typedef struct surfcache_s
|
||||
{
|
||||
struct surfcache_s *next;
|
||||
struct surfcache_s **owner; // NULL is an empty chunk of memory
|
||||
int lightadj[MAXLIGHTMAPS]; // checked for strobe flush
|
||||
int dlight;
|
||||
int size; // including header
|
||||
unsigned width;
|
||||
unsigned height; // DEBUG only needed for debug
|
||||
float mipscale;
|
||||
struct texture_s *texture; // checked for animating textures
|
||||
byte data[4]; // width*height elements
|
||||
} surfcache_t;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
pixel_t *surfdat; // destination for generated surface
|
||||
int rowbytes; // destination logical width in bytes
|
||||
msurface_t *surf; // description for surface to generate
|
||||
fixed8_t lightadj[MAXLIGHTMAPS];
|
||||
// adjust for lightmap levels for dynamic lighting
|
||||
texture_t *texture; // corrected for animating textures
|
||||
int surfmip; // mipmapped ratio of surface texels / world pixels
|
||||
int surfwidth; // in mipmapped texels
|
||||
int surfheight; // in mipmapped texels
|
||||
} drawsurf_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2, pt_blob, pt_blob2
|
||||
} ptype_t;
|
||||
|
|
|
@ -483,22 +483,3 @@ int GreatestCommonDivisor (int i1, int i2)
|
|||
return GreatestCommonDivisor (i1, i2 % i1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===================
|
||||
Invert24To16
|
||||
|
||||
Inverts an 8.24 value to a 16.16 value
|
||||
====================
|
||||
*/
|
||||
|
||||
fixed16_t Invert24To16(fixed16_t val)
|
||||
{
|
||||
if (val < 256)
|
||||
return (0xFFFFFFFF);
|
||||
|
||||
return (fixed16_t)
|
||||
(((double)0x10000 * (double)0x1000000 / (double)val) + 0.5);
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@ void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]);
|
|||
|
||||
void FloorDivMod (double numer, double denom, int *quotient,
|
||||
int *rem);
|
||||
fixed16_t Invert24To16(fixed16_t val);
|
||||
int GreatestCommonDivisor (int i1, int i2);
|
||||
|
||||
void AngleVectors (vec3_t angles, vec3_t forward, vec3_t right, vec3_t up);
|
||||
|
|
|
@ -130,7 +130,7 @@ extern int pr_xstatement;
|
|||
|
||||
extern uint16_t pr_crc;
|
||||
|
||||
FUNC_NORETURN void PR_RunError (const char *error, ...) FUNC_PRINTF(1,2);
|
||||
noreturn void PR_RunError (const char *error, ...) FUNC_PRINTF(1,2);
|
||||
#ifdef __WATCOMC__
|
||||
#pragma aux PR_RunError aborts;
|
||||
#endif
|
||||
|
|
|
@ -32,31 +32,15 @@
|
|||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdnoreturn.h>
|
||||
#include <limits.h>
|
||||
#ifndef _WIN32 /* others we support without sys/param.h? */
|
||||
#ifndef _WIN32
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* NOTES on TYPE SIZES:
|
||||
Quake/Hexen II engine relied on 32 bit int type size
|
||||
with ILP32 (not LP32) model in mind. We now support
|
||||
LP64 and LLP64, too. We expect:
|
||||
sizeof (char) == 1
|
||||
sizeof (short) == 2
|
||||
sizeof (int) == 4
|
||||
sizeof (float) == 4
|
||||
sizeof (long) == 4 / 8
|
||||
sizeof (pointer *) == 4 / 8
|
||||
For this, we need stdint.h (or inttypes.h)
|
||||
FIXME: On some platforms, only inttypes.h is available.
|
||||
FIXME: Properly replace certain short and int usage
|
||||
with int16_t and int32_t.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
/* MS Visual Studio provides stdint.h only starting with
|
||||
* version 2010. Even in VS2010, there is no inttypes.h.. */
|
||||
#include "msinttypes/stdint.h"
|
||||
#else
|
||||
#include <stdint.h>
|
||||
|
@ -66,8 +50,6 @@
|
|||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
_Static_assert(sizeof(float) == 4, "float not correct size");
|
||||
_Static_assert(sizeof(long) >= 4, "long not correct size");
|
||||
_Static_assert(sizeof(int) == 4, "int not correct size");
|
||||
|
@ -78,23 +60,13 @@ enum dummy_enum {
|
|||
};
|
||||
_Static_assert(sizeof(enum dummy_enum) == sizeof(int), "enum not sizeof(int)");
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
typedef uint8_t byte;
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
/* math */
|
||||
typedef float vec_t;
|
||||
typedef vec_t vec3_t[3];
|
||||
typedef vec_t vec4_t[4];
|
||||
typedef vec_t vec5_t[5];
|
||||
typedef int fixed4_t;
|
||||
typedef int fixed8_t;
|
||||
typedef int fixed16_t;
|
||||
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
/* MAX_OSPATH (max length of a filesystem pathname, i.e. PATH_MAX)
|
||||
* Note: See GNU Hurd and others' notes about brokenness of this:
|
||||
|
@ -116,21 +88,7 @@ typedef int fixed16_t;
|
|||
|
||||
#define MAX_OSPATH PATH_MAX
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
/* missing types */
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_WIN64)
|
||||
#define ssize_t SSIZE_T
|
||||
#else
|
||||
typedef int ssize_t;
|
||||
#endif /* _WIN64 */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
/* function attributes, etc */
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define FUNC_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
|
||||
#else
|
||||
|
@ -144,47 +102,4 @@ typedef int ssize_t;
|
|||
#define FUNCP_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
/* llvm's optnone function attribute started with clang-3.5.0 */
|
||||
#if defined(__clang__) && \
|
||||
(__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 5))
|
||||
#define FUNC_NO_OPTIMIZE __attribute__((__optnone__))
|
||||
/* function optimize attribute is added starting with gcc 4.4.0 */
|
||||
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 3))
|
||||
#define FUNC_NO_OPTIMIZE __attribute__((__optimize__("0")))
|
||||
#else
|
||||
#define FUNC_NO_OPTIMIZE
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define FUNC_NORETURN __attribute__((__noreturn__))
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
#define FUNC_NORETURN __declspec(noreturn)
|
||||
#elif defined(__WATCOMC__)
|
||||
#define FUNC_NORETURN /* use the 'aborts' aux pragma */
|
||||
#else
|
||||
#define FUNC_NORETURN
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||
#define FUNC_NOINLINE __attribute__((__noinline__))
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
#define FUNC_NOINLINE __declspec(noinline)
|
||||
#else
|
||||
#define FUNC_NOINLINE
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
|
||||
#define FUNC_NOCLONE __attribute__((__noclone__))
|
||||
#else
|
||||
#define FUNC_NOCLONE
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
|
||||
#endif /* __QSTDINC_H */
|
||||
|
||||
|
|
|
@ -275,8 +275,8 @@ void Host_InitCommands (void);
|
|||
void Host_Init (void);
|
||||
void Host_Shutdown(void);
|
||||
void Host_Callback_Notify (cvar_t *var); /* callback function for CVAR_NOTIFY */
|
||||
FUNC_NORETURN void Host_Error (const char *error, ...) FUNC_PRINTF(1,2);
|
||||
FUNC_NORETURN void Host_EndGame (const char *message, ...) FUNC_PRINTF(1,2);
|
||||
noreturn void Host_Error (const char *error, ...) FUNC_PRINTF(1,2);
|
||||
noreturn void Host_EndGame (const char *message, ...) FUNC_PRINTF(1,2);
|
||||
#ifdef __WATCOMC__
|
||||
#pragma aux Host_Error aborts;
|
||||
#pragma aux Host_EndGame aborts;
|
||||
|
|
|
@ -45,8 +45,8 @@ void Sys_mkdir (const char *path);
|
|||
//
|
||||
// system IO
|
||||
//
|
||||
FUNC_NORETURN void Sys_Quit (void);
|
||||
FUNC_NORETURN void Sys_Error (const char *error, ...) FUNC_PRINTF(1,2);
|
||||
noreturn void Sys_Quit (void);
|
||||
noreturn void Sys_Error (const char *error, ...) FUNC_PRINTF(1,2);
|
||||
// an error will cause the entire program to exit
|
||||
#ifdef __WATCOMC__
|
||||
#pragma aux Sys_Error aborts;
|
||||
|
|
Loading…
Reference in New Issue