#include <Core.h>
Public Member Functions | |
UINT | Init (const char *name) |
Function to initialize the object Core. | |
UINT | InitAll (const char *name, int w, int h, int bpp=32, bool winmode=false, int frequency=DEFAULT_FREQUENCY22, word format=DEFAULT_FORMAT, int channels=DEFAULT_NUM_CHANNELS, int chunksize=DEFAULT_CHUNKSIZE) |
Function to initialize the whole library. | |
void | Release (void) |
Function to finalize the object Core. | |
void | ReleaseAll (void) |
Function to finalize the whole library. | |
void | ErrMsg (const char *msg) |
Function to send a message of error by screen. | |
void | Delay (UINT ms) |
Function to stop the execution of the program. | |
dword | GetTime (void) |
Function to obtain the passed time. | |
Static Public Member Functions | |
static Core * | GetInstance (void) |
Function to obtain the instance of Core. | |
Public Attributes | |
Graphics * | AppGraphics |
Object to handle the graphical section. | |
Input * | AppInput |
Object to handle the input of the program. | |
Audio * | AppAudio |
Object to handle the section of the audio one. | |
Script * | AppScript |
Object to handle the section of scripting with Lua. |
The main reason for the existence of the class Core is to initialize the base system of the library, on which the rest of functionalities of the library mounts. In order to make the use more comfortable of the other sections, Core contains pointers to the classes Graphics, Input, Audio and Script.
void Yukino::Core::Delay | ( | UINT | ms | ) | [inline] |
Function to stop the execution of the program.
This function serves to stop the execution of the program during a determined number of milliseconds.
ms | Number of milliseconds that we stopped the execution. |
void Yukino::Core::ErrMsg | ( | const char * | msg | ) | [inline] |
Function to send a message of error by screen.
This function serves to show the user a message of error of the application, in case that after finding an error, we may want to show an explanation of what it is what it has happened.
msg | Message of error that we want to show the user. |
Core * Yukino::Core::GetInstance | ( | void | ) | [static] |
Function to obtain the instance of Core.
This function creates an instance of Core, in case of not being created, and gives back a pointer of this if memory is successful requesting.
dword Yukino::Core::GetTime | ( | void | ) | [inline] |
Function to obtain the passed time.
This function serves to obtain the time passed from the beginning of the application. Normally this one is used to chronometrate parts of the code.
UINT Yukino::Core::Init | ( | const char * | name | ) |
Function to initialize the object Core.
This function serves to initialize only the object Core, passing to him the name of the application, that is going to use the library.
name | Name of the application. |
UINT Yukino::Core::InitAll | ( | const char * | name, | |
int | w, | |||
int | h, | |||
int | bpp = 32 , |
|||
bool | winmode = false , |
|||
int | frequency = DEFAULT_FREQUENCY22 , |
|||
word | format = DEFAULT_FORMAT , |
|||
int | channels = DEFAULT_NUM_CHANNELS , |
|||
int | chunksize = DEFAULT_CHUNKSIZE | |||
) |
Function to initialize the whole library.
This function serves to initialize the whole library, passing to him the parameters necessary to initiate Core, Graphics, Input, Audio and Script.
name | Name of the application. | |
w | Width of the application. | |
h | Height of the application. | |
bpp | Depth of color of the application. | |
winmode | Window mode activated. | |
frequency | Audio's frequency. | |
format | Audio's format. | |
channels | Audio's channels's number. | |
chunksize | Audio's buffer's size. |
void Yukino::Core::Release | ( | void | ) |
Function to finalize the object Core.
This function serves to finalize only the object Core.
void Yukino::Core::ReleaseAll | ( | void | ) |
Object to handle the section of the audio one.
This variable is a pointer to the object that handles the section of the audio one of the library. From him we will be able to handle the audio one and to reproduce sounds.
Object to handle the graphical section.
This variable is a pointer to the object that handles the graphical section of the library. From him we will be able to make calls to paint any Surface that we have in the screen of the application.
Object to handle the input of the program.
This variable is a pointer to the object that handles the section of the input of the library. From him we will be able to handle the keyboard and the mouse.
Object to handle the section of scripting with Lua.
This variable is a pointer to the object that handles the section of scripting with Lua of the library. From him we will be able to configure interpreter, and to handle the stack of Lua, when we create our functions.