diff --git a/src/client/refresh/files/stb.c b/src/client/refresh/files/stb.c index 2e75468e..226416f5 100644 --- a/src/client/refresh/files/stb.c +++ b/src/client/refresh/files/stb.c @@ -96,7 +96,7 @@ LoadSTB(const char *origname, const char* type, byte **pic, int *width, int *hei } qboolean -ResizeSTB(byte *input_pixels, int input_width, int input_height, +ResizeSTB(const byte *input_pixels, int input_width, int input_height, byte *output_pixels, int output_width, int output_height) { if (stbir_resize_uint8(input_pixels, input_width, input_height, 0, @@ -223,7 +223,7 @@ SmoothColorImage(unsigned *dst, size_t size, size_t rstep) /* https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms */ void -scale2x(byte *src, byte *dst, int width, int height) +scale2x(const byte *src, byte *dst, int width, int height) { /* EPX/Scale2×/AdvMAME2× @@ -239,7 +239,7 @@ scale2x(byte *src, byte *dst, int width, int height) IF B==D AND B!=A AND D!=C => 4=D */ { - byte *in_buff = src; + const byte *in_buff = src; byte *out_buff = dst; byte *out_buff_full = dst + ((width * height) << 2); while (out_buff < out_buff_full) @@ -304,7 +304,7 @@ scale2x(byte *src, byte *dst, int width, int height) } void -scale3x(byte *src, byte *dst, int width, int height) +scale3x(const byte *src, byte *dst, int width, int height) { /* Scale3×/AdvMAME3× and ScaleFX @@ -326,7 +326,7 @@ scale3x(byte *src, byte *dst, int width, int height) IF F==H AND F!=B AND H!=D => 9=F */ { - byte *in_buff = src; + const byte *in_buff = src; byte *out_buff = dst; byte *out_buff_full = dst + ((width * height) * 9); while (out_buff < out_buff_full) diff --git a/src/client/refresh/gl1/gl1_model.c b/src/client/refresh/gl1/gl1_model.c index f98f4b6c..948e95a9 100644 --- a/src/client/refresh/gl1/gl1_model.c +++ b/src/client/refresh/gl1/gl1_model.c @@ -210,7 +210,7 @@ Mod_SP2Fixup(model_t *mod, const dsprite_t *sprout) /* byte swap everything */ for (i = 0; i < sprout->numframes; i++) { - mod->skins[i] = R_FindImage(sprout->frames[i].name, + mod->skins[i] = R_FindImage((char *)sprout->frames[i].name, it_sprite); } } diff --git a/src/client/refresh/gl3/gl3_model.c b/src/client/refresh/gl3/gl3_model.c index 643d88ec..51b4d430 100644 --- a/src/client/refresh/gl3/gl3_model.c +++ b/src/client/refresh/gl3/gl3_model.c @@ -1009,7 +1009,7 @@ Mod_SP2Fixup(gl3model_t *mod, const dsprite_t *sprout) /* byte swap everything */ for (i = 0; i < sprout->numframes; i++) { - mod->skins[i] = GL3_FindImage(sprout->frames[i].name, + mod->skins[i] = GL3_FindImage((char *)sprout->frames[i].name, it_sprite); } } diff --git a/src/client/refresh/ref_shared.h b/src/client/refresh/ref_shared.h index dcee1ad5..ee25566e 100644 --- a/src/client/refresh/ref_shared.h +++ b/src/client/refresh/ref_shared.h @@ -81,11 +81,11 @@ extern void LoadPCX(char *origname, byte **pic, byte **palette, int *width, int extern void GetPCXInfo(char *filename, int *width, int *height); extern qboolean LoadSTB(const char *origname, const char* type, byte **pic, int *width, int *height); -extern qboolean ResizeSTB(byte *input_pixels, int input_width, int input_height, +extern qboolean ResizeSTB(const byte *input_pixels, int input_width, int input_height, byte *output_pixels, int output_width, int output_height); extern void SmoothColorImage(unsigned *dst, size_t size, size_t rstep); -extern void scale2x(byte *src, byte *dst, int width, int height); -extern void scale3x(byte *src, byte *dst, int width, int height); +extern void scale2x(const byte *src, byte *dst, int width, int height); +extern void scale3x(const byte *src, byte *dst, int width, int height); extern void GetWalInfo(char *name, int *width, int *height); extern void GetM8Info(char *name, int *width, int *height); diff --git a/src/client/refresh/soft/sw_model.c b/src/client/refresh/soft/sw_model.c index 51cbba87..ddf8bb74 100644 --- a/src/client/refresh/soft/sw_model.c +++ b/src/client/refresh/soft/sw_model.c @@ -169,7 +169,7 @@ Mod_SP2Fixup(model_t *mod, const dsprite_t *sprout) /* byte swap everything */ for (i = 0; i < sprout->numframes; i++) { - mod->skins[i] = R_FindImage (sprout->frames[i].name, + mod->skins[i] = R_FindImage ((char *)sprout->frames[i].name, it_sprite); } }