Skip to content

Commit

Permalink
snake_case scene_*()
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoskiv committed Nov 18, 2023
1 parent bcddc89 commit 5f2c0d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/api/c-ray.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,16 @@ void cr_destroy_renderer(struct cr_renderer *ext) {
struct cr_scene;

// Do we want multiple scenes anyway?
struct cr_scene *cr_scene_create(struct cr_renderer *r) {
(void)r;
return NULL;
struct cr_scene *cr_scene_create(struct cr_renderer *ext) {
if (!ext) return NULL;
struct renderer *r = (struct renderer *)ext;
return (struct cr_scene *)r->scene;
}

void cr_scene_destroy(struct cr_scene *s) {
//TODO
(void)s;
void cr_scene_destroy(struct cr_scene *ext) {
if (!ext) return;
struct world *s = (struct world *)ext;
scene_destroy(s);
}

struct cr_object;
Expand Down
2 changes: 1 addition & 1 deletion src/datatypes/scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "poly.h"

//Free scene data
void destroyScene(struct world *scene) {
void scene_destroy(struct world *scene) {
if (scene) {
camera_arr_free(&scene->cameras);
for (size_t i = 0; i < scene->meshes.count; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion src/datatypes/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ struct world {
float backgroundOffset;
};

void destroyScene(struct world *scene);
void scene_destroy(struct world *scene);

0 comments on commit 5f2c0d8

Please sign in to comment.