Added image loading
Added some string functions and macros Added path listing on windows Added assets
This commit is contained in:
@@ -14,6 +14,19 @@ internal Str8 Win32_WideStr(M_Arena *arena, Str8 v) {
|
||||
return result;
|
||||
}
|
||||
|
||||
internal Str8 Win32_MultiByteStr(M_Arena *arena, LPWSTR wstr) {
|
||||
Str8 result = { 0 };
|
||||
|
||||
S32 nbytes = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, 0, 0, 0, 0);
|
||||
|
||||
result.count = nbytes - 1;
|
||||
result.data = M_ArenaPush(arena, U8, .count = nbytes);
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, wstr, -1, (LPSTR) result.data, nbytes, 0, 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Virtual memory
|
||||
|
||||
U64 VM_PageSize() {
|
||||
|
||||
Reference in New Issue
Block a user