Function hooking.
More...
|
| CAVESTORY_MOD_API BOOL | CSM_FindNetScoreType (const char *pName, CaveNet::DataStructures::NetScoreType **pOut) |
| | Fetch a NetScoreType by name. More...
|
| |
| CAVESTORY_MOD_API BOOL | CSM_FindNetScoreTypeByHash (unsigned int iNameHash, CaveNet::DataStructures::NetScoreType **pOut) |
| | Fetch a NetScoreType by name hash. More...
|
| |
| CAVESTORY_MOD_API BOOL | CSM_RegisterNetScoreType (const char *pName, const char *pUIFormat, const char *pUIDynamicFormat, unsigned long long int iMaskBits=0, unsigned long long int iFlags=0, CSM_NetScore_GetScoreModifyAmount pModifyFunc=NULL) |
| | Register a NetScoreType by name. More...
|
| |
| CAVESTORY_MOD_API bool | CSM_RegisterWeaponByName (const char *pWeaponName, CSM_Weapon_ShootFunc pFunc) |
| | Register a weapon by name. More...
|
| |
| CAVESTORY_MOD_API bool | CSM_RegisterWeapon (int iWeaponIndex, CSM_Weapon_ShootFunc pFunc) |
| | Register a weapon. More...
|
| |
| CAVESTORY_MOD_API bool | CSM_RegisterBullet (int iBulletIndex, CSM_Bullet_ActFunc pFunc) |
| | Register a bullet. More...
|
| |
| CAVESTORY_MOD_API bool | CSM_RegisterNpc (int iNpcIndex, CSM_Npc_ActFunc pFunc) |
| | Register an NPC. More...
|
| |
| CAVESTORY_MOD_API int | CSM_RegisterCaret (CSM_Caret_ActFunc pFunc, int iWidth, int iHeight) |
| | Register a caret. More...
|
| |
| CAVESTORY_MOD_API BOOL | CSM_RegisterPlayerState (const char *pStateName, unsigned long long int iFlags, unsigned int iTransmitFlags, PlayerState_ActFuncType pActFunc, PlayerState_AnimFuncType pAnimFunc, PlayerState_DrawFuncType pDrawFunc=NULL, int *pPlayerStateIndex=NULL, unsigned int iIndexOverride=0, PlayerStateAnimator_OutputType iOutputType=PlayerStateAnimator_OutputType::PSAOT_PLAYER_FRAME) |
| | Register a player state. More...
|
| |
| CAVESTORY_MOD_API BOOL | CSM_RegisterTextScriptCommand (const char *pCmdName, const char *pShortDesc, const char *pDesc, const char *pArgs, void(*pFuncPtr)(int &, int &, int &, int &, bool &, int &)) |
| | Register a textscript command. More...
|
| |
|
CAVESTORY_MOD_API void | CSM_ResetNetScoreTypes () |
| | Reset all NetScore types.
|
| |
Function hooking.
Hooking functions to various game aspects.
◆ CSM_FindNetScoreType()
Fetch a NetScoreType by name.
- Parameters
-
| pName | The internal name of the score type we want. |
| pOut | Holds the result. Is set to NULL if the type couldn't be found. |
- Returns
- Returns TRUE on success, FALSE otherwise.
◆ CSM_FindNetScoreTypeByHash()
Fetch a NetScoreType by name hash.
- Parameters
-
| iNameHash | The hash of the score type we want. |
| pOut | Holds the result. Is set to NULL if the type couldn't be found. |
- Returns
- Returns TRUE on success, FALSE otherwise.
◆ CSM_RegisterBullet()
Register a bullet.
- Parameters
-
| iBulletIndex | The bullet that this act function belongs to. |
| pFunc | A pointer to the act function to add. |
- Returns
- Returns true on success, false otherwise.
- Note
- The function added here will be used every frame that the game is not frozen on.
◆ CSM_RegisterCaret()
Register a caret.
- Parameters
-
| pActFunc | The caret's act function |
| iWidth | The width of the caret, in pixels. Not subpixels / magnified. |
| iHeight | The height of the caret, in pixels. Not subpixels / magnified. |
- Returns
- Returns the index of the registered caret on success, otherwise returns -1 on fail.
◆ CSM_RegisterNetScoreType()
| CAVESTORY_MOD_API BOOL CSM_RegisterNetScoreType |
( |
const char * |
pName, |
|
|
const char * |
pUIFormat, |
|
|
const char * |
pUIDynamicFormat, |
|
|
unsigned long long int |
iMaskBits = 0, |
|
|
unsigned long long int |
iFlags = 0, |
|
|
CSM_NetScore_GetScoreModifyAmount |
pModifyFunc = NULL |
|
) |
| |
Register a NetScoreType by name.
- Parameters
-
| pName | The internal name of this score type. |
| pUIFormat | The format of the string on the stats page. Something like "Players Killed: $TOTAL$ ($MOST$ Killstreak)". Possible keywords are "$TOTAL$", "$MOST$" and "$LIFE$". |
| pUIDynamicFormat | The format of the string on the stats page, but with a dynamic "%s" insert. |
| iMaskBits | The mask bits for this score type. |
| iFlags | The flags to set for this score type. |
| pModifyFunc | A pointer to the function that will determine the amount of points to modify. |
- Returns
- Returns true on success, false otherwise.
- See also
- NetScoreMaskBits
◆ CSM_RegisterNpc()
Register an NPC.
- Parameters
-
| iNpcIndex | The NPC's index |
| pFunc | The NPC's act function. |
- Returns
- Returns true on success, false otherwise.
◆ CSM_RegisterPlayerState()
Register a player state.
- Parameters
-
| pStateName | The name of the player state. |
| iFlags | The flags for this state. |
| iTransmitFlags | The networking transmit flags. |
| pActFunc | The act function for this player state. |
| pAnimFunc | The animation function for this player state. |
| pDrawFunc | The draw function for this player state. Can be NULL. |
| pPlayerStateIndex | A pointer to an int that will hold the index that this player state was assigned to. |
| iIndexOverride | Use this to override a existing player state. Pass '0' to this arg to append it as a new playerstate. |
| iOutputType | Tells the animation system how to parse the return value from the animate function for this player state. |
◆ CSM_RegisterTextScriptCommand()
| CAVESTORY_MOD_API BOOL CSM_RegisterTextScriptCommand |
( |
const char * |
pCmdName, |
|
|
const char * |
pShortDesc, |
|
|
const char * |
pDesc, |
|
|
const char * |
pArgs, |
|
|
void(*)(int &, int &, int &, int &, bool &, int &) |
pFuncPtr |
|
) |
| |
Register a textscript command.
- Parameters
-
| pCmdName | The command's name. If this string is not three characters in size, then this function will fail. |
| pShortDesc | The command's short-hand description. Ex: <TRA has the shorthand description "TRAnsport" |
| pDesc | A description of what the command does. |
| pArgs | A string containing the argument types for each argument. Should length of the string shoul correspond to the number of arguments there are. |
| pFuncPtr | A pointer to the actual TSC function. |
- Returns
- Returns true on success, false on failure.
◆ CSM_RegisterWeapon()
Register a weapon.
- Parameters
-
| iWeaponIndex | The bullet that this act function belongs to. |
| pFunc | A pointer to the shoot function. |
- Returns
- Returns true on success, false otherwise.
- Note
- The function added here will be used every frame that the game is not frozen on.
◆ CSM_RegisterWeaponByName()
Register a weapon by name.
- Parameters
-
| pWeaponName | The (case-insensitive) name of the weapon to map the function to. |
| pFunc | A pointer to the shoot function. |
- Returns
- Returns true on success, false otherwise.
- Note
- The function added here will be used every frame that the game is not frozen on.