From 7288bdd42360109f26a684431fa286ea265d07a4 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 21 May 2025 23:32:50 +0200 Subject: Remove util.* for the liblog --- src/main/game/cell.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main/game/cell.c') diff --git a/src/main/game/cell.c b/src/main/game/cell.c index 892dd47..53d051a 100644 --- a/src/main/game/cell.c +++ b/src/main/game/cell.c @@ -19,15 +19,26 @@ #include #include +#include #include "cell.h" -#include "../util.h" + +static Log *log = NULL; + +static void +init_log(void) +{ + if (log != NULL) return; + log = log_create("Cell"); +} Cell * cell_new(float left, float right, float top, float bottom) { + init_log(); + Cell *cell = malloc(sizeof(Cell)); if (cell == NULL) { - log_error("Error allocating memory for cell"); + log_error(log, "Error allocating memory for cell"); exit(EXIT_FAILURE); } cell->left = left; -- cgit v1.2.3