mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-05 17:56:34 +00:00
revert unrelated change
This commit is contained in:
parent
a36955f9e6
commit
2b3aeabfa9
5 changed files with 7 additions and 11 deletions
|
|
@ -10709,7 +10709,6 @@ function smlua_collision_util_get_level_collision(level, area)
|
|||
end
|
||||
|
||||
--- @param data Pointer_Collision
|
||||
--- @return table
|
||||
--- Gets a table of the surface types from `data`
|
||||
function smlua_collision_util_find_surface_types(data)
|
||||
-- ...
|
||||
|
|
|
|||
|
|
@ -7406,7 +7406,7 @@ Gets the `level` terrain collision from `area`
|
|||
Gets a table of the surface types from `data`
|
||||
|
||||
### Lua Example
|
||||
`local tableValue = smlua_collision_util_find_surface_types(data)`
|
||||
`smlua_collision_util_find_surface_types(data)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
|
|
@ -7414,10 +7414,10 @@ Gets a table of the surface types from `data`
|
|||
| data | `Pointer` <`Collision`> |
|
||||
|
||||
### Returns
|
||||
- `table`
|
||||
- None
|
||||
|
||||
### C Prototype
|
||||
`LuaTable smlua_collision_util_find_surface_types(Collision* data);`
|
||||
`void smlua_collision_util_find_surface_types(Collision* data);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
|
|
|
|||
|
|
@ -31768,7 +31768,7 @@ int smlua_func_smlua_collision_util_find_surface_types(lua_State* L) {
|
|||
Collision* data = (Collision*)smlua_to_cpointer(L, 1, LVT_COLLISION_P);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_collision_util_find_surface_types"); return 0; }
|
||||
|
||||
smlua_push_lua_table(L, smlua_collision_util_find_surface_types(data));
|
||||
smlua_collision_util_find_surface_types(data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,9 +209,8 @@ Collision *smlua_collision_util_get_level_collision(u32 level, u16 area) {
|
|||
return dynos_level_get_collision(level, area);
|
||||
}
|
||||
|
||||
LuaTable smlua_collision_util_find_surface_types(Collision* data) {
|
||||
void smlua_collision_util_find_surface_types(Collision* data) {
|
||||
lua_State* L = gLuaState;
|
||||
if (!L) { return 0; }
|
||||
|
||||
if (data && *data++ == COL_INIT()) {
|
||||
lua_newtable(L);
|
||||
|
|
@ -232,12 +231,11 @@ LuaTable smlua_collision_util_find_surface_types(Collision* data) {
|
|||
lua_pushinteger(L, surfaceType);
|
||||
lua_settable(L, t);
|
||||
}
|
||||
return smlua_to_lua_table(L, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
// Couldn't find anything
|
||||
lua_pushnil(L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool surface_is_quicksand(struct Surface* surf) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SMLUA_COLLISION_UTILS_H
|
||||
#define SMLUA_COLLISION_UTILS_H
|
||||
|
||||
#include "pc/lua/smlua_utils.h"
|
||||
#include "engine/surface_collision.h"
|
||||
|
||||
struct RayIntersectionInfo {
|
||||
|
|
@ -141,7 +140,7 @@ Collision* smlua_collision_util_get_current_terrain_collision(void);
|
|||
Collision *smlua_collision_util_get_level_collision(u32 level, u16 area);
|
||||
|
||||
/* |description|Gets a table of the surface types from `data`|descriptionEnd| */
|
||||
LuaTable smlua_collision_util_find_surface_types(Collision* data);
|
||||
void smlua_collision_util_find_surface_types(Collision* data);
|
||||
|
||||
/* |description|Checks if the surface is quicksand|descriptionEnd| */
|
||||
bool surface_is_quicksand(struct Surface* surf);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue