Document lag_compensation.h (54.31%)

This commit is contained in:
Agent X 2024-12-08 18:16:12 -05:00
parent 66e23c0cbf
commit c790115c24
3 changed files with 20 additions and 0 deletions

View file

@ -4469,20 +4469,24 @@ end
--- @param otherNp NetworkPlayer
--- @return MarioState
--- Gets the local Mario's state stored in lag compensation history
function lag_compensation_get_local_state(otherNp)
-- ...
end
--- @return integer
--- Gets the local Mario's state index
function lag_compensation_get_local_state_index()
-- ...
end
--- @return boolean
--- Checks if lag compensation history is ready
function lag_compensation_get_local_state_ready()
-- ...
end
--- Stores the local Mario's current state in lag compensation history
function lag_compensation_store()
-- ...
end

View file

@ -5126,6 +5126,9 @@ Sets if first person is enabled
## [lag_compensation_get_local_state](#lag_compensation_get_local_state)
### Description
Gets the local Mario's state stored in lag compensation history
### Lua Example
`local MarioStateValue = lag_compensation_get_local_state(otherNp)`
@ -5146,6 +5149,9 @@ Sets if first person is enabled
## [lag_compensation_get_local_state_index](#lag_compensation_get_local_state_index)
### Description
Gets the local Mario's state index
### Lua Example
`local integerValue = lag_compensation_get_local_state_index()`
@ -5164,6 +5170,9 @@ Sets if first person is enabled
## [lag_compensation_get_local_state_ready](#lag_compensation_get_local_state_ready)
### Description
Checks if lag compensation history is ready
### Lua Example
`local booleanValue = lag_compensation_get_local_state_ready()`
@ -5182,6 +5191,9 @@ Sets if first person is enabled
## [lag_compensation_store](#lag_compensation_store)
### Description
Stores the local Mario's current state in lag compensation history
### Lua Example
`lag_compensation_store()`

View file

@ -4,9 +4,13 @@
#define MAX_LOCAL_STATE_HISTORY 30
void lag_compensation_clear(void);
/* |description|Stores the local Mario's current state in lag compensation history|descriptionEnd| */
void lag_compensation_store(void);
/* |description|Gets the local Mario's state stored in lag compensation history|descriptionEnd| */
struct MarioState* lag_compensation_get_local_state(struct NetworkPlayer* otherNp);
/* |description|Checks if lag compensation history is ready|descriptionEnd| */
bool lag_compensation_get_local_state_ready(void);
/* |description|Gets the local Mario's state index|descriptionEnd| */
u32 lag_compensation_get_local_state_index(void);
#endif