11#if defined( _MSC_VER ) && defined( box2d_EXPORTS )
13 #define BOX2D_EXPORT __declspec( dllexport )
14#elif defined( _MSC_VER ) && defined( BOX2D_DLL )
16 #define BOX2D_EXPORT __declspec( dllimport )
17#elif defined( box2d_EXPORTS )
19 #define BOX2D_EXPORT __attribute__( ( visibility( "default" ) ) )
27 #define B2_API extern "C" BOX2D_EXPORT
28 #define B2_INLINE inline
29 #define B2_LITERAL(T) T
30 #define B2_ZERO_INIT {}
32 #define B2_API BOX2D_EXPORT
33 #define B2_INLINE static inline
35 #define B2_LITERAL(T) (T)
36 #define B2_ZERO_INIT {0}
49typedef void*
b2AllocFcn(
unsigned int size,
int alignment );
56typedef int b2AssertFcn(
const char* condition,
const char* fileName,
int lineNumber );
94#elif defined( __linux__ ) || defined( __APPLE__ )
95 unsigned long long start_sec;
96 unsigned long long start_usec;
102B2_API b2Timer b2CreateTimer(
void );
103B2_API int64_t b2GetTicks( b2Timer* timer );
104B2_API
float b2GetMilliseconds(
const b2Timer* timer );
105B2_API
float b2GetMillisecondsAndReset( b2Timer* timer );
106B2_API
void b2SleepMilliseconds(
int milliseconds );
107B2_API
void b2Yield(
void );
110#define B2_HASH_INIT 5381
111B2_API uint32_t b2Hash( uint32_t hash,
const uint8_t* data,
int count );
int minor
Incremental changes.
Definition base.h:77
int revision
Bug fixes.
Definition base.h:80
int major
Significant changes.
Definition base.h:74
void * b2AllocFcn(unsigned int size, int alignment)
Prototype for user allocation function.
Definition base.h:49
void b2SetAllocator(b2AllocFcn *allocFcn, b2FreeFcn *freeFcn)
This allows the user to override the allocation functions.
void b2FreeFcn(void *mem)
Prototype for user free function.
Definition base.h:53
void b2SetAssertFcn(b2AssertFcn *assertFcn)
Override the default assert callback.
int b2AssertFcn(const char *condition, const char *fileName, int lineNumber)
Prototype for the user assert callback. Return 0 to skip the debugger break.
Definition base.h:56
b2Version b2GetVersion(void)
Get the current version of Box2D.
Version numbering scheme.
Definition base.h:72