Added specialization
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
tags*
|
||||||
|
import
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
project('template', 'c',
|
project('evol-mod-assetmanager', 'c',
|
||||||
version : '0.1',
|
version : '0.1',
|
||||||
default_options : ['warning_level=3', 'c_std=c11'])
|
default_options : ['warning_level=3', 'c_std=c11'])
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ run_command( 'python3', meson.source_root() + '/subprojects/evol/buildscripts/co
|
|||||||
subdir('import')
|
subdir('import')
|
||||||
|
|
||||||
mod_src = [
|
mod_src = [
|
||||||
'src/template.c',
|
'src/mod.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
mod_incdir = [
|
mod_incdir = [
|
||||||
@@ -20,7 +20,7 @@ mod_deps = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
module = shared_module(
|
module = shared_module(
|
||||||
'template', mod_src,
|
'evmodassetmanager', mod_src,
|
||||||
include_directories: mod_incdir,
|
include_directories: mod_incdir,
|
||||||
dependencies: mod_deps,
|
dependencies: mod_deps,
|
||||||
)
|
)
|
||||||
@@ -29,4 +29,4 @@ mod_dep = declare_dependency(
|
|||||||
include_directories: mod_incdir,
|
include_directories: mod_incdir,
|
||||||
)
|
)
|
||||||
|
|
||||||
meson.override_dependency('evmod_template', mod_dep)
|
meson.override_dependency('evmod_assets', mod_dep)
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
EV_CONFIG_VAR(template_var1, I32, 0)
|
|
||||||
EV_CONFIG_VAR(template_var2, SDS, "Default")
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
PRIMARY(PrimaryEvent, { U32 dummy_primary; })
|
|
||||||
|
|
||||||
SECONDARY(PrimaryEvent, SecondaryEvent, { U32 dummy_secondary; })
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
EV_NS_DEF_BEGIN(Namespace1)
|
|
||||||
|
|
||||||
EV_NS_DEF_FN(U32, update, (F32, deltaTime))
|
|
||||||
|
|
||||||
EV_NS_DEF_END(Namespace1)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
TYPE(TypeA, { I32 member1, F32 member2; })
|
|
||||||
TYPE(TypeB, { PTR memberX, STR memberY; })
|
|
||||||
|
|||||||
14
src/mod.c
Normal file
14
src/mod.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#define EV_MODULE_DEFINE
|
||||||
|
#include <evol/evolmod.h>
|
||||||
|
|
||||||
|
EV_CONSTRUCTOR
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
EV_DESTRUCTOR
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
EV_BINDINGS
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#define EV_MODULE_DEFINE
|
|
||||||
#include <evol/evolmod.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
EV_CONSTRUCTOR
|
|
||||||
{
|
|
||||||
printf("Loaded template module\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
U32
|
|
||||||
update(
|
|
||||||
F32 deltaTime)
|
|
||||||
{
|
|
||||||
EV_UNUSED_PARAM(deltaTime);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
EV_DESTRUCTOR
|
|
||||||
{
|
|
||||||
printf("Unloaded template module\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
EVMODAPI bool
|
|
||||||
export_and(
|
|
||||||
bool x,
|
|
||||||
bool y)
|
|
||||||
{
|
|
||||||
return x & y;
|
|
||||||
}
|
|
||||||
|
|
||||||
EVMODAPI bool
|
|
||||||
export_or(
|
|
||||||
bool x,
|
|
||||||
bool y)
|
|
||||||
{
|
|
||||||
return x | y;
|
|
||||||
}
|
|
||||||
|
|
||||||
EV_BINDINGS
|
|
||||||
{
|
|
||||||
EV_NS_BIND_FN(Namespace1, update, update);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user