64 const char* pCategory,
74 unsigned int iColor = 0xFFFFFFFF
84 const char* pSourceFile,
86 const char* pCategory,
98 const char* pSourceFile,
100 const char* pCategory,
110 #define CSM_LogError(pCategory, pFormat, ...) CSM_LogInfo(pCategory, "\v08" pFormat, __VA_ARGS__)
117 #define CSM_LogWarn(pCategory, pFormat, ...) CSM_LogInfo(pCategory, "\v0B" pFormat, __VA_ARGS__)
124 #define CSM_LogErrorWithInfo(pCategory, pFormat, ...) __CSM__LogError(__FILE__, __LINE__, pCategory, pFormat, __VA_ARGS__)
131 #define CSM_LogWarnWithInfo(pCategory, pFormat, ...) __CSM__LogWarn(__FILE__, __LINE__, pCategory, pFormat, __VA_ARGS__)
140 const char* pCategory,
157 const char* pErrorName,
158 const char* pTitle =
"\\a{0} crashed!",
159 const char* pMessage =
"The mod's DLL has crashed!",
160 bool bGenerateCrashLog =
true
222 const char* pDesiredSubpath,
223 const char* pFileName,
224 char* pOutputFilePath,
225 char* pOutputFileName,
226 const char* pFileNameFormat =
"*.*",
227 void* pModPointer = NULL
279 unsigned int iNameHash,
297 const char* pUIFormat,
298 const char* pUIDynamicFormat,
299 unsigned long long int iMaskBits = 0,
300 unsigned long long int iFlags = 0,
314 const char* pWeaponName,
385 const char* pStateName,
386 unsigned long long int iFlags,
387 unsigned int iTransmitFlags,
391 int* pPlayerStateIndex = NULL,
392 unsigned int iIndexOverride = 0,
407 const char* pCmdName,
408 const char* pShortDesc,
411 void(*pFuncPtr)(
int&,
int&,
int&,
int&,
bool&,
int&)
999 const char* pCVarName
1009 const char* pCVarName
1019 const char* pCVarName
1030 const char* pCVarName,
1043 const char* pCVarName,
1045 bool bUserInput =
false
1107 const char* pString1 = NULL
1129 const char* pString1 = NULL
1206 bool bHitEndBlock =
true,
1207 bool bHitStartBlock =
true
1230 unsigned int iHitMask,
1232 bool bHitEndBlock =
true,
1233 bool bHitStartBlock =
true
1266 int iNewMagnification = -1
1296 const char* pOutputImagePath,
1363 CustomPlayer* pCharacter,
1376 CustomPlayer* pCharacter
1386 CustomPlayer* pCharacter
1396 CustomPlayer* pCharacter
1406 CustomPlayer* pCharacter
1422 int* pX,
int* pY,
int iValue
1589 bool bForceSpawn =
false
1599 BOOL bSetFlag = TRUE
1609 BOOL bSetFlag = FALSE
1620 BOOL bSetFlag = TRUE
1645 bool bForceSpawn =
false
1670 CustomPlayer* pCustomChar,
1827 int iMaxRandomXOffset,
1882 const char* pFieldName
1895 unsigned int iFieldCrc
1907 const char* pFieldName
1922 const char* pFormat,
1940 const char* pDefaultValue =
""
1954 int iDefaultValue = 0
1968 float fDefaultValue = 0.0f
1982 BOOL bDefaultValue = FALSE
2042 bool bRecordChange =
true
2054 bool bRecordChange =
true
2068 unsigned short iTileIndex,
2069 bool bCreateSmoke =
true,
2070 bool bRecordChange =
true
2114 unsigned char iRectCount,
2115 unsigned short iWait,
2154 bool bTransmit =
true,
2156 bool bUseRestrictionLevel =
false,
2158 NPCHAR* pSourceNpc = NULL
2174 const char* pFileName =
"290.rec"
2189 unsigned long long int iOffset
2240 const char* pFileName,
2252 const char* pFileName,
2253 BOOL bDoGameFuncs = TRUE
2288 unsigned long long* pModifyTime = NULL
2302 unsigned int iTileTypes
2314 unsigned int iTileTypes
2325 unsigned int iTileTypes,
2326 unsigned int iOtherTileTypes
2686 unsigned int iCodeChar,
2698 unsigned int iCodeChar,
2764 return iCoord * magnification / 0x200;
2776 return iCoord * magnification;
2788 return iCoord / magnification;
2801 return 0x200 * iCoord / magnification;
2853 const char** pCategoryList = NULL,
2854 int iCategoryCount = 0
2876 int iStateType = -1,
3056 const char* pString,
3057 bool bSanitize =
false
3075 bool bTransmit =
true
3085 bool bTransmit =
true
3105 bool bTransmit =
true
3115 bool bTransmit =
true
3142 typedef int CSM_CustomSoundId;
3170 CSM_CustomSoundId iSoundId,
3171 unsigned char iPanAmount = 50
3180 CSM_CustomSoundId iSoundId,
3181 unsigned char iVolume
3201 CSM_CustomSoundId iSoundId
3227 bool bAlwaysOnScreen,
3230 unsigned int iPlayVolume = 0x100,
3231 unsigned int iFalloffRadius = 0x7FFFFFFE
3241 unsigned short iPitch
3261 unsigned char iVolume
3273 unsigned int iPlayVolume = 0x100
3299 const char* pFileName
3307 unsigned char iVolume
CSM_BossTypes
Boss types.
Definition: CSMAPI_enums.h:1336
Surface_Ids
List of surface IDs.
Definition: CSMAPI_enums.h:714
@ SURFACE_ID_LEVEL_TILESET
Current level tileset.
Definition: CSMAPI_enums.h:722
CSM_ProgramMode
The program mode.
Definition: CSMAPI_enums.h:1414
CSM_KEY_DESC
A table of input descriptors.
Definition: CSMAPI_enums.h:116
PlayerDeathType
A list of possible player death types.
Definition: CSMAPI_enums.h:1215
PlayerStateAnimator_OutputType
A list of output types for a player state's "ANIMATE" function.
Definition: CSMAPI_enums.h:1203
TextScriptTarget
The TextScript's target.
Definition: CSMAPI_enums.h:1045
@ TS_TARGET_EVERYONE
Target everyone in the server.
Definition: CSMAPI_enums.h:1047
CSM_SDL_Scancode
SDL2's scancode enum, exposed for CSM.
Definition: CSMAPI_enums.h:1757
CSM_KEYBIND_DESC
A table of keybind descriptors.
Definition: CSMAPI_enums.h:83
NpcPositionType
A list of position types for CSM_Npc_GetPosition .
Definition: CSMAPI_enums.h:1241
float(* CSM_NetScore_GetScoreModifyAmount)(CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetScoreInstance *pInstance)
Determine the amount of score to be modified for a client.
Definition: CSMAPI_types.h:7384
void(* PlayerState_DrawFuncType)(int iFrameX, int iFrameY, MYCHAR *pMC, SafeClientInterface *pInterface)
The draw function for this player state.
Definition: CSMAPI_types.h:7157
void(* CSM_Npc_ActFunc)(NPCHAR *pNpc)
Called every frame an NPC is active.
Definition: CSMAPI_types.h:7413
void(* PlayerState_ActFuncType)(BOOL bKey, SafeClientInterface *pInterface, MYCHAR *pMC, const MYCHAR_PHYSICS *pPhysics)
The act function for this player state.
Definition: CSMAPI_types.h:7140
void(* CSM_Caret_ActFunc)(CARET *caret)
Called every frame a caret is active.
Definition: CSMAPI_types.h:7421
unsigned int(* PlayerState_AnimFuncType)(BOOL bKey, MYCHAR *pMC, SafeClientInterface *pInterface)
The animation function for this player state.
Definition: CSMAPI_types.h:7149
void(* CSM_Bullet_ActFunc)(BULLET *pBul, int iLevel)
Called every frame a bullet is active.
Definition: CSMAPI_types.h:7404
void(* CSM_Weapon_ShootFunc)(ShootInfo *sData, int iLevel)
Called every frame a weapon is equipped, for every client.
Definition: CSMAPI_types.h:7394
Networking client.
Definition: CaveNet_ExportedTypes.h:1825
A networking player.
Definition: CaveNet_ExportedTypes.h:3560
Score type.
Definition: CaveNet_ExportedTypes.h:553
Player teams.
Definition: CaveNet_ExportedTypes.h:860
CAVESTORY_MOD_API int CSM_Boss_GetBossCount()
Get the number of valid boss functions.
CAVESTORY_MOD_API void CSM_Boss_ResetAllBossesHealth()
Reset all bosses' health back to their initial health amounts.
CAVESTORY_MOD_API void CSM_Boss_SetInitHealth(CSM_BossTypes iBossType, int iHealth)
Set the initializer health for a boss.
CAVESTORY_MOD_API NPCHAR * CSM_Boss_GetBossNpc(int iIndex)
Get a boss NPC by index.
CAVESTORY_MOD_API int CSM_Boss_GetCurrentBossDefaultHealth()
Get the current boss' init health.
CAVESTORY_MOD_API int CSM_CaveNet_GetClientCount()
Get how many clients are currently connected to the server.
Definition: CavestoryModAPI.cpp:160
CAVESTORY_MOD_API int CSM_CaveNet_GetRealClientCount()
Get how many clients are currently connected to the server, excluding AI players.
Definition: CavestoryModAPI.cpp:165
CAVESTORY_MOD_API bool CSM_CaveNet_ConnectedAsClient()
Check to see whether we're connected to a server or not.
Definition: CavestoryModAPI.cpp:150
CAVESTORY_MOD_API BOOL CSM_CaveNet_SendUserCmdToClient(CaveNet::DataStructures::NetClient *pClient, int iArg1=0, int iArg2=0, int iArg3=0, int iArg4=0, int iArg5=0, int iArg6=0, const char *pString1=NULL)
Send a user command to a connected client.
CAVESTORY_MOD_API bool CSM_CaveNet_IsHosting()
Check to see whether we're hosting a server.
Definition: CavestoryModAPI.cpp:155
CAVESTORY_MOD_API BOOL CSM_CaveNet_SendUserCmdToServer(int iArg1=0, int iArg2=0, int iArg3=0, int iArg4=0, int iArg5=0, int iArg6=0, const char *pString1=NULL)
Send a user command to the server we're connected to.
CAVESTORY_MOD_API bool Config_GetBool(const char *pCVarName)
Get a boolean value from a configuration variable.
Definition: CavestoryModAPI.cpp:172
CAVESTORY_MOD_API bool Config_SetValue(const char *pCVarName, const char *pValue, bool bUserInput=false)
Set the value of a configuration variable.
Definition: CavestoryModAPI.cpp:202
CAVESTORY_MOD_API const char * Config_GetString(const char *pCVarName)
Get a string value from a configuration variable.
Definition: CavestoryModAPI.cpp:184
CAVESTORY_MOD_API int Config_GetInt(const char *pCVarName)
Get an integer value from a configuration variable.
Definition: CavestoryModAPI.cpp:178
CAVESTORY_MOD_API void Config_GetColor(const char *pCVarName, GUI_COLOR &pColor)
Get a color value from a configuration variable.
Definition: CavestoryModAPI.cpp:190
CAVESTORY_MOD_API int CSM_DediServer_RunCommand(const char *pFormat,...)
Run a console command for the server.
CAVESTORY_MOD_API BOOL GetNPCFlag(long iFlagNo)
Check if an NPC flag is set.
CAVESTORY_MOD_API void SetNPCFlag(long iFlagNo, bool bTransmit=true)
Set an NPC flag to 'true'.
CAVESTORY_MOD_API void CutSkipFlag(long iFlagNo, bool bTransmit=true)
Set a skip flag to 'true'.
CAVESTORY_MOD_API BOOL GetSkipFlag(long iFlagNo)
Check if a skip flag is set.
CAVESTORY_MOD_API void CutNPCFlag(long iFlagNo, bool bTransmit=true)
Set an NPC flag to 'false'.
CAVESTORY_MOD_API void SetSkipFlag(long iFlagNo, bool bTransmit=true)
Set a skip flag to 'true'.
CAVESTORY_MOD_API BOOL CSM_FindNetScoreType(const char *pName, CaveNet::DataStructures::NetScoreType **pOut)
Fetch a NetScoreType by name.
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.
CAVESTORY_MOD_API BOOL CSM_FindNetScoreTypeByHash(unsigned int iNameHash, CaveNet::DataStructures::NetScoreType **pOut)
Fetch a NetScoreType by name hash.
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.
CAVESTORY_MOD_API bool CSM_RegisterWeaponByName(const char *pWeaponName, CSM_Weapon_ShootFunc pFunc)
Register a weapon by name.
CAVESTORY_MOD_API int CSM_RegisterCaret(CSM_Caret_ActFunc pFunc, int iWidth, int iHeight)
Register a caret.
CAVESTORY_MOD_API bool CSM_RegisterWeapon(int iWeaponIndex, CSM_Weapon_ShootFunc pFunc)
Register a weapon.
CAVESTORY_MOD_API void CSM_ResetNetScoreTypes()
Reset all NetScore types.
CAVESTORY_MOD_API bool CSM_RegisterNpc(int iNpcIndex, CSM_Npc_ActFunc pFunc)
Register an NPC.
CAVESTORY_MOD_API bool CSM_RegisterBullet(int iBulletIndex, CSM_Bullet_ActFunc pFunc)
Register a bullet.
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.
CAVESTORY_MOD_API void CSM_SpawnHeart(int iSubPixelX, int iSubPixelY, int iAmount)
Spawn a heart pickup that gives a certain amount of health.
CAVESTORY_MOD_API void StartFadeOut(signed char iDirect)
Fade the screen out.
CAVESTORY_MOD_API void CSM_Map_ClearAllTileAnimations(bool bForeground)
Clear a specific map tile's animation.
CAVESTORY_MOD_API void ClearBullet()
Delete all bullets.
CAVESTORY_MOD_API void SetQuake2(int iTime)
Shake the screen for iTime ticks.
CAVESTORY_MOD_API void ActValueView()
Process all view values.
CAVESTORY_MOD_API void SetHellTimerMS(int iTimeInMS)
Set the current hell timer time in milliseconds.
CAVESTORY_MOD_API void ResetQuake()
Stop shaking the screen.
CAVESTORY_MOD_API BOOL TransferStage2(int iStageNo, int iEventNo)
Transfer over to a new map without moving characters.
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.
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceMaskSurfaceId(CustomPlayer *pCharacter)
Get the surface ID for a character's face mask plane.
CAVESTORY_MOD_API BOOL LoadProfileIntoMem(const char *pName, PROFILE *pProfile, unsigned long long *pModifyTime=NULL)
Load a profile into a PROFILE* struct.
CAVESTORY_MOD_API void StartFadeIn(signed char iDirect)
Fade the screen in.
CAVESTORY_MOD_API void SetQuake(int iTime)
Shake the screen for iTime ticks.
CAVESTORY_MOD_API void ChangeToFirstArms()
Switch to this client's first weapon.
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.
CAVESTORY_MOD_API BOOL AddArmsData2(long iCode, long iNum, long iMaxNum, long iLevel)
Add arms data to the singleplayer character.
CAVESTORY_MOD_API MYCHAR * GetLocalPlayerCharacter()
Get the local player.
Definition: CavestoryModAPI.cpp:219
CAVESTORY_MOD_API void SetDestroyNpCharUp(int iSpawnX, int iSpawnY, int iMaxRandomXOffset, int iSmokeAmt)
Spawns smoke at the given coordinates & flashes the screen.
CAVESTORY_MOD_API BOOL TransferStage(int iStageNo, int iEventNo, int iSpawnX, int iSpawnY)
Transfer over to a new map.
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.
CAVESTORY_MOD_API int CountArmsBullet(int iArmsCode, int iGhostId=-1)
Get the number of bullets matching the given description onscreen.
#define CAVESTORY_MOD_API
Exports / imports Cavestory Mod API functions & classes.
Definition: CSMAPI_begincode.h:30
CAVESTORY_MOD_API bool IsPlayerInsideNpChar(NPCHAR *pNpc)
Check to see if an NPC is clipping bounds with the player.
CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATA * GetCurrentTextScriptConfig()
Get the current text script context.
CAVESTORY_MOD_API BOOL IsFadedOut()
Check to see if the screen is blacked out.
CAVESTORY_MOD_API bool IsActiveSomeBullet()
Check if some bullet is active.
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalMaskSurfaceId(CustomPlayer *pCharacter)
Get the surface ID for a character's normal mask plane.
CAVESTORY_MOD_API unsigned long long int GetHellTimerGlobalTimerOffset()
Get the global timer offset at which the hell counter started at.
CAVESTORY_MOD_API void ProcFade()
Process the fade.
CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndexByCrc(NPCHAR *pNpc, unsigned int iFieldCrc)
Lookup the index of an NPC's property field.
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.
CAVESTORY_MOD_API int CSM_FindPlayerAnimFrameByName(const char *pName)
Find a player animation frame's index by its name.
CAVESTORY_MOD_API void DeleteNpCharCode(int iCharCode, BOOL bSmoke, BOOL bSetFlag=TRUE)
Delete all NPCs with a specific character code.
CAVESTORY_MOD_API unsigned int CSM_EntProp_GetFieldNameCRC(const char *pFieldName)
Get the CRC value of a property field's name.
CAVESTORY_MOD_API int CountBulletNum(int iBulletCode, int iGhostId=-1)
Get the number of bullets matching the given description onscreen.
CAVESTORY_MOD_API BOOL SaveProfile(const char *pFileName, MYCHAR *pMC=NULL)
Save the current gamestate to a profile.
CAVESTORY_MOD_API void GetTextScriptPath(char *pPath)
Get the text script path.
CAVESTORY_MOD_API unsigned int CompareTileTypeXY(int iX, int iY, unsigned int iTileTypes)
Compare tile types for tile at X, Y.
CAVESTORY_MOD_API void PutFade()
Draw the fade.
CAVESTORY_MOD_API void DeleteArmBullets(int iArmsCode)
Delete all bullets matching the arms ID.
CAVESTORY_MOD_API void CSM_SetFramerateVisible(BOOL bValue)
Set the visibility of the FPS counter.
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetFaceSurfaceId(CustomPlayer *pCharacter)
Get the surface ID for a character's face plane.
CAVESTORY_MOD_API BOOL GetFadeActive()
Check to see if the screen is being faded.
CAVESTORY_MOD_API bool IsSpecificPlayerInsideNpChar(MYCHAR *pMC, NPCHAR *pNpc)
Check to see if an NPC is clipping bounds with a player.
CAVESTORY_MOD_API void ClearFade()
Clear the current screen fade.
CAVESTORY_MOD_API void CSM_Map_DeleteTile(int iX, int iY, bool bRecordChange=true)
Delete a map tile at the specified coordinates.
CAVESTORY_MOD_API void DeleteNpCharEvent(int iEventNo, BOOL bSetFlag=TRUE)
Delete all NPCs with a specific event number.
CAVESTORY_MOD_API void PutValueView(int iFrameX, int iFrameY)
Draw all view values.
CAVESTORY_MOD_API BOOL LoadProfile(const char *pFileName, BOOL bDoGameFuncs=TRUE)
Load a profile into the current gamestate.
CAVESTORY_MOD_API void SetTextScriptContext(TEXT_SCRIPT_PTR_DATA *pData=&default_TextScriptPtrData)
Set the current text script context.
CAVESTORY_MOD_API void CSM_SpawnAmmo(int iSubPixelX, int iSubPixelY, int iAmount)
Spawn a missile pickup.
CAVESTORY_MOD_API void CSM_PlayerState_DrawWeapon(int iFrameX, int iFrameY, SafeClientInterface *pInterface, float fScale=1.f)
Draw the weapon.
CAVESTORY_MOD_API void GetFramePosition(int *iX, int *iY)
Get the current camera position.
CAVESTORY_MOD_API void ClearValueView()
Clear all view values.
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.
CAVESTORY_MOD_API bool IsCarryingAllowed()
Check whether the current mod allows carrying other players.
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.
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.
CAVESTORY_MOD_API bool IsAgilityAllowed()
Check whether the current mod allows agility.
CAVESTORY_MOD_API BOOL UseArmsEnergy(long iNum, ARMS *pArmsTable, int iSelectedIdx)
Use some arms energy from the selected arm.
CAVESTORY_MOD_API unsigned int GetTileFlagsNPC(NPCHAR *pNpc)
Fetch the tile type flags for a map tile.
CAVESTORY_MOD_API int LoadTimeCounter(const char *pFileName="290.rec")
Load the time counter's total time.
CAVESTORY_MOD_API BOOL IsNpCharInsideNpChar(NPCHAR *pNpc, NPCHAR *pOther)
Check to see if an NPC is clipping bounds with another NPC.
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.
CAVESTORY_MOD_API void SetValueView(int *pX, int *pY, int iValue)
Create a new view value.
CAVESTORY_MOD_API void StopTextScript()
Stop text script.
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.
CAVESTORY_MOD_API BOOL CSM_IsFramerateVisible()
Set the visibility of the FPS counter.
CAVESTORY_MOD_API void CSM_Map_ShiftTileIndex(int iX, int iY, bool bRecordChange=true)
Shift a map tile to the left one tile index.
CAVESTORY_MOD_API BOOL IsProfile()
Check if there is a profile.
CAVESTORY_MOD_API void CSM_Map_ClearTileAnimation(bool bForeground, unsigned int iX, unsigned int iY)
Clear a specific map tile's animation.
CAVESTORY_MOD_API void DeleteNpCharFlag(int iFlagNo, BOOL bSetFlag=FALSE)
Delete all NPCs with a specific flag number.
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.
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.
CAVESTORY_MOD_API unsigned int CompareTileType(unsigned int iTileTypes, unsigned int iOtherTileTypes)
Compare two tile types against each other.
CAVESTORY_MOD_API void SetHellTimerGlobalTimerOffset(unsigned long long int iOffset)
Set the global timer offset at which the hell counter started at.
CAVESTORY_MOD_API bool IsFishingAllowed()
Check whether the current mod allows fishing.
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.
CAVESTORY_MOD_API bool IsFocusInsideNpChar(NPCHAR *pNpc)
Check to see if an NPC is clipping bounds with the NPC's focus object.
CAVESTORY_MOD_API BOOL ChargeArmsEnergy(long iChargeAmt, ARMS *pArmsTable, int iSelectedWeapon)
Charge the selected weapon in pArmsTable.
CAVESTORY_MOD_API int CSM_EntProp_GetFieldIndex(NPCHAR *pNpc, const char *pFieldName)
Lookup the index of an NPC's property field.
CAVESTORY_MOD_API void CSM_SpawnEXP(int iSubPixelX, int iSubPixelY, int iAmount)
Spawn a certain amount of EXP pellets.
CAVESTORY_MOD_API unsigned int GetTileFlagsXY(int iX, int iY)
Fetch the tile type flags for a map tile.
CAVESTORY_MOD_API void CSM_PlayerState_DrawCharacter(int iFrameX, int iFrameY, SafeClientInterface *pInterface, float fScale=1.f)
Draw the character.
CAVESTORY_MOD_API void SetCaret(int iSpawnX, int iSpawnY, int iCaretId, int iDirection, CARET **pOut=NULL)
Spawn a caret at the coordinates.
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.
CAVESTORY_MOD_API unsigned int CompareTileTypeNPC(NPCHAR *pNpc, unsigned int iTileTypes)
Compare tile types for the map tile that npc is on.
CAVESTORY_MOD_API void CSM_Map_ActAnimatedTiles()
Act animated tiles.
CAVESTORY_MOD_API BOOL LoadProfileFromMem(PROFILE *pProfile)
Load the gamestate from a PROFILE* struct.
CAVESTORY_MOD_API void CSM_SaveScreenshot(const char *pOutputImagePath, GUI_RECT *pSource=NULL)
Take an unmagnified screenshot and save it at a path.
CAVESTORY_MOD_API BOOL SaveProfileIntoMem(PROFILE *pProfile)
Save the current gamestate to a PROFILE* struct.
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.
CAVESTORY_MOD_API void SetHellTimerFrameCount(int iFrameCount)
Set the current hell timer frame count.
CAVESTORY_MOD_API void SetFramePosition(int iX, int iY)
Set frame position.
CAVESTORY_MOD_API int GetHellTimerFrameCount()
Get the current hell timer frame count.
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.
CAVESTORY_MOD_API int GetHellTimerMS()
Get the current hell timer time in milliseconds.
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.
CAVESTORY_MOD_API BOOL HasArmsData(long iCode)
Check to see if the singleplayer character has a weapon.
CAVESTORY_MOD_API BOOL TransferDataStage(int iStageNo, int iEventNo, int iSpawnX, int iSpawnY)
Transfer over to a vanilla map.
CAVESTORY_MOD_API Surface_Ids CSM_CustomPlayer_GetNormalSurfaceId(CustomPlayer *pCharacter)
Get the surface ID for a character's normal plane.
CAVESTORY_MOD_API void SetFadeMask()
Completely fade the screen out.
BOOL(* CSM_HOOK_OnMessageSentFunc)(CaveNet::DataStructures::NetClient *pClient, const char *pMessage)
Called when a client says something.
Definition: CSMAPI_functions.h:922
CAVESTORY_MOD_API void CSM_SetHook_OnReceiveUserCmdFromServer(CSM_HOOK_OnReceiveUserCmdFromServerFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
BOOL(* CSM_HOOK_OnPlayerPickupHeartFunc)(NPCHAR *pHeart, CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, int iHealth)
Called every time a player picks up a heart.
Definition: CSMAPI_functions.h:652
CAVESTORY_MOD_API void CSM_SetHook_OnTeamAddMember(CSM_HOOK_OnTeamAddMemberFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnDrawHUD(CSM_HOOK_OnDrawHUDFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnClientConnectedFunc)(CaveNet::DataStructures::NetClient *pClient)
Called when a client has connected to the server.
Definition: CSMAPI_functions.h:542
void(* CSM_HOOK_OnReceiveUserCmdFromClientFunc)(CaveNet::DataStructures::NetClient *pClient, int iArg1, int iArg2, int iArg3, int iArg4, int iArg5, int iArg6, const char *pString1)
Called when a mod user command is received from a client.
Definition: CSMAPI_functions.h:946
void(* CSM_HOOK_OnClientReviveFunc)(CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetClient *pSavior)
Called every time a client is revived.
Definition: CSMAPI_functions.h:616
CAVESTORY_MOD_API void CSM_SetHook_OnPlayerPickupNpc(CSM_HOOK_OnPlayerPickupNpcFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
BOOL(* CSM_HOOK_OnPlayerPickupMissileFunc)(NPCHAR *pMissile, CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, int iAmmo)
Called every time a player picks up a missile.
Definition: CSMAPI_functions.h:672
CAVESTORY_MOD_API void CSM_SetHook_OnClientDisconnected(CSM_HOOK_OnClientDisconnectedFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnTeamRemoveMemberFunc)(CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetClient *pServerClient, CaveNet::DataStructures::NetTeam *pTeam)
Called when a client is removed from a team.
Definition: CSMAPI_functions.h:754
CAVESTORY_MOD_API void CSM_SetHook_OnStageChange(CSM_HOOK_OnStageChangeFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnTeamAddMemberFunc)(CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetClient *pServerClient, CaveNet::DataStructures::NetTeam *pTeam)
Called when a client is added to a team.
Definition: CSMAPI_functions.h:737
CAVESTORY_MOD_API void CSM_SetHook_OnClientConnected(CSM_HOOK_OnClientConnectedFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
BOOL(* CSM_HOOK_OnPlayerPickupExperienceFunc)(NPCHAR *pExp, CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, int iExp)
Called every time a player picks up experience.
Definition: CSMAPI_functions.h:692
CAVESTORY_MOD_API void CSM_SetHook_OnPreDrawHUD(CSM_HOOK_OnPreDrawHUDFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnServerTick(CSM_HOOK_OnServerTickFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnClientTickFunc)()
Called every time the client ticks.
Definition: CSMAPI_functions.h:720
BOOL(* CSM_HOOK_OnHitBulletMapFunc)(BULLET *pBullet)
Called when a bullet is tested for collision against the map.
Definition: CSMAPI_functions.h:801
CAVESTORY_MOD_API void CSM_SetHook_OnPlayerPickupHeart(CSM_HOOK_OnPlayerPickupHeartFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
BOOL(* CSM_HOOK_OnDrawItemFunc)(GUI_RECT pDrawRect, MYCHAR *pMC, ITEM *pItem, int iItemIndex)
Called when an item is drawn in the inventory menu.
Definition: CSMAPI_functions.h:510
CAVESTORY_MOD_API void CSM_SetHook_OnClientDie(CSM_HOOK_OnClientDieFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnServerTickFunc)()
Called every time the server ticks.
Definition: CSMAPI_functions.h:706
BOOL(* CSM_HOOK_OnHitMyCharMapFunc)(CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, bool bNoclip)
Called when a player is being checked for map collision.
Definition: CSMAPI_functions.h:884
CAVESTORY_MOD_API void CSM_SetHook_OnTeamRemoveMember(CSM_HOOK_OnTeamRemoveMemberFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnPlayerPickupExperience(CSM_HOOK_OnPlayerPickupExperienceFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnClientDisconnectedFunc)(CaveNet::DataStructures::NetClient *pClient)
Called before a client is deleted after leaving.
Definition: CSMAPI_functions.h:526
BOOL(* CSM_HOOK_OnGetTeamSpawnPointFunc)(CaveNet::DataStructures::NetTeam *pTeam, int *pSpawnX, int *pSpawnY)
Called every time a team tries to find a valid player spawn point.
Definition: CSMAPI_functions.h:578
BOOL(* CSM_HOOK_OnHitMyCharMapTileFunc)(CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, int iTileX, int iTileY, int iTileAttrib, bool bNoclip)
Called when a player is being checked for map collision against a specific map tile.
Definition: CSMAPI_functions.h:865
CAVESTORY_MOD_API void CSM_SetHook_OnClientSpawn(CSM_HOOK_OnClientSpawnFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnDrawMapFront(CSM_HOOK_OnDrawMapFrontFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnStageChangeFunc)(const char *pStageName, int iAreaIndex)
Called every time the stage changes.
Definition: CSMAPI_functions.h:632
CAVESTORY_MOD_API void CSM_SetHook_OnProcessAI(CSM_HOOK_OnProcessAIFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnClientRevive(CSM_HOOK_OnClientReviveFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnPlayerPickupMissile(CSM_HOOK_OnPlayerPickupMissileFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnPreDrawHUDFunc)()
Called after all gameplay elements are drawn, but before the HUD is drawn.
Definition: CSMAPI_functions.h:490
void(* CSM_HOOK_OnDrawMapBackFunc)()
Called before the map's background tiles are rendered.
Definition: CSMAPI_functions.h:462
BOOL(* CSM_HOOK_OnHitMyCharNpCharFunc)(CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, bool bNoclip)
Called when a player is being checked for collision with NPCs.
Definition: CSMAPI_functions.h:820
CAVESTORY_MOD_API void CSM_SetNpcCodeCharWhitelisted(int iCodeChar, bool bWhitelisted)
Set whether a specific code_char is whitelisted or not.
void(* CSM_HOOK_OnPlayerPickupNpcFunc)(CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetPlayer *pPlayer, MYCHAR *pMC, NPCHAR *pNpc)
Called when an NPCHAR with a whitelisted code_char can be picked up by the player.
Definition: CSMAPI_functions.h:772
CAVESTORY_MOD_API void CSM_SetHook_OnDrawMapBack(CSM_HOOK_OnDrawMapBackFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnGetTeamSpawnPoint(CSM_HOOK_OnGetTeamSpawnPointFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnHitMyCharMap(CSM_HOOK_OnHitMyCharMapFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnMessageSent(CSM_HOOK_OnMessageSentFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnPostDraw(CSM_HOOK_OnPostDrawFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
BOOL(* CSM_HOOK_OnMyCharCollisionTest_NpChar)(CaveNet::DataStructures::NetClient *pClient, MYCHAR *pMC, NPCHAR *pNpc, BOOL bNoclip, BOOL &bCallAgain)
Called when a player needs to test collision against a whitelisted NPC.
Definition: CSMAPI_functions.h:841
void(* CSM_HOOK_OnDrawHUDFunc)(BOOL bFlash)
Called after the game is finished drawing everything.
Definition: CSMAPI_functions.h:448
CAVESTORY_MOD_API void CSM_SetHook_OnClientTick(CSM_HOOK_OnClientTickFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnHitBulletMap(CSM_HOOK_OnHitBulletMapFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnHitMyCharMapTile(CSM_HOOK_OnHitMyCharMapTileFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnReceiveUserCmdFromClient(CSM_HOOK_OnReceiveUserCmdFromClientFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnClientSpawnFunc)(CaveNet::DataStructures::NetClient *pClient)
Called every time a client spawns.
Definition: CSMAPI_functions.h:558
void(* CSM_HOOK_OnPostDrawFunc)()
Called after the game is finished drawing gameplay elements to the screen, but before it draws GUI el...
Definition: CSMAPI_functions.h:433
void(* CSM_HOOK_OnDrawMapFrontFunc)()
Called before the map's foreground tiles are rendered.
Definition: CSMAPI_functions.h:476
void(* CSM_HOOK_OnProcessAIFunc)(CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetPlayer *pPlayer, CaveNet::DataStructures::NetTeam *pTeam)
Called when an AI-controlled player is thinking.
Definition: CSMAPI_functions.h:903
void(* CSM_HOOK_OnReceiveUserCmdFromServerFunc)(int iArg1, int iArg2, int iArg3, int iArg4, int iArg5, int iArg6, const char *pString1)
Called when a mod user command is received from the server we're connected to.
Definition: CSMAPI_functions.h:969
CAVESTORY_MOD_API void CSM_SetHook_OnDrawItem(CSM_HOOK_OnDrawItemFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
void(* CSM_HOOK_OnClientDieFunc)(CaveNet::DataStructures::NetClient *pClient, PlayerDeathType iDeathType, NPCHAR *pKillerNpc, CaveNet::DataStructures::NetClient *pKillerClient)
Called every time a client dies.
Definition: CSMAPI_functions.h:598
CAVESTORY_MOD_API void CSM_SetHook_OnMyCharCollisionTest_NpChar(int iNpcId, CSM_HOOK_OnMyCharCollisionTest_NpChar pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_SetHook_OnHitMyCharNpChar(CSM_HOOK_OnHitMyCharNpCharFunc pFuncPtr)
Hook up a function to make custom code run during a game event.
CAVESTORY_MOD_API void CSM_Log(const char *pFormat,...)
Log a message to the console.
Definition: CavestoryModAPI.cpp:50
CAVESTORY_MOD_API void CSM_LogColor(unsigned int iColor=0xFFFFFFFF)
Set the color of the console.
Definition: CavestoryModAPI.cpp:58
CAVESTORY_MOD_API void CSM_LogInfo(const char *pCategory, const char *pFormat,...)
Log a message to the console & to the log file (if one is open).
Definition: CavestoryModAPI.cpp:63
CAVESTORY_MOD_API void CSM_Explode(int iErrorCode, const char *pErrorName, const char *pTitle="\\a{0} crashed!", const char *pMessage="The mod's DLL has crashed!", bool bGenerateCrashLog=true)
Display a crash screen.
Definition: CavestoryModAPI.cpp:115
CAVESTORY_MOD_API void __CSM__LogWarn(const char *pSourceFile, int iSourceLineNo, const char *pCategory, const char *pFormat,...)
Log a warning message to the console & to the log file (if one is open).
Definition: CavestoryModAPI.cpp:89
CAVESTORY_MOD_API void __CSM__LogError(const char *pSourceFile, int iSourceLineNo, const char *pCategory, const char *pFormat,...)
Log an error message to the console & to the log file (if one is open).
Definition: CavestoryModAPI.cpp:75
CAVESTORY_MOD_API void CSM_LogInfoNoNL(const char *pCategory, const char *pFormat,...)
Log a message to the console & to the log file (if one is open).
Definition: CavestoryModAPI.cpp:103
CAVESTORY_MOD_API void CSM_Log_EnableStackLines(bool bEnable)
Enable or disable StackLines.
Definition: CavestoryModAPI.cpp:45
CAVESTORY_MOD_API int GetCos(unsigned char iDeg)
Calculate cos.
CAVESTORY_MOD_API int CSM_GetWindowHeight()
Get the current window height.
CAVESTORY_MOD_API void CSM_Puppy_GetDrawOffset(MYCHAR *pMC, GUI_POINT *pOut)
Get the held entity offset of a player's current frame.
CAVESTORY_MOD_API void CSM_Npc_SkipUpdate(NPCHAR *pNpc)
Skip one NPC update for a specific NPC.
CAVESTORY_MOD_API unsigned char GetArktan(int iX, int iY)
Get arktan from x and y.
CAVESTORY_MOD_API void CSM_SetBitmapLoadMagnification(int iMagnification)
Set the magnification of all loaded bitmaps beyond this point.
int ScreenCoordToPixel(int iCoord)
Convert a screen cordinate to a pixel.
Definition: CSMAPI_functions.h:2784
CAVESTORY_MOD_API int GetSin(unsigned char iDeg)
Calculate sin.
int SubpixelToScreenCoord(int iCoord)
Convert a subpixel coordinate to screen coordinate.
Definition: CSMAPI_functions.h:2760
CAVESTORY_MOD_API void GetMyCharDrawRectangle(MYCHAR *pMC, GUI_RECT *pOut)
Get the draw rectangle of a MYCHAR.
CAVESTORY_MOD_API void CSM_Carry_GetDrawOffset(MYCHAR *pMC, GUI_POINT *pOut)
Get the carried player offset of a player's current frame.
CAVESTORY_MOD_API unsigned long long int CSM_Npc_GetUpdateNodes(unsigned int iCodeChar, int iActNo)
Get the update nodes for a specific NPC type.
CAVESTORY_MOD_API unsigned long long int CSM_Npc_GetTransmitNodes(unsigned int iCodeChar, int iActNo)
Get the transmit nodes for a specific NPC type.
CAVESTORY_MOD_API void CSM_Npc_GetPosition(NPCHAR *pNpc, NpcPositionType iType=NpcPositionType::NPT_DRAW_POSITION, int *iOutX=NULL, int *iOutY=NULL, int iFrameX=-1, int iFrameY=-1)
Get the draw position of an NPC.
CAVESTORY_MOD_API int CSM_GetWindowWidth()
Get the current window width.
CAVESTORY_MOD_API void CSM_Weapon_GetDrawOffset(MYCHAR *pMC, int iWeaponCode, GUI_POINT *pOut)
Get the draw offset of a player's weapon.
int PixelToScreenCoord(int iCoord)
Convert a pixel to a screen cordinate.
Definition: CSMAPI_functions.h:2772
CAVESTORY_MOD_API bool IsNpcOnScreen(NPCHAR *pNpc)
Check if an NPC is on screen.
int ScreenCoordToSubPixel(int iCoord)
Convert a screen cordinate to a subpixel.
Definition: CSMAPI_functions.h:2797
CAVESTORY_MOD_API int Random(int iMin, int iMax)
Get a random value.
CAVESTORY_MOD_API int OpenOptionsMenu(const char **pCategoryList=NULL, int iCategoryCount=0)
Open the options menu.
CAVESTORY_MOD_API int OpenEscapeMenu()
Open the escape menu.
CAVESTORY_MOD_API unsigned int GetPlayerStateFlags(MYCHAR *pChar)
Get the flags for a player's state.
CAVESTORY_MOD_API PlayerStateAnimator_OutputType GetPlayerStateAnimatorType(MYCHAR *pChar)
Get the return type of a player's state's animate function.
CAVESTORY_MOD_API int GetStateByUnitIndex(int iUnitIndex)
Transform a unit index into a player state index.
CAVESTORY_MOD_API void SetPlayerState(SafeClientInterface *pInterface, int iStateType=-1, bool bForce=false)
Set the state of an interface.
CAVESTORY_MOD_API unsigned int GetPlayerStateFlagsFromCarrier(MYCHAR *pChar)
Get the flags from a player's carrier's playerstate.
CAVESTORY_MOD_API int FindPlayerStateByName(const char *pName)
Find a player state by its name.
CAVESTORY_MOD_API int GetUnitIndexByState(int iPlayerState)
Transform a player state index into a unit index.
bool IsPlayerState(MYCHAR *pChar, int iStateType)
Check to see if a player is in the specified state.
Definition: CSMAPI_functions.h:2896
CAVESTORY_MOD_API int GetPlayerState(SafeClientInterface *pInterface)
Get the current playerstate of an interface.
CAVESTORY_MOD_API BOOL CSM_Raycasting_CastRay(GUI_POINT pPointStart, GUI_POINT pPointEnd, RAYCAST_QUERY *pInfo=NULL, bool bHitEndBlock=true, bool bHitStartBlock=true)
Cast a ray in the game world.
CAVESTORY_MOD_API void CSM_Raycasting_SetBounds(GUI_RECT *pRect)
Setup raycasting bounds.
CAVESTORY_MOD_API BOOL CSM_Raycasting_CastRay_Quick(int iStartX, int iStartY, int iEndX, int iEndY, unsigned int iHitMask, RAYCAST_QUERY *pInfo=NULL, bool bHitEndBlock=true, bool bHitStartBlock=true)
Cast a ray in the game world, but faster.
CAVESTORY_MOD_API void CSM_Sound_Process2D()
Process the 2D soundscape.
int CSM_CustomPixToneId
A custom sound ID.
Definition: CSMAPI_functions.h:3141
CAVESTORY_MOD_API void CSM_Sound_SetPitch(int iSoundIndex, unsigned short iPitch)
Set the pitch of a sound.
CAVESTORY_MOD_API void ChangeMusic(int iMusicIndex)
Set the current music track.
CAVESTORY_MOD_API BOOL CSM_UnloadCustomSound(CSM_CustomSoundId iSoundId)
Unload a custom sound file.
CAVESTORY_MOD_API BOOL CSM_UnloadPixTone(CSM_CustomPixToneId iSoundId)
Unload a custom sound file.
CAVESTORY_MOD_API void CSM_Music_SetVolume(unsigned char iVolume)
Set the volume of music.
#define SOUND_MODE_STOP_THEN_PLAY
Stop and then play a sound.
Definition: CSMAPI_defines.h:31
CAVESTORY_MOD_API void PlaySoundObject(int iSoundIndex, int iPlayMode=SOUND_MODE_STOP_THEN_PLAY, unsigned int iPlayVolume=0x100)
Play a sound by index.
CAVESTORY_MOD_API void CSM_SetCustomSoundVolume(CSM_CustomSoundId iSoundId, unsigned char iVolume)
Set the volume of a custom sound.
CAVESTORY_MOD_API BOOL IsSoundPlaying(int iSoundId)
Check if a sound is playing.
CAVESTORY_MOD_API void PlayCustomMusic(const char *pFileName)
Play custom music.
CAVESTORY_MOD_API CSM_CustomSoundId CSM_LoadCustomSound(const char *pPath)
Load a custom sound file.
CAVESTORY_MOD_API void CSM_SetCustomSoundPan(CSM_CustomSoundId iSoundId, unsigned char iPanAmount=50)
Set the pan amount of a custom sound.
CAVESTORY_MOD_API CSM_CustomPixToneId CSM_LoadPixTone(const char *pPath)
Load a custom pixtone file.
CAVESTORY_MOD_API void PlaySoundObject2D(int iSubpixelX, int iSubpixelY, int iRadius, bool bAlwaysOnScreen, int iSoundIndex, int iPlayMode=SOUND_MODE_STOP_THEN_PLAY, unsigned int iPlayVolume=0x100, unsigned int iFalloffRadius=0x7FFFFFFE)
Play a sound by index at a specific place in the game.
CAVESTORY_MOD_API void CSM_Sound_SetPan(int iSoundIndex, char iPan)
Set the panning of a sound.
CAVESTORY_MOD_API void ReCallMusic()
Recall the last played music.
CAVESTORY_MOD_API void CSM_Sound_SetVolume(int iSoundIndex, unsigned char iVolume)
Set the volume of a sound.
CAVESTORY_MOD_API void SetCharacterNameTextScript()
Append the character's name into the messagebox.
CAVESTORY_MOD_API void DisplayCustomTextToScript(const char *pString, bool bSanitize=false)
Appends text to the current messagebox text.
CAVESTORY_MOD_API void ClearTextLine()
Clear the messagebox.
CAVESTORY_MOD_API bool JumpTextScript(int no, BOOL call=FALSE)
Jump to another event.
CAVESTORY_MOD_API int GetTextScriptNo(int a)
Get a number argument from the script.
CAVESTORY_MOD_API void Server_ClearFocusFromPlayer()
Stop focusing on the event executor.
CAVESTORY_MOD_API bool ReturnTextScript()
Return execution to last call command.
CAVESTORY_MOD_API void CheckNewLine()
Check if a new messagebox line needs to be created.
CAVESTORY_MOD_API void Server_FocusOnCurrentPlayer()
Focus on the player that started the event.
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.
CAVESTORY_MOD_API void SetNumberTextScript(int iIndex)
Type a specific number into the message box.
CAVESTORY_MOD_API unsigned long long int CSM_GetFrameCount()
Get the number of frames that have passed since CSMP started.
CAVESTORY_MOD_API unsigned int GetTicks()
Get the current ticks since the program started.
CAVESTORY_MOD_API void CSM_Video_GetResolution(int *iWidth, int *iHeight)
Get the game's window resolution.
CAVESTORY_MOD_API void CSM_Video_SetResolution(int iNewWidth, int iNewHeight, int iNewMagnification=-1)
Set the game's window resolution.
Weapon object.
Definition: CSMAPI_types.h:1264
Bullet object.
Definition: CSMAPI_types.h:1128
Stores particle information.
Definition: CSMAPI_types.h:1298
Manages colors.
Definition: CSMAPI_types.h:497
Manages points.
Definition: CSMAPI_types.h:546
Definition: CSMAPI_types.h:842
Item object.
Definition: CSMAPI_types.h:1289
Player character object.
Definition: CSMAPI_types.h:1470
int netanim
Animation index.
Definition: CSMAPI_types.h:1514
NPC object.
Definition: CSMAPI_types.h:2021
Stores information for save files.
Definition: CSMAPI_types.h:2404
Stores information from CSM_CastRay().
Definition: CSMAPI_types.h:6801
Rect structure.
Definition: CSMAPI_types.h:125
SafeClientInterface.
Definition: CSMAPI_types.h:1775
Text script pointer data.
Definition: CSMAPI_types.h:2528