diff --git a/src/common/header/ref_shared.h b/src/common/header/ref_shared.h index e94a1c6..6476edf 100644 --- a/src/common/header/ref_shared.h +++ b/src/common/header/ref_shared.h @@ -85,6 +85,21 @@ extern const byte* Mod_DecompressVis(const byte *in, int row); /* Shared models struct */ +enum { + SIDE_FRONT = 0, + SIDE_BACK = 1, + SIDE_ON = 2 +}; + +// FIXME: differentiate from texinfo SURF_ flags +enum { + SURF_PLANEBACK = 0x02, + SURF_DRAWSKY = 0x04, // sky brush face + SURF_DRAWTURB = 0x10, + SURF_DRAWBACKGROUND = 0x40, + SURF_UNDERWATER = 0x80 +}; + typedef struct mvertex_s { vec3_t position; @@ -99,7 +114,6 @@ typedef struct medge_s typedef struct mtexinfo_s { float vecs[2][4]; - float mipadjust; /* FIXME: Used only by soft render */ int flags; int numframes; struct mtexinfo_s *next; /* animation chain */ diff --git a/src/vk/header/model.h b/src/vk/header/model.h index d459708..67a9300 100644 --- a/src/vk/header/model.h +++ b/src/vk/header/model.h @@ -41,10 +41,6 @@ BRUSH MODELS // // in memory representation // -typedef struct -{ - vec3_t position; -} mvertex_t; #define SIDE_FRONT 0 @@ -58,21 +54,6 @@ typedef struct #define SURF_DRAWBACKGROUND 0x40 #define SURF_UNDERWATER 0x80 -typedef struct -{ - unsigned short v[2]; - unsigned int cachededgeoffset; -} medge_t; - -typedef struct mtexinfo_s -{ - float vecs[2][4]; - int flags; - int numframes; - struct mtexinfo_s *next; // animation chain - image_t *image; -} mtexinfo_t; - #define VERTEXSIZE 7 typedef struct vkpoly_s diff --git a/src/vk/vk_draw.c b/src/vk/vk_draw.c index c620e0e..063b248 100644 --- a/src/vk/vk_draw.c +++ b/src/vk/vk_draw.c @@ -31,7 +31,7 @@ Draw_InitLocal */ void Draw_InitLocal (void) { - draw_chars = FindPic ("conchars", (findimage_t)Vk_FindImage); + draw_chars = R_FindPic ("conchars", (findimage_t)Vk_FindImage); if (!draw_chars) { ri.Sys_Error(ERR_FATAL, "%s: Couldn't load pics/conchars.pcx", @@ -86,7 +86,7 @@ RE_Draw_FindPic */ image_t *RE_Draw_FindPic (char *name) { - return FindPic(name, (findimage_t)Vk_FindImage); + return R_FindPic(name, (findimage_t)Vk_FindImage); } /* @@ -98,7 +98,7 @@ void RE_Draw_GetPicSize (int *w, int *h, char *name) { image_t *image; - image = FindPic(name, (findimage_t)Vk_FindImage); + image = R_FindPic(name, (findimage_t)Vk_FindImage); if (!image) { *w = *h = -1; @@ -121,7 +121,7 @@ void RE_Draw_StretchPic (int x, int y, int w, int h, char *name) if (!vk_frameStarted) return; - vk = FindPic(name, (findimage_t)Vk_FindImage); + vk = R_FindPic(name, (findimage_t)Vk_FindImage); if (!vk) { R_Printf(PRINT_ALL, "%s(): Can't find pic: %s\n", __func__, name); @@ -144,7 +144,7 @@ void RE_Draw_PicScaled (int x, int y, char *name, float scale) { image_t *vk; - vk = FindPic(name, (findimage_t)Vk_FindImage); + vk = R_FindPic(name, (findimage_t)Vk_FindImage); if (!vk) { R_Printf(PRINT_ALL, "%s(): Can't find pic: %s\n", __func__, name); @@ -169,7 +169,7 @@ void RE_Draw_TileClear (int x, int y, int w, int h, char *name) if (!vk_frameStarted) return; - image = FindPic(name, (findimage_t)Vk_FindImage); + image = R_FindPic(name, (findimage_t)Vk_FindImage); if (!image) { R_Printf(PRINT_ALL, "%s(): Can't find pic: %s\n", __func__, name); diff --git a/src/vk/vk_image.c b/src/vk/vk_image.c index 748cbec..a17198d 100644 --- a/src/vk/vk_image.c +++ b/src/vk/vk_image.c @@ -1275,7 +1275,7 @@ Vk_FindImage (const char *name, imagetype_t type) // // load the pic from disk // - image = (image_t *)LoadImage(name, namewe, ext, type, + image = (image_t *)R_LoadImage(name, namewe, ext, type, r_retexturing->value, (loadimage_t)Vk_LoadPic); if (!image && r_validation->value > 0)