|
Cavestory Mod API
|
A list of game manipulation functions. More...
Macros | |
| #define | CAVESTORY_MOD_API __declspec(dllimport) |
| Exports / imports Cavestory Mod API functions & classes. | |
| #define | NPC_MAX (0x200 + ANIM_NPC_MAX) |
| How many npcs can be initialized at one time. | |
| #define | BOSS_MAX 20 |
| How many bosses can be initialized at one time. | |
| #define | ITEM_MAX 32 |
| How many items can be initialized at one time for each client. | |
| #define | ARMS_MAX 8 |
| How many weapons can be initialized at one time for each client. | |
| #define | BULLET_MAX 0x200 |
| How many bullets can be initialized at one time. | |
Functions | |
| CAVESTORY_MOD_API void | CSM_SaveScreenshot (const char *pOutputImagePath, GUI_RECT *pSource=NULL) |
| Take an unmagnified screenshot and save it at a path. More... | |
| CAVESTORY_MOD_API void | CSM_SetFramerateVisible (BOOL bValue) |
| Set the visibility of the FPS counter. More... | |
| CAVESTORY_MOD_API BOOL | CSM_IsFramerateVisible () |
| Set the visibility of the FPS counter. More... | |
| CAVESTORY_MOD_API void | CSM_PlayerState_DrawWeapon (int iFrameX, int iFrameY, SafeClientInterface *pInterface, float fScale=1.f) |
| Draw the weapon. More... | |
| CAVESTORY_MOD_API void | CSM_PlayerState_DrawCharacter (int iFrameX, int iFrameY, SafeClientInterface *pInterface, float fScale=1.f) |
| Draw the character. More... | |
| CAVESTORY_MOD_API int | CSM_FindPlayerAnimFrameByName (const char *pName) |
| Find a player animation frame's index by its name. More... | |
| CAVESTORY_MOD_API BOOL | CSM_CustomPlayer_IsPixelSolid (CustomPlayer *pCharacter, int iFrame, int iX, int iY) |
| Determine if a pixel on a specific frame of animation is opaque or not. More... | |
| CAVESTORY_MOD_API Surface_Ids | CSM_CustomPlayer_GetNormalSurfaceId (CustomPlayer *pCharacter) |
| Get the surface ID for a character's normal plane. More... | |
| CAVESTORY_MOD_API Surface_Ids | CSM_CustomPlayer_GetNormalMaskSurfaceId (CustomPlayer *pCharacter) |
| Get the surface ID for a character's normal mask plane. More... | |
| CAVESTORY_MOD_API Surface_Ids | CSM_CustomPlayer_GetFaceSurfaceId (CustomPlayer *pCharacter) |
| Get the surface ID for a character's face plane. More... | |
| CAVESTORY_MOD_API Surface_Ids | CSM_CustomPlayer_GetFaceMaskSurfaceId (CustomPlayer *pCharacter) |
| Get the surface ID for a character's face mask plane. More... | |
| CAVESTORY_MOD_API void | ClearValueView () |
| Clear all view values. | |
| CAVESTORY_MOD_API void | SetValueView (int *pX, int *pY, int iValue) |
| Create a new view value. More... | |
| CAVESTORY_MOD_API void | ActValueView () |
| Process all view values. | |
| CAVESTORY_MOD_API void | PutValueView (int iFrameX, int iFrameY) |
| Draw all view values. More... | |
| CAVESTORY_MOD_API BOOL | IsNpCharInsideNpChar (NPCHAR *pNpc, NPCHAR *pOther) |
| Check to see if an NPC is clipping bounds with another NPC. More... | |
| CAVESTORY_MOD_API bool | IsSpecificPlayerInsideNpChar (MYCHAR *pMC, NPCHAR *pNpc) |
| Check to see if an NPC is clipping bounds with a player. More... | |
| CAVESTORY_MOD_API bool | IsPlayerInsideNpChar (NPCHAR *pNpc) |
| Check to see if an NPC is clipping bounds with the player. More... | |
| CAVESTORY_MOD_API bool | IsFocusInsideNpChar (NPCHAR *pNpc) |
| Check to see if an NPC is clipping bounds with the NPC's focus object. More... | |
| CAVESTORY_MOD_API void | SetQuake (int iTime) |
| Shake the screen for iTime ticks. More... | |
| CAVESTORY_MOD_API void | SetQuake2 (int iTime) |
| Shake the screen for iTime ticks. More... | |
| CAVESTORY_MOD_API void | ResetQuake () |
| Stop shaking the screen. | |
| CAVESTORY_MOD_API bool | IsAgilityAllowed () |
| Check whether the current mod allows agility. More... | |
| CAVESTORY_MOD_API bool | IsFishingAllowed () |
| Check whether the current mod allows fishing. More... | |
| CAVESTORY_MOD_API bool | IsCarryingAllowed () |
| Check whether the current mod allows carrying other players. More... | |
| CAVESTORY_MOD_API void | SetBullet (int iBulNo, int iSpawnX, int iSpawnY, int iDirection, int iCodeArms, int iLevel, int iGhostId=0) |
| Spawn a bullet at the coordinates. More... | |
| CAVESTORY_MOD_API void | SetCaret (int iSpawnX, int iSpawnY, int iCaretId, int iDirection, CARET **pOut=NULL) |
| Spawn a caret at the coordinates. More... | |
| CAVESTORY_MOD_API void | SetNpChar (int iNpcId, int iSpawnX, int iSpawnY, int iVelocityX, int iVelocityY, int iDirection, NPCHAR *pNpc, int iStartIndex, NPCHAR **iOutNPC=0, bool bForceSpawn=false) |
| Spawn an NPC at the coordinates. More... | |
| CAVESTORY_MOD_API void | DeleteNpCharEvent (int iEventNo, BOOL bSetFlag=TRUE) |
| Delete all NPCs with a specific event number. More... | |
| CAVESTORY_MOD_API void | DeleteNpCharFlag (int iFlagNo, BOOL bSetFlag=FALSE) |
| Delete all NPCs with a specific flag number. More... | |
| CAVESTORY_MOD_API void | DeleteNpCharCode (int iCharCode, BOOL bSmoke, BOOL bSetFlag=TRUE) |
| Delete all NPCs with a specific character code. More... | |
| void CAVESTORY_MOD_API | SetNpChar_Backwards (int iNpcId, int iSpawnX, int iSpawnY, int iVelocityX, int iVelocityY, int iDirection, NPCHAR *pNpc, int iStartIndex, NPCHAR **iOutNPC=0, bool bForceSpawn=false) |
| Spawn an NPC at the coordinates. More... | |
| CAVESTORY_MOD_API bool | SetAnimNpChar (int iNpcId, int iVelocityX, int iVelocityY, int iDirection, NPCHAR *pNpc, int iStartIndex, MYCHAR *pMC, CustomPlayer *pCustomChar, NPCHAR **iOutNPC=0) |
| Spawn an animation NPC at the coordinates. More... | |
| CAVESTORY_MOD_API void | CSM_SpawnEXP (int iSubPixelX, int iSubPixelY, int iAmount) |
| Spawn a certain amount of EXP pellets. More... | |
| CAVESTORY_MOD_API void | CSM_SpawnHeart (int iSubPixelX, int iSubPixelY, int iAmount) |
| Spawn a heart pickup that gives a certain amount of health. More... | |
| CAVESTORY_MOD_API void | CSM_SpawnAmmo (int iSubPixelX, int iSubPixelY, int iAmount) |
| Spawn a missile pickup. More... | |
| CAVESTORY_MOD_API int | CountArmsBullet (int iArmsCode, int iGhostId=-1) |
| Get the number of bullets matching the given description onscreen. More... | |
| CAVESTORY_MOD_API int | CountBulletNum (int iBulletCode, int iGhostId=-1) |
| Get the number of bullets matching the given description onscreen. More... | |
| CAVESTORY_MOD_API void | DeleteArmBullets (int iArmsCode) |
| Delete all bullets matching the arms ID. More... | |
| CAVESTORY_MOD_API void | ClearBullet () |
| Delete all bullets. | |
| CAVESTORY_MOD_API bool | IsActiveSomeBullet () |
| Check if some bullet is active. | |
| CAVESTORY_MOD_API BOOL | HasArmsData (long iCode) |
| Check to see if the singleplayer character has a weapon. More... | |
| CAVESTORY_MOD_API BOOL | AddArmsData2 (long iCode, long iNum, long iMaxNum, long iLevel) |
| Add arms data to the singleplayer character. More... | |
| CAVESTORY_MOD_API BOOL | UseArmsEnergy (long iNum, ARMS *pArmsTable, int iSelectedIdx) |
| Use some arms energy from the selected arm. More... | |
| CAVESTORY_MOD_API void | ChangeToFirstArms () |
| Switch to this client's first weapon. | |
| CAVESTORY_MOD_API MYCHAR * | GetLocalPlayerCharacter () |
| Get the local player. More... | |
| CAVESTORY_MOD_API BOOL | ChargeArmsEnergy (long iChargeAmt, ARMS *pArmsTable, int iSelectedWeapon) |
| Charge the selected weapon in pArmsTable. More... | |
| CAVESTORY_MOD_API void | SetDestroyNpCharUp (int iSpawnX, int iSpawnY, int iMaxRandomXOffset, int iSmokeAmt) |
| Spawns smoke at the given coordinates & flashes the screen. More... | |
| CAVESTORY_MOD_API BOOL | TransferDataStage (int iStageNo, int iEventNo, int iSpawnX, int iSpawnY) |
| Transfer over to a vanilla map. More... | |
| CAVESTORY_MOD_API BOOL | TransferStage (int iStageNo, int iEventNo, int iSpawnX, int iSpawnY) |
| Transfer over to a new map. More... | |
| CAVESTORY_MOD_API BOOL | TransferStage2 (int iStageNo, int iEventNo) |
| Transfer over to a new map without moving characters. More... | |
| CAVESTORY_MOD_API unsigned int | CSM_EntProp_GetFieldNameCRC (const char *pFieldName) |
| Get the CRC value of a property field's name. More... | |
| CAVESTORY_MOD_API int | CSM_EntProp_GetFieldIndexByCrc (NPCHAR *pNpc, unsigned int iFieldCrc) |
| Lookup the index of an NPC's property field. More... | |
| CAVESTORY_MOD_API int | CSM_EntProp_GetFieldIndex (NPCHAR *pNpc, const char *pFieldName) |
| Lookup the index of an NPC's property field. More... | |
| CAVESTORY_MOD_API int | CSM_EntProp_GetFieldValue_ScanString (NPCHAR *pNpc, int iFieldIndex, const char *pFormat,...) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API char * | CSM_EntProp_GetFieldValue_String (NPCHAR *pNpc, int iFieldIndex, char *pOutBuffer, int iOutBufferSize, const char *pDefaultValue="") |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API int | CSM_EntProp_GetFieldValue_Int (NPCHAR *pNpc, int iFieldIndex, int iDefaultValue=0) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API float | CSM_EntProp_GetFieldValue_Float (NPCHAR *pNpc, int iFieldIndex, float fDefaultValue=0.0f) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API BOOL | CSM_EntProp_GetFieldValue_Boolean (NPCHAR *pNpc, int iFieldIndex, BOOL bDefaultValue=FALSE) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API GUI_COLOR * | CSM_EntProp_GetFieldValue_Color (NPCHAR *pNpc, int iFieldIndex, GUI_COLOR *pColorPtr, GUI_COLOR pDefaultValue=GUI_COLOR(0, 0, 0, 0)) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API GUI_POINT * | CSM_EntProp_GetFieldValue_Point (NPCHAR *pNpc, int iFieldIndex, GUI_POINT *pPointPtr, GUI_POINT pDefaultValue=GUI_POINT(0, 0)) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API GUI_RECT * | CSM_EntProp_GetFieldValue_Rect (NPCHAR *pNpc, int iFieldIndex, GUI_RECT *pRectPtr, GUI_RECT pDefaultValue=GUI_RECT(0, 0, 0, 0)) |
| Fetch the value of a field for a specific NPC. More... | |
| CAVESTORY_MOD_API void | CSM_Map_DeleteTile (int iX, int iY, bool bRecordChange=true) |
| Delete a map tile at the specified coordinates. More... | |
| CAVESTORY_MOD_API void | CSM_Map_ShiftTileIndex (int iX, int iY, bool bRecordChange=true) |
| Shift a map tile to the left one tile index. More... | |
| CAVESTORY_MOD_API BOOL | CSM_Map_SetTileIndex (int iX, int iY, unsigned short iTileIndex, bool bCreateSmoke=true, bool bRecordChange=true) |
| Set the map tile index for a specified tile. More... | |
| CAVESTORY_MOD_API void | CSM_Map_ActAnimatedTiles () |
| Act animated tiles. | |
| CAVESTORY_MOD_API void | CSM_Map_ClearAllTileAnimations (bool bForeground) |
| Clear a specific map tile's animation. More... | |
| CAVESTORY_MOD_API void | CSM_Map_ClearTileAnimation (bool bForeground, unsigned int iX, unsigned int iY) |
| Clear a specific map tile's animation. More... | |
| CAVESTORY_MOD_API void | CSM_Map_SetTileAnimation (bool bForeground, unsigned int iX, unsigned int iY, RECT *pRectList, unsigned char iRectCount, unsigned short iWait, Surface_Ids iSurfaceId=SURFACE_ID_LEVEL_TILESET) |
| Set a map tile's animation. More... | |
| CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATA * | GetCurrentTextScriptConfig () |
| Get the current text script context. More... | |
| CAVESTORY_MOD_API void | GetTextScriptPath (char *pPath) |
| Get the text script path. More... | |
| CAVESTORY_MOD_API void | SetTextScriptContext (TEXT_SCRIPT_PTR_DATA *pData=&default_TextScriptPtrData) |
| Set the current text script context. More... | |
| CAVESTORY_MOD_API BOOL | StartTextScript (int iEventNo, bool bTransmit=true, TEXT_SCRIPT_PTR_DATA *pData=&default_TextScriptPtrData, bool bUseRestrictionLevel=false, TextScriptTarget iTargetType=TextScriptTarget::TS_TARGET_EVERYONE, NPCHAR *pSourceNpc=NULL) |
| Start a text script event. More... | |
| CAVESTORY_MOD_API void | StopTextScript () |
| Stop text script. | |
| CAVESTORY_MOD_API int | LoadTimeCounter (const char *pFileName="290.rec") |
| Load the time counter's total time. More... | |
| CAVESTORY_MOD_API unsigned long long int | GetHellTimerGlobalTimerOffset () |
| Get the global timer offset at which the hell counter started at. More... | |
| CAVESTORY_MOD_API void | SetHellTimerGlobalTimerOffset (unsigned long long int iOffset) |
| Set the global timer offset at which the hell counter started at. More... | |
| CAVESTORY_MOD_API void | SetHellTimerFrameCount (int iFrameCount) |
| Set the current hell timer frame count. More... | |
| CAVESTORY_MOD_API int | GetHellTimerFrameCount () |
| Get the current hell timer frame count. More... | |
| CAVESTORY_MOD_API void | SetHellTimerMS (int iTimeInMS) |
| Set the current hell timer time in milliseconds. More... | |
| CAVESTORY_MOD_API int | GetHellTimerMS () |
| Get the current hell timer time in milliseconds. More... | |
| CAVESTORY_MOD_API BOOL | IsProfile () |
| Check if there is a profile. More... | |
| CAVESTORY_MOD_API BOOL | SaveProfile (const char *pFileName, MYCHAR *pMC=NULL) |
| Save the current gamestate to a profile. More... | |
| CAVESTORY_MOD_API BOOL | LoadProfile (const char *pFileName, BOOL bDoGameFuncs=TRUE) |
| Load a profile into the current gamestate. More... | |
| CAVESTORY_MOD_API BOOL | SaveProfileIntoMem (PROFILE *pProfile) |
| Save the current gamestate to a PROFILE* struct. More... | |
| CAVESTORY_MOD_API BOOL | LoadProfileFromMem (PROFILE *pProfile) |
| Load the gamestate from a PROFILE* struct. More... | |
| CAVESTORY_MOD_API BOOL | LoadProfileIntoMem (const char *pName, PROFILE *pProfile, unsigned long long *pModifyTime=NULL) |
| Load a profile into a PROFILE* struct. More... | |
| CAVESTORY_MOD_API unsigned int | CompareTileTypeXY (int iX, int iY, unsigned int iTileTypes) |
| Compare tile types for tile at X, Y. More... | |
| CAVESTORY_MOD_API unsigned int | CompareTileTypeNPC (NPCHAR *pNpc, unsigned int iTileTypes) |
| Compare tile types for the map tile that npc is on. More... | |
| CAVESTORY_MOD_API unsigned int | CompareTileType (unsigned int iTileTypes, unsigned int iOtherTileTypes) |
| Compare two tile types against each other. More... | |
| CAVESTORY_MOD_API unsigned int | GetTileFlagsXY (int iX, int iY) |
| Fetch the tile type flags for a map tile. More... | |
| CAVESTORY_MOD_API unsigned int | GetTileFlagsNPC (NPCHAR *pNpc) |
| Fetch the tile type flags for a map tile. More... | |
| CAVESTORY_MOD_API void | GetFramePosition (int *iX, int *iY) |
| Get the current camera position. More... | |
| CAVESTORY_MOD_API void | SetFramePosition (int iX, int iY) |
| Set frame position. More... | |
| CAVESTORY_MOD_API void | SetFadeMask () |
| Completely fade the screen out. | |
| CAVESTORY_MOD_API void | ClearFade () |
| Clear the current screen fade. | |
| CAVESTORY_MOD_API void | StartFadeOut (signed char iDirect) |
| Fade the screen out. More... | |
| CAVESTORY_MOD_API void | StartFadeIn (signed char iDirect) |
| Fade the screen in. More... | |
| CAVESTORY_MOD_API void | ProcFade () |
| Process the fade. | |
| CAVESTORY_MOD_API void | PutFade () |
| Draw the fade. | |
| CAVESTORY_MOD_API BOOL | GetFadeActive () |
| Check to see if the screen is being faded. More... | |
| CAVESTORY_MOD_API BOOL | IsFadedOut () |
| Check to see if the screen is blacked out. More... | |
A list of game manipulation functions.
| CAVESTORY_MOD_API BOOL AddArmsData2 | ( | long | iCode, |
| long | iNum, | ||
| long | iMaxNum, | ||
| long | iLevel | ||
| ) |
Add arms data to the singleplayer character.
| iCode | The weapon ID. |
| iNum | The amount of ammo. |
| iMaxNum | Maximum amount of ammo. Pass '0' to have infinite ammo. |
| iLevel | The level of the weapon. Only pass 1 through 3. |
| CAVESTORY_MOD_API BOOL ChargeArmsEnergy | ( | long | iChargeAmt, |
| ARMS * | pArmsTable, | ||
| int | iSelectedWeapon | ||
| ) |
Charge the selected weapon in pArmsTable.
| iChargeAmt | The amount to charge. |
| pArmsTable | The arms table. |
| iSelectedWeapon | The selected weapon |
| CAVESTORY_MOD_API unsigned int CompareTileType | ( | unsigned int | iTileTypes, |
| unsigned int | iOtherTileTypes | ||
| ) |
Compare two tile types against each other.
| iTileTypes | The tile types we want to test |
| iOtherTileTypes | The tile types we want to test |
| CAVESTORY_MOD_API unsigned int CompareTileTypeNPC | ( | NPCHAR * | pNpc, |
| unsigned int | iTileTypes | ||
| ) |
Compare tile types for the map tile that npc is on.
| pNpc | The NPC to use the position of |
| iTileTypes | The tile types we want to test |
| CAVESTORY_MOD_API unsigned int CompareTileTypeXY | ( | int | iX, |
| int | iY, | ||
| unsigned int | iTileTypes | ||
| ) |
Compare tile types for tile at X, Y.
| iX | The map tile's X position that we want to test |
| iY | The map tile's Y position that we want to test |
| iTileTypes | The tile types we want to test |
| CAVESTORY_MOD_API int CountArmsBullet | ( | int | iArmsCode, |
| int | iGhostId = -1 |
||
| ) |
Get the number of bullets matching the given description onscreen.
| iArmsCode | The arms the bullets should belong to. |
| iGhostId | The ghost ID they should belong to. Can be -1 to count bullets regardless of ghost id. |
| CAVESTORY_MOD_API int CountBulletNum | ( | int | iBulletCode, |
| int | iGhostId = -1 |
||
| ) |
Get the number of bullets matching the given description onscreen.
| iArmsCode | The arms the bullets should belong to. |
| iGhostId | The ghost ID they should belong to. Can be -1 to count bullets regardless of ghost id. |
| CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceMaskSurfaceId | ( | CustomPlayer * | pCharacter | ) |
Get the surface ID for a character's face mask plane.
| pCharacter | The player character object. |
| CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceSurfaceId | ( | CustomPlayer * | pCharacter | ) |
Get the surface ID for a character's face plane.
| pCharacter | The player character object. |
| CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalMaskSurfaceId | ( | CustomPlayer * | pCharacter | ) |
Get the surface ID for a character's normal mask plane.
| pCharacter | The player character object. |
| CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalSurfaceId | ( | CustomPlayer * | pCharacter | ) |
Get the surface ID for a character's normal plane.
| pCharacter | The player character object. |
| CAVESTORY_MOD_API BOOL CSM_CustomPlayer_IsPixelSolid | ( | CustomPlayer * | pCharacter, |
| int | iFrame, | ||
| int | iX, | ||
| int | iY | ||
| ) |
Determine if a pixel on a specific frame of animation is opaque or not.
| pCharacter | The player character to determine the solidity of. |
| iFrame | The frame to reference. |
| iX | The X position. |
| iY | The Y position. |
| CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndex | ( | NPCHAR * | pNpc, |
| const char * | pFieldName | ||
| ) |
Lookup the index of an NPC's property field.
| pNpc | The NPC to get the field of. |
| pFieldName | The name of the property field. |
| CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndexByCrc | ( | NPCHAR * | pNpc, |
| unsigned int | iFieldCrc | ||
| ) |
Lookup the index of an NPC's property field.
| pNpc | The NPC to get the field of. |
| iFieldCrc | The field name's CRC value. |
| CAVESTORY_MOD_API unsigned int CSM_EntProp_GetFieldNameCRC | ( | const char * | pFieldName | ) |
Get the CRC value of a property field's name.
| pFieldName | The name of the property field. |
| CAVESTORY_MOD_API BOOL CSM_EntProp_GetFieldValue_Boolean | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| BOOL | bDefaultValue = FALSE |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| bDefaultValue | The default value for this property if it is not defined. |
| CAVESTORY_MOD_API GUI_COLOR* CSM_EntProp_GetFieldValue_Color | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| GUI_COLOR * | pColorPtr, | ||
| GUI_COLOR | pDefaultValue = GUI_COLOR(0, 0, 0, 0) |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| pColorPtr | A pointer to the GUI_COLOR that will hold the information. |
| bDefaultValue | The default value for this property if it is not defined. |
| CAVESTORY_MOD_API float CSM_EntProp_GetFieldValue_Float | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| float | fDefaultValue = 0.0f |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| fDefaultValue | The default value for this property if it is not defined. |
| CAVESTORY_MOD_API int CSM_EntProp_GetFieldValue_Int | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| int | iDefaultValue = 0 |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| iDefaultValue | The default value for this property if it is not defined. |
| CAVESTORY_MOD_API GUI_POINT* CSM_EntProp_GetFieldValue_Point | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| GUI_POINT * | pPointPtr, | ||
| GUI_POINT | pDefaultValue = GUI_POINT(0, 0) |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| pPointPtr | A pointer to the GUI_POINT that will hold the information. |
| bDefaultValue | The default value for this property if it is not defined. |
| CAVESTORY_MOD_API GUI_RECT* CSM_EntProp_GetFieldValue_Rect | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| GUI_RECT * | pRectPtr, | ||
| GUI_RECT | pDefaultValue = GUI_RECT(0, 0, 0, 0) |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| pPointPtr | A pointer to the GUI_POINT that will hold the information. |
| bDefaultValue | The default value for this property if it is not defined. |
| CAVESTORY_MOD_API int CSM_EntProp_GetFieldValue_ScanString | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| const char * | pFormat, | ||
| ... | |||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| pFormat | The expected format of the string. |
| ... | Pointers to variables that will be filled when reading the string. |
| CAVESTORY_MOD_API char* CSM_EntProp_GetFieldValue_String | ( | NPCHAR * | pNpc, |
| int | iFieldIndex, | ||
| char * | pOutBuffer, | ||
| int | iOutBufferSize, | ||
| const char * | pDefaultValue = "" |
||
| ) |
Fetch the value of a field for a specific NPC.
| pNpc | The NPC to get the field of. |
| iFieldIndex | The index of the field. |
| pOutBuffer | A pointer to a buffer to hold the value. |
| iOutBufferSize | The size of pOutBuffer. |
| CAVESTORY_MOD_API int CSM_FindPlayerAnimFrameByName | ( | const char * | pName | ) |
Find a player animation frame's index by its name.
| pName | The name of the player animation (ex: "FRAME_COLLAPSED") |
| CAVESTORY_MOD_API BOOL CSM_IsFramerateVisible | ( | ) |
Set the visibility of the FPS counter.
| CAVESTORY_MOD_API void CSM_Map_ClearAllTileAnimations | ( | bool | bForeground | ) |
Clear a specific map tile's animation.
| bForeground | Whether the foreground tiles should be cleared(TRUE), or background tiles should be cleared(FALSE). |
| CAVESTORY_MOD_API void CSM_Map_ClearTileAnimation | ( | bool | bForeground, |
| unsigned int | iX, | ||
| unsigned int | iY | ||
| ) |
Clear a specific map tile's animation.
| bForeground | Whether the animated tile should be found in the foreground list(TRUE) or background list(FALSE). |
| iX | The map tile's X position. |
| iY | The map tile's Y position. |
| CAVESTORY_MOD_API void CSM_Map_DeleteTile | ( | int | iX, |
| int | iY, | ||
| bool | bRecordChange = true |
||
| ) |
Delete a map tile at the specified coordinates.
| iX | The Y position of the map tile. |
| iY | The X position of the map tile. |
| bRecordChange | Record the change and transmit it to all clients. If this is false, then newly connecting clients will not be sent this change. |
| CAVESTORY_MOD_API void CSM_Map_SetTileAnimation | ( | bool | bForeground, |
| unsigned int | iX, | ||
| unsigned int | iY, | ||
| RECT * | pRectList, | ||
| unsigned char | iRectCount, | ||
| unsigned short | iWait, | ||
| Surface_Ids | iSurfaceId = SURFACE_ID_LEVEL_TILESET |
||
| ) |
Set a map tile's animation.
| bForeground | Whether the animated tile should appear on the foreground(TRUE) or background(FALSE). |
| iX | The map tile's X position. |
| iY | The map tile's Y position. |
| pRectList | A list of RECTs defining tile data. |
| iRectCount | The number of frames pRectList holds. |
| iWait | The number of frames that should pass before the frame counter increments. |
| iSurfaceId | The surface ID that should be used to draw the tile. |
| CAVESTORY_MOD_API BOOL CSM_Map_SetTileIndex | ( | int | iX, |
| int | iY, | ||
| unsigned short | iTileIndex, | ||
| bool | bCreateSmoke = true, |
||
| bool | bRecordChange = true |
||
| ) |
Set the map tile index for a specified tile.
| iX | The Y position of the map tile. |
| iY | The X position of the map tile. |
| iTileIndex | The new tile index for the map tile. |
| bCreateSmoke | Create smoke. |
| bRecordChange | Record the change and transmit it to all clients. If this is false, then newly connecting clients will not be sent this change. |
| CAVESTORY_MOD_API void CSM_Map_ShiftTileIndex | ( | int | iX, |
| int | iY, | ||
| bool | bRecordChange = true |
||
| ) |
Shift a map tile to the left one tile index.
| iX | The Y position of the map tile. |
| iY | The X position of the map tile. |
| bRecordChange | Record the change and transmit it to all clients. If this is false, then newly connecting clients will not be sent this change. |
| CAVESTORY_MOD_API void CSM_PlayerState_DrawCharacter | ( | int | iFrameX, |
| int | iFrameY, | ||
| SafeClientInterface * | pInterface, | ||
| float | fScale = 1.f |
||
| ) |
Draw the character.
| iFrameX | Camera X offset |
| iFrameY | Camera Y offset |
| pInterface | The interface to use |
| fScale | The scale of the player |
| CAVESTORY_MOD_API void CSM_PlayerState_DrawWeapon | ( | int | iFrameX, |
| int | iFrameY, | ||
| SafeClientInterface * | pInterface, | ||
| float | fScale = 1.f |
||
| ) |
Draw the weapon.
| iFrameX | Camera X offset |
| iFrameY | Camera Y offset |
| pInterface | The interface to use |
| fScale | The scale of the weapon |
| CAVESTORY_MOD_API void CSM_SaveScreenshot | ( | const char * | pOutputImagePath, |
| GUI_RECT * | pSource = NULL |
||
| ) |
Take an unmagnified screenshot and save it at a path.
Must end with '.png'.
| pOutputImagePath | The output file path. |
| pSource | The source rect to save. Must be magnified to screen coordinates. Can be NULL. |
| CAVESTORY_MOD_API void CSM_SetFramerateVisible | ( | BOOL | bValue | ) |
Set the visibility of the FPS counter.
| bValue | Whether it's visible or not. |
| CAVESTORY_MOD_API void CSM_SpawnAmmo | ( | int | iSubPixelX, |
| int | iSubPixelY, | ||
| int | iAmount | ||
| ) |
Spawn a missile pickup.
| iSubPixelX | The X position at which to spawn the missiles at. |
| iSubPixelY | The Y position at which to spawn the missiles at. |
| iAmount | The amount of missiles that should be given. |
| CAVESTORY_MOD_API void CSM_SpawnEXP | ( | int | iSubPixelX, |
| int | iSubPixelY, | ||
| int | iAmount | ||
| ) |
Spawn a certain amount of EXP pellets.
| iSubPixelX | The X position at which to spawn the pellets at. |
| iSubPixelY | The Y position at which to spawn the pellets at. |
| iAmount | The amount of EXP that should be given. |
| CAVESTORY_MOD_API void CSM_SpawnHeart | ( | int | iSubPixelX, |
| int | iSubPixelY, | ||
| int | iAmount | ||
| ) |
Spawn a heart pickup that gives a certain amount of health.
| iSubPixelX | The X position at which to spawn the heart at. |
| iSubPixelY | The Y position at which to spawn the heart at. |
| iAmount | The amount of life that should be given. |
| CAVESTORY_MOD_API void DeleteArmBullets | ( | int | iArmsCode | ) |
Delete all bullets matching the arms ID.
| iArmsCode | The arms code whose bullets we should be deleting. |
| CAVESTORY_MOD_API void DeleteNpCharCode | ( | int | iCharCode, |
| BOOL | bSmoke, | ||
| BOOL | bSetFlag = TRUE |
||
| ) |
Delete all NPCs with a specific character code.
| iCharCode | The character code to search for. |
| bSmoke | Whether to spawn smoke on deletion or not. |
| CAVESTORY_MOD_API void DeleteNpCharEvent | ( | int | iEventNo, |
| BOOL | bSetFlag = TRUE |
||
| ) |
Delete all NPCs with a specific event number.
| iEventNo | The event number to search for. |
| bSetFlag | Normally, when an NPC is deleted, its flag gets set. If this is 'false', the flag will not get set. |
| CAVESTORY_MOD_API void DeleteNpCharFlag | ( | int | iFlagNo, |
| BOOL | bSetFlag = FALSE |
||
| ) |
Delete all NPCs with a specific flag number.
| iFlagNo | The flag number to search for. |
| bSetFlag | Normally, when an NPC is deleted, its flag gets set. If this is 'false', the flag will not get set. |
| CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATA* GetCurrentTextScriptConfig | ( | ) |
Get the current text script context.
| CAVESTORY_MOD_API BOOL GetFadeActive | ( | ) |
Check to see if the screen is being faded.
| CAVESTORY_MOD_API void GetFramePosition | ( | int * | iX, |
| int * | iY | ||
| ) |
Get the current camera position.
| iX | A pointer to an int to hold the camera's X position. |
| iY | A pointer to an int to hold the camera's Y position. |
| CAVESTORY_MOD_API int GetHellTimerFrameCount | ( | ) |
Get the current hell timer frame count.
| CAVESTORY_MOD_API unsigned long long int GetHellTimerGlobalTimerOffset | ( | ) |
Get the global timer offset at which the hell counter started at.
| CAVESTORY_MOD_API int GetHellTimerMS | ( | ) |
Get the current hell timer time in milliseconds.
| CAVESTORY_MOD_API MYCHAR* GetLocalPlayerCharacter | ( | ) |
Get the local player.
| CAVESTORY_MOD_API void GetTextScriptPath | ( | char * | pPath | ) |
Get the text script path.
| pPath | A buffer to hold the text script path in. |
| CAVESTORY_MOD_API unsigned int GetTileFlagsNPC | ( | NPCHAR * | pNpc | ) |
Fetch the tile type flags for a map tile.
| pNpc | The NPC to use the position of |
| CAVESTORY_MOD_API unsigned int GetTileFlagsXY | ( | int | iX, |
| int | iY | ||
| ) |
Fetch the tile type flags for a map tile.
| iX | The map tile's X position |
| iY | The map tile's Y position |
| CAVESTORY_MOD_API BOOL HasArmsData | ( | long | iCode | ) |
Check to see if the singleplayer character has a weapon.
| iCode | The weapon ID. |
| CAVESTORY_MOD_API bool IsAgilityAllowed | ( | ) |
Check whether the current mod allows agility.
| CAVESTORY_MOD_API bool IsCarryingAllowed | ( | ) |
Check whether the current mod allows carrying other players.
| CAVESTORY_MOD_API BOOL IsFadedOut | ( | ) |
Check to see if the screen is blacked out.
| CAVESTORY_MOD_API bool IsFishingAllowed | ( | ) |
Check whether the current mod allows fishing.
| CAVESTORY_MOD_API bool IsFocusInsideNpChar | ( | NPCHAR * | pNpc | ) |
Check to see if an NPC is clipping bounds with the NPC's focus object.
| pNpc | The NPCHAR to test against. |
| CAVESTORY_MOD_API BOOL IsNpCharInsideNpChar | ( | NPCHAR * | pNpc, |
| NPCHAR * | pOther | ||
| ) |
| CAVESTORY_MOD_API bool IsPlayerInsideNpChar | ( | NPCHAR * | pNpc | ) |
Check to see if an NPC is clipping bounds with the player.
| pNpc | The NPCHAR to test against. |
| CAVESTORY_MOD_API BOOL IsProfile | ( | ) |
Check if there is a profile.
| CAVESTORY_MOD_API bool IsSpecificPlayerInsideNpChar | ( | MYCHAR * | pMC, |
| NPCHAR * | pNpc | ||
| ) |
Check to see if an NPC is clipping bounds with a player.
| pMC | The player to test for. |
| pNpc | The NPCHAR to test against. |
| CAVESTORY_MOD_API BOOL LoadProfile | ( | const char * | pFileName, |
| BOOL | bDoGameFuncs = TRUE |
||
| ) |
Load a profile into the current gamestate.
| pFileName | The name of the savefile. |
| bDoGameFuncs | Whether to call essential game funcs or not. |
| CAVESTORY_MOD_API BOOL LoadProfileFromMem | ( | PROFILE * | pProfile | ) |
Load the gamestate from a PROFILE* struct.
| pProfile | A pointer to a PROFILE to hold the information. |
| CAVESTORY_MOD_API BOOL LoadProfileIntoMem | ( | const char * | pName, |
| PROFILE * | pProfile, | ||
| unsigned long long * | pModifyTime = NULL |
||
| ) |
Load a profile into a PROFILE* struct.
| pName | The name of the savefile. |
| pProfile | A pointer to a PROFILE to hold the information. |
| pModifyTime | A pointer to an INT which will hold the last modified time for this save file. Can be NULL. |
| pProfileName | A pointer to a CHAR array which will hold the profile name for this save file. Can be NULL. |
| CAVESTORY_MOD_API int LoadTimeCounter | ( | const char * | pFileName = "290.rec" | ) |
Load the time counter's total time.
| pFileName | The file name of the record to load. |
| CAVESTORY_MOD_API void PutValueView | ( | int | iFrameX, |
| int | iFrameY | ||
| ) |
Draw all view values.
| iFrameX | The camera's X position. |
| iFrameY | The camera's Y position. |
| CAVESTORY_MOD_API BOOL SaveProfile | ( | const char * | pFileName, |
| MYCHAR * | pMC = NULL |
||
| ) |
Save the current gamestate to a profile.
| pFileName | The name of the savefile. |
| pMC | The player object to use. Set to NULL to use gMC. |
| pProfileName | The name of the savegame. |
| CAVESTORY_MOD_API BOOL SaveProfileIntoMem | ( | PROFILE * | pProfile | ) |
Save the current gamestate to a PROFILE* struct.
| pProfile | The profile to copy the gamestate into. |
| CAVESTORY_MOD_API bool SetAnimNpChar | ( | int | iNpcId, |
| int | iVelocityX, | ||
| int | iVelocityY, | ||
| int | iDirection, | ||
| NPCHAR * | pNpc, | ||
| int | iStartIndex, | ||
| MYCHAR * | pMC, | ||
| CustomPlayer * | pCustomChar, | ||
| NPCHAR ** | iOutNPC = 0 |
||
| ) |
Spawn an animation NPC at the coordinates.
| iNpcId | The ID of the NPC to spawn. |
| iVelocityX | The initial X velocity. |
| iVelocityY | The initial Y velocity. |
| iDirection | The initial direction. |
| pNpc | The NPC this should be pointing to. |
| iStartIndex | Which NPC slot the spawner should start from when looking for an available slot. |
| pMC | The player character this anim npc should be tied to. |
| pChar | The custom player character for this player. |
| iOutNPC | A pointer to the spawned NPC (NULL if the NPC couldn't be spawned!) |
| CAVESTORY_MOD_API void SetBullet | ( | int | iBulNo, |
| int | iSpawnX, | ||
| int | iSpawnY, | ||
| int | iDirection, | ||
| int | iCodeArms, | ||
| int | iLevel, | ||
| int | iGhostId = 0 |
||
| ) |
Spawn a bullet at the coordinates.
| iBulNo | The ID of the bullet to spawn. |
| iSpawnX | The X position to spawn the bullet at. |
| iSpawnY | The Y position to spawn the bullet at. |
| iDirection | The direction the bullet should be facing. |
| iCodeArms | Should be set to the weapon number that spawned this bullet (-1 if no weapon spawned it) |
| iLevel | The level of the bullet |
| iGhostId | Should be set to the client ghost ID that spawned this bullet (-1 if no client spawned it) |
| CAVESTORY_MOD_API void SetCaret | ( | int | iSpawnX, |
| int | iSpawnY, | ||
| int | iCaretId, | ||
| int | iDirection, | ||
| CARET ** | pOut = NULL |
||
| ) |
Spawn a caret at the coordinates.
| iSpawnX | The subpixel X position to spawn the caret at. |
| iSpawnY | The subpixel Y position to spawn the caret at. |
| iCaretId | The ID of the caret to spawn. |
| iDirection | The direction to spawn the caret at. |
| pOut | Pointer to a variable that will hold the created caret. |
| CAVESTORY_MOD_API void SetDestroyNpCharUp | ( | int | iSpawnX, |
| int | iSpawnY, | ||
| int | iMaxRandomXOffset, | ||
| int | iSmokeAmt | ||
| ) |
Spawns smoke at the given coordinates & flashes the screen.
| iSpawnX | The smoke's X spawn coordniate |
| iSpawnY | The smoke's Y spawn coordniate |
| iMaxRandomXOffset | The maximum random X value offset. |
| iSmokeAmt | How many smoke particles to spawn. |
| CAVESTORY_MOD_API void SetFramePosition | ( | int | iX, |
| int | iY | ||
| ) |
Set frame position.
| iX | The new X position. |
| iY | The new Y position. |
| CAVESTORY_MOD_API void SetHellTimerFrameCount | ( | int | iFrameCount | ) |
Set the current hell timer frame count.
| iFrameCount | The amount of frames to set the timer at. |
| CAVESTORY_MOD_API void SetHellTimerGlobalTimerOffset | ( | unsigned long long int | iOffset | ) |
Set the global timer offset at which the hell counter started at.
| iOffset | The time offset. |
| CAVESTORY_MOD_API void SetHellTimerMS | ( | int | iTimeInMS | ) |
Set the current hell timer time in milliseconds.
| iTimeInMS | The amount of time, in milliseconds, to set the timer to. |
| CAVESTORY_MOD_API void SetNpChar | ( | int | iNpcId, |
| int | iSpawnX, | ||
| int | iSpawnY, | ||
| int | iVelocityX, | ||
| int | iVelocityY, | ||
| int | iDirection, | ||
| NPCHAR * | pNpc, | ||
| int | iStartIndex, | ||
| NPCHAR ** | iOutNPC = 0, |
||
| bool | bForceSpawn = false |
||
| ) |
Spawn an NPC at the coordinates.
| iNpcId | The ID of the NPC to spawn. |
| iSpawnX | The initial X position. |
| iSpawnY | The initial Y position. |
| iVelocityX | The initial X velocity. |
| iVelocityY | The initial Y velocity. |
| iDirection | The initial direction. |
| pNpc | The NPC this should be pointing to. |
| iStartIndex | Which NPC slot the spawner should start from when looking for an available slot. |
| iOutNPC | A pointer to the spawned NPC (NULL if the NPC couldn't be spawned!) |
| bForceSpawn | Force this NPC to spawn regardless |
| void CAVESTORY_MOD_API SetNpChar_Backwards | ( | int | iNpcId, |
| int | iSpawnX, | ||
| int | iSpawnY, | ||
| int | iVelocityX, | ||
| int | iVelocityY, | ||
| int | iDirection, | ||
| NPCHAR * | pNpc, | ||
| int | iStartIndex, | ||
| NPCHAR ** | iOutNPC = 0, |
||
| bool | bForceSpawn = false |
||
| ) |
Spawn an NPC at the coordinates.
| iNpcId | The ID of the NPC to spawn. |
| iSpawnX | The initial X position. |
| iSpawnY | The initial Y position. |
| iVelocityX | The initial X velocity. |
| iVelocityY | The initial Y velocity. |
| iDirection | The initial direction. |
| pNpc | The NPC this should be pointing to. |
| iStartIndex | Which NPC slot the spawner should start from when looking for an available slot. |
| iOutNPC | A pointer to the spawned NPC (NULL if the NPC couldn't be spawned!) |
| bForceSpawn | Force this NPC to spawn regardless |
| CAVESTORY_MOD_API void SetQuake | ( | int | iTime | ) |
Shake the screen for iTime ticks.
| iTime | The ticks to shake the screen for. |
| CAVESTORY_MOD_API void SetQuake2 | ( | int | iTime | ) |
Shake the screen for iTime ticks.
| iTime | The ticks to shake the screen for. |
| CAVESTORY_MOD_API void SetTextScriptContext | ( | TEXT_SCRIPT_PTR_DATA * | pData = &default_TextScriptPtrData | ) |
Set the current text script context.
| pData | A pointer to the new context. |
| CAVESTORY_MOD_API void SetValueView | ( | int * | pX, |
| int * | pY, | ||
| int | iValue | ||
| ) |
Create a new view value.
| pX | A pointer to the damaged entity's X variable. |
| pY | A pointer to the damaged entity's Y variable. |
| iValue | The value to show. |
| CAVESTORY_MOD_API void StartFadeIn | ( | signed char | iDirect | ) |
| CAVESTORY_MOD_API void StartFadeOut | ( | signed char | iDirect | ) |
| CAVESTORY_MOD_API BOOL StartTextScript | ( | int | iEventNo, |
| bool | bTransmit = true, |
||
| TEXT_SCRIPT_PTR_DATA * | pData = &default_TextScriptPtrData, |
||
| bool | bUseRestrictionLevel = false, |
||
| TextScriptTarget | iTargetType = TextScriptTarget::TS_TARGET_EVERYONE, |
||
| NPCHAR * | pSourceNpc = NULL |
||
| ) |
Start a text script event.
| iEventNo | The event number. |
| bTransmit | Transmit to everyone on the server. |
| pData | The context to start the text script event with. |
| bUseRestrictionLevel | Use the restriction level option. |
| pSourceNpc | The NPC that was used to start this event. |
| CAVESTORY_MOD_API BOOL TransferDataStage | ( | int | iStageNo, |
| int | iEventNo, | ||
| int | iSpawnX, | ||
| int | iSpawnY | ||
| ) |
Transfer over to a vanilla map.
| iStageNo | The stage index. |
| iEventNo | The script event to call. |
| iSpawnX | Map tile's X position to spawn on. |
| iSpawnY | Map tile's Y position to spawn on. |
| CAVESTORY_MOD_API BOOL TransferStage | ( | int | iStageNo, |
| int | iEventNo, | ||
| int | iSpawnX, | ||
| int | iSpawnY | ||
| ) |
Transfer over to a new map.
| iStageNo | The stage index. |
| iEventNo | The script event to call. |
| iSpawnX | Map tile's X position to spawn on. |
| iSpawnY | Map tile's Y position to spawn on. |
| CAVESTORY_MOD_API BOOL TransferStage2 | ( | int | iStageNo, |
| int | iEventNo | ||
| ) |
Transfer over to a new map without moving characters.
| iStageNo | The stage index. |
| iEventNo | The script event to call. |
| CAVESTORY_MOD_API BOOL UseArmsEnergy | ( | long | iNum, |
| ARMS * | pArmsTable, | ||
| int | iSelectedIdx | ||
| ) |
Use some arms energy from the selected arm.
| iNum | The amount of energy to use. |
| pArmsTable | A pointer to the arms table. |
| iSelectedIdx | The currently selected weapon index. |