mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
111 lines
3.9 KiB
C#
111 lines
3.9 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Fmod.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.FmodApi
|
|
{
|
|
public static partial class Fmod
|
|
{
|
|
/// Memory::initialize
|
|
public static Result TryMemoryInitialize(
|
|
nint poolMem,
|
|
int poolLen,
|
|
MemoryAllocCallbackPtr userAlloc,
|
|
MemoryReallocCallbackPtr userRealloc,
|
|
MemoryFreeCallbackPtr userFree,
|
|
MemoryType memTypeFlags
|
|
) => PInvoke.MemoryInitialize(poolMem, poolLen, userAlloc, userRealloc, userFree, memTypeFlags);
|
|
|
|
/// Memory::initialize
|
|
public static void MemoryInitialize(
|
|
nint poolMem,
|
|
int poolLen,
|
|
MemoryAllocCallbackPtr userAlloc,
|
|
MemoryReallocCallbackPtr userRealloc,
|
|
MemoryFreeCallbackPtr userFree,
|
|
MemoryType memTypeFlags
|
|
) => TryMemoryInitialize(poolMem, poolLen, userAlloc, userRealloc, userFree, memTypeFlags).Check();
|
|
|
|
/// Memory::getStats
|
|
public static unsafe Result TryMemoryGetStats(out int currentAlloced, out int maxAlloced, Bool32 blocking)
|
|
{
|
|
fixed (int* currentAllocedPtr = ¤tAlloced)
|
|
fixed (int* maxAllocedPtr = &maxAlloced)
|
|
return PInvoke.MemoryGetStats(currentAllocedPtr, maxAllocedPtr, blocking);
|
|
}
|
|
|
|
/// Memory::getStats
|
|
public static void MemoryGetStats(out int currentAlloced, out int maxAlloced, Bool32 blocking) =>
|
|
TryMemoryGetStats(out currentAlloced, out maxAlloced, blocking).Check();
|
|
|
|
/// Debug::initialize
|
|
public static unsafe Result TryDebugInitialize(
|
|
DebugFlags flags,
|
|
DebugMode mode,
|
|
DebugCallbackPtr callback,
|
|
RefString8 fileName
|
|
)
|
|
{
|
|
fixed (byte* fileNamePtr = fileName)
|
|
return PInvoke.DebugInitialize(flags, mode, callback, fileNamePtr);
|
|
}
|
|
|
|
/// Debug::initialize
|
|
public static void DebugInitialize(
|
|
DebugFlags flags,
|
|
DebugMode mode,
|
|
DebugCallbackPtr callback,
|
|
RefString8 fileName
|
|
) => TryDebugInitialize(flags, mode, callback, fileName).Check();
|
|
|
|
/// File::setDiskBusy
|
|
public static Result TryFileSetDiskBusy(int busy) => PInvoke.FileSetDiskBusy(busy);
|
|
|
|
/// File::setDiskBusy
|
|
public static void FileSetDiskBusy(int busy) => TryFileSetDiskBusy(busy).Check();
|
|
|
|
/// File::getDiskBusy
|
|
public static unsafe Result TryFileGetDiskBusy(out int busy)
|
|
{
|
|
fixed (int* busyPtr = &busy)
|
|
return PInvoke.FileGetDiskBusy(busyPtr);
|
|
}
|
|
|
|
/// File::getDiskBusy
|
|
public static int FileGetDiskBusy()
|
|
{
|
|
TryFileGetDiskBusy(out var busy).Check();
|
|
return busy;
|
|
}
|
|
|
|
/// Thread::setAttributes
|
|
public static Result TryThreadSetAttributes(
|
|
ThreadType type,
|
|
ThreadAffinity affinity,
|
|
ThreadPriority priority,
|
|
ThreadStackSize stackSize
|
|
) => PInvoke.ThreadSetAttributes(type, affinity, priority, stackSize);
|
|
|
|
/// Thread::setAttributes
|
|
public static void ThreadSetAttributes(
|
|
ThreadType type,
|
|
ThreadAffinity affinity,
|
|
ThreadPriority priority,
|
|
ThreadStackSize stackSize
|
|
) => TryThreadSetAttributes(type, affinity, priority, stackSize).Check();
|
|
|
|
/// System::create
|
|
public static unsafe Result TrySystemCreate(out FmodSystem system, uint headerVersion)
|
|
{
|
|
fixed (FmodSystem* systemPtr = &system)
|
|
return PInvoke.SystemCreate(systemPtr, headerVersion);
|
|
}
|
|
|
|
/// System::create
|
|
public static FmodSystem SystemCreate(uint headerVersion)
|
|
{
|
|
TrySystemCreate(out var system, headerVersion).Check();
|
|
return system;
|
|
}
|
|
}
|
|
}
|