add documentation to some missing manual functions

This commit is contained in:
Isaac0-dev 2025-03-10 23:22:20 +10:00
parent aa21b4feea
commit f98571c458
3 changed files with 105 additions and 1 deletions

View file

@ -212,6 +212,8 @@ manual_index_documentation = """
- [add_scroll_target](#add_scroll_target)
- [collision_find_surface_on_ray](#collision_find_surface_on_ray)
- [cast_graph_node](#cast_graph_node)
- [get_uncolored_string](#get_uncolored_string)
- [gfx_set_command](#gfx_set_command)
<br />
@ -726,6 +728,56 @@ N/A
<br />
## [get_uncolored_string](#get_uncolored_string)
Removes color codes from a string.
### Lua Example
```lua
print(get_uncolored_string("\#210059\Colored \#FF086F\String")) -- "Colored String"
```
### Parameters
| Field | Type |
| ----- | ---- |
| str | 'string' |
### Returns
- `string`
### C Prototype
N/A
[:arrow_up_small:](#)
<br />
## [gfx_set_command](#gfx_set_command)
Sets the specified display list command on the display list given.
### Lua Example
```lua
gfx_set_command(gfx, "gsDPSetEnvColor", 0x00, 0xFF, 0x00, 0xFF)
```
### Parameters
| Field | Type |
| ----- | ---- |
| gfx | [Gfx](structs.md#Gfx) |
| command | `string` |
| (Any number of arguments) | `integer` |
### Returns
- None
### C Prototype
N/A
[:arrow_up_small:](#)
<br />
"""
############################################################################

View file

@ -27,6 +27,8 @@
- [add_scroll_target](#add_scroll_target)
- [collision_find_surface_on_ray](#collision_find_surface_on_ray)
- [cast_graph_node](#cast_graph_node)
- [get_uncolored_string](#get_uncolored_string)
- [gfx_set_command](#gfx_set_command)
<br />
@ -2457,6 +2459,56 @@ N/A
<br />
## [get_uncolored_string](#get_uncolored_string)
Removes color codes from a string.
### Lua Example
```lua
print(get_uncolored_string("\#210059\Colored \#FF086F\String")) -- "Colored String"
```
### Parameters
| Field | Type |
| ----- | ---- |
| str | 'string' |
### Returns
- `string`
### C Prototype
N/A
[:arrow_up_small:](#)
<br />
## [gfx_set_command](#gfx_set_command)
Sets the specified display list command on the display list given.
### Lua Example
```lua
gfx_set_command(gfx, "gsDPSetEnvColor", 0x00, 0xFF, 0x00, 0xFF)
```
### Parameters
| Field | Type |
| ----- | ---- |
| gfx | [Gfx](structs.md#Gfx) |
| command | `string` |
| (Any number of arguments) | `integer` |
### Returns
- None
### C Prototype
N/A
[:arrow_up_small:](#)
<br />
---
# functions from area.h

View file

@ -1083,7 +1083,7 @@ if (strcmp(command, #symb) == 0) { \
if (paramCount != params) { LOG_LUA("gfx_set_command: '" #symb "' received incorrect number of parameters. Received %u, expected %u", paramCount, params); return 0; } \
UNUSED const char symbolName[] = #symb; \
REPEAT(HANDLE_PARAM, params); \
Gfx _Gfx[] = { CALL_SYMB(symb, LIST_ARGS(GET_ARG, params)) }; \
const Gfx _Gfx[] = { CALL_SYMB(symb, LIST_ARGS(GET_ARG, params)); } \
memcpy(gfx, _Gfx, sizeof(_Gfx)); \
return 1; \
}