2012-02-14 12:25:19 +00:00
|
|
|
#ifndef __mod_internal_h
|
|
|
|
#define __mod_internal_h
|
|
|
|
|
2021-02-01 12:11:45 +00:00
|
|
|
#include "QF/darray.h"
|
2012-05-16 09:09:44 +00:00
|
|
|
#include "QF/iqm.h"
|
2012-02-14 12:25:19 +00:00
|
|
|
#include "QF/model.h"
|
|
|
|
#include "QF/skin.h"
|
2012-02-23 03:09:19 +00:00
|
|
|
#include "QF/plugin/vid_render.h"
|
|
|
|
|
2021-02-01 12:11:45 +00:00
|
|
|
typedef struct stvertset_s DARRAY_TYPE (stvert_t) stvertset_t;
|
|
|
|
typedef struct mtriangleset_s DARRAY_TYPE (mtriangle_t) mtriangleset_t;
|
|
|
|
typedef struct trivertxset_s DARRAY_TYPE (trivertx_t *) trivertxset_t;
|
|
|
|
|
|
|
|
typedef struct mod_alias_ctx_s {
|
|
|
|
aliashdr_t *header;
|
|
|
|
model_t *mod;
|
|
|
|
stvertset_t stverts;
|
|
|
|
mtriangleset_t triangles;
|
|
|
|
trivertxset_t poseverts;
|
|
|
|
int aliasbboxmins[3];
|
|
|
|
int aliasbboxmaxs[3];
|
|
|
|
|
|
|
|
} mod_alias_ctx_t;
|
|
|
|
|
2021-02-01 05:39:00 +00:00
|
|
|
int Mod_CalcFullbright (const byte *in, byte *out, int pixels);
|
|
|
|
void Mod_ClearFullbright (const byte *in, byte *out, int pixels);
|
|
|
|
void Mod_FloodFillSkin (byte *skin, int skinwidth, int skinheight);
|
|
|
|
//FIXME gl specific. rewrite to use above
|
|
|
|
int Mod_Fullbright (byte * skin, int width, int height, const char *name);
|
|
|
|
|
|
|
|
void Mod_LoadBrushModel (model_t *mod, void *buffer);
|
|
|
|
void Mod_FindClipDepth (hull_t *hull);
|
|
|
|
|
|
|
|
model_t *Mod_FindName (const char *name);
|
|
|
|
float RadiusFromBounds (const vec3_t mins, const vec3_t maxs) __attribute__((pure));
|
|
|
|
|
2021-01-19 09:15:05 +00:00
|
|
|
struct vulkan_ctx_s;
|
|
|
|
|
2012-02-23 03:09:19 +00:00
|
|
|
extern vid_model_funcs_t *m_funcs;
|
2012-02-14 12:25:19 +00:00
|
|
|
|
2021-02-01 12:11:45 +00:00
|
|
|
void gl_Mod_MakeAliasModelDisplayLists (mod_alias_ctx_t *alias_ctx, void *_m,
|
2012-02-23 03:55:50 +00:00
|
|
|
int _s, int extra);
|
2021-02-01 12:11:45 +00:00
|
|
|
void *gl_Mod_LoadSkin (mod_alias_ctx_t *alias_ctx, byte *skin, int skinsize,
|
|
|
|
int snum, int gnum, qboolean group,
|
|
|
|
maliasskindesc_t *skindesc);
|
|
|
|
void gl_Mod_FinalizeAliasModel (mod_alias_ctx_t *alias_ctx);
|
|
|
|
void gl_Mod_LoadExternalSkins (mod_alias_ctx_t *alias_ctx);
|
2012-05-14 14:02:06 +00:00
|
|
|
void gl_Mod_IQMFinish (model_t *mod);
|
2012-02-23 03:55:50 +00:00
|
|
|
|
2021-02-01 12:11:45 +00:00
|
|
|
void glsl_Mod_MakeAliasModelDisplayLists (mod_alias_ctx_t *alias_ctx,
|
2012-02-23 03:55:50 +00:00
|
|
|
void *_m, int _s, int extra);
|
2021-02-01 12:11:45 +00:00
|
|
|
void *glsl_Mod_LoadSkin (mod_alias_ctx_t *alias_ctx, byte *skin, int skinsize,
|
|
|
|
int snum, int gnum, qboolean group,
|
|
|
|
maliasskindesc_t *skindesc);
|
|
|
|
void glsl_Mod_FinalizeAliasModel (mod_alias_ctx_t *alias_ctx);
|
|
|
|
void glsl_Mod_LoadExternalSkins (mod_alias_ctx_t *alias_ctx);
|
2012-05-14 14:02:06 +00:00
|
|
|
void glsl_Mod_IQMFinish (model_t *mod);
|
2012-02-23 03:55:50 +00:00
|
|
|
|
2021-02-01 12:11:45 +00:00
|
|
|
void sw_Mod_MakeAliasModelDisplayLists (mod_alias_ctx_t *alias_ctx, void *_m,
|
2012-02-23 03:55:50 +00:00
|
|
|
int _s, int extra);
|
2021-02-01 12:11:45 +00:00
|
|
|
void *sw_Mod_LoadSkin (mod_alias_ctx_t *alias_ctx, byte *skin, int skinsize,
|
|
|
|
int snum, int gnum, qboolean group,
|
|
|
|
maliasskindesc_t *skindesc);
|
2012-05-14 14:02:06 +00:00
|
|
|
void sw_Mod_IQMFinish (model_t *mod);
|
2012-02-23 03:55:50 +00:00
|
|
|
|
2021-02-01 05:39:00 +00:00
|
|
|
void gl_Mod_LoadLighting (model_t *mod, bsp_t *bsp);
|
|
|
|
void gl_Mod_SubdivideSurface (model_t *mod, msurface_t *fa);
|
|
|
|
void gl_Mod_ProcessTexture (model_t *mod, texture_t *tx);
|
2012-02-23 03:55:50 +00:00
|
|
|
|
2021-02-01 05:39:00 +00:00
|
|
|
void glsl_Mod_LoadLighting (model_t *mod, bsp_t *bsp);
|
|
|
|
void glsl_Mod_ProcessTexture (model_t *mod, texture_t *tx);
|
2012-02-23 03:55:50 +00:00
|
|
|
|
2021-02-01 05:39:00 +00:00
|
|
|
void sw_Mod_LoadLighting (model_t *mod, bsp_t *bsp);
|
2012-02-23 03:55:50 +00:00
|
|
|
|
2021-02-01 05:39:00 +00:00
|
|
|
void Vulkan_Mod_LoadLighting (model_t *mod, bsp_t *bsp,
|
|
|
|
struct vulkan_ctx_s *ctx);
|
|
|
|
void Vulkan_Mod_SubdivideSurface (model_t *mod, msurface_t *fa,
|
|
|
|
struct vulkan_ctx_s *ctx);
|
|
|
|
void Vulkan_Mod_ProcessTexture (model_t *mod, texture_t *tx,
|
|
|
|
struct vulkan_ctx_s *ctx);
|
2021-01-19 09:15:05 +00:00
|
|
|
|
2021-02-01 05:39:00 +00:00
|
|
|
void gl_Mod_SpriteLoadTexture (model_t *mod, mspriteframe_t *pspriteframe,
|
|
|
|
int framenum);
|
|
|
|
void glsl_Mod_SpriteLoadTexture (model_t *mod, mspriteframe_t *pspriteframe,
|
|
|
|
int framenum);
|
|
|
|
void sw_Mod_SpriteLoadTexture (model_t *mod, mspriteframe_t *pspriteframe,
|
|
|
|
int framenum);
|
2012-02-23 04:18:59 +00:00
|
|
|
|
2012-04-27 05:40:06 +00:00
|
|
|
void Mod_LoadIQM (model_t *mod, void *buffer);
|
2012-05-16 09:09:44 +00:00
|
|
|
void Mod_FreeIQM (iqm_t *iqm);
|
2012-05-17 06:55:38 +00:00
|
|
|
iqmblend_t *Mod_IQMBuildBlendPalette (iqm_t *iqm, int *size);
|
2012-05-21 23:23:22 +00:00
|
|
|
void Mod_LoadAliasModel (model_t *mod, void *buffer,
|
2012-02-14 12:25:19 +00:00
|
|
|
cache_allocator_t allocator);
|
|
|
|
void Mod_LoadSpriteModel (model_t *mod, void *buffer);
|
|
|
|
|
|
|
|
void Skin_Init (void);
|
|
|
|
skin_t *Skin_SetColormap (skin_t *skin, int cmap);
|
|
|
|
skin_t *Skin_SetSkin (skin_t *skin, int cmap, const char *skinname);
|
|
|
|
void Skin_SetTranslation (int cmap, int top, int bottom);
|
2021-01-26 11:33:51 +00:00
|
|
|
int Skin_CalcTopColors (const byte *in, byte *out, int pixels);
|
|
|
|
int Skin_CalcBottomColors (const byte *in, byte *out, int pixels);
|
|
|
|
void Skin_ClearTopColors (const byte *in, byte *out, int pixels);
|
|
|
|
void Skin_ClearBottomColors (const byte *in, byte *out, int pixels);
|
2012-02-23 03:09:19 +00:00
|
|
|
|
|
|
|
void sw_Skin_SetupSkin (skin_t *skin, int cmap);
|
|
|
|
void sw_Skin_ProcessTranslation (int cmap, const byte *translation);
|
|
|
|
void sw_Skin_InitTranslations (void);
|
|
|
|
|
|
|
|
void glsl_Skin_SetupSkin (skin_t *skin, int cmap);
|
|
|
|
void glsl_Skin_ProcessTranslation (int cmap, const byte *translation);
|
|
|
|
void glsl_Skin_InitTranslations (void);
|
|
|
|
|
|
|
|
void gl_Skin_SetupSkin (skin_t *skin, int cmap);
|
|
|
|
void gl_Skin_ProcessTranslation (int cmap, const byte *translation);
|
|
|
|
void gl_Skin_InitTranslations (void);
|
|
|
|
int gl_Skin_Init_Textures (int base);
|
|
|
|
void gl_Skin_SetPlayerSkin (int width, int height, const byte *data);
|
2012-02-14 12:25:19 +00:00
|
|
|
#endif// __mod_internal_h
|