Added new physics functions

* Added some new physics functions
* Added new documentation
* Added some auto checks for OS to rc_os_defines.h
* Fixed bugs on settting and getting position of sprites
This commit is contained in:
n00b
2024-11-15 20:42:08 -05:00
parent 3f4a1ce1cc
commit 40ca65cb3f
37 changed files with 1652 additions and 987 deletions

View File

@@ -1510,6 +1510,48 @@ add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("flag", ID_TYPE_NUM);
embed_function("spriteIsFixedRotation", ID_TYPE_FN_NUM);
add_embedded_arg("spr_id", ID_TYPE_NUM);
embed_function("SetSpriteDensity", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("density", ID_TYPE_NUM);
embed_function("GetSpriteDensity", ID_TYPE_FN_NUM);
add_embedded_arg("spr_id", ID_TYPE_NUM);
embed_function("SetSpriteFriction", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("friction", ID_TYPE_NUM);
embed_function("GetSpriteFriction", ID_TYPE_FN_NUM);
add_embedded_arg("spr_id", ID_TYPE_NUM);
embed_function("SetSpriteRestitution", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("restitution", ID_TYPE_NUM);
embed_function("GetSpriteRestitution", ID_TYPE_FN_NUM);
add_embedded_arg("spr_id", ID_TYPE_NUM);
embed_function("SetSpriteRestitutionThreshold", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("threshold", ID_TYPE_NUM);
embed_function("GetSpriteAABB", ID_TYPE_SUB);
add_embedded_arg("spr_id", ID_TYPE_NUM);
add_embedded_arg("x1", ID_TYPE_BYREF_NUM);
add_embedded_arg("y1", ID_TYPE_BYREF_NUM);
add_embedded_arg("x2", ID_TYPE_BYREF_NUM);
add_embedded_arg("y2", ID_TYPE_BYREF_NUM);
embed_function("SetGravity2D", ID_TYPE_SUB);
add_embedded_arg("x", ID_TYPE_NUM);
add_embedded_arg("y", ID_TYPE_NUM);
embed_function("GetGravity2D", ID_TYPE_SUB);
add_embedded_arg("x", ID_TYPE_BYREF_NUM);
add_embedded_arg("y", ID_TYPE_BYREF_NUM);
embed_function("SetWorld2DTimeStep", ID_TYPE_SUB);
add_embedded_arg("ts", ID_TYPE_NUM);
embed_function("SetWorld2DVelocityIterations", ID_TYPE_SUB);
add_embedded_arg("v", ID_TYPE_NUM);
embed_function("SetWorld2DPositionIterations", ID_TYPE_SUB);
add_embedded_arg("p", ID_TYPE_NUM);
embed_function("GetWorld2DTimeStep", ID_TYPE_FN_NUM);
embed_function("GetWorld2DVelocityIterations", ID_TYPE_FN_NUM);
embed_function("GetWorld2DPositionIterations", ID_TYPE_FN_NUM);
embed_function("SetWorld2DAutoClearForces", ID_TYPE_SUB);
add_embedded_arg("flag", ID_TYPE_NUM);
embed_function("GetWorld2DAutoClearForces", ID_TYPE_FN_NUM);
embed_function("createDistanceJoint", ID_TYPE_FN_NUM);
add_embedded_arg("spriteA", ID_TYPE_NUM);
add_embedded_arg("spriteB", ID_TYPE_NUM);
@@ -2641,6 +2683,8 @@ embed_function("SetWorld3DMaxSubSteps", ID_TYPE_SUB);
add_embedded_arg("steps", ID_TYPE_NUM);
embed_function("SetWorld3DTimeStep", ID_TYPE_SUB);
add_embedded_arg("ts", ID_TYPE_NUM);
embed_function("GetWorld3DMaxSubSteps", ID_TYPE_FN_NUM);
embed_function("GetWorld3DTimeStep", ID_TYPE_FN_NUM);
embed_function("startParticleEmitter", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
embed_function("stopParticleEmitter", ID_TYPE_SUB);