HandmadeHero/project/platform/macros.h
Ed_ 973936ac82 Day 4 complete
Going to have to fork win32 modular headers lib, they didn't do handle declares proper.

So far so good. Made a funny looking gradient
2023-09-09 03:03:03 -04:00

15 lines
483 B
C

// Keywords
#define global static // Global variables
#define internal static // Internal linkage
#define local_persist static // Local Persisting variables
#define api_c extern "C"
// Casting
#define ccast( Type, Value ) ( * const_cast< Type* >( & (Value) ) )
#define pcast( Type, Value ) ( * reinterpret_cast< Type* >( & ( Value ) ) )
#define rcast( Type, Value ) reinterpret_cast< Type >( Value )
#define scast( Type, Value ) static_cast< Type >( Value )