mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 20:24:39 +00:00
init engine
This commit is contained in:
parent
1b4dbef38b
commit
8fc77c4d50
@ -1,5 +1,5 @@
|
||||
TARGET = libnishbox.a
|
||||
OBJS = version.o
|
||||
OBJS = version.o core.o
|
||||
|
||||
include ../common.mk
|
||||
|
||||
|
11
engine/core.c
Normal file
11
engine/core.c
Normal 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
13
engine/nb_core.h
Normal 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
|
Loading…
x
Reference in New Issue
Block a user