mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-12-24 00:42:28 +00:00
- Add new functions for objects, Feel free to flesh some out if need be. - Fix long-standing issue with our LUA garbage collection, It will now run after all our hooks do to prevent buildup which causes lag.
226 lines
3.4 KiB
Markdown
226 lines
3.4 KiB
Markdown
## [:rewind: Lua Functions](functions.md)
|
|
|
|
---
|
|
|
|
[< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5]
|
|
|
|
|
|
---
|
|
# functions from surface_collision.h
|
|
|
|
<br />
|
|
|
|
|
|
## [find_ceil_height](#find_ceil_height)
|
|
|
|
### Lua Example
|
|
`local numberValue = find_ceil_height(x, y, z)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| x | `number` |
|
|
| y | `number` |
|
|
| z | `number` |
|
|
|
|
### Returns
|
|
- `number`
|
|
|
|
### C Prototype
|
|
`f32 find_ceil_height(f32 x, f32 y, f32 z);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [find_floor_height](#find_floor_height)
|
|
|
|
### Lua Example
|
|
`local numberValue = find_floor_height(x, y, z)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| x | `number` |
|
|
| y | `number` |
|
|
| z | `number` |
|
|
|
|
### Returns
|
|
- `number`
|
|
|
|
### C Prototype
|
|
`f32 find_floor_height(f32 x, f32 y, f32 z);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [find_poison_gas_level](#find_poison_gas_level)
|
|
|
|
### Lua Example
|
|
`local numberValue = find_poison_gas_level(x, z)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| x | `number` |
|
|
| z | `number` |
|
|
|
|
### Returns
|
|
- `number`
|
|
|
|
### C Prototype
|
|
`f32 find_poison_gas_level(f32 x, f32 z);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [find_wall_collisions](#find_wall_collisions)
|
|
|
|
### Lua Example
|
|
`local integerValue = find_wall_collisions(colData)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| colData | [WallCollisionData](structs.md#WallCollisionData) |
|
|
|
|
### Returns
|
|
- `integer`
|
|
|
|
### C Prototype
|
|
`s32 find_wall_collisions(struct WallCollisionData *colData);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [find_water_level](#find_water_level)
|
|
|
|
### Lua Example
|
|
`local numberValue = find_water_level(x, z)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| x | `number` |
|
|
| z | `number` |
|
|
|
|
### Returns
|
|
- `number`
|
|
|
|
### C Prototype
|
|
`f32 find_water_level(f32 x, f32 z);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
---
|
|
# functions from surface_load.h
|
|
|
|
<br />
|
|
|
|
|
|
## [alloc_surface_pools](#alloc_surface_pools)
|
|
|
|
### Lua Example
|
|
`alloc_surface_pools()`
|
|
|
|
### Parameters
|
|
- None
|
|
|
|
### Returns
|
|
- None
|
|
|
|
### C Prototype
|
|
`void alloc_surface_pools(void);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [clear_dynamic_surfaces](#clear_dynamic_surfaces)
|
|
|
|
### Lua Example
|
|
`clear_dynamic_surfaces()`
|
|
|
|
### Parameters
|
|
- None
|
|
|
|
### Returns
|
|
- None
|
|
|
|
### C Prototype
|
|
`void clear_dynamic_surfaces(void);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [get_area_terrain_size](#get_area_terrain_size)
|
|
|
|
### Lua Example
|
|
`local integerValue = get_area_terrain_size(data)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| data | `Pointer` <`integer`> |
|
|
|
|
### Returns
|
|
- `integer`
|
|
|
|
### C Prototype
|
|
`u32 get_area_terrain_size(s16 *data);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [load_area_terrain](#load_area_terrain)
|
|
|
|
### Lua Example
|
|
`load_area_terrain(index, data, surfaceRooms, macroObjects)`
|
|
|
|
### Parameters
|
|
| Field | Type |
|
|
| ----- | ---- |
|
|
| index | `integer` |
|
|
| data | `Pointer` <`integer`> |
|
|
| surfaceRooms | `Pointer` <`integer`> |
|
|
| macroObjects | `Pointer` <`integer`> |
|
|
|
|
### Returns
|
|
- None
|
|
|
|
### C Prototype
|
|
`void load_area_terrain(s16 index, s16 *data, s8 *surfaceRooms, s16 *macroObjects);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
## [load_object_collision_model](#load_object_collision_model)
|
|
|
|
### Lua Example
|
|
`load_object_collision_model()`
|
|
|
|
### Parameters
|
|
- None
|
|
|
|
### Returns
|
|
- None
|
|
|
|
### C Prototype
|
|
`void load_object_collision_model(void);`
|
|
|
|
[:arrow_up_small:](#)
|
|
|
|
<br />
|
|
|
|
---
|
|
|
|
[< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5]
|
|
|