diff options
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/backend.c | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e4a677d..42d2502 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) | |||
| 2 | 2 | ||
| 3 | project(isogfx) | 3 | project(isogfx) |
| 4 | 4 | ||
| 5 | set(CMAKE_C_STANDARD 17) | 5 | set(CMAKE_C_STANDARD 23) |
| 6 | set(CMAKE_C_STANDARD_REQUIRED On) | 6 | set(CMAKE_C_STANDARD_REQUIRED On) |
| 7 | set(CMAKE_C_EXTENSIONS Off) | 7 | set(CMAKE_C_EXTENSIONS Off) |
| 8 | 8 | ||
diff --git a/src/backend.c b/src/backend.c index 567146f..94f1728 100644 --- a/src/backend.c +++ b/src/backend.c | |||
| @@ -36,10 +36,10 @@ IsoBackend* iso_backend_init(const IsoGfx* iso) { | |||
| 36 | 36 | ||
| 37 | IsoBackend* backend = calloc(1, sizeof(IsoBackend)); | 37 | IsoBackend* backend = calloc(1, sizeof(IsoBackend)); |
| 38 | if (!backend) { | 38 | if (!backend) { |
| 39 | return 0; | 39 | return nullptr; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | if (!(backend->gfx = gfx_init())) { | 42 | if (!((backend->gfx = gfx_init()))) { |
| 43 | goto cleanup; | 43 | goto cleanup; |
| 44 | } | 44 | } |
| 45 | GfxCore* gfxcore = gfx_get_core(backend->gfx); | 45 | GfxCore* gfxcore = gfx_get_core(backend->gfx); |
| @@ -47,14 +47,14 @@ IsoBackend* iso_backend_init(const IsoGfx* iso) { | |||
| 47 | int screen_width, screen_height; | 47 | int screen_width, screen_height; |
| 48 | isogfx_get_screen_size(iso, &screen_width, &screen_height); | 48 | isogfx_get_screen_size(iso, &screen_width, &screen_height); |
| 49 | 49 | ||
| 50 | if (!(backend->screen_texture = gfx_make_texture( | 50 | if (!((backend->screen_texture = gfx_make_texture( |
| 51 | gfxcore, &(TextureDesc){.width = screen_width, | 51 | gfxcore, &(TextureDesc){.width = screen_width, |
| 52 | .height = screen_height, | 52 | .height = screen_height, |
| 53 | .dimension = Texture2D, | 53 | .dimension = Texture2D, |
| 54 | .format = TextureSRGBA8, | 54 | .format = TextureSRGBA8, |
| 55 | .filtering = NearestFiltering, | 55 | .filtering = NearestFiltering, |
| 56 | .wrap = ClampToEdge, | 56 | .wrap = ClampToEdge, |
| 57 | .mipmaps = false}))) { | 57 | .mipmaps = false})))) { |
| 58 | goto cleanup; | 58 | goto cleanup; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| @@ -75,7 +75,7 @@ IsoBackend* iso_backend_init(const IsoGfx* iso) { | |||
| 75 | .name = sstring_make("Texture")}; | 75 | .name = sstring_make("Texture")}; |
| 76 | Material* material = gfx_make_material(&material_desc); | 76 | Material* material = gfx_make_material(&material_desc); |
| 77 | if (!material) { | 77 | if (!material) { |
| 78 | return false; | 78 | return nullptr; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | const MeshDesc mesh_desc = | 81 | const MeshDesc mesh_desc = |
| @@ -92,7 +92,7 @@ cleanup: | |||
| 92 | gfx_destroy(&backend->gfx); | 92 | gfx_destroy(&backend->gfx); |
| 93 | } | 93 | } |
| 94 | free(backend); | 94 | free(backend); |
| 95 | return 0; | 95 | return nullptr; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void iso_backend_shutdown(IsoBackend** ppApp) { | 98 | void iso_backend_shutdown(IsoBackend** ppApp) { |
