diff options
| author | 3gg <3gg@shellblade.net> | 2025-07-17 16:43:29 -0700 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-07-17 16:43:29 -0700 |
| commit | 10cd24c9e5da615064c782effafc7477bf074054 (patch) | |
| tree | 4fb371e9be9d66f27915a92f11afa2b8c9a1291e /src | |
| parent | 18e0598ad1e664f7dfd0bb077a50ee45101a9ce8 (diff) | |
Use C23
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend.c | 24 |
1 files changed, 12 insertions, 12 deletions
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) { |
