Merge remote-tracking branch 'fwk/main'

main
Dominik Madarász 2023-08-10 18:25:18 +02:00
commit 9dbeb39fd3
2 changed files with 29 additions and 3 deletions

26
engine/bind/fwk.py 100644
View File

@ -0,0 +1,26 @@
import os
import sys
import ctypes
import cffi
ffi = cffi.FFI()
with open('./fwk.lua') as f:
lines = [line for line in f if not line.startswith('#')]
lines = [line for line in lines if not 'va_list' in line]
lines = [line for line in lines if not 'inline ' in line]
lines = [line for line in lines if not line.startswith('typedef union ') ]
lines = [line for line in lines if not '//lcpp INF' in line ]
data = ''.join(lines)
data = data[data.find('[[')+2:data.find(']]')]
data = '''
typedef struct vec2i { float x,y; } vec2i;
typedef struct vec3i { float x,y,z; } vec3i;
typedef struct vec2 { float x,y; } vec2;
typedef struct vec3 { float x,y,z; } vec3;
typedef struct vec4 { float x,y,z,w; } vec4;
typedef struct quat { float x,y,z,w; } quat;
typedef union frustum frustum;
typedef union json_t json_t;
''' + data
ffi.cdef(data)
fwk = ffi.dlopen('./fwk.dll')

View File

@ -593,13 +593,13 @@ details > summary::-webkit-details-marker {
**V·4·K**
|Version: | 2023.8 |
|Version: | 2023.7 |
|:--------------|:------------|
|Branch: | main |
|Commit: | 2 |
|Commit: | 5 |
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
# [V·4·K 2023.8 ](https://dev.v4.games/zaklaus/v4k)
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)
## a b o u t
- https://dev.v4.games/zaklaus/v4k is a 3D game framework in C, with Luajit bindings.