summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend.c24
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
98void iso_backend_shutdown(IsoBackend** ppApp) { 98void iso_backend_shutdown(IsoBackend** ppApp) {