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. [Error] is called when an exception occurs. 
    API(wcstr domain, wcstr app, FMessage Print = 0, FMessage Error = 0);

    // Destructor.
    ~API();
};