|
Cavestory Mod API
|
Gameplay demoing. More...
| enum | PXDEMO_EVENT_TYPE : unsigned char { PXDET_INVALID_EVENT = 0 , PXDET_SET_PLAYER_STATE = 1 , PXDET_SET_STAGE = 2 , PXDET_MAX_EVENTS } |
| GameDemo Event Types. More... | |
| CAVESTORY_MOD_API GAME_DEMO_STATE * | gRecordingDemo |
| A pointer to the current recording demo. More... | |
| CAVESTORY_MOD_API void | CSM_GameDemo_Init (GAME_DEMO_STATE *pState) |
| Initialize a GAME_DEMO_STATE object. More... | |
| CAVESTORY_MOD_API void | CSM_GameDemo_Free (GAME_DEMO_STATE *pState) |
| Free a GAME_DEMO_STATE object. More... | |
| CAVESTORY_MOD_API int | CSM_GameDemo_Load (GAME_DEMO_STATE *pState, const char *pFileName) |
| Load a game demo. More... | |
| CAVESTORY_MOD_API int | CSM_GameDemo_Save (GAME_DEMO_STATE *pState, const char *pFileName) |
| Save a game demo. More... | |
| CAVESTORY_MOD_API PXDEMO_PLAYER_STRUCT * | CSM_GameDemo_Players_Add (GAME_DEMO_STATE *pState, const char *pName, MYCHAR *pMC=NULL) |
| Add a player to the demo state. More... | |
| CAVESTORY_MOD_API bool | CSM_GameDemo_Players_Remove (GAME_DEMO_STATE *pState, const char *pName) |
| Remove a player from the demo state. More... | |
| CAVESTORY_MOD_API PXDEMO_PLAYER_STRUCT * | CSM_GameDemo_Players_Find (GAME_DEMO_STATE *pState, const char *pName, int *pIndex=NULL) |
| Find a player's object by name. More... | |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * | CSM_GameDemo_Events_Add (GAME_DEMO_STATE *pState, PXDEMO_EVENT_TYPE iType, int iFrameNo) |
| Add an event to the demo. More... | |
| CAVESTORY_MOD_API bool | CSM_GameDemo_Events_Remove (GAME_DEMO_STATE *pState, PXDEMO_EVENT_TYPE iType, int iFrameNo, int iStartIndex=0) |
| Remove an event from the demo. More... | |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * | CSM_GameDemo_Events_Find (GAME_DEMO_STATE *pState, PXDEMO_EVENT_TYPE iType, int iFrameNo, int iStartIndex=0, PXDEMO_FRAME_STRUCT **pFramePtr=NULL, int *pFrameIndex=NULL, int *pEventIndex=NULL) |
| Find an event. More... | |
| CAVESTORY_MOD_API PXDEMO_FRAME_STRUCT * | CSM_GameDemo_Frames_Add (GAME_DEMO_STATE *pState, int iFrameNo) |
| Add af rame to the demo. More... | |
| CAVESTORY_MOD_API bool | CSM_GameDemo_Frames_Remove (GAME_DEMO_STATE *pState, int iFrameNo) |
| Remove a frame from the demo. More... | |
| CAVESTORY_MOD_API PXDEMO_FRAME_STRUCT * | CSM_GameDemo_Frames_Find (GAME_DEMO_STATE *pState, int iFrameNo, int *pIndex=NULL) |
| Find a frame. More... | |
| CAVESTORY_MOD_API void | CSM_GameDemo_LoadGameState (GAME_DEMO_STATE *pState) |
| Load the game state of a demo. More... | |
| CAVESTORY_MOD_API void | CSM_GameDemo_Act (GAME_DEMO_STATE *pState) |
| Act for a frame. More... | |
| CAVESTORY_MOD_API void | CSM_GameDemo_Put (GAME_DEMO_STATE *pState) |
| Draw a demo's current game state. More... | |
| CAVESTORY_MOD_API void | CSM_GameDemo_StartRecord () |
| Begin recording a demo. | |
| CAVESTORY_MOD_API void | CSM_GameDemo_StopRecord (GAME_DEMO_STATE *pState) |
| Stop recording a demo. More... | |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * | CSM_GameDemo_Record_PlayerState (GAME_DEMO_STATE *pState, const char *pName, MYCHAR *pMC, int iKey, int iKeyTrg) |
| Record a player's state. More... | |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * | CSM_GameDemo_Record_Stage (GAME_DEMO_STATE *pState) |
| Record the current stage index. More... | |
| CAVESTORY_MOD_API int | CSM_GameDemo_Record_NewFrame (GAME_DEMO_STATE *pState) |
| Increment the simulated frame count. More... | |
Gameplay demoing.
Creating & loading gameplay demos
| enum PXDEMO_EVENT_TYPE : unsigned char |
| CAVESTORY_MOD_API void CSM_GameDemo_Act | ( | GAME_DEMO_STATE * | pState | ) |
Act for a frame.
| pState | The demo to simulate the game with. |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT* CSM_GameDemo_Events_Add | ( | GAME_DEMO_STATE * | pState, |
| PXDEMO_EVENT_TYPE | iType, | ||
| int | iFrameNo | ||
| ) |
Add an event to the demo.
| pState | The gamedemo state to manipulate. |
| iType | The type of event to allocate. |
| iFrameNo | The frame number to add the event to. |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT* CSM_GameDemo_Events_Find | ( | GAME_DEMO_STATE * | pState, |
| PXDEMO_EVENT_TYPE | iType, | ||
| int | iFrameNo, | ||
| int | iStartIndex = 0, |
||
| PXDEMO_FRAME_STRUCT ** | pFramePtr = NULL, |
||
| int * | pFrameIndex = NULL, |
||
| int * | pEventIndex = NULL |
||
| ) |
Find an event.
| pState | The gamedemo state to manipulate. |
| iType | The type of event to remove. |
| iFrameNo | The frame number the event should belong to. |
| iStartIndex | The starting index in the frame's event list. |
| pFramePtr | A pointer to the variable that will hold the frame that holds the event. Can be NULL. |
| pFrameIndex | A pointer to an int that will hold the index at which the frame was found at. Can be NULL. |
| pEventIndex | A pointer to an int that will hold the index at which the event was found at. Can be NULL. |
| CAVESTORY_MOD_API bool CSM_GameDemo_Events_Remove | ( | GAME_DEMO_STATE * | pState, |
| PXDEMO_EVENT_TYPE | iType, | ||
| int | iFrameNo, | ||
| int | iStartIndex = 0 |
||
| ) |
Remove an event from the demo.
| pState | The gamedemo state to manipulate. |
| iType | The type of event to remove. |
| iFrameNo | The frame number to remove the event from. |
| iStartIndex | The starting index in the frame's event list. |
| CAVESTORY_MOD_API PXDEMO_FRAME_STRUCT* CSM_GameDemo_Frames_Add | ( | GAME_DEMO_STATE * | pState, |
| int | iFrameNo | ||
| ) |
Add af rame to the demo.
| pState | The gamedemo state to manipulate. |
| iFrameNo | The frame number. |
| CAVESTORY_MOD_API PXDEMO_FRAME_STRUCT* CSM_GameDemo_Frames_Find | ( | GAME_DEMO_STATE * | pState, |
| int | iFrameNo, | ||
| int * | pIndex = NULL |
||
| ) |
Find a frame.
| pState | The gamedemo state to manipulate. |
| iFrameNo | The frame number to search for. |
| pIndex | A pointer to an int that will hold the index at which the entry was found at. Can be NULL. |
| CAVESTORY_MOD_API bool CSM_GameDemo_Frames_Remove | ( | GAME_DEMO_STATE * | pState, |
| int | iFrameNo | ||
| ) |
Remove a frame from the demo.
| pState | The gamedemo state to manipulate. |
| iFrameNo | The frame number. |
| CAVESTORY_MOD_API void CSM_GameDemo_Free | ( | GAME_DEMO_STATE * | pState | ) |
Free a GAME_DEMO_STATE object.
This should be called after initializing the object.
| pState | The state to free. |
| CAVESTORY_MOD_API void CSM_GameDemo_Init | ( | GAME_DEMO_STATE * | pState | ) |
Initialize a GAME_DEMO_STATE object.
| pState | The state to initialize. |
| CAVESTORY_MOD_API int CSM_GameDemo_Load | ( | GAME_DEMO_STATE * | pState, |
| const char * | pFileName | ||
| ) |
Load a game demo.
| pState | The state to load the demo into. |
| pFileName | The name of the file to load into pState. |
| CAVESTORY_MOD_API void CSM_GameDemo_LoadGameState | ( | GAME_DEMO_STATE * | pState | ) |
Load the game state of a demo.
| pState | The demo to simulate the game with. |
| CAVESTORY_MOD_API PXDEMO_PLAYER_STRUCT* CSM_GameDemo_Players_Add | ( | GAME_DEMO_STATE * | pState, |
| const char * | pName, | ||
| MYCHAR * | pMC = NULL |
||
| ) |
Add a player to the demo state.
| pState | The gamedemo state to manipulate. |
| pName | The name of the client. |
| pMC | A pointer to a MYCHAR structure to use for the player's state. Can be NULL. |
| CAVESTORY_MOD_API PXDEMO_PLAYER_STRUCT* CSM_GameDemo_Players_Find | ( | GAME_DEMO_STATE * | pState, |
| const char * | pName, | ||
| int * | pIndex = NULL |
||
| ) |
Find a player's object by name.
| pState | The gamedemo state to manipulate. |
| pName | The name of the player to find. |
| pIndex | A pointer to an int that will hold the index at which the entry was found at. Can be NULL. |
| CAVESTORY_MOD_API bool CSM_GameDemo_Players_Remove | ( | GAME_DEMO_STATE * | pState, |
| const char * | pName | ||
| ) |
Remove a player from the demo state.
| pState | The gamedemo state to manipulate. |
| pName | The name of the player to remove. |
| CAVESTORY_MOD_API void CSM_GameDemo_Put | ( | GAME_DEMO_STATE * | pState | ) |
Draw a demo's current game state.
| pState | The demo to simulate the game with. |
| CAVESTORY_MOD_API int CSM_GameDemo_Record_NewFrame | ( | GAME_DEMO_STATE * | pState | ) |
Increment the simulated frame count.
| pState | The gamedemo state. |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT* CSM_GameDemo_Record_PlayerState | ( | GAME_DEMO_STATE * | pState, |
| const char * | pName, | ||
| MYCHAR * | pMC, | ||
| int | iKey, | ||
| int | iKeyTrg | ||
| ) |
Record a player's state.
| pState | The gamedemo state. |
| pName | The name of the client. |
| pMC | A pointer to the client's mychar. |
| iKey | The player's current input flags. |
| iKeyTrg | The player's current input flags (trg). |
| CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT* CSM_GameDemo_Record_Stage | ( | GAME_DEMO_STATE * | pState | ) |
Record the current stage index.
| pState | The gamedemo state. |
| CAVESTORY_MOD_API int CSM_GameDemo_Save | ( | GAME_DEMO_STATE * | pState, |
| const char * | pFileName | ||
| ) |
Save a game demo.
| pState | The state to save the demo into. |
| pFileName | The output name of the file. |
| CAVESTORY_MOD_API void CSM_GameDemo_StopRecord | ( | GAME_DEMO_STATE * | pState | ) |
Stop recording a demo.
| pState | A pointer to the state to hold the recorded gamestate. |
|
extern |
A pointer to the current recording demo.
If NULL, then the game is not being recorded.