{gl1,gl3,soft}_model.c fix const parameters

This commit is contained in:
Denis Pauk 2022-09-25 23:03:12 +03:00
parent ae13c7e034
commit e01e5273f8
5 changed files with 11 additions and 11 deletions

View File

@ -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)

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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);
}
}