Map to newest k3

This commit is contained in:
mid 2025-09-13 12:02:15 +03:00
parent f65891932a
commit 3c372a3024
2 changed files with 9 additions and 3 deletions

View File

@ -1935,7 +1935,7 @@ static int dagame_draw(lua_State *L) {
rect.y -= rect.h / 2; rect.y -= rect.h / 2;
} }
k3FontDraw(font, lua_tonumber(L, -2) + rect.x, lua_tonumber(L, -1) + rect.y, lua_tonumber(L, -4), lua_tostring(L, -3), -1, (vec4) {lua_tonumber(L, -8), lua_tonumber(L, -7), lua_tonumber(L, -6), lua_tonumber(L, -5)}); k3FontDraw(font, lua_tonumber(L, -2) + rect.x, lua_tonumber(L, -1) + rect.y, lua_tonumber(L, -4), lua_tostring(L, -3), -1, 0, (vec4) {lua_tonumber(L, -8), lua_tonumber(L, -7), lua_tonumber(L, -6), lua_tonumber(L, -5)});
lua_pop(L, 9); lua_pop(L, 9);
} }
@ -2147,6 +2147,8 @@ static int dagame_k3menuitem_on(lua_State *L) {
evcode = k3M_EVENT_MEASURE; evcode = k3M_EVENT_MEASURE;
} else if(!strcmp(lua_tostring(L, 2), "arrange")) { } else if(!strcmp(lua_tostring(L, 2), "arrange")) {
evcode = k3M_EVENT_ARRANGE; evcode = k3M_EVENT_ARRANGE;
} else if(!strcmp(lua_tostring(L, 2), "post_arrange")) {
evcode = k3M_EVENT_POST_ARRANGE;
} else if(!strcmp(lua_tostring(L, 2), "all")) { } else if(!strcmp(lua_tostring(L, 2), "all")) {
evcode = k3M_EVENT_ALL; evcode = k3M_EVENT_ALL;
} }
@ -2740,7 +2742,9 @@ static int os_time(lua_State *L) {
} }
static int dagame_particle_system(lua_State *L) { static int dagame_particle_system(lua_State *L) {
struct k3CPUQuadParticles *qp = calloc(1, sizeof(*qp)); struct k3CPUQuadParticles *qp = _mm_malloc(sizeof(*qp), 16);
memset(qp, 0, sizeof(*qp));
qp->capacity = lua_tointeger(L, 1); qp->capacity = lua_tointeger(L, 1);
qp->origin[0] = 0; qp->origin[0] = 0;

View File

@ -283,7 +283,9 @@ static int eng_init() {
k3SetLogCallback(k4k3LogCallback); k3SetLogCallback(k4k3LogCallback);
k3Init(); k3Init(
!k4_get_arg("tc") || strtol(k4_get_arg("tc"), NULL, 0) != 0,
!k4_get_arg("mipmap") || strtol(k4_get_arg("mipmap"), NULL, 0) != 0);
k3BatchInit(); k3BatchInit();