Add -Wall and -Werror

to follow android compiler
This commit is contained in:
Nikola Petrov 2024-03-03 23:09:37 +01:00
parent 1755c18496
commit acb478f970
3 changed files with 6 additions and 5 deletions

View File

@ -5,8 +5,6 @@ RAYOBJECTS= obj/rcore.o obj/rshapes.o obj/rtextures.o obj/rtext.o obj/utils.o ob
#RAYOPT= -O3
RAYOPT= -ggdb
CFLAGS= -std=c++23
all: setup main run
setup:
@ -44,6 +42,8 @@ SRCDIR = src
OBJDIR = obj
INCLUDE = -Iinc
CFLAGS= -std=c++23 -Wall -Werror
SOURCES = $(wildcard $(SRCDIR)/*.cpp)
OBJECTS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SOURCES))

View File

@ -3,7 +3,7 @@
int main(void)
{
char *name = "treender";
char name[] = "treender";
int screenWidth = 800;
int screenHeight = 800;
@ -20,7 +20,7 @@ int main(void)
tree.newTree();
int yPos = (screenHeight - screenWidth) / 2;
Rectangle dest = {yPos, 0, screenWidth, screenWidth};
Rectangle dest = {0, (float)yPos, (float)screenWidth, (float)screenWidth};
float rotation = 0.0f;
while (!WindowShouldClose())
{
@ -29,6 +29,7 @@ int main(void)
tree.newTree();
}
BeginDrawing();
ClearBackground(WHITE);
tree.draw(dest, rotation);
EndDrawing();
}

View File

@ -82,7 +82,7 @@ void Tree::drawBranch()
void Tree::drawTree()
{
draw_calls.push_back((DrawArgs){start, 0, size / 4, 1});
draw_calls.push_back((DrawArgs){start, 0, (float)size / 4, 1});
while (!draw_calls.empty())
{