mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- got rid of common.h
All still relevant content was moved to places closer to its use.
This commit is contained in:
parent
5524d8eab7
commit
ec1c42b04a
37 changed files with 39 additions and 126 deletions
|
@ -29,7 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "automap.h"
|
||||
#include "pragmas.h"
|
||||
#include "mmulti.h"
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
|
||||
#include "actor.h"
|
||||
|
|
|
@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "build.h"
|
||||
#include "mmulti.h"
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
#include "g_input.h"
|
||||
#include "automap.h"
|
||||
|
|
|
@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#pragma once
|
||||
#include "build.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "pragmas.h"
|
||||
#include "misc.h"
|
||||
#include "printf.h"
|
||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "blood.h"
|
||||
#include "dude.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "build.h"
|
||||
#include "v_draw.h"
|
||||
#include "common.h"
|
||||
#include "mmulti.h"
|
||||
#include "common_game.h"
|
||||
#include "blood.h"
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
#include "m_fixed.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
|
|
@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include <string.h>
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
|
||||
#include "blood.h"
|
||||
|
|
|
@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#pragma once
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
|
||||
#include "blood.h"
|
||||
|
|
|
@ -31,6 +31,8 @@ static_assert('\xff' == 255, "Char must be unsigned!");
|
|||
#include "buildtiles.h"
|
||||
#include "c_cvars.h"
|
||||
#include "cmdlib.h"
|
||||
#include "m_fixed.h"
|
||||
#include "mathutil.h"
|
||||
|
||||
typedef int64_t coord_t;
|
||||
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
//
|
||||
// Definitions of common non-engine data structures/functions
|
||||
// (and declarations of data appearing in both)
|
||||
// for EDuke32 and Mapster32
|
||||
//
|
||||
|
||||
#ifndef EDUKE32_COMMON_H_
|
||||
#define EDUKE32_COMMON_H_
|
||||
|
||||
|
||||
#include "compat.h"
|
||||
#include "pragmas.h" // klabs
|
||||
#include "scriptfile.h"
|
||||
#include "mathutil.h"
|
||||
|
||||
//// TYPES
|
||||
struct strllist
|
||||
{
|
||||
struct strllist *next;
|
||||
char *str;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *text;
|
||||
int32_t tokenid;
|
||||
}
|
||||
tokenlist;
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
T_EOF = -2,
|
||||
T_ERROR = -1,
|
||||
};
|
||||
|
||||
|
||||
//// EXTERN DECLS
|
||||
|
||||
extern const char *s_buildRev;
|
||||
extern const char *s_buildTimestamp;
|
||||
|
||||
//// FUNCTIONS
|
||||
|
||||
void G_AddDef(const char *buffer);
|
||||
void G_AddDefModule(const char *buffer);
|
||||
|
||||
// returns a buffer of size BMAX_PATH
|
||||
static inline char *dup_filename(const char *fn)
|
||||
{
|
||||
char * const buf = (char *) Xmalloc(BMAX_PATH);
|
||||
return Bstrncpyz(buf, fn, BMAX_PATH);
|
||||
}
|
||||
|
||||
static inline void realloc_copy(char **fn, const char *buf)
|
||||
{
|
||||
uint8_t len = Bstrlen(buf) + 1;
|
||||
*fn = (char *)Xrealloc(*fn, len);
|
||||
Bstrncpy(*fn, buf, len);
|
||||
}
|
||||
|
||||
int32_t getatoken(scriptfile *sf, const tokenlist *tl, int32_t ntokens);
|
||||
|
||||
|
||||
void COMMON_clearbackground(int32_t numcols, int32_t numrows);
|
||||
|
||||
// timer defs for profiling function chunks the simple way
|
||||
#define EDUKE32_TMRDEF int32_t t[20], ti=0; const char *tmrstr=__func__; fprintf(stderr,"%s\n",tmrstr); t[ti++]=I_msTime();
|
||||
#define EDUKE32_TMRTIC t[ti++]=I_msTime()
|
||||
#define EDUKE32_TMRPRN do { int ii=0; fprintf(stderr,"%s: ",tmrstr); for (ii=1; ii<ti; ii++) fprintf(stderr,"%d ", t[ii]-t[ii-1]); fprintf(stderr,"\n"); } while (0)
|
||||
|
||||
#endif
|
|
@ -284,10 +284,6 @@ typedef struct MAY_ALIAS {
|
|||
int32_t x, y;
|
||||
} vec2_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t x, y;
|
||||
} vec2u_t;
|
||||
|
||||
typedef struct {
|
||||
float x, y;
|
||||
} vec2f_t;
|
||||
|
@ -424,18 +420,6 @@ static FORCE_INLINE char *Bstrncpyz(char *dst, const char *src, bsize_t n)
|
|||
|
||||
////////// Inlined external libraries //////////
|
||||
|
||||
#include "m_fixed.h"
|
||||
#include "vectors.h"
|
||||
|
||||
inline FVector3 GetSoundPos(const vec3_t *pos)
|
||||
{
|
||||
// converts a Build coordinate to a sound system coordinate
|
||||
const float xmul = 1 / 16.f;
|
||||
const float ymul = -1 / 16.f;
|
||||
const float zmul = -1 / 256.f;
|
||||
return { pos->x* xmul, pos->z* zmul, pos->y* ymul };
|
||||
}
|
||||
|
||||
/* End dependence on compat.o object. */
|
||||
|
||||
|
||||
|
|
|
@ -30,4 +30,21 @@ int32_t scriptfile_getsymbolvalue(char const *name, int32_t *val);
|
|||
int32_t scriptfile_addsymbolvalue(char const *name, int32_t val);
|
||||
void scriptfile_clearsymbols(void);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *text;
|
||||
int32_t tokenid;
|
||||
}
|
||||
tokenlist;
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
T_EOF = -2,
|
||||
T_ERROR = -1,
|
||||
};
|
||||
|
||||
|
||||
int32_t getatoken(scriptfile *sf, const tokenlist *tl, int32_t ntokens);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
#include <vpx/vp8dx.h>
|
||||
#include "animvpx.h"
|
||||
|
||||
struct vec2u_t
|
||||
{
|
||||
uint32_t x, y;
|
||||
} ;
|
||||
|
||||
const char *animvpx_read_ivf_header_errmsg[] = {
|
||||
"All OK",
|
||||
"couldn't read 32-byte IVF header",
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "engine_priv.h"
|
||||
#include "scriptfile.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "mdsprite.h" // md3model_t
|
||||
#include "buildtiles.h"
|
||||
#include "bitmap.h"
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "automap.h"
|
||||
|
||||
#include "imagehelpers.h"
|
||||
#include "common.h"
|
||||
#include "compat.h"
|
||||
#include "engine_priv.h"
|
||||
#include "palette.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "polymost.h"
|
||||
#include "mdsprite.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "palette.h"
|
||||
#include "textures.h"
|
||||
#include "bitmap.h"
|
||||
|
|
|
@ -7,7 +7,6 @@ Ken Silverman's official web site: http://www.advsys.net/ken
|
|||
|
||||
#include "build.h"
|
||||
#include "automap.h"
|
||||
#include "common.h"
|
||||
#include "engine_priv.h"
|
||||
#include "mdsprite.h"
|
||||
#include "polymost.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "compat.h"
|
||||
#include "scriptfile.h"
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "filesystem.h"
|
||||
#include "printf.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
|
||||
#include "c_cvars.h"
|
||||
#include "common.h"
|
||||
#include "gameconfigfile.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "m_argv.h"
|
||||
|
|
|
@ -12,11 +12,6 @@ struct vec2_t
|
|||
int32_t x, y;
|
||||
};
|
||||
|
||||
struct vec2u_t
|
||||
{
|
||||
uint32_t x, y;
|
||||
};
|
||||
|
||||
struct vec2f_t
|
||||
{
|
||||
float x, y;
|
||||
|
@ -50,4 +45,4 @@ struct vec3_16_t
|
|||
vec2_16_t vec2;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include "palette.h"
|
||||
#include "superfasthash.h"
|
||||
#include "common.h"
|
||||
#include "memarena.h"
|
||||
#include "palettecontainer.h"
|
||||
#include "palutil.h"
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
#pragma once
|
||||
#include "s_soundinternal.h"
|
||||
#include "m_fixed.h"
|
||||
#include "vectors.h"
|
||||
#include "build.h"
|
||||
|
||||
inline FVector3 GetSoundPos(const vec3_t *pos)
|
||||
{
|
||||
// converts a Build coordinate to a sound system coordinate
|
||||
const float xmul = 1 / 16.f;
|
||||
const float ymul = -1 / 16.f;
|
||||
const float zmul = -1 / 256.f;
|
||||
return { pos->x* xmul, pos->z* zmul, pos->y* ymul };
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "sc_man.h"
|
||||
#include "resourcefile.h"
|
||||
#include "printf.h"
|
||||
#include "common.h"
|
||||
#include "version.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "m_argv.h"
|
||||
|
|
|
@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h"
|
||||
#include "automap.h"
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "engine.h"
|
||||
#include "exhumed.h"
|
||||
#include "sequence.h"
|
||||
|
|
|
@ -17,7 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "engine.h"
|
||||
#include "exhumed.h"
|
||||
#include "sequence.h"
|
||||
|
@ -54,8 +53,6 @@ BEGIN_PS_NS
|
|||
extern short bPlayerPan;
|
||||
extern short bLockPan;
|
||||
|
||||
extern const char* s_buildRev;
|
||||
extern const char* s_buildTimestamp;
|
||||
|
||||
|
||||
void uploadCinemaPalettes();
|
||||
|
|
|
@ -17,7 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "compat.h"
|
||||
#include "common.h"
|
||||
#include "engine.h"
|
||||
#include "exhumed.h"
|
||||
#include "sequence.h"
|
||||
|
|
|
@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h"
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
#include "exhumed.h"
|
||||
#include "player.h"
|
||||
#include "view.h"
|
||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "ns.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "names2.h"
|
||||
#include "game.h"
|
||||
|
|
|
@ -60,7 +60,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "misc.h"
|
||||
#include "jsector.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "gameconfigfile.h"
|
||||
#include "printf.h"
|
||||
#include "m_argv.h"
|
||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "ns.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "names2.h"
|
||||
#include "panel.h"
|
||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "ns.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "mytypes.h"
|
||||
#include "names2.h"
|
||||
|
|
|
@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "gamecontrol.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "v_text.h"
|
||||
#include "printf.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
|
||||
#undef MAIN
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "names2.h"
|
||||
#include "panel.h"
|
||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "ns.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "mytypes.h"
|
||||
#include "names2.h"
|
||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "ns.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "gamecontrol.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "names2.h"
|
||||
#include "panel.h"
|
||||
|
|
|
@ -25,7 +25,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "build.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "names2.h"
|
||||
#include "panel.h"
|
||||
|
|
Loading…
Reference in a new issue