From 0832441c91f5ade687947b9aae2608676e48203a Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Wed, 1 Mar 2023 20:42:44 +0000 Subject: [PATCH] Nuke trees --- source/engine/2dphysics.c | 6 ++---- source/engine/ffi.c | 8 ++++++++ source/engine/nuke.c | 1 + source/engine/sound.c | 1 + source/engine/yugine.c | 6 +++--- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/source/engine/2dphysics.c b/source/engine/2dphysics.c index 4c5730a..0e391e3 100644 --- a/source/engine/2dphysics.c +++ b/source/engine/2dphysics.c @@ -582,11 +582,9 @@ void shape_set_sensor(struct phys2d_shape *shape, int sensor) { if (!shape->shape) { struct phys2d_edge *edge = shape->data; - - for (int i = 0; i < arrlen(edge->shapes); i++) { + + for (int i = 0; i < arrlen(edge->shapes); i++) cpShapeSetSensor(edge->shapes[i], sensor); - YughInfo("Setting shape %d sensor to %d", i, sensor); - } } else cpShapeSetSensor(shape->shape, sensor); } diff --git a/source/engine/ffi.c b/source/engine/ffi.c index dc1e7bb..6581890 100644 --- a/source/engine/ffi.c +++ b/source/engine/ffi.c @@ -266,6 +266,14 @@ duk_ret_t duk_nuke(duk_context *duk) duk_push_number(duk,rect.h); duk_put_prop_string(duk,-2,"h"); return 1; + + case 11: + duk_push_boolean(duk, nuke_push_tree_id(duk_to_string(duk, 1), duk_to_int(duk,2))); + return 1; + + case 12: + nuke_tree_pop(); + return 0; } return 0; diff --git a/source/engine/nuke.c b/source/engine/nuke.c index 95fa681..af9d5eb 100644 --- a/source/engine/nuke.c +++ b/source/engine/nuke.c @@ -17,6 +17,7 @@ #include "window.h" #include "texture.h" +#include "log.h" #define MAX_VERTEX_BUFFER 512 * 1024 #define MAX_ELEMENT_BUFFER 128 * 1024 diff --git a/source/engine/sound.c b/source/engine/sound.c index a649c13..43c5dff 100644 --- a/source/engine/sound.c +++ b/source/engine/sound.c @@ -139,6 +139,7 @@ void print_devices() void sound_init() { + return; mixer_init(); PaError err = Pa_Initialize(); check_pa_err(err); diff --git a/source/engine/yugine.c b/source/engine/yugine.c index 6e7bebe..fed1633 100644 --- a/source/engine/yugine.c +++ b/source/engine/yugine.c @@ -26,7 +26,7 @@ #endif #ifdef __linux__ -#include +//#include #endif #include @@ -62,7 +62,7 @@ int fps; void seghandle(int sig) { #ifdef __linux__ - void *ents[512]; +/* void *ents[512]; size_t size; size = backtrace(ents, 512); @@ -84,7 +84,7 @@ void seghandle(int sig) { duk_dump_stack(duk); - exit(1); + exit(1);*/ #endif }