2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void* MemCopy(void* dest, void* src, s32 size) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u8* destu = (u8*)dest;
|
|
|
|
u8* srcu = (u8*)src;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
while (size > 0) {
|
2020-03-17 04:31:30 +00:00
|
|
|
*destu++ = *srcu++;
|
|
|
|
size--;
|
|
|
|
}
|
|
|
|
|
|
|
|
return dest;
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void* MemSet(void* dest, s32 val, s32 size) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u8* destu = (u8*)dest;
|
|
|
|
s32 s = size;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
while (s > 0) {
|
2020-03-17 04:31:30 +00:00
|
|
|
*destu++ = val;
|
|
|
|
s--;
|
|
|
|
}
|
|
|
|
|
|
|
|
return dest;
|
|
|
|
}
|