Add -Wall and -Werror
to follow android compiler
This commit is contained in:
parent
1755c18496
commit
acb478f970
4
Makefile
4
Makefile
@ -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))
|
||||
|
5
main.cpp
5
main.cpp
@ -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();
|
||||
}
|
||||
|
@ -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())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user