Fix the sprite model loader for plugins.

This commit is contained in:
Bill Currie 2012-02-23 13:18:59 +09:00
parent cbdbfdd12f
commit 1d864521e9
11 changed files with 13 additions and 5 deletions

View file

@ -447,7 +447,6 @@ void *Mod_LoadAliasFrame (void *pin, int *posenum, maliasframedesc_t *frame,
int extra);
void *Mod_LoadAliasGroup (void *pin, int *posenum, maliasframedesc_t *frame,
int extra);
void Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum);
void Mod_LoadBrushModel (model_t *mod, void *buffer);
void Mod_FloodFillSkin (byte * skin, int skinwidth, int skinheight);

View file

@ -95,6 +95,7 @@ typedef struct vid_model_funcs_s {
void (*Mod_FinalizeAliasModel) (model_t *m, aliashdr_t *hdr);
void (*Mod_LoadExternalSkins) (model_t * mod);
int alias_cache;
void (*Mod_SpriteLoadTexture) (mspriteframe_t *pspriteframe, int framenum);
struct skin_s *(*Skin_SetColormap) (struct skin_s *skin, int cmap);
struct skin_s *(*Skin_SetSkin) (struct skin_s *skin, int cmap,

View file

@ -43,6 +43,10 @@ void sw_Mod_LoadLighting (bsp_t *bsp);
void sw_Mod_SubdivideSurface (msurface_t *fa);
void sw_Mod_ProcessTexture(texture_t *tx);
void gl_Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum);
void glsl_Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum);
void sw_Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum);
void Mod_LoadAliasModel (model_t *mod, void *buffer,
cache_allocator_t allocator);
void Mod_LoadSpriteModel (model_t *mod, void *buffer);

View file

@ -47,7 +47,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "mod_internal.h"
void
Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum)
gl_Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum)
{
tex_t *targa;
const char *name;

View file

@ -73,7 +73,7 @@ glsl_sprite_clear (model_t *m)
}
void
Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum)
glsl_Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum)
{
const char *name;

View file

@ -75,7 +75,7 @@ Mod_LoadSpriteFrame (void *pin, mspriteframe_t **ppframe, int framenum)
memcpy (pspriteframe->pixels, (byte *) (pinframe + 1), size);
Mod_SpriteLoadTexture (pspriteframe, framenum);
m_funcs->Mod_SpriteLoadTexture (pspriteframe, framenum);
return (void *) ((byte *) pinframe + sizeof (dspriteframe_t) + size);
}

View file

@ -34,6 +34,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "mod_internal.h"
void
Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum)
sw_Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum)
{
}

View file

@ -53,6 +53,7 @@ static vid_model_funcs_t model_funcs = {
gl_Mod_FinalizeAliasModel,
gl_Mod_LoadExternalSkins,
1,
gl_Mod_SpriteLoadTexture,
Skin_SetColormap,
Skin_SetSkin,

View file

@ -53,6 +53,7 @@ static vid_model_funcs_t model_funcs = {
glsl_Mod_FinalizeAliasModel,
glsl_Mod_LoadExternalSkins,
0,
glsl_Mod_SpriteLoadTexture,
Skin_SetColormap,
Skin_SetSkin,

View file

@ -48,6 +48,7 @@ static vid_model_funcs_t model_funcs = {
sw_Mod_FinalizeAliasModel,
sw_Mod_LoadExternalSkins,
1,
sw_Mod_SpriteLoadTexture,
Skin_SetColormap,
Skin_SetSkin,

View file

@ -53,6 +53,7 @@ static vid_model_funcs_t model_funcs = {
sw_Mod_FinalizeAliasModel,
sw_Mod_LoadExternalSkins,
1,
sw_Mod_SpriteLoadTexture,
Skin_SetColormap,
Skin_SetSkin,