X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=model_sprite.c;h=acfac9f5a27cf8c8fd820a9989bd713e01070503;hb=963be2b0cd7efbeb2244efbb4cdc7684af1777fe;hp=23604f729e096ce5f2ec6c53ad680b07cfbe18d9;hpb=4498a86fd5db6f1066559fae990b648ddfe2df22;p=xonotic%2Fdarkplaces.git diff --git a/model_sprite.c b/model_sprite.c index 23604f72..acfac9f5 100644 --- a/model_sprite.c +++ b/model_sprite.c @@ -25,17 +25,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include "image.h" -cvar_t r_mipsprites = {CVAR_SAVE, "r_mipsprites", "1", "mipmaps sprites so they render faster in the distance and do not display noise artifacts"}; -cvar_t r_labelsprites_scale = {CVAR_SAVE, "r_labelsprites_scale", "1", "global scale to apply to label sprites before conversion to HUD coordinates"}; -cvar_t r_labelsprites_roundtopixels = {CVAR_SAVE, "r_labelsprites_roundtopixels", "1", "try to make label sprites sharper by rounding their size to 0.5x or 1x and by rounding their position to whole pixels if possible"}; -cvar_t r_overheadsprites_perspective = {CVAR_SAVE, "r_overheadsprites_perspective", "5", "fake perspective effect for SPR_OVERHEAD sprites"}; -cvar_t r_overheadsprites_pushback = {CVAR_SAVE, "r_overheadsprites_pushback", "15", "how far to pull the SPR_OVERHEAD sprites toward the eye (used to avoid intersections with 3D models)"}; -cvar_t r_overheadsprites_scalex = {CVAR_SAVE, "r_overheadsprites_scalex", "1", "additional scale for overhead sprites for x axis"}; -cvar_t r_overheadsprites_scaley = {CVAR_SAVE, "r_overheadsprites_scaley", "1", "additional scale for overhead sprites for y axis"}; -cvar_t r_track_sprites = {CVAR_SAVE, "r_track_sprites", "1", "track SPR_LABEL* sprites by putting them as indicator at the screen border to rotate to"}; -cvar_t r_track_sprites_flags = {CVAR_SAVE, "r_track_sprites_flags", "1", "1: Rotate sprites accordingly, 2: Make it a continuous rotation"}; -cvar_t r_track_sprites_scalew = {CVAR_SAVE, "r_track_sprites_scalew", "1", "width scaling of tracked sprites"}; -cvar_t r_track_sprites_scaleh = {CVAR_SAVE, "r_track_sprites_scaleh", "1", "height scaling of tracked sprites"}; +cvar_t r_mipsprites = {CVAR_CLIENT | CVAR_SAVE, "r_mipsprites", "1", "mipmaps sprites so they render faster in the distance and do not display noise artifacts"}; +cvar_t r_labelsprites_scale = {CVAR_CLIENT | CVAR_SAVE, "r_labelsprites_scale", "1", "global scale to apply to label sprites before conversion to HUD coordinates"}; +cvar_t r_labelsprites_roundtopixels = {CVAR_CLIENT | CVAR_SAVE, "r_labelsprites_roundtopixels", "1", "try to make label sprites sharper by rounding their size to 0.5x or 1x and by rounding their position to whole pixels if possible"}; +cvar_t r_overheadsprites_perspective = {CVAR_CLIENT | CVAR_SAVE, "r_overheadsprites_perspective", "5", "fake perspective effect for SPR_OVERHEAD sprites"}; +cvar_t r_overheadsprites_pushback = {CVAR_CLIENT | CVAR_SAVE, "r_overheadsprites_pushback", "15", "how far to pull the SPR_OVERHEAD sprites toward the eye (used to avoid intersections with 3D models)"}; +cvar_t r_overheadsprites_scalex = {CVAR_CLIENT | CVAR_SAVE, "r_overheadsprites_scalex", "1", "additional scale for overhead sprites for x axis"}; +cvar_t r_overheadsprites_scaley = {CVAR_CLIENT | CVAR_SAVE, "r_overheadsprites_scaley", "1", "additional scale for overhead sprites for y axis"}; +cvar_t r_track_sprites = {CVAR_CLIENT | CVAR_SAVE, "r_track_sprites", "1", "track SPR_LABEL* sprites by putting them as indicator at the screen border to rotate to"}; +cvar_t r_track_sprites_flags = {CVAR_CLIENT | CVAR_SAVE, "r_track_sprites_flags", "1", "1: Rotate sprites accordingly, 2: Make it a continuous rotation"}; +cvar_t r_track_sprites_scalew = {CVAR_CLIENT | CVAR_SAVE, "r_track_sprites_scalew", "1", "width scaling of tracked sprites"}; +cvar_t r_track_sprites_scaleh = {CVAR_CLIENT | CVAR_SAVE, "r_track_sprites_scaleh", "1", "height scaling of tracked sprites"}; /* =============== @@ -106,7 +106,7 @@ static void Mod_Sprite_SharedSetup(const unsigned char *datapointer, int version if (loadmodel->numframes < 1) Host_Error ("Mod_Sprite_SharedSetup: Invalid # of frames: %d", loadmodel->numframes); - // LordHavoc: hack to allow sprites to be non-fullbright + // LadyHavoc: hack to allow sprites to be non-fullbright fullbright = true; for (i = 0;i < MAX_QPATH && loadmodel->name[i];i++) if (loadmodel->name[i] == '!') @@ -235,7 +235,7 @@ static void Mod_Sprite_SharedSetup(const unsigned char *datapointer, int version } else //if (version == SPRITEHL_VERSION || version == SPRITE_VERSION) Image_Copy8bitBGRA(datapointer, pixels, width*height, palette ? palette : palette_bgra_transparent); - skinframe = R_SkinFrame_LoadInternalBGRA(name, texflags, pixels, width, height, false); + skinframe = R_SkinFrame_LoadInternalBGRA(name, texflags, pixels, width, height, 0, 0, 0, false); // texflags |= TEXF_COMPRESS; Mem_Free(pixels); } @@ -407,7 +407,7 @@ void Mod_IDS2_Load(dp_model_t *mod, void *buffer, void *bufferend) loadmodel->sprite.sprnum_type = SPR_VP_PARALLEL; loadmodel->synctype = ST_SYNC; - // LordHavoc: hack to allow sprites to be non-fullbright + // LadyHavoc: hack to allow sprites to be non-fullbright fullbright = true; for (i = 0;i < MAX_QPATH && loadmodel->name[i];i++) if (loadmodel->name[i] == '!') @@ -462,7 +462,7 @@ void Mod_IDS2_Load(dp_model_t *mod, void *buffer, void *bufferend) pinframe = &pinqsprite->frames[i]; if (!(skinframe = R_SkinFrame_LoadExternal(pinframe->name, texflags, false, false))) { - Con_Printf("Mod_IDS2_Load: failed to load %s", pinframe->name); + Con_Printf(CON_ERROR "Mod_IDS2_Load: failed to load %s", pinframe->name); skinframe = R_SkinFrame_LoadMissing(); } Mod_SpriteSetupTexture(&loadmodel->data_textures[i], skinframe, fullbright, false);