HLP - help functions
Helper functions generally used for safety checks, to get specific information from the engine or to interface with the configuration .ini
files.
Hlp_HasFocusVob
Hlp_HasFocusVob
Returns TRUE
, if a specified NPC has a Vob in focus
npc
- NPCreturn
-TRUE
if npc has a focus Vob,FALSE
if it does not
Hlp_GetFocusVob
Hlp_GetFocusVob
Returns NPC's focus Vob
npc
- NPCreturn
- focus vob
Hlp_GetFocusVobName
Hlp_GetFocusVobName
Returns the name of NPC's focus vob
npc
- NPCreturn
- focus vob name
Hlp_GetStringLength
Hlp_GetStringLength
Returns the length of a specified string
return
- length ofstr
IsNAN
IsNAN
Checks whether floating point number is valid
return
-TRUE
ifvalue
is NaN,FALSE
ifvalue
is a valid floating point number
Hlp_KeyToggled
Hlp_KeyToggled
Checks whether key
is toggled
key
- key codereturn
-TRUE
if key is toggled,FALSE
if key is not toggled
Hlp_KeyPressed
Hlp_KeyPressed
Checks whether key
is pressed
key
- key codereturn
-TRUE
if key is pressed,FALSE
if key is not pressed
Hlp_LogicalKeyToggled
Hlp_LogicalKeyToggled
Checks whether logical key
is toggled
key
- key codereturn
-TRUE
if key is toggled,FALSE
if key is not toggled
Hlp_GameOnPause
Hlp_GameOnPause
Checks whether the game is paused
return
-TRUE
if the game is paused,FALSE
if the game is not paused
Hlp_MessageBox
Hlp_MessageBox
Opens a message box with a specified message
message
- message to be printed
Hlp_PrintConsole
Hlp_PrintConsole
Prints a message to the Union debug console
message
- message to be printed
Hlp_OptionIsExists
Hlp_OptionIsExists
Checks whether the entry
in section
in .ini
file optName
exists
optName
values
"Gothic"
"Mod"
"SystemPack"
optName
- the.ini
filesection
- settings section like[GAME]
entry
- one setting entry likeplayLogoVideos
return
-TRUE
if the option exists,FALSE
if the option does not exist
Hlp_ReadOptionInt
Hlp_ReadOptionInt
Read an integer value from specified .ini
file, section and entry.
optName
values
"Gothic"
"Mod"
"SystemPack"
optName
- the.ini
filesection
- settings section like[GAME]
entry
- one setting entry likeplayLogoVideos
default
- default value - if the value is emptyreturn
- the option value
Hlp_ReadOptionFloat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Hlp_ReadOptionString
Hlp_ReadOptionString
Read a string value from specified .ini
file, section and entry.
optName
values
"Gothic"
"Mod"
"SystemPack"
optName
- the.ini
filesection
- settings section like[INTERFACE]
entry
- one setting entry likescale
default
- default value - if the value is emptyreturn
- the option value
Hlp_WriteOptionInt
Hlp_WriteOptionInt
Writes an integer value to specified .ini
file, section and entry.
optName
values
"Gothic"
"Mod"
"SystemPack"
optName
- the.ini
filesection
- settings section like[INTERFACE]
entry
- one setting entry likescale
value
- value to be written
Hlp_WriteOptionFloat
Hlp_WriteOptionFloat
Writes a floating point value to specified .ini
file, section and entry.
optName
values
"Gothic"
"Mod"
"SystemPack"
optName
- the.ini
filesection
- settings section like[INTERFACE]
entry
- one setting entry likescale
value
- value to be written
Hlp_WriteOptionString
Hlp_WriteOptionString
Writes a string value to specified .ini
file, section and entry.
optName
values
"Gothic"
"Mod"
"SystemPack"
optName
- the.ini
filesection
- settings section like[INTERFACE]
entry
- one setting entry likescale
value
- value to be written
Hlp_GetSteamPersonalName
Hlp_GetSteamPersonalName
Returns the name of the current Steam user Returns empty string when not run with Steam
return
- string containing the Steam username, or an empty string