Fixed Memory Leak in Collision Callback

This commit is contained in:
n00b
2025-05-21 19:45:56 -04:00
parent daac85c26a
commit e7da6b745c
25 changed files with 1510 additions and 1283 deletions

View File

@@ -1629,10 +1629,10 @@ void init_embedded_functions()
add_embedded_arg("y", ID_TYPE_BYREF_NUM);
add_embedded_arg("normal_x", ID_TYPE_BYREF_NUM);
add_embedded_arg("normal_y", ID_TYPE_BYREF_NUM);
embed_function("SetSpriteCollisionShape", ID_TYPE_SUB);
embed_function("SetSpriteShape", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("shape", ID_TYPE_NUM);
embed_function("GetSpriteCollisionShape", ID_TYPE_FN_NUM);
embed_function("GetSpriteShape", ID_TYPE_FN_NUM);
add_embedded_arg("spr_id", ID_TYPE_NUM);
embed_function("SetSpriteRadius", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
@@ -1666,6 +1666,14 @@ void init_embedded_functions()
add_embedded_arg("vx", ID_TYPE_BYREF_NUM);
add_embedded_arg("vy", ID_TYPE_BYREF_NUM);
add_embedded_arg("v_count", ID_TYPE_NUM);
embed_function("SetSpriteShapeOffset", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("x", ID_TYPE_NUM);
add_embedded_arg("y", ID_TYPE_NUM);
embed_function("GetSpriteShapeOffset", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("x", ID_TYPE_BYREF_NUM);
add_embedded_arg("y", ID_TYPE_BYREF_NUM);
embed_function("createDistanceJoint", ID_TYPE_FN_NUM);
add_embedded_arg("spriteA", ID_TYPE_NUM);
add_embedded_arg("spriteB", ID_TYPE_NUM);
@@ -1960,6 +1968,10 @@ void init_embedded_functions()
add_embedded_arg("tileset", ID_TYPE_NUM);
embed_function("DeleteTileMap", ID_TYPE_SUB);
add_embedded_arg("tilemap", ID_TYPE_NUM);
embed_function("TileSetExists", ID_TYPE_FN_NUM);
add_embedded_arg("tileset", ID_TYPE_NUM);
embed_function("TileMapExists", ID_TYPE_FN_NUM);
add_embedded_arg("tilemap", ID_TYPE_NUM);
embed_function("LoadMesh", ID_TYPE_FN_NUM);
add_embedded_arg("mesh_file$", ID_TYPE_STR);
embed_function("DeleteMesh", ID_TYPE_SUB);
@@ -2164,11 +2176,11 @@ void init_embedded_functions()
add_embedded_arg("x", ID_TYPE_BYREF_NUM);
add_embedded_arg("y", ID_TYPE_BYREF_NUM);
add_embedded_arg("z", ID_TYPE_BYREF_NUM);
embed_function("SetActorCollisionShape", ID_TYPE_SUB);
embed_function("SetActorShape", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("shape_type", ID_TYPE_NUM);
add_embedded_arg("mass", ID_TYPE_NUM);
embed_function("GetActorCollisionShape", ID_TYPE_FN_NUM);
embed_function("GetActorShape", ID_TYPE_FN_NUM);
add_embedded_arg("actor", ID_TYPE_NUM);
embed_function("SetActorSolid", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);