From 10cd24c9e5da615064c782effafc7477bf074054 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 17 Jul 2025 16:43:29 -0700 Subject: Use C23 --- src/backend.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/backend.c') 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) { IsoBackend* backend = calloc(1, sizeof(IsoBackend)); if (!backend) { - return 0; + return nullptr; } - if (!(backend->gfx = gfx_init())) { + if (!((backend->gfx = gfx_init()))) { goto cleanup; } GfxCore* gfxcore = gfx_get_core(backend->gfx); @@ -47,14 +47,14 @@ IsoBackend* iso_backend_init(const IsoGfx* iso) { int screen_width, screen_height; isogfx_get_screen_size(iso, &screen_width, &screen_height); - if (!(backend->screen_texture = gfx_make_texture( - gfxcore, &(TextureDesc){.width = screen_width, - .height = screen_height, - .dimension = Texture2D, - .format = TextureSRGBA8, - .filtering = NearestFiltering, - .wrap = ClampToEdge, - .mipmaps = false}))) { + if (!((backend->screen_texture = gfx_make_texture( + gfxcore, &(TextureDesc){.width = screen_width, + .height = screen_height, + .dimension = Texture2D, + .format = TextureSRGBA8, + .filtering = NearestFiltering, + .wrap = ClampToEdge, + .mipmaps = false})))) { goto cleanup; } @@ -75,7 +75,7 @@ IsoBackend* iso_backend_init(const IsoGfx* iso) { .name = sstring_make("Texture")}; Material* material = gfx_make_material(&material_desc); if (!material) { - return false; + return nullptr; } const MeshDesc mesh_desc = @@ -92,7 +92,7 @@ cleanup: gfx_destroy(&backend->gfx); } free(backend); - return 0; + return nullptr; } void iso_backend_shutdown(IsoBackend** ppApp) { -- cgit v1.2.3