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
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
Returns NPC's focus Vob
npc
- NPCreturn
- focus vob
Hlp_GetFocusVobName
Returns the name of NPC's focus vob
npc
- NPCreturn
- focus vob name
Hlp_GetStringLength
Returns the length of a specified string
return
- length ofstr
IsNAN
Checks whether floating point number is valid
return
-TRUE
ifvalue
is NaN,FALSE
ifvalue
is a valid floating point number
Hlp_KeyToggled
Checks whether key
is toggled
key
- key codereturn
-TRUE
if key is toggled,FALSE
if key is not toggled
Hlp_KeyPressed
Checks whether key
is pressed
key
- key codereturn
-TRUE
if key is pressed,FALSE
if key is not pressed
Hlp_LogicalKeyToggled
Checks whether logical key
is toggled
key
- key codereturn
-TRUE
if key is toggled,FALSE
if key is not toggled
Hlp_GameOnPause
Checks whether the game is paused
return
-TRUE
if the game is paused,FALSE
if the game is not paused
Hlp_MessageBox
Opens a message box with a specified message
message
- message to be printed
Hlp_PrintConsole
Prints a message to the Union debug console
message
- message to be printed
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
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
Read a floating point 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_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
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
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
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
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
Hlp_DoEvent
Calls every event function with the name funcName
.
funcName
- name of the event function to be called (all of them).