Pascal
function tsInit(Name: tsEnum): tsBool;
C/C++
tsBool tsInit(tsEnum Name);
Initialize the TextSuite library or some of the subsystems. The tsInit function count how much TS_INIT_TEXTSUITE is getting initialized. If the librarys core already was initialized this functions does nothing instead of incrementing this counter. If you want to quit the library you have to call tsQuit and the counter will decreased. If the counter reached zero the library and all subsystems will quit. So it is importat to call tsQuit same count you have called tsInit with the flag TS_INIT_TEXTSUITE.
|
Warning |
|---|---|
|
The internal counter dosn't mean an callcounter of tsInit! It means an counter how much the flag TS_INIT_TEXTSUITE is present in the name parameter. |
|
If you want to know what requirents exists for the subsystems please take a look in the requirements and restrictions article.
The parameter Name provides an set of consts that describes which subsystems will be initialized.
Initializes the core of the TextSuite library.
|
Important |
|---|---|
|
Before you can use any functionallity of this library you must initialize the TextSuite library. |
|
Initializes some functions of the SDL_ttf library. These functions are used to create chars with SDL_ttf. Also some functions of the SDL library will be initialized.
This system is used for TS_CREATOR_SDL. Also some functions of the SDL library will be initialized.
Initializes some functions of SDL_image.
This image library will be used for TS_IMAGE_LIBRARY_SDL to load external images. Also some functions of the SDL library will be initialized.
Initializes some functions from the Graphic Device Interfaces (GDI) under windows. This functions are used to create chars with the GDI.
This system is used for TS_CREATOR_GDI, TS_CREATOR_GDI_FACENAME.
Initializes functions from OpenGL. If you want to print some text on the screen you need to initialize OpenGL. At this moment only functions from the 1.1 core will be uses.
This system is used for TS_RENDERER_OPENGL.
If all systems was successfully initialized the function returns TS_TRUE.
If the initialization of one ore more systems failed the function returns TS_FALSE.
The initialization of one ore more subsystems failed.