unused parameter macro
This commit is contained in:
parent
4675a22292
commit
e9a031eea7
@ -5,8 +5,6 @@
|
||||
#include "../platform/platform.h"
|
||||
#include "../ttf/ttf.h"
|
||||
#include "../gpu/gpu.h"
|
||||
#include "../sim/sim.h"
|
||||
#include "../user/user.h"
|
||||
#include "../sprite/sprite.h"
|
||||
#include "../watch/watch.h"
|
||||
#include "../draw/draw.h"
|
||||
@ -18,6 +16,7 @@
|
||||
#include "../net/net.h"
|
||||
#include "../resource/resource.h"
|
||||
#include "../playback/playback.h"
|
||||
#include "../pp/pp.h"
|
||||
|
||||
#include "app_core.h"
|
||||
|
||||
|
||||
@ -150,11 +150,11 @@ void P_AppStartup(String args_str)
|
||||
}
|
||||
}
|
||||
|
||||
(UNUSED)args;
|
||||
(UNUSED)logfile_name;
|
||||
(UNUSED)settings_file_name;
|
||||
(UNUSED)connect_address;
|
||||
(UNUSED)GetDefaultAppWindowSettings;
|
||||
(MaybeUnused)args;
|
||||
(MaybeUnused)logfile_name;
|
||||
(MaybeUnused)settings_file_name;
|
||||
(MaybeUnused)connect_address;
|
||||
(MaybeUnused)GetDefaultAppWindowSettings;
|
||||
|
||||
#if !RtcIsEnabled
|
||||
/* Verify test modes aren't left on by accident in release mode */
|
||||
@ -243,14 +243,14 @@ void P_AppStartup(String args_str)
|
||||
MIX_StartupReceipt mixer_sr = MIX_Startup();
|
||||
SND_StartupReceipt sound_sr = SND_Startup(&asset_cache_sr);
|
||||
D_StartupReceipt draw_sr = D_Startup(&font_sr);
|
||||
SimStartupReceipt sim_sr = sim_startup();
|
||||
|
||||
/* Interface systems */
|
||||
SimStartupReceipt sim_sr = SimStartup();
|
||||
PB_StartupReceipt playback_sr = PB_Startup(&mixer_sr);
|
||||
UserStartupReceipt user_sr = StartupUser(&font_sr, &sprite_sr, &draw_sr, &asset_cache_sr, &sound_sr, &mixer_sr, &sim_sr, connect_address);
|
||||
|
||||
(UNUSED)user_sr;
|
||||
(UNUSED)playback_sr;
|
||||
(MaybeUnused)user_sr;
|
||||
(MaybeUnused)playback_sr;
|
||||
|
||||
#if 0
|
||||
/* Write window settings to file */
|
||||
|
||||
@ -238,8 +238,8 @@ void ASE_Inflate(u8 *dst, u8 *encoded)
|
||||
|
||||
u8 cmf = (u8)(cm | (cinfo << 4));
|
||||
u8 flg = fcheck | (fdict << 5) | (flevl << 6);
|
||||
(UNUSED)cmf;
|
||||
(UNUSED)flg;
|
||||
(MaybeUnused)cmf;
|
||||
(MaybeUnused)flg;
|
||||
Assert(((cmf * 256) + flg) % 31 == 0);
|
||||
|
||||
u8 bfinal = 0;
|
||||
@ -255,7 +255,7 @@ void ASE_Inflate(u8 *dst, u8 *encoded)
|
||||
i16 len = ASE_ConsumeBits(&bb, 16);
|
||||
i16 nlen = ASE_ConsumeBits(&bb, 16);
|
||||
Assert(len == ~nlen); /* Validation */
|
||||
(UNUSED)nlen;
|
||||
(MaybeUnused)nlen;
|
||||
while (len-- > 0)
|
||||
{
|
||||
*dst++ = ASE_ConsumeBits(&bb, 8);
|
||||
|
||||
@ -50,7 +50,7 @@ AC_Asset *AC_GetAssetCacheSlotLocked(P_Lock *lock, String key, u64 hash)
|
||||
{
|
||||
AC_SharedState *g = &AC_shared_state;
|
||||
P_AssertLockedES(lock, &g->lookup_mutex);
|
||||
(UNUSED)lock;
|
||||
(MaybeUnused)lock;
|
||||
|
||||
u64 index = hash % countof(g->lookup);
|
||||
for (;;)
|
||||
|
||||
@ -134,7 +134,7 @@ void ShrinkArena(Arena *arena)
|
||||
{
|
||||
/* Not implemented */
|
||||
Assert(0);
|
||||
(UNUSED)arena;
|
||||
(MaybeUnused)arena;
|
||||
}
|
||||
|
||||
void SetArenaReadonly(Arena *arena)
|
||||
|
||||
@ -205,7 +205,7 @@ Inline TempArena _BeginScratch(Arena *potential_conflict)
|
||||
_BeginScratchNoConflict(); \
|
||||
do { \
|
||||
u8 arena = 0; \
|
||||
(UNUSED)arena; \
|
||||
(MaybeUnused)arena; \
|
||||
} while (0)
|
||||
|
||||
Inline TempArena _BeginScratchNoConflict(void)
|
||||
|
||||
@ -161,7 +161,7 @@ BuddyBlock *GetUnusedBuddyBlock(BuddyCtx *ctx, BuddyLevel *level)
|
||||
left->parent = parent_block;
|
||||
left->memory = parent_block->memory;
|
||||
|
||||
/* Create right (UNUSED) block from parent block */
|
||||
/* Create right (MaybeUnused) block from parent block */
|
||||
BuddyBlock *right = PushBuddyBlock(ctx);
|
||||
right->is_used = 0;
|
||||
right->level = level;
|
||||
@ -196,7 +196,7 @@ BuddyBlock *GetUnusedBuddyBlock(BuddyCtx *ctx, BuddyLevel *level)
|
||||
left->level = level;
|
||||
left->memory = ArenaBase(arena);
|
||||
|
||||
/* Create right (UNUSED) block from new arena memory */
|
||||
/* Create right (MaybeUnused) block from new arena memory */
|
||||
BuddyBlock *right = PushBuddyBlock(ctx);
|
||||
right->is_used = 0;
|
||||
right->level = level;
|
||||
|
||||
@ -133,7 +133,7 @@ extern "C" {
|
||||
# define Assert(cond) ((cond) ? 1 : (__builtin_trap(), 0))
|
||||
# define DEBUGBREAK __builtin_debugtrap()
|
||||
# endif
|
||||
# define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; (UNUSED) __DEBUGBREAKABLE_VAR; } (void)0
|
||||
# define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; (MaybeUnused) __DEBUGBREAKABLE_VAR; } (void)0
|
||||
#else
|
||||
# define Assert(cond) (void)(0)
|
||||
#endif
|
||||
@ -238,7 +238,13 @@ void __asan_unpoison_memory_region(void const volatile *add, size_t);
|
||||
#endif
|
||||
|
||||
//- Markup
|
||||
#define UNUSED void
|
||||
#define MaybeUnused void
|
||||
|
||||
#if CompilerIsClang
|
||||
# define UNUSED __attribute((unused))
|
||||
#else
|
||||
# define UNUSED
|
||||
#endif
|
||||
|
||||
#if CompilerIsMsvc
|
||||
# if LanguageIsCpp
|
||||
|
||||
@ -649,7 +649,7 @@ b32 AdvanceCodepointIter(CodepointIter *iter)
|
||||
void EndCodepointIter(CodepointIter *iter)
|
||||
{
|
||||
/* Do nothing */
|
||||
(UNUSED)iter;
|
||||
(MaybeUnused)iter;
|
||||
}
|
||||
|
||||
//- String decode
|
||||
|
||||
@ -7,7 +7,7 @@ D_StartupReceipt D_Startup(F_StartupReceipt *font_sr)
|
||||
{
|
||||
__prof;
|
||||
D_SharedState *g = &D_shared_state;
|
||||
(UNUSED)font_sr;
|
||||
(MaybeUnused)font_sr;
|
||||
u32 pixel_white = 0xFFFFFFFF;
|
||||
g->solid_white_texture = GPU_AllocTexture(GP_TEXTURE_FORMAT_R8G8B8A8_UNORM, 0, VEC2I32(1, 1), &pixel_white);
|
||||
return (D_StartupReceipt) { 0 };
|
||||
@ -116,7 +116,7 @@ void D_DrawLineGradient(GPU_RenderSig *sig, Vec2 start, Vec2 end, f32 thickness,
|
||||
D_DrawMaterial(sig, D_MATERIALPARAMS(.texture = g->solid_white_texture, .tint0 = start_color, .tint1 = end_color, .quad = quad));
|
||||
#else
|
||||
/* Placeholder */
|
||||
(UNUSED)end_color;
|
||||
(MaybeUnused)end_color;
|
||||
Quad quad = QuadFromLine(start, end, thickness);
|
||||
D_DrawQuad(sig, quad, start_color);
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
|
||||
DXC_Result DXC_Compile(Arena *arena, String shader_source, i32 num_args, String *args)
|
||||
{
|
||||
(UNUSED)arena;
|
||||
(UNUSED)shader_source;
|
||||
(UNUSED)num_args;
|
||||
(UNUSED)args;
|
||||
(MaybeUnused)arena;
|
||||
(MaybeUnused)shader_source;
|
||||
(MaybeUnused)num_args;
|
||||
(MaybeUnused)args;
|
||||
DXC_Result result = ZI;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@ F_StartupReceipt F_Startup(AC_StartupReceipt *asset_cache_sr, TTF_StartupReceipt
|
||||
{
|
||||
__prof;
|
||||
F_SharedState *g = &F_shared_state;
|
||||
(UNUSED)asset_cache_sr;
|
||||
(UNUSED)ttf_sr;
|
||||
(MaybeUnused)asset_cache_sr;
|
||||
(MaybeUnused)ttf_sr;
|
||||
g->params.arena = AllocArena(Gibi(64));
|
||||
return (F_StartupReceipt) { 0 };
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ P_ExitFuncDef(GPU_D12_Shutdown)
|
||||
}
|
||||
ID3D12Device_Release(g->device);
|
||||
#else
|
||||
(UNUSED)GPU_D12_ReleaseCommandQueue;
|
||||
(MaybeUnused)GPU_D12_ReleaseCommandQueue;
|
||||
#endif
|
||||
|
||||
{
|
||||
@ -339,7 +339,7 @@ void GPU_D12_InitObjects(void)
|
||||
GPU_D12_CommandQueue *cq = g->command_queues[i];
|
||||
String dbg_name = params[i].dbg_name;
|
||||
__prof_dx12_ctx_alloc(cq->prof, g->device, cq->cq, dbg_name.text, dbg_name.len);
|
||||
(UNUSED)dbg_name;
|
||||
(MaybeUnused)dbg_name;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1321,7 +1321,7 @@ GPU_D12_CpuDescriptorHeap *GPU_D12_AllocCpuDescriptorHeap(enum D3D12_DESCRIPTOR_
|
||||
void cpu_descriptor_heap_release(GPU_D12_CpuDescriptorHeap *dh)
|
||||
{
|
||||
/* TODO */
|
||||
(UNUSED)dh;
|
||||
(MaybeUnused)dh;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1556,7 +1556,7 @@ void GPU_D12_ReleaseCommandQueue(GPU_D12_CommandQueue *cq)
|
||||
{
|
||||
__prof;
|
||||
/* TODO */
|
||||
(UNUSED)cq;
|
||||
(MaybeUnused)cq;
|
||||
//ID3D12CommandQueue_Release(cq->cq);
|
||||
}
|
||||
|
||||
@ -3090,7 +3090,7 @@ GPU_Swapchain *GPU_AllocSwapchain(P_Window *window, Vec2I32 resolution)
|
||||
void GPU_ReleaseSwapchain(GPU_Swapchain *gp_swapchain)
|
||||
{
|
||||
/* TODO */
|
||||
(UNUSED)gp_swapchain;
|
||||
(MaybeUnused)gp_swapchain;
|
||||
}
|
||||
|
||||
void GPU_WaitOnSwapchain(GPU_Swapchain *gp_swapchain)
|
||||
@ -3102,7 +3102,7 @@ void GPU_WaitOnSwapchain(GPU_Swapchain *gp_swapchain)
|
||||
WaitForSingleObjectEx(swapchain->waitable, 1000, 1);
|
||||
}
|
||||
#else
|
||||
(UNUSED)gp_swapchain;
|
||||
(MaybeUnused)gp_swapchain;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ MIX_Track *MIX_AllocTrackLocked(P_Lock *lock, SND_Sound *sound)
|
||||
{
|
||||
MIX_SharedState *g = &M_shared_state;
|
||||
P_AssertLockedE(lock, &g->mutex);
|
||||
(UNUSED)lock;
|
||||
(MaybeUnused)lock;
|
||||
|
||||
MIX_Track *track = 0;
|
||||
if (g->track_first_free)
|
||||
@ -104,7 +104,7 @@ void MIX_ReleaseTrackLocked(P_Lock *lock, MIX_Track *track)
|
||||
{
|
||||
MIX_SharedState *g = &M_shared_state;
|
||||
P_AssertLockedE(lock, &g->mutex);
|
||||
(UNUSED)lock;
|
||||
(MaybeUnused)lock;
|
||||
|
||||
/* Remove from playing list */
|
||||
MIX_Track *prev = track->prev;
|
||||
|
||||
@ -65,8 +65,8 @@ void P_Unlock(P_Lock *lock);
|
||||
# define P_AssertLockedE(l, m) Assert((l)->mutex == (m) && (l)->exclusive == 1)
|
||||
# define P_AssertLockedES(l, m) Assert((l)->mutex == (m))
|
||||
#else
|
||||
# define P_AssertLockedE(l, m) (UNUSED)l
|
||||
# define P_AssertLockedES(l, m) (UNUSED)l
|
||||
# define P_AssertLockedE(l, m) (MaybeUnused)l
|
||||
# define P_AssertLockedES(l, m) (MaybeUnused)l
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
@ -187,7 +187,7 @@ void P_W32_WaitReleaseThread(P_W32_Thread *thread)
|
||||
__prof;
|
||||
b32 success = P_W32_TryReleaseThread(thread, F32Infinity);
|
||||
Assert(success);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
@ -671,7 +671,7 @@ ForceNoInline void P_W32_FiberResume(P_W32_Fiber *fiber)
|
||||
|
||||
void P_W32_YieldFiber(P_W32_Fiber *fiber, P_W32_Fiber *parent_fiber)
|
||||
{
|
||||
(UNUSED)fiber;
|
||||
(MaybeUnused)fiber;
|
||||
Assert(fiber->id == FiberId());
|
||||
Assert(parent_fiber->id == fiber->parent_id);
|
||||
Assert(parent_fiber->id > 0);
|
||||
@ -727,7 +727,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
||||
P_W32_WorkerCtx *ctx = worker_ctx_arg;
|
||||
P_Pool pool_kind = ctx->pool_kind;
|
||||
P_W32_JobPool *pool = &g->job_pools[pool_kind];
|
||||
(UNUSED)ctx;
|
||||
(MaybeUnused)ctx;
|
||||
|
||||
{
|
||||
/* TODO: Heuristic pinning */
|
||||
@ -739,7 +739,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
||||
__profn("Set priority");
|
||||
b32 success = SetThreadPriority(thread_handle, pool->thread_priority) != 0;
|
||||
Assert(success);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -761,7 +761,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
||||
}
|
||||
#endif
|
||||
Assert(success);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -772,7 +772,7 @@ P_W32_ThreadDef(P_W32_JobWorkerEntryFunc, worker_ctx_arg)
|
||||
DWORD task = 0;
|
||||
HANDLE mmc_handle = AvSetMmThreadCharacteristics(L"Pro Audio", &task);
|
||||
Assert(mmc_handle);
|
||||
(UNUSED)mmc_handle;
|
||||
(MaybeUnused)mmc_handle;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1107,7 +1107,7 @@ P_W32_ThreadDef(P_W32_JobSchedulerEntryFunc, _)
|
||||
{
|
||||
i32 priority = THREAD_PRIORITY_TIME_CRITICAL;
|
||||
b32 success = SetThreadPriority(GetCurrentThread(), priority);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
Assert(success);
|
||||
}
|
||||
|
||||
@ -2281,7 +2281,7 @@ String P_ReadFile(Arena *arena, P_File file)
|
||||
/* TODO: error checking */
|
||||
AlignArena(arena, 16);
|
||||
s.text = PushStructsNoZero(arena, u8, size);
|
||||
(UNUSED)ReadFile(
|
||||
(MaybeUnused)ReadFile(
|
||||
(HANDLE)file.handle,
|
||||
s.text,
|
||||
(DWORD)s.len,
|
||||
@ -2308,7 +2308,7 @@ void P_WriteFile(P_File file, String data)
|
||||
}
|
||||
|
||||
/* WriteFile returns TRUE on success */
|
||||
(UNUSED)WriteFile(
|
||||
(MaybeUnused)WriteFile(
|
||||
(HANDLE)file.handle,
|
||||
data.text,
|
||||
(DWORD)data.len,
|
||||
@ -2513,7 +2513,7 @@ P_WatchInfoList P_ReadWatchWait(Arena *arena, P_Watch *dw)
|
||||
0,
|
||||
&ov,
|
||||
0);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
Assert(success);
|
||||
|
||||
HANDLE handles[] = {
|
||||
@ -3070,7 +3070,7 @@ void P_WriteSock(P_Sock *sock, P_Address address, String data)
|
||||
if (size != (i32)data.len)
|
||||
{
|
||||
i32 err = WSAGetLastError();
|
||||
(UNUSED)err;
|
||||
(MaybeUnused)err;
|
||||
Assert(0);
|
||||
}
|
||||
#endif
|
||||
@ -3373,10 +3373,10 @@ P_JobDef(P_W32_AppShutdownJob, _)
|
||||
|
||||
int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance, _In_ LPWSTR cmdline_wstr, _In_ int show_code)
|
||||
{
|
||||
(UNUSED)instance;
|
||||
(UNUSED)prev_instance;
|
||||
(UNUSED)cmdline_wstr;
|
||||
(UNUSED)show_code;
|
||||
(MaybeUnused)instance;
|
||||
(MaybeUnused)prev_instance;
|
||||
(MaybeUnused)cmdline_wstr;
|
||||
(MaybeUnused)show_code;
|
||||
|
||||
__profthread("Main thread", PROF_THREAD_GROUP_MAIN);
|
||||
P_W32_SharedCtx *g = &P_W32_shared_ctx;
|
||||
@ -3441,7 +3441,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
||||
}
|
||||
}
|
||||
Assert(success);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
}
|
||||
}
|
||||
CloseHandle(thread);
|
||||
@ -3543,7 +3543,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
||||
|
||||
b32 success = RegisterRawInputDevices(&rid, 1, sizeof(rid));
|
||||
Assert(success);
|
||||
(UNUSED)success;
|
||||
(MaybeUnused)success;
|
||||
}
|
||||
|
||||
/* Init threads pool */
|
||||
|
||||
@ -13,7 +13,7 @@ PB_StartupReceipt PB_Startup(MIX_StartupReceipt *mixer_sr)
|
||||
{
|
||||
__prof;
|
||||
PB_WSP_SharedState *g = &PB_WSP_shared_state;
|
||||
(UNUSED)mixer_sr;
|
||||
(MaybeUnused)mixer_sr;
|
||||
PB_WSP_InitializeWasapi();
|
||||
/* Start playback job */
|
||||
P_Run(1, PB_WSP_PlaybackJob, 0, P_Pool_Audio, P_Priority_High, &g->PB_WSP_PlaybackJob_counter);
|
||||
|
||||
8
src/pp/pp.c
Normal file
8
src/pp/pp.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "pp.h"
|
||||
|
||||
#include "pp_ent.c"
|
||||
#include "pp_phys.c"
|
||||
#include "pp_step.c"
|
||||
#include "pp_space.c"
|
||||
#include "pp_sim.c"
|
||||
#include "pp_core.c"
|
||||
21
src/pp/pp.h
Normal file
21
src/pp/pp.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef PP_H
|
||||
#define PP_H
|
||||
|
||||
#include "../base/base.h"
|
||||
#include "../gpu/gpu.h"
|
||||
#include "../sprite/sprite.h"
|
||||
#include "../font/font.h"
|
||||
#include "../collider/collider.h"
|
||||
#include "../draw/draw.h"
|
||||
#include "../net/net.h"
|
||||
#include "../mixer/mixer.h"
|
||||
#include "../bitbuff/bitbuff.h"
|
||||
|
||||
#include "pp_sim.h"
|
||||
#include "pp_phys.h"
|
||||
#include "pp_space.h"
|
||||
#include "pp_ent.h"
|
||||
#include "pp_step.h"
|
||||
#include "pp_core.h"
|
||||
|
||||
#endif
|
||||
@ -13,13 +13,13 @@ UserStartupReceipt StartupUser(F_StartupReceipt *font_sr,
|
||||
String connect_address_str)
|
||||
{
|
||||
__prof;
|
||||
(UNUSED)font_sr;
|
||||
(UNUSED)sprite_sr;
|
||||
(UNUSED)draw_sr;
|
||||
(UNUSED)asset_cache_sr;
|
||||
(UNUSED)sound_sr;
|
||||
(UNUSED)mixer_sr;
|
||||
(UNUSED)sim_sr;
|
||||
(MaybeUnused)font_sr;
|
||||
(MaybeUnused)sprite_sr;
|
||||
(MaybeUnused)draw_sr;
|
||||
(MaybeUnused)asset_cache_sr;
|
||||
(MaybeUnused)sound_sr;
|
||||
(MaybeUnused)mixer_sr;
|
||||
(MaybeUnused)sim_sr;
|
||||
SharedUserState *g = &shared_user_state;
|
||||
|
||||
SetGstat(GSTAT_DEBUG_STEPS, U64Max);
|
||||
@ -1358,8 +1358,8 @@ void UpdateUser(P_Window *window)
|
||||
ContactConstraint *data = &ent->contact_constraint_data;
|
||||
Entity *e0 = sim_ent_from_id(g->ss_blended, data->e0);
|
||||
Entity *e1 = sim_ent_from_id(g->ss_blended, data->e1);
|
||||
(UNUSED)e0;
|
||||
(UNUSED)e1;
|
||||
(MaybeUnused)e0;
|
||||
(MaybeUnused)e1;
|
||||
|
||||
#if DeveloperIsEnabled
|
||||
/* Draw contact points */
|
||||
@ -1433,8 +1433,8 @@ void UpdateUser(P_Window *window)
|
||||
Entity *e1 = sim_ent_from_id(g->ss_blended, data->e1);
|
||||
CLD_Shape e0_collider = e0->local_collider;
|
||||
CLD_Shape e1_collider = e1->local_collider;
|
||||
(UNUSED)e0_collider;
|
||||
(UNUSED)e1_collider;
|
||||
(MaybeUnused)e0_collider;
|
||||
(MaybeUnused)e1_collider;
|
||||
|
||||
/* Draw closest points */
|
||||
#if 0
|
||||
@ -1538,7 +1538,7 @@ void UpdateUser(P_Window *window)
|
||||
u32 color = collision_reuslt.solved ? Rgba32F(0, 0, 0.25, 1) : Rgba32F(0, 0.25, 0.25, 1);
|
||||
f32 thickness = 2;
|
||||
u32 detail = 512;
|
||||
(UNUSED)thickness;
|
||||
(MaybeUnused)thickness;
|
||||
|
||||
Vec2Array m = CLD_Menkowski(temp.arena, &e0_collider, &e1_collider, e0_xf, e1_xf, detail);
|
||||
|
||||
@ -2134,7 +2134,7 @@ void GenerateuserInputCmds(Client *user_input_client, u64 tick)
|
||||
////////////////////////////////
|
||||
//~ Sim update
|
||||
|
||||
P_JobDef(SimJob, _)
|
||||
P_JobDef(SimJob, UNUSED job)
|
||||
{
|
||||
SharedUserState *g = &shared_user_state;
|
||||
#if 0
|
||||
@ -1013,7 +1013,7 @@ void phys_warm_start_weld_joints(PhysStepCtx *ctx)
|
||||
sim_ent_set_angular_velocity(e1, e1->angular_velocity + joint->angular_impulse1 * inv_i);
|
||||
}
|
||||
#else
|
||||
(UNUSED)joint;
|
||||
(MaybeUnused)joint;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -1260,7 +1260,7 @@ void phys_step(PhysStepCtx *ctx, f32 timestep)
|
||||
f32 earliest_toi = MaxF32(phys_determine_earliest_toi(ctx, step_dt, tolerance, max_iterations), min_toi);
|
||||
step_dt = remaining_dt * earliest_toi;
|
||||
#else
|
||||
(UNUSED)phys_determine_earliest_toi;
|
||||
(MaybeUnused)phys_determine_earliest_toi;
|
||||
#endif
|
||||
}
|
||||
remaining_dt -= step_dt;
|
||||
@ -52,7 +52,7 @@ Readonly Snapshot **_g_sim_snapshot_nil = &G.nil_snapshot;
|
||||
/* Accessed via `sim_ent_nil()` */
|
||||
Readonly Entity **_g_sim_ent_nil = &G.nil_ent;
|
||||
|
||||
SimStartupReceipt sim_startup(void)
|
||||
SimStartupReceipt SimStartup(void)
|
||||
{
|
||||
__prof;
|
||||
G.nil_arena = AllocArena(Gibi(1));
|
||||
@ -25,7 +25,7 @@ Struct(ClientHandle) {
|
||||
* ========================== */
|
||||
|
||||
Struct(SimStartupReceipt) { i32 _; };
|
||||
SimStartupReceipt sim_startup(void);
|
||||
SimStartupReceipt SimStartup(void);
|
||||
|
||||
/* ========================== *
|
||||
* Client store
|
||||
@ -170,9 +170,9 @@ internal Entity *test_spawn_employee(Entity *parent)
|
||||
|
||||
/* Player weapon */
|
||||
if (employee->valid) {
|
||||
(UNUSED)test_spawn_smg;
|
||||
(UNUSED)test_spawn_launcher;
|
||||
(UNUSED)test_spawn_chucker;
|
||||
(MaybeUnused)test_spawn_smg;
|
||||
(MaybeUnused)test_spawn_launcher;
|
||||
(MaybeUnused)test_spawn_chucker;
|
||||
|
||||
Entity *e = test_spawn_chucker(employee);
|
||||
employee->equipped = e->id;
|
||||
@ -229,7 +229,7 @@ internal void test_teleport(Entity *ent, Vec2 pos)
|
||||
|
||||
internal void test_spawn_entities1(Entity *parent, Vec2 pos)
|
||||
{
|
||||
(UNUSED)pos;
|
||||
(MaybeUnused)pos;
|
||||
|
||||
/* Enemy */
|
||||
{
|
||||
@ -242,7 +242,7 @@ internal void test_spawn_entities1(Entity *parent, Vec2 pos)
|
||||
|
||||
internal void test_spawn_entities2(Entity *parent, Vec2 pos)
|
||||
{
|
||||
(UNUSED)pos;
|
||||
(MaybeUnused)pos;
|
||||
|
||||
/* Small Box */
|
||||
#if 1
|
||||
@ -313,7 +313,7 @@ internal void test_spawn_entities2(Entity *parent, Vec2 pos)
|
||||
|
||||
internal void test_spawn_entities3(Entity *parent, Vec2 pos)
|
||||
{
|
||||
(UNUSED)pos;
|
||||
(MaybeUnused)pos;
|
||||
|
||||
/* Heavy box */
|
||||
{
|
||||
@ -338,7 +338,7 @@ internal void test_spawn_entities3(Entity *parent, Vec2 pos)
|
||||
|
||||
internal void test_spawn_entities4(Entity *parent, Vec2 pos)
|
||||
{
|
||||
(UNUSED)pos;
|
||||
(MaybeUnused)pos;
|
||||
|
||||
/* Light box */
|
||||
Entity *e = sim_ent_alloc_sync_src(parent);
|
||||
@ -42,7 +42,7 @@ RES_StartupReceipt RES_Startup(void);
|
||||
RES_Resource RES_OpenResource(String name);
|
||||
|
||||
#if RESOURCES_EMBEDDED
|
||||
# define RES_CloseResource(res_ptr) (UNUSED)res_ptr
|
||||
# define RES_CloseResource(res_ptr) (MaybeUnused)res_ptr
|
||||
#else
|
||||
void RES_CloseResource(RES_Resource *res_ptr);
|
||||
#endif
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
#include "sim.h"
|
||||
|
||||
#include "sim_core.c"
|
||||
#include "sim_ent.c"
|
||||
#include "sim_phys.c"
|
||||
#include "sim_step.c"
|
||||
#include "sim_space.c"
|
||||
@ -1,17 +0,0 @@
|
||||
#ifndef SIM_H
|
||||
#define SIM_H
|
||||
|
||||
#include "../base/base.h"
|
||||
#include "../sprite/sprite.h"
|
||||
#include "../collider/collider.h"
|
||||
#include "../net/net.h"
|
||||
#include "../mixer/mixer.h"
|
||||
#include "../bitbuff/bitbuff.h"
|
||||
|
||||
#include "sim_core.h"
|
||||
#include "sim_phys.h"
|
||||
#include "sim_space.h"
|
||||
#include "sim_ent.h"
|
||||
#include "sim_step.h"
|
||||
|
||||
#endif
|
||||
@ -7,7 +7,7 @@ SND_StartupReceipt SND_Startup(AC_StartupReceipt *asset_cache_sr)
|
||||
{
|
||||
__prof;
|
||||
SND_SharedState *g = &SND_shared_state;
|
||||
(UNUSED)asset_cache_sr;
|
||||
(MaybeUnused)asset_cache_sr;
|
||||
g->params.arena = AllocArena(Gibi(64));
|
||||
return (SND_StartupReceipt) { 0 };
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ TTF_Result TTF_Decode(Arena *arena, String encoded, f32 point_size, u32 *cache_c
|
||||
|
||||
/* TODO: handle errors */
|
||||
HRESULT error = 0;
|
||||
(UNUSED)error;
|
||||
(MaybeUnused)error;
|
||||
|
||||
/* File */
|
||||
IDWriteFontFile *font_file = 0;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
#include "user.h"
|
||||
|
||||
#include "user_core.c"
|
||||
@ -1,15 +0,0 @@
|
||||
#ifndef USER_H
|
||||
#define USER_H
|
||||
|
||||
#include "../base/base.h"
|
||||
#include "../sim/sim.h"
|
||||
#include "../gpu/gpu.h"
|
||||
#include "../sprite/sprite.h"
|
||||
#include "../font/font.h"
|
||||
#include "../collider/collider.h"
|
||||
#include "../draw/draw.h"
|
||||
#include "../net/net.h"
|
||||
|
||||
#include "user_core.h"
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user