Cavestory Mod API
Macros | Functions | Variables
CavestoryModAPI.cpp File Reference

Implementing Cavestory Mod API. More...

#include <CavestoryModAPI.h>
#include "../Game/System/Platform/Platform.h"
#include "../CaveNet/CaveNet.h"
#include "../Sound.h"
#include "../Stage.h"
#include "../Bullet.h"
#include "../Caret.h"
#include "../NpChar.h"
#include "../ArmsItem.h"
#include "../Game.h"
#include "../KeyControl.h"
#include "../MyChar.h"
#include "../MycParam.h"
#include "../Config.h"
#include "../ConfigVar.h"
#include "../Triangle.h"
#include "../Main.h"
#include "../CrashMode.h"
#include "../ConsoleLog.h"
#include <stdarg.h>
#include <CSMAPI_begincode.h>
#include <CSMAPI_endcode.h>

Macros

#define NETEVENT_UNPACK(name)   static void __NEF_UNPACK_##name##(NetPacket* packet, bool client, NetClient* cl)
 

Functions

void CSM_Log_EnableStackLines (bool bEnable)
 Enable or disable StackLines. More...
 
void CSM_Log (const char *pFormat,...)
 Log a message to the console. More...
 
void CSM_LogColor (unsigned int iColor)
 Set the color of the console. More...
 
void CSM_LogInfo (const char *pCategory, const char *pFormat,...)
 Log a message to the console & to the log file (if one is open). More...
 
void __CSM__LogError (const char *pSourceFileName, int iSourceFileLineNo, const char *pCategory, const char *pFormat,...)
 Log an error message to the console & to the log file (if one is open). More...
 
void __CSM__LogWarn (const char *pSourceFileName, int iSourceFileLineNo, const char *pCategory, const char *pFormat,...)
 Log a warning message to the console & to the log file (if one is open). More...
 
void CSM_LogInfoNoNL (const char *pCategory, const char *pFormat,...)
 Log a message to the console & to the log file (if one is open). More...
 
void CSM_Explode (int iErrorCode, const char *pErrorName, const char *pTitle, const char *pMessage, bool bGenerateCrashLog)
 Display a crash screen. More...
 
bool CSM_CaveNet_ConnectedAsClient ()
 Check to see whether we're connected to a server or not. More...
 
bool CSM_CaveNet_IsHosting ()
 Check to see whether we're hosting a server. More...
 
int CSM_CaveNet_GetClientCount ()
 Get how many clients are currently connected to the server. More...
 
int CSM_CaveNet_GetRealClientCount ()
 Get how many clients are currently connected to the server, excluding AI players. More...
 
bool Config_GetBool (const char *pCVarName)
 Get a boolean value from a configuration variable. More...
 
int Config_GetInt (const char *pCVarName)
 Get an integer value from a configuration variable. More...
 
const char * Config_GetString (const char *pCVarName)
 Get a string value from a configuration variable. More...
 
void Config_GetColor (const char *pCVarName, GUI_COLOR &pColor)
 Get a color value from a configuration variable. More...
 
bool Config_SetValue (const char *pCVarName, const char *pValue, bool bUserInput)
 Set the value of a configuration variable. More...
 
MYCHARGetLocalPlayerCharacter ()
 Get the local player. More...
 
int GetKeybind (CSM_KEYBIND_DESC iType)
 Get the input flags for a keybind. More...
 
int GetInput (CSM_KEY_DESC iType)
 Get the current input flags from a store. More...
 
void CaveNet_CreateTeam (int iTeamId, bool bClientSide, void *pOut)
 Create a team object. More...
 
unsigned int CaveNet_Client_GetGlobalTimerOffset ()
 Get the global timer. More...
 
bool CaveNet_Client_IsInGui ()
 Check if we're in a GUI. More...
 
bool CaveNet_Client_IsConnected ()
 Check if we're connected to a server. More...
 
int CaveNet_Client_GetGhostId ()
 Get our ghost ID. More...
 
CaveNet::DataStructures::NetClientCaveNet_Client_ClientGroup_GetClient (int index)
 Get a client object. More...
 
CaveNet::DataStructures::NetClientCaveNet_Client_ClientGroup_GetClientByGhostId (int ghost_id)
 Get a client object by their ghost id. More...
 
int CaveNet_Client_ClientGroup_GetClientCount ()
 Get the amount of clients currently cached. More...
 
unsigned int CaveNet_Server_GetGlobalTimerOffset ()
 Get the server-side global timer. More...
 
bool CaveNet_Server_IsHosting ()
 Check if we're hosting a server. More...
 
bool CaveNet_Server_InLobby ()
 Check if we're in the lobby. More...
 
void CaveNet_Server_EnterLobby ()
 Enter the lobby.
 
CaveNet::DataStructures::NetClientCaveNet_Server_ClientGroup_AddBot (const char *pBotName, const char *pCharName, unsigned char iColorR, unsigned char iColorG, unsigned char iColorB, bool bRandomColor)
 Create a bot. More...
 
CaveNet::DataStructures::NetClientCaveNet_Server_ClientGroup_GetClient (int index)
 Get a client object. More...
 
CaveNet::DataStructures::NetClientCaveNet_Server_ClientGroup_GetClientByGhostId (int ghost_id)
 Get a client object by their ghost id. More...
 
int CaveNet_Server_ClientGroup_GetClientCount ()
 Get the amount of clients currently cached. More...
 
void CaveNet_Server_ClientGroup_TransmitSystemMessage (const char *pFormat,...)
 Transmit a system message. More...
 
void CaveNet_Server_ClientGroup_ReviveAllDeadPlayers ()
 Revive all dead players.
 

Variables

int spur_charge
 
bool spur_max
 
bool bModCrashed = false
 
bool bStackLines = false
 
unsigned int iCurrentConsoleColor = CSM_FOREGROUND_RED | CSM_FOREGROUND_GREEN | CSM_FOREGROUND_BLUE
 

Detailed Description

Implementing Cavestory Mod API.