Cavestory Mod API
Modules | Functions
Script

Modules

 Flags
 
 Sound
 In-house math functions.
 

Functions

CAVESTORY_MOD_API void CheckNewLine ()
 Check if a new messagebox line needs to be created. More...
 
CAVESTORY_MOD_API void SetNumberTextScript (int iIndex)
 Type a specific number into the message box. More...
 
CAVESTORY_MOD_API void SetCharacterNameTextScript ()
 Append the character's name into the messagebox.
 
CAVESTORY_MOD_API void ClearTextLine ()
 Clear the messagebox.
 
CAVESTORY_MOD_API void Server_FocusOnCurrentPlayer ()
 Focus on the player that started the event.
 
CAVESTORY_MOD_API void Server_ClearFocusFromPlayer ()
 Stop focusing on the event executor.
 
CAVESTORY_MOD_API int GetTextScriptNo (int a)
 Get a number argument from the script. More...
 
CAVESTORY_MOD_API bool ReturnTextScript ()
 Return execution to last call command. More...
 
CAVESTORY_MOD_API bool JumpTextScript (int no, BOOL call=FALSE)
 Jump to another event. More...
 
CAVESTORY_MOD_API void ShowTextLines (const char *pLine4, const char *pLine3, const char *pLine2, const char *pLine1)
 Display a custom message in the message box. More...
 
CAVESTORY_MOD_API void DisplayCustomTextToScript (const char *pString, bool bSanitize=false)
 Appends text to the current messagebox text. More...
 

Detailed Description

Function Documentation

◆ CheckNewLine()

CAVESTORY_MOD_API void CheckNewLine ( )

Check if a new messagebox line needs to be created.

If so, then create it.

◆ DisplayCustomTextToScript()

CAVESTORY_MOD_API void DisplayCustomTextToScript ( const char *  pString,
bool  bSanitize = false 
)

Appends text to the current messagebox text.

Parameters
pStringThe text to add.
bSanitizeWhether to remove TSC from the input string or not.

◆ GetTextScriptNo()

CAVESTORY_MOD_API int GetTextScriptNo ( int  a)

Get a number argument from the script.

Parameters
aThe textscript offset to read the number from. Usually 'gTS.p_read + [offset]'.
Returns
Returns the value at the given offset in numerical form.

◆ JumpTextScript()

CAVESTORY_MOD_API bool JumpTextScript ( int  no,
BOOL  call = FALSE 
)

Jump to another event.

Parameters
noThe event number to jump to.
callIf this is TRUE, the execution will jump back to where it was before this jumpscript call when an END tag is reached.
Returns
Returns true if the event was jumped to successfully, false otherwise.

◆ ReturnTextScript()

CAVESTORY_MOD_API bool ReturnTextScript ( )

Return execution to last call command.

Returns
Returns true if there was queued return data, false otherwise.

◆ SetNumberTextScript()

CAVESTORY_MOD_API void SetNumberTextScript ( int  iIndex)

Type a specific number into the message box.

Parameters
iIndex

◆ ShowTextLines()

CAVESTORY_MOD_API void ShowTextLines ( const char *  pLine4,
const char *  pLine3,
const char *  pLine2,
const char *  pLine1 
)

Display a custom message in the message box.

Parameters
pLine4The fourth line.
pLine3The third line.
pLine2The second line.
pLine1The first line.