mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-02 07:46:01 +00:00
e84f5ab387
* Un-fake a couple of matches in memory manip functions * Document fmodf * Un-fake a couple of matches in memory manip functions * Document fmodf * Rename functions and files * Document memmove, memsets, memcpys * Format * Sort out some missing sizeofs * Name fmodf * Rename local variables * size_t * Use COBRA_SHADOW_TEX_SIZE * Review * Tweak the Doxyfile to remove @brief requirement * Roman's review * Fix a bug comment * Change fmodf
21 lines
468 B
C
21 lines
468 B
C
#include "global.h"
|
|
|
|
/**
|
|
* memset: sets `len` bytes to `val` starting at address `dest`.
|
|
*
|
|
* @see There are two other memsets in this codebase, Lib_MemSet(), MemSet()
|
|
*
|
|
* @param dest address to start at
|
|
* @param val value to write (s32, but interpreted as u8)
|
|
* @param len number of bytes to write
|
|
*
|
|
* @return dest
|
|
*/
|
|
void* __osMemset(void* dest, s32 val, size_t len) {
|
|
u8* ptr = dest;
|
|
|
|
while (len--) {
|
|
*ptr++ = val;
|
|
}
|
|
return dest;
|
|
}
|