Skip to content

Commit

Permalink
Fixed some compiler warnings (Thanks dpeter99)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloMazzon committed Aug 24, 2024
1 parent 508e9d4 commit 61819f2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ run from the `shaders/` folder (requires Python).
Roadmap
=======
+ Sprite batching
+ Built-in imgui support
+ Better multi-threaded loading support
+ Soft shadows
Expand Down
2 changes: 1 addition & 1 deletion VK2D/Renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void vk2dRendererQuit() {
}

const char *vk2dHostInformation() {
return gHostMachineBuffer;
return (void*)gHostMachineBuffer;
}

void vk2dRendererWait() {
Expand Down
2 changes: 1 addition & 1 deletion VK2D/Util.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,4 @@ void vk2dSleep(double seconds) {
while ((SDL_GetPerformanceCounter() - start) / (double)SDL_GetPerformanceFrequency() < seconds) {
volatile int i = 0;
}
}
}
2 changes: 0 additions & 2 deletions VK2D/Validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ void vk2dValidationEnd() {
}

void vk2dValidationWriteHeader() {
VK2DRenderer gRenderer = vk2dRendererGetPointer();

if (gErrorFile != NULL) {
FILE *f = fopen(gErrorFile, "a");
if (f != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion examples/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
project(main)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wno-misleading-indentation")

# Vulkan and SDL2 (latest, since Vulkan support is fairly recent) are all that needed
find_package(Vulkan)
Expand Down
2 changes: 1 addition & 1 deletion examples/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int main(int argc, const char *argv[]) {
vk2dRendererLockCameras(testCamera);
vk2dDrawTexture(testSurface, -100, -100);
vk2dDrawPolygon(testPoly, 0, 0);
vk2dRendererDrawGeometry(SAMPLE_RECTANGLE, SAMPLE_RECTANGLE_VERTICES, 400, 400, false, 3, 1, 1, 0, 0, 0);
vk2dRendererDrawGeometry((void*)SAMPLE_RECTANGLE, SAMPLE_RECTANGLE_VERTICES, 400, 400, false, 3, 1, 1, 0, 0, 0);
vk2dDrawTexture(testTexture, 0, 0);
shaderFloat += delta * 5;
vk2dRendererDrawShader(shader, &shaderFloat, testTexture, 64, 64, 4 + 3 * xScale, 4 + 3 * yScale, rot, 8, 8, 0, 0, 16, 16);
Expand Down

0 comments on commit 61819f2

Please sign in to comment.