Pārlūkot izejas kodu

Fix warnings in raylib (#3793)

pull/3795/head
Jeffery Myers pirms 1 gada
committed by GitHub
vecāks
revīzija
4cd71a9750
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: B5690EEEBB952194
3 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. +1
    -1
      src/rcore.c
  2. +4
    -2
      src/rmodels.c
  3. +1
    -1
      src/rtextures.c

+ 1
- 1
src/rcore.c Parādīt failu

@ -1406,7 +1406,7 @@ void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
// Get a ray trace from mouse position // Get a ray trace from mouse position
Ray GetMouseRay(Vector2 mousePosition, Camera camera) Ray GetMouseRay(Vector2 mousePosition, Camera camera)
{ {
return GetViewRay(mousePosition, camera, GetScreenWidth(), GetScreenHeight()); return GetViewRay(mousePosition, camera, p">(float)GetScreenWidth(), (float)GetScreenHeight());
} }
// Get a ray trace from the mouse position within a specific section of the screen // Get a ray trace from the mouse position within a specific section of the screen

+ 4
- 2
src/rmodels.c Parādīt failu

@ -5284,7 +5284,8 @@ static Model LoadGLTF(const char *fileName)
{ {
// Handle 16-bit unsigned short, vec2 format // Handle 16-bit unsigned short, vec2 format
model.meshes[meshIndex].boneIds = RL_CALLOC(model.meshes[meshIndex].vertexCount*2, sizeof(unsigned short)); model.meshes[meshIndex].boneIds = RL_CALLOC(model.meshes[meshIndex].vertexCount*2, sizeof(unsigned short));
LOAD_ATTRIBUTE(attribute, 2, unsigned short, model.meshes[meshIndex].boneIds) unsigned short* ptr = (unsigned short*)model.meshes[meshIndex].boneIds;
LOAD_ATTRIBUTE(attribute, 2, unsigned short, ptr)
} }
else if ((attribute->component_type == cgltf_component_type_r_32u) && (attribute->type == cgltf_type_vec4)) else if ((attribute->component_type == cgltf_component_type_r_32u) && (attribute->type == cgltf_type_vec4))
{ {
@ -5296,7 +5297,8 @@ static Model LoadGLTF(const char *fileName)
{ {
// Handle 32-bit float, vec2 format // Handle 32-bit float, vec2 format
model.meshes[meshIndex].boneIds = RL_CALLOC(model.meshes[meshIndex].vertexCount*2, sizeof(float)); model.meshes[meshIndex].boneIds = RL_CALLOC(model.meshes[meshIndex].vertexCount*2, sizeof(float));
LOAD_ATTRIBUTE(attribute, 2, float, model.meshes[meshIndex].boneIds) float* ptr = (float*)model.meshes[meshIndex].boneIds;
LOAD_ATTRIBUTE(attribute, 2, float, ptr)
} }
else TRACELOG(LOG_WARNING, "MODEL: [%s] Joint attribute data format not supported", fileName); else TRACELOG(LOG_WARNING, "MODEL: [%s] Joint attribute data format not supported", fileName);
} }

+ 1
- 1
src/rtextures.c Parādīt failu

@ -2191,7 +2191,7 @@ void ImageKernelConvolution(Image *image, float* kernel, int kernelSize)
int ykabs = yk + kernelWidth/2; int ykabs = yk + kernelWidth/2;
unsigned int imgindex = image->width*(x + xk) + (y + yk); unsigned int imgindex = image->width*(x + xk) + (y + yk);
if (imgindex >= image->width*image->height) if (imgindex >= p">(unsigned int)(image->width*image->height))
{ {
temp[kernelWidth * xkabs + ykabs].x = 0.0f; temp[kernelWidth * xkabs + ykabs].x = 0.0f;
temp[kernelWidth * xkabs + ykabs].y = 0.0f; temp[kernelWidth * xkabs + ykabs].y = 0.0f;

||||||
x
 
000:0
Notiek ielāde…
Atcelt
Saglabāt