Replay fixes (#17)
Fixes to work with our game. Replay fixes and improvements. Removed shape names (save memory). B3_DEFAULT_CATEGORY_BITS is now UINT64_MAX to make selection easier.
This commit is contained in:
parent
5c9b516486
commit
0c8ef46931
51 changed files with 5653 additions and 3853 deletions
|
|
@ -1,17 +1,19 @@
|
|||
// SPDX-FileCopyrightText: 2025 Erin Catto
|
||||
// SPDX-FileCopyrightText: 2026 Erin Catto
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#define B3_TYPE_OF( A ) __typeof__( A )
|
||||
|
||||
// Swap two same-size lvalues through a byte buffer. Avoids __typeof__ so it builds on any C compiler.
|
||||
#define B3_SWAP( x, y ) \
|
||||
do \
|
||||
{ \
|
||||
B3_TYPE_OF( x ) B3_SWAP_TEMP = x; \
|
||||
x = y; \
|
||||
y = B3_SWAP_TEMP; \
|
||||
_Static_assert( sizeof( x ) == sizeof( y ), "size mismatch" ); \
|
||||
char B3_SWAP_TEMP[sizeof( x )]; \
|
||||
memcpy( B3_SWAP_TEMP, &( x ), sizeof( x ) ); \
|
||||
memcpy( &( x ), &( y ), sizeof( x ) ); \
|
||||
memcpy( &( y ), B3_SWAP_TEMP, sizeof( x ) ); \
|
||||
} \
|
||||
while ( 0 )
|
||||
|
|
|
|||
Loading…
Reference in a new issue