Fix can't compile android/iOS projects due to PickedPosRenderer.c having been renamed to SelOutlineRenderer.c, less warnings when compiling with modern gcc

This commit is contained in:
UnknownShadow200 2024-01-15 18:19:59 +11:00
parent 6f41df9926
commit 9f1eeb4a20
7 changed files with 18 additions and 17 deletions

View file

@ -47,7 +47,7 @@ add_library(classicube SHARED
../../src/Vorbis.c
../../src/Protocol.c
../../src/World.c
../../src/PickedPosRenderer.c
../../src/SelOutlineRenderer.c
../../src/Platform_Posix.c
../../src/Platform_Android.c
../../src/LScreens.c

View file

@ -106,7 +106,7 @@ TODO: explain multiple backends for some Modules
|EnvRenderer|Renders environment of the world (clouds, sky, skybox, world sides/edges, etc)
|HeldBlockRenderer|Renders the block currently being held in bottom right corner
|MapRenderer|Renders the blocks of the world by diving it into chunks, and manages sorting/updating these chunks
|PickedPosRenderer|Renders an outline around the block currently being looked at
|SelOutlineRenderer|Renders an outline around the block currently being looked at
|SelectionBox|Renders and stores selection boxes
## Texture pack modules

View file

@ -69,7 +69,7 @@
9A89D57E27F802F600FF3F80 /* Resources.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4BE27F802F600FF3F80 /* Resources.c */; };
9A89D57F27F802F600FF3F80 /* LWeb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4C427F802F600FF3F80 /* LWeb.c */; };
9A89D58027F802F600FF3F80 /* Formats.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4C627F802F600FF3F80 /* Formats.c */; };
9A89D58127F802F600FF3F80 /* PickedPosRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4C927F802F600FF3F80 /* PickedPosRenderer.c */; };
9A89D58127F802F600FF3F80 /* SelOutlineRenderer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4C927F802F600FF3F80 /* SelOutlineRenderer.c */; };
9A89D58327F802F600FF3F80 /* EntityComponents.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4CC27F802F600FF3F80 /* EntityComponents.c */; };
9A89D58427F802F600FF3F80 /* Camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4CF27F802F600FF3F80 /* Camera.c */; };
9A89D58627F802F600FF3F80 /* Screens.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A89D4D127F802F600FF3F80 /* Screens.c */; };
@ -153,7 +153,7 @@
9A89D4BE27F802F600FF3F80 /* Resources.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Resources.c; sourceTree = "<group>"; };
9A89D4C427F802F600FF3F80 /* LWeb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LWeb.c; sourceTree = "<group>"; };
9A89D4C627F802F600FF3F80 /* Formats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Formats.c; sourceTree = "<group>"; };
9A89D4C927F802F600FF3F80 /* PickedPosRenderer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PickedPosRenderer.c; sourceTree = "<group>"; };
9A89D4C927F802F600FF3F80 /* SelOutlineRenderer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SelOutlineRenderer.c; sourceTree = "<group>"; };
9A89D4CC27F802F600FF3F80 /* EntityComponents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = EntityComponents.c; sourceTree = "<group>"; };
9A89D4CF27F802F600FF3F80 /* Camera.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Camera.c; sourceTree = "<group>"; };
9A89D4D127F802F600FF3F80 /* Screens.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Screens.c; sourceTree = "<group>"; };
@ -263,7 +263,7 @@
9A89D39C27F802F500FF3F80 /* PackedCol.c */,
9A89D39B27F802F500FF3F80 /* Particle.c */,
9A89D49B27F802F600FF3F80 /* Physics.c */,
9A89D4C927F802F600FF3F80 /* PickedPosRenderer.c */,
9A89D4C927F802F600FF3F80 /* SelOutlineRenderer.c */,
9A89D4AA27F802F600FF3F80 /* Picking.c */,
9A89D39227F802F500FF3F80 /* Platform_Posix.c */,
9A89D48127F802F600FF3F80 /* Program.c */,
@ -373,7 +373,7 @@
9A89D58D27F802F600FF3F80 /* Options.c in Sources */,
9A89D57927F802F600FF3F80 /* Event.c in Sources */,
9A89D55B27F802F600FF3F80 /* _type1.c in Sources */,
9A89D58127F802F600FF3F80 /* PickedPosRenderer.c in Sources */,
9A89D58127F802F600FF3F80 /* SelOutlineRenderer.c in Sources */,
9A89D56027F802F600FF3F80 /* _ftbitmap.c in Sources */,
9A89D50327F802F600FF3F80 /* Platform_Posix.c in Sources */,
9A89D58027F802F600FF3F80 /* Formats.c in Sources */,

View file

@ -341,10 +341,10 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
cc_result res;
/* header variables */
static const cc_uint32 samplesPerPixel[7] = { 1, 0, 3, 1, 2, 0, 4 };
cc_uint8 col, bitsPerSample, bytesPerPixel;
Png_RowExpander rowExpander;
cc_uint32 scanlineSize, scanlineBytes;
static const cc_uint8 samplesPerPixel[] = { 1, 0, 3, 1, 2, 0, 4 };
cc_uint8 col, bitsPerSample, bytesPerPixel = 0;
Png_RowExpander rowExpander = NULL;
cc_uint32 scanlineSize = 0, scanlineBytes = 0;
/* palette data */
BitmapCol trnsCol;

View file

@ -899,8 +899,8 @@ static cc_result HttpClient_Process(struct HttpClientState* state, char* buffer,
#define INPUT_BUFFER_LEN 8192
static cc_result HttpClient_ParseResponse(struct HttpClientState* state) {
struct HttpRequest* req = state->req;
char buffer[INPUT_BUFFER_LEN];
char* dst;
cc_uint8 buffer[INPUT_BUFFER_LEN];
cc_uint8* dst;
cc_uint32 total;
cc_result res;
@ -915,9 +915,10 @@ static cc_result HttpClient_ParseResponse(struct HttpClientState* state) {
/* When there is more than INPUT_BUFFER_LEN bytes of unread data/content, */
/* there is no need to run the HTTP client state machine - just read directly */
/* into the output buffer to avoid a pointless Mem_Copy call */
Http_BufferExpanded(req, total); state->dataLeft -= total;
Http_BufferExpanded(req, total);
state->dataLeft -= total;
} else {
res = HttpClient_Process(state, buffer, total);
res = HttpClient_Process(state, (char*)buffer, total);
}
if (res) return res;

View file

@ -112,7 +112,7 @@ void SelOutlineRenderer_Render(struct RayTracer* selected, cc_bool dirty) {
/*########################################################################################################################*
*-----------------------------------------------PickedPosRenderer component-----------------------------------------------*
*-----------------------------------------------SelOutlineRenderer component----------------------------------------------*
*#########################################################################################################################*/
static void OnContextLost(void* obj) {
Gfx_DeleteDynamicVb(&selOutline_vb);

View file

@ -1,5 +1,5 @@
#ifndef CC_PICKEDPOSRENDERER_H
#define CC_PICKEDPOSRENDERER_H
#ifndef CC_SELOUTLINERENDERER_H
#define CC_SELOUTLINERENDERER_H
#include "Core.h"
/* Renders an outline around the block the player is looking at.
Copyright 2014-2023 ClassiCube | Licensed under BSD-3