Added plane mesh and new water node

* Changed the water actor to irrlichts built-in water surface node
* Added CreatePlaneMesh() function
This commit is contained in:
n00b
2024-10-06 21:15:58 -04:00
parent 5542629c92
commit 78cc1a983c
7 changed files with 825 additions and 1106 deletions

View File

@@ -439,8 +439,6 @@ void init_embedded_functions()
add_embedded_arg("flag", ID_TYPE_NUM);
embed_function("SetMouseRelative", ID_TYPE_SUB);
add_embedded_arg("flag", ID_TYPE_NUM);
embed_function("SetWindowVSync", ID_TYPE_SUB);
add_embedded_arg("flag", ID_TYPE_NUM);
embed_function("FlashWindow", ID_TYPE_FN_NUM);
add_embedded_arg("flag", ID_TYPE_NUM);
embed_function("WindowIsGrabbed", ID_TYPE_FN_NUM);
@@ -455,8 +453,6 @@ void init_embedded_functions()
embed_function("CloseCanvas", ID_TYPE_SUB);
add_embedded_arg("c_num", ID_TYPE_NUM);
embed_function("OpenCanvas3D", ID_TYPE_FN_NUM);
add_embedded_arg("w", ID_TYPE_NUM);
add_embedded_arg("h", ID_TYPE_NUM);
add_embedded_arg("viewport_x", ID_TYPE_NUM);
add_embedded_arg("viewport_y", ID_TYPE_NUM);
add_embedded_arg("viewport_w", ID_TYPE_NUM);
@@ -521,7 +517,7 @@ void init_embedded_functions()
embed_function("SetCanvasPhysics2D", ID_TYPE_SUB);
add_embedded_arg("c_num", ID_TYPE_NUM);
add_embedded_arg("state", ID_TYPE_NUM);
embed_function("OpenSpriteCanvas", ID_TYPE_FN_NUM);
embed_function("OpenCanvasSpriteLayer", ID_TYPE_FN_NUM);
add_embedded_arg("w", ID_TYPE_NUM);
add_embedded_arg("h", ID_TYPE_NUM);
add_embedded_arg("viewport_x", ID_TYPE_NUM);
@@ -1309,6 +1305,11 @@ void init_embedded_functions()
embed_function("LoadMeshFromArchive", ID_TYPE_FN_NUM);
add_embedded_arg("archive$", ID_TYPE_STR);
add_embedded_arg("mesh_file$", ID_TYPE_STR);
embed_function("CreatePlaneMesh", ID_TYPE_FN_NUM);
add_embedded_arg("w", ID_TYPE_NUM);
add_embedded_arg("h", ID_TYPE_NUM);
add_embedded_arg("tileCount_w", ID_TYPE_NUM);
add_embedded_arg("tileCount_h", ID_TYPE_NUM);
embed_function("CreateMeshActor", ID_TYPE_FN_NUM);
add_embedded_arg("mesh", ID_TYPE_NUM);
embed_function("CreateMeshOctreeActor", ID_TYPE_FN_NUM);
@@ -1317,9 +1318,11 @@ void init_embedded_functions()
add_embedded_arg("cube_size", ID_TYPE_NUM);
embed_function("CreateSphereActor", ID_TYPE_FN_NUM);
add_embedded_arg("radius", ID_TYPE_NUM);
embed_function("CreateWaterPlaneActor", ID_TYPE_FN_NUM);
add_embedded_arg("w", ID_TYPE_NUM);
add_embedded_arg("h", ID_TYPE_NUM);
embed_function("CreateWaterActor", ID_TYPE_FN_NUM);
add_embedded_arg("mesh", ID_TYPE_NUM);
add_embedded_arg("waveHeight", ID_TYPE_NUM);
add_embedded_arg("waveSpeed", ID_TYPE_NUM);
add_embedded_arg("waveLength", ID_TYPE_NUM);
embed_function("CreateLightActor", ID_TYPE_FN_NUM);
embed_function("CreateBillboardActor", ID_TYPE_FN_NUM);
embed_function("CreateTerrainActor", ID_TYPE_FN_NUM);
@@ -2297,34 +2300,6 @@ void init_embedded_functions()
add_embedded_arg("patchX", ID_TYPE_NUM);
add_embedded_arg("patchZ", ID_TYPE_NUM);
add_embedded_arg("LOD", ID_TYPE_NUM);
embed_function("setWaterWindForce", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("f", ID_TYPE_NUM);
embed_function("getWaterWindForce", ID_TYPE_FN_NUM);
add_embedded_arg("actor", ID_TYPE_NUM);
embed_function("setWaterWaveHeight", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("h", ID_TYPE_NUM);
embed_function("getWaterWaveHeight", ID_TYPE_FN_NUM);
add_embedded_arg("actor", ID_TYPE_NUM);
embed_function("setWaterWindDirection", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("x", ID_TYPE_NUM);
add_embedded_arg("z", ID_TYPE_NUM);
embed_function("getWaterWindDirection", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("x", ID_TYPE_BYREF_NUM);
add_embedded_arg("z", ID_TYPE_BYREF_NUM);
embed_function("setWaterColor", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("c", ID_TYPE_NUM);
embed_function("getWaterColor", ID_TYPE_FN_NUM);
add_embedded_arg("actor", ID_TYPE_NUM);
embed_function("setWaterColorBlendFactor", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("cbfactor", ID_TYPE_NUM);
embed_function("getWaterColorBlendFactor", ID_TYPE_FN_NUM);
add_embedded_arg("actor", ID_TYPE_NUM);
embed_function("SetActorAnimation", ID_TYPE_SUB);
add_embedded_arg("actor", ID_TYPE_NUM);
add_embedded_arg("start_frame", ID_TYPE_NUM);