init engine

This commit is contained in:
NishiOwO 2025-03-26 17:36:13 +09:00
parent 1b4dbef38b
commit 8fc77c4d50
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
3 changed files with 25 additions and 1 deletions

View File

@ -1,5 +1,5 @@
TARGET = libnishbox.a
OBJS = version.o
OBJS = version.o core.o
include ../common.mk

11
engine/core.c Normal file
View File

@ -0,0 +1,11 @@
#include "nb_core.h"
#include <ode/ode.h>
void nb_engine_init(nb_engine_t* engine){
engine->world = dWorldCreate();
}
void nb_engine_destroy(nb_engine_t* engine){
dWorldDestroy(engine->world);
}

13
engine/nb_core.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef __NB_CORE_H__
#define __NB_CORE_H__
#include <ode/ode.h>
typedef struct nb_engine {
dWorldID world;
} nb_engine_t;
void nb_engine_init(nb_engine_t* engine);
void nb_engine_destroy(nb_engine_t* engine);
#endif