Cavestory Mod API
Classes | Macros | Typedefs | Functions | Variables
CSMAPI_types.h File Reference
#include <List.h>
#include "CSMAPI_begincode.h"
#include "CSMAPI_endcode.h"

Go to the source code of this file.

Classes

struct  SDL_Rect
 
struct  RECT
 Rect structure. More...
 
struct  CSM_POINT
 Point structure. More...
 
struct  FRAME
 Camera struct. More...
 
struct  CUSTOM_FRAME_LIMITS
 Custom frame limit object. More...
 
class  FontManager
 Manages fonts. More...
 
class  FontHandle
 A handle for fonts. More...
 
struct  GUI_COLOR
 Manages colors. More...
 
struct  GUI_POINT
 Manages points. More...
 
struct  GUI_POINT_F
 Manages points (float). More...
 
struct  GUI_RECT
 
struct  BULLET
 Bullet object. More...
 
struct  PERMIT_STAGE
 Permit stage object. More...
 
struct  ARMS
 Weapon object. More...
 
struct  ITEM
 Item object. More...
 
struct  CARET
 Stores particle information. More...
 
struct  MYCHAR_PHYSICS
 Physics specifier for MYCHAR. More...
 
struct  CUSTOM_OBJECT
 Custom object structure. More...
 
struct  CUSTOM_PLAYER_ANIMATION_INFO
 Animation information for CustomPlayerAnimation. More...
 
struct  MYCHAR
 Player character object. More...
 
struct  SafeClientInterface
 SafeClientInterface. More...
 
struct  ShootInfo
 ShootInfo structure. More...
 
struct  NPCHAR
 NPC object. More...
 
struct  WHIMSICAL_STAR
 Whimsical star object. More...
 
struct  _NPCHAR_CACHE
 
struct  PROFILE
 Stores information for save files. More...
 
struct  TEXT_SCRIPT_PTR_DATA
 Text script pointer data. More...
 
struct  TEXT_SCRIPT
 Text script state object. More...
 
struct  TEXT_SCRIPT_CALLSTACK_DATA
 Callstack data for text script. More...
 
class  GuiBase
 The base class for GUI elements. More...
 
class  CenteredTextInfo
 Draw centered text. More...
 
class  LabelInfo
 Text. More...
 
class  SelectableLabelInfo
 Text. More...
 
class  ScrollAreaInfo
 A scroll area. More...
 
class  TextInputInfo
 Show a text input box. More...
 
class  KeyInputInfo
 Show a text input box. More...
 
class  CheckBoxInfo
 Show a toggleable checkbox. More...
 
class  SliderIntInfo
 Show a number slider. More...
 
class  ButtonInfo
 Show a clickable button. More...
 
class  DropdownBoxInfo
 Show a dropdown box. More...
 
struct  DropdownBoxInfo::DBI_Item
 Dropdown box item struct. More...
 
class  ColorPickerInfo
 Several combined GUI elements to form a color picker. More...
 
class  DraggableWindowInfo
 Show a clickable button. More...
 
class  GroupBoxInfo
 Show a windows-style group box. More...
 
class  TabBookInfo
 Show a tab selector. More...
 
struct  TabBookInfo::TAB
 Dropdown box item struct. More...
 
class  CustomDrawInfo
 Custom draw GUI element. More...
 
class  DrawBitmapInfo
 Custom draw GUI element. More...
 
class  CaveStoryDialogBoxInfo
 Custom draw GUI element. More...
 
struct  SystemMenuItem
 System menu info struct. More...
 
class  SystemMenuInfo
 Show a dropdown box. More...
 
class  SelectableListInfo
 Text. More...
 
struct  SelectableListInfo::SEL_LIST_ENTRY
 Stores info for an entry. More...
 
struct  RAYCAST_QUERY
 Stores information from CSM_CastRay(). More...
 
struct  MAP_CHANGED_TILE
 
class  MAP_ZONE
 A map zone to be used for network optimization. More...
 
struct  MAP_ZONE::MAP_ZONE_RECT_STRUCT
 The rect for this zone. More...
 
struct  MAP_ANIMATED_TILE
 Contains an animated map tile's information. More...
 
struct  MAP_DATA
 Contains the currently loaded stage's map data. More...
 
struct  MYCHAR_STATE_ARG_INFO
 Player state argument info. More...
 
struct  MYCHAR_STATE_INFO
 Player state information. More...
 
struct  CSM_RANKED_CLIENT_INFO
 A client's ranked info. More...
 
struct  DYNAMIC_WINDOW_CONFIG
 DynamicWindowMode config struct. More...
 
struct  CSM_QSA_Data
 Quick Surface Access data. More...
 

Macros

#define FALSE   0
 
#define TRUE   1
 
#define _NPCHAR_CACHE_SET(varName)   this->varName = npc->varName;
 
#define _NPCHAR_CACHE_TRANSMIT(varName)   npc->varName = this->varName;
 
#define _NPCHAR_CACHE_EQUALS(varName)   npc->varName == this->varName
 
#define MAP_MAX_ZONES   0x7FFFFFFF
 

Typedefs

typedef struct SDL_Rect SDL_Rect
 
typedef int BOOL
 
typedef void * NetClientPointer
 
typedef int NetClientGhostId
 
typedef void(* PutNPCFunc) (NPCHAR *npc, int fx, int fy)
 A custom draw function for NPCHAR. More...
 
typedef void(* FreeNPCFunc) (NPCHAR *npc)
 A custom free function for NPCHAR. More...
 
typedef BOOL(* CollideNPCFunc) (NPCHAR *npc)
 Custom collision detection function. More...
 
typedef struct FontObject FontObject
 
typedef void(* SystemMenuInfo_OnItemClickFunc) (SystemMenuInfo *pSMI, SystemMenuItem *pItem)
 
typedef void(* PlayerState_ActFuncType) (BOOL bKey, SafeClientInterface *pInterface, MYCHAR *pMC, const MYCHAR_PHYSICS *pPhysics)
 The act function for this player state. More...
 
typedef unsigned int(* PlayerState_AnimFuncType) (BOOL bKey, MYCHAR *pMC, SafeClientInterface *pInterface)
 The animation function for this player state. More...
 
typedef void(* PlayerState_DrawFuncType) (int iFrameX, int iFrameY, MYCHAR *pMC, SafeClientInterface *pInterface)
 The draw function for this player state. More...
 
typedef float(* CSM_NetScore_GetScoreModifyAmount) (CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetScoreInstance *pInstance)
 Determine the amount of score to be modified for a client. More...
 
typedef void(* CSM_Weapon_ShootFunc) (ShootInfo *sData, int iLevel)
 Called every frame a weapon is equipped, for every client. More...
 
typedef void(* CSM_Bullet_ActFunc) (BULLET *pBul, int iLevel)
 Called every frame a bullet is active. More...
 
typedef void(* CSM_Npc_ActFunc) (NPCHAR *pNpc)
 Called every frame an NPC is active. More...
 
typedef void(* CSM_Caret_ActFunc) (CARET *caret)
 Called every frame a caret is active. More...
 

Functions

CAVESTORY_MOD_API void GetTrg ()
 

Variables

CAVESTORY_MOD_API int magnification
 
CAVESTORY_MOD_API bool fullscreen
 
CAVESTORY_MOD_API const char ** MainArgv
 
CAVESTORY_MOD_API int MainArgc
 
CAVESTORY_MOD_API int empty
 
CAVESTORY_MOD_API CUSTOM_FRAME_LIMITS gFrameLimits
 
CAVESTORY_MOD_API FRAME gFrame
 
struct CAVESTORY_MOD_API GUI_RECT
 
struct CAVESTORY_MOD_API GUI_POINT
 
class CAVESTORY_MOD_API FontHandle
 
struct CAVESTORY_MOD_API GUI_POINT_F
 
class CAVESTORY_MOD_API SystemMenuInfo
 
CAVESTORY_MOD_API MYCHAR gMC
 
CAVESTORY_MOD_API MYCHAR gNOT_USED
 
CAVESTORY_MOD_API NPCHAR gNPC [NPC_MAX]
 
CAVESTORY_MOD_API CARET gCrt [CARET_MAX]
 
CAVESTORY_MOD_API int gKey
 
CAVESTORY_MOD_API int gKeyTrg
 
CAVESTORY_MOD_API int gKeyOld
 
CAVESTORY_MOD_API int gKeyJump
 
CAVESTORY_MOD_API int gKeyShot
 
CAVESTORY_MOD_API int gKeyArms
 
CAVESTORY_MOD_API int gKeyArmsRev
 
CAVESTORY_MOD_API int gKeyItem
 
CAVESTORY_MOD_API int gKeyMap
 
CAVESTORY_MOD_API int gKeyOk
 
CAVESTORY_MOD_API int gKeyCancel
 
CAVESTORY_MOD_API int gKeyLeft
 
CAVESTORY_MOD_API int gKeyUp
 
CAVESTORY_MOD_API int gKeyRight
 
CAVESTORY_MOD_API int gKeyDown
 
CAVESTORY_MOD_API int gKeyMaxVal
 
CAVESTORY_MOD_API int gKey2
 
CAVESTORY_MOD_API int gKeyTrg2
 
CAVESTORY_MOD_API int gKeyOld2
 
CAVESTORY_MOD_API int gKey_JOY
 
CAVESTORY_MOD_API int gKeyTrg_JOY
 
CAVESTORY_MOD_API int gKeyOld_JOY
 
CAVESTORY_MOD_API int gStageNo
 
CAVESTORY_MOD_API int gMusicNo
 
CAVESTORY_MOD_API int g_GameFlags
 
CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATA default_TextScriptPtrData
 
CAVESTORY_MOD_API TEXT_SCRIPT_PTR_DATA gCurrentPtrData
 
CAVESTORY_MOD_API TEXT_SCRIPT gTS
 
CAVESTORY_MOD_API List< TEXT_SCRIPT_CALLSTACK_DATA > * gTS_CallStack
 
CAVESTORY_MOD_API int gCollectableCount
 
CAVESTORY_MOD_API bool gCollectablesShown
 
CAVESTORY_MOD_API MAP_DATA gMap
 

Typedef Documentation

◆ CollideNPCFunc

typedef BOOL(* CollideNPCFunc) (NPCHAR *npc)

Custom collision detection function.

Parameters
npcA pointer to the NPC.
Returns
Should return TRUE if the normal collision detection routine should be run.

◆ CSM_Bullet_ActFunc

typedef void(* CSM_Bullet_ActFunc) (BULLET *pBul, int iLevel)

Called every frame a bullet is active.

Parameters
pBulA pointer to the bullet.
iLevelThe level of the bullet.

◆ CSM_Caret_ActFunc

typedef void(* CSM_Caret_ActFunc) (CARET *caret)

Called every frame a caret is active.

Parameters
caretA pointer to the caret.

◆ CSM_NetScore_GetScoreModifyAmount

typedef float(* CSM_NetScore_GetScoreModifyAmount) (CaveNet::DataStructures::NetClient *pClient, CaveNet::DataStructures::NetScoreInstance *pInstance)

Determine the amount of score to be modified for a client.

Parameters
pClientThe client to modify the score of.
pInstanceThe instance that holds the point info.
Returns
Should return the amount of score to be modified.

◆ CSM_Npc_ActFunc

typedef void(* CSM_Npc_ActFunc) (NPCHAR *pNpc)

Called every frame an NPC is active.

Parameters
pNpcA pointer to the NPC.

◆ CSM_Weapon_ShootFunc

typedef void(* CSM_Weapon_ShootFunc) (ShootInfo *sData, int iLevel)

Called every frame a weapon is equipped, for every client.

Parameters
sDataThe shoot information.
iLevelThe level of the weapon, starting from 1.

◆ FreeNPCFunc

typedef void(* FreeNPCFunc) (NPCHAR *npc)

A custom free function for NPCHAR.

Called just before an NPC is changed.

Parameters
npcA pointer to the NPC.

◆ PlayerState_ActFuncType

typedef void(* PlayerState_ActFuncType) (BOOL bKey, SafeClientInterface *pInterface, MYCHAR *pMC, const MYCHAR_PHYSICS *pPhysics)

The act function for this player state.

Parameters
bKeyWhether key inputs should be allowed for this tick or not.
pInterfaceThe safe interface for this player.
pMCThe player character we should be manipulating.
pPhysicsThe physics we should be using for this tick. If the player is in water, this will be pMC->physics_underwater. If not, then it will be pMC->physics_normal.

◆ PlayerState_AnimFuncType

typedef unsigned int(* PlayerState_AnimFuncType) (BOOL bKey, MYCHAR *pMC, SafeClientInterface *pInterface)

The animation function for this player state.

Parameters
bKeyWhether key inputs should be allowed for this tick or not.
pMCThe player character we should be manipulating.
pInterfaceThe safe interface for this player.
Returns
Should return a PlayerAnimFrame. This will be set as the current player animation.

◆ PlayerState_DrawFuncType

typedef void(* PlayerState_DrawFuncType) (int iFrameX, int iFrameY, MYCHAR *pMC, SafeClientInterface *pInterface)

The draw function for this player state.

Parameters
iFrameXThe camera X offset.
iFrameYThe camera Y offset.
pMCThe player character we should be manipulating.
pInterfaceThe interface for this player.

◆ PutNPCFunc

typedef void(* PutNPCFunc) (NPCHAR *npc, int fx, int fy)

A custom draw function for NPCHAR.

Parameters
npcA pointer to the NPC.
fxThe X offset of the camera.
fyThe Y offset of the camera.