2008-11-09 22:29:28 +00:00
|
|
|
|
|
|
|
#include "hash.h"
|
|
|
|
#include "shader.h"
|
|
|
|
|
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
|
|
|
#ifdef SKELETALMODELS
|
2008-11-09 22:29:28 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#endif
|
|
|
|
|
2009-11-04 21:16:50 +00:00
|
|
|
int HLMod_BoneForName(model_t *mod, char *name);
|
|
|
|
int HLMod_FrameForName(model_t *mod, char *name);
|
2008-11-09 22:29:28 +00:00
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
//a single pose within an animation (note: always refered to via a framegroup, even if there's only one frame in that group).
|
2013-04-06 03:36:00 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2013-07-14 12:22:51 +00:00
|
|
|
vecV_t *ofsverts;
|
2008-11-09 22:29:28 +00:00
|
|
|
#ifndef SERVERONLY
|
2013-07-14 12:22:51 +00:00
|
|
|
vec3_t *ofsnormals;
|
|
|
|
vec3_t *ofstvector;
|
|
|
|
vec3_t *ofssvector;
|
2013-04-06 03:36:00 +00:00
|
|
|
|
|
|
|
vboarray_t vboverts;
|
|
|
|
vboarray_t vbonormals;
|
|
|
|
vboarray_t vbosvector;
|
|
|
|
vboarray_t vbotvector;
|
2008-11-09 22:29:28 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
vec3_t scale;
|
|
|
|
vec3_t scale_origin;
|
|
|
|
} galiaspose_t;
|
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
//a frame group (aka: animation)
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
#ifdef SKELETALMODELS
|
|
|
|
qboolean isheirachical; //for models with transforms, states that bones need to be transformed from their parent.
|
|
|
|
//this is actually bad, and can result in bones shortening as they interpolate.
|
|
|
|
#endif
|
|
|
|
qboolean loop;
|
|
|
|
int numposes;
|
|
|
|
float rate;
|
|
|
|
galiaspose_t *poseofs;
|
|
|
|
float *boneofs; //numposes*12*numbones
|
|
|
|
char name[64];
|
|
|
|
} galiasgroup_t;
|
|
|
|
|
2011-12-23 03:12:29 +00:00
|
|
|
typedef struct galiasbone_s galiasbone_t;
|
2008-11-09 22:29:28 +00:00
|
|
|
#ifdef SKELETALMODELS
|
2013-04-06 03:36:00 +00:00
|
|
|
struct galiasbone_s
|
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
char name[32];
|
|
|
|
int parent;
|
2011-12-23 03:12:29 +00:00
|
|
|
float inverse[12];
|
|
|
|
};
|
2008-11-09 22:29:28 +00:00
|
|
|
|
2013-04-06 03:36:00 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
//skeletal poses refer to this.
|
|
|
|
int vertexindex;
|
|
|
|
int boneindex;
|
|
|
|
vec4_t org;
|
2009-06-30 22:05:18 +00:00
|
|
|
#ifndef SERVERONLY
|
|
|
|
vec3_t normal;
|
|
|
|
#endif
|
2008-11-09 22:29:28 +00:00
|
|
|
} galisskeletaltransforms_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//we can't be bothered with animating skins.
|
|
|
|
//We'll load up to four of them but after that you're on your own
|
|
|
|
#ifndef SERVERONLY
|
2013-07-14 12:22:51 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
int skinwidth;
|
|
|
|
int skinheight;
|
2013-07-14 12:22:51 +00:00
|
|
|
qbyte **ofstexels; //this is 8bit for frame 0 only. only valid in q1 models without replacement textures, used for colourising player skins.
|
2008-11-09 22:29:28 +00:00
|
|
|
float skinspeed;
|
2012-02-12 05:18:31 +00:00
|
|
|
int numshaders;
|
2013-07-14 12:22:51 +00:00
|
|
|
shader_t **ofsshaders;
|
|
|
|
char name[MAX_QPATH];
|
2008-11-09 22:29:28 +00:00
|
|
|
} galiasskin_t;
|
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
char name[MAX_QPATH];
|
2009-11-04 21:16:50 +00:00
|
|
|
texnums_t texnum;
|
2008-06-01 22:06:22 +00:00
|
|
|
unsigned int tcolour;
|
2008-11-09 22:29:28 +00:00
|
|
|
unsigned int bcolour;
|
2010-08-28 17:14:38 +00:00
|
|
|
unsigned int pclass;
|
2008-11-09 22:29:28 +00:00
|
|
|
int skinnum;
|
2009-11-04 21:16:50 +00:00
|
|
|
unsigned int subframe;
|
2008-11-09 22:29:28 +00:00
|
|
|
bucket_t bucket;
|
|
|
|
} galiascolourmapped_t;
|
|
|
|
#endif
|
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char name[64];
|
|
|
|
vec3_t org;
|
|
|
|
float ang[3][3];
|
|
|
|
} md3tag_t;
|
2013-06-23 02:17:02 +00:00
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
typedef struct galiasinfo_s
|
|
|
|
{
|
|
|
|
index_t *ofs_indexes;
|
2013-06-23 02:17:02 +00:00
|
|
|
int numindexes;
|
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
int *ofs_trineighbours;
|
2013-06-23 02:17:02 +00:00
|
|
|
|
|
|
|
int numskins;
|
|
|
|
#ifndef SERVERONLY
|
2013-07-14 12:22:51 +00:00
|
|
|
galiasskin_t *ofsskins;
|
2013-06-23 02:17:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
int shares_verts; //used with models with two shaders using the same vertex. set to the surface number to inherit from (or itself).
|
|
|
|
int shares_bones; //use last mesh's bones. set to the surface number to inherit from (or itself).
|
|
|
|
|
|
|
|
int numverts;
|
|
|
|
|
|
|
|
#ifndef SERVERONLY
|
2013-07-14 12:22:51 +00:00
|
|
|
vec2_t *ofs_st_array;
|
2013-06-23 02:17:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
int groups;
|
2013-07-14 12:22:51 +00:00
|
|
|
galiasgroup_t *groupofs;
|
2013-06-23 02:17:02 +00:00
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
struct galiasinfo_s *nextsurf;
|
2013-06-23 02:17:02 +00:00
|
|
|
|
|
|
|
#ifdef SKELETALMODELS
|
2013-07-14 12:22:51 +00:00
|
|
|
float *baseframeofs; /*non-heirachical*/
|
2013-06-23 02:17:02 +00:00
|
|
|
int numbones;
|
2013-07-14 12:22:51 +00:00
|
|
|
galiasbone_t *ofsbones;
|
2013-06-23 02:17:02 +00:00
|
|
|
int numswtransforms;
|
2013-07-14 12:22:51 +00:00
|
|
|
galisskeletaltransforms_t *ofsswtransforms;
|
2013-06-23 02:17:02 +00:00
|
|
|
|
2013-07-14 12:22:51 +00:00
|
|
|
vecV_t *ofs_skel_xyz;
|
|
|
|
vec3_t *ofs_skel_norm;
|
|
|
|
vec3_t *ofs_skel_svect;
|
|
|
|
vec3_t *ofs_skel_tvect;
|
|
|
|
byte_vec4_t *ofs_skel_idx;
|
|
|
|
vec4_t *ofs_skel_weight;
|
2013-06-23 02:17:02 +00:00
|
|
|
|
|
|
|
vboarray_t vbo_skel_verts;
|
|
|
|
vboarray_t vbo_skel_normals;
|
|
|
|
vboarray_t vbo_skel_svector;
|
|
|
|
vboarray_t vbo_skel_tvector;
|
|
|
|
vboarray_t vbo_skel_bonenum;
|
|
|
|
vboarray_t vbo_skel_bweight;
|
|
|
|
#endif
|
|
|
|
vboarray_t vboindicies;
|
|
|
|
vboarray_t vbotexcoords;
|
|
|
|
|
|
|
|
//these exist only in the root mesh.
|
|
|
|
int numtagframes;
|
|
|
|
int numtags;
|
2013-07-14 12:22:51 +00:00
|
|
|
md3tag_t *ofstags;
|
2013-06-23 02:17:02 +00:00
|
|
|
} galiasinfo_t;
|
|
|
|
|
2011-12-23 03:12:29 +00:00
|
|
|
float *Alias_GetBonePositions(galiasinfo_t *inf, framestate_t *fstate, float *buffer, int buffersize, qboolean renderable);
|
2009-01-16 01:24:57 +00:00
|
|
|
#ifdef SKELETALMODELS
|
2010-03-14 14:35:56 +00:00
|
|
|
void Alias_TransformVerticies(float *bonepose, galisskeletaltransforms_t *weights, int numweights, vecV_t *xyzout, vec3_t *normout);
|
2009-01-16 01:24:57 +00:00
|
|
|
#endif
|
2013-04-06 03:36:00 +00:00
|
|
|
qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, int surfnum, entity_t *e, qboolean allowskel);
|
2011-07-30 14:14:56 +00:00
|
|
|
void Alias_FlushCache(void);
|
2012-07-05 19:42:36 +00:00
|
|
|
void Alias_Shutdown(void);
|
2013-10-29 17:38:22 +00:00
|
|
|
void Alias_Register(void);
|
2008-11-09 22:29:28 +00:00
|
|
|
|
2008-12-23 02:55:20 +00:00
|
|
|
void Mod_DoCRC(model_t *mod, char *buffer, int buffersize);
|
|
|
|
|
2013-10-29 17:38:22 +00:00
|
|
|
qboolean QDECL Mod_LoadHLModel (model_t *mod, void *buffer);
|
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
|
|
|
#ifdef MAP_PROC
|
|
|
|
qboolean Mod_LoadMap_Proc(model_t *mode, void *buffer);
|
|
|
|
#endif
|
2009-11-04 21:16:50 +00:00
|
|
|
|
|
|
|
void Mod_AccumulateTextureVectors(vecV_t *vc, vec2_t *tc, vec3_t *nv, vec3_t *sv, vec3_t *tv, index_t *idx, int numidx);
|
|
|
|
void Mod_AccumulateMeshTextureVectors(mesh_t *mesh);
|
|
|
|
void Mod_NormaliseTextureVectors(vec3_t *n, vec3_t *s, vec3_t *t, int v);
|