Moved to raylib 4.2.0. Renamed some directory functions to raylib 4.2.0 conventions. Removed GenMeshBinormals and GetRayCollisionModel. Sound and music pan.

This commit is contained in:
jussi
2022-08-19 13:38:09 +03:00
parent 4f54a0a499
commit 49f1dad6b9
13 changed files with 665 additions and 352 deletions

View File

@@ -1451,32 +1451,6 @@ int lmodelsGenMeshTangents( lua_State *L ) {
return 1;
}
/*
> success = RL_GenMeshBinormals( Mesh mesh )
Compute mesh binormals
- Failure return false
- Success return true
*/
int lmodelsGenMeshBinormals( lua_State *L ) {
if ( !lua_isnumber( L, -1 ) ) {
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshBinormals( Mesh mesh )" );
lua_pushboolean( L, false );
return 1;
}
size_t meshId = lua_tointeger( L, -1 );
if ( !validMesh( meshId ) ) {
lua_pushboolean( L, false );
return 1;
}
GenMeshBinormals( state->meshes[ meshId ] );
lua_pushboolean( L, true );
return 1;
}
/*
## Models - Material
*/
@@ -2385,33 +2359,6 @@ int lmodelsGetRayCollisionBox( lua_State *L ) {
return 1;
}
/*
> rayCollision = RL_GetRayCollisionModel( Ray ray, Model model )
Get collision info between ray and model
- Failure return nil
- Success return RayCollision
*/
int lmodelsGetRayCollisionModel( lua_State *L ) {
if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) {
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetRayCollisionModel( Ray ray, Model model )" );
lua_pushnil( L );
return 1;
}
size_t modelId = lua_tointeger( L, -1 );
lua_pop( L, 1 );
Ray ray = uluaGetRay( L );
if ( !validModel( modelId ) ) {
lua_pushnil( L );
return 1;
}
uluaPushRayCollision( L, GetRayCollisionModel( ray, *state->models[ modelId ] ) );
return 1;
}
/*
> rayCollision = RL_GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform )