Module d2d.sdl2
LibSDL2
Functions
Name | Description |
---|---|
ensureSafe(output)
|
Takes in an integer output from an SDL function and then throws an error if the integer isn't 0 Because SDL doesn't throw errors, but rather returns codes, 0 means a successful finish to a function Any non-zero output from a function means that SDL encountered an error, and this function will throw upon an SDL error |
ensureSafe(output)
|
Takes in an object from an SDL function and then throws an error if the object is null Because SDL doesn't throw errors upon failed object creation, but constructs the object as a null, a non-null object means a successful creation Any null creation means that SDL encountered an error, and this function will throw an SDL error accordingly |
handle(vec)
|
Gets a 2d vector as an SDL_Point* |
handle(rec)
|
Gets a 2d axis aligned bounding box as an SDL_Rect* |
loadLibImage()
|
Loads SDL_Image libraries Function can be called many times, but load only happens once |
loadLibMixer()
|
Loads SDL_Mixer libraries Function can be called many times, but load only happens once |
loadLibSDL(ver)
|
Loads base DerelictSDL2 Function can be called many times, but load only happens once |
loadLibTTF()
|
Loads SDL_ttf libraries Function can be called many times, but load only happens once |
toPolygon(rec)
|
Gets a 2d axis aligned bounding box as a polygon |