Rayve API

// Rayve API initialization.
class RVAPI API
{
public:
    // Function signature for message callbacks.
    typedef void (*FMessage)(wcstr msg);

    // Throw exception.
    static void Error(wcstr msg);

    // Print message.
    static void Print(wcstr msg, ...);

    // Show in-game message then pause game until spacebar is pressed.
    static void Pause(wcstr msg, ...);

    // Construct API. Must be first function called when program starts. [domain] and [app] are 
    // names used when creating a temp folder for the game. [Print] overrides where Rayve 
    // prints messages. The default is to print to VS output & stdout. Pass 0 to keep default. 
    // [Error] overrides the handling of exceptions. When an exception happens, Rayve should 
    // release the engine, close the display and show an error message dialog. After this, 
    // the default is to break on the function causing the exception. Use [Error] to override 
    // the default break behavior with a custom behavior, or pass 0 to keep the default.
    API(wcstr domain, wcstr app, FMessage Print = 0, FMessage Error = 0);

    // Destructor.
    ~API();
};