Cavestory Mod API
GameDemo.h
Go to the documentation of this file.
1 /*
2  Cavestory Multiplayer API
3  Copyright (C) 2021 Johnny Ledger
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
26 #ifndef CAVESTORY_MOD_API_H_
27 #error "Please include CavestoryModAPI.h before including sub-classes."
28 #endif
29 
30 #include <CSMAPI_begincode.h>
31 
32 #pragma once
33 
37 
38 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
39 
42 enum PXDEMO_EVENT_TYPE : unsigned char
43 {
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 };
77 
80 enum PXDEMO_FADE_TYPE : unsigned char
81 {
84 
87 
90 
93 };
94 
99 enum PXDEMO_PLAYERSTATE_CHANGE : unsigned int
100 {
102  PXDPSC_cond = 0x00000001,
103 
105  PXDPSC_x = 0x00000002,
106 
108  PXDPSC_y = 0x00000004,
109 
111  PXDPSC_xm = 0x00000008,
112 
114  PXDPSC_ym = 0x00000010,
115 
117  PXDPSC_life = 0x00000020,
118 
120  PXDPSC_max_life = 0x00000040,
121 
123  PXDPSC_input_flags = 0x00000080,
124 
127 
129  PXDPSC_weapon_code = 0x00000200,
130 
132  PXDPSC_weapon_ammo = 0x00000400,
133 
136 
138  PXDPSC_weapon_level = 0x00001000,
139 
141  PXDPSC_weapon_exp = 0x00002000,
142 
144  PXDPSC_selectedArms = 0x00004000,
145 
147  PXDPSC_direct = 0x00008000,
148 
150  PXDPSC_ani_no = 0x00010000,
151 
153  PXDPSC_ani_wait = 0x00020000,
154 
156  PXDPSC_equip = 0x00040000,
157 
159  PXDPSC_star = 0x00080000,
160 
162  PXDPSC_shock = 0x00100000,
163 
165  PXDPSC_netanim = 0x00200000,
166 
168  PXDPSC_physics_normal = 0x00400000,
169 
172 
174  PXDPSC_ignore_water = 0x01000000,
175 
177  PXDPSC_boost_sw = 0x02000000,
178 
180  PXDPSC_boost_cnt = 0x04000000,
181 
183  PXDPSC_flag = 0x08000000,
184 
186  PXDPSC_updown = 0x10000000,
187 
189  PXDPSC_counts = 0x20000000,
190 
192  PXDPSC_act_wait = 0x40000000,
193 
195  PXDPSC_act_no = 0x80000000,
196 
198  PXDPSC_ALL_FLAGS = 0xFFFFFFFF,
199 
201  PXDPSC_COUNT = 34 + /* MYCHAR_PHYSICS */(8 * 2),
202 
204  PXDPSC_UNIQUE_COUNT = PXDPSC_COUNT - (/* MYCHAR_PHYSICS */(8 * 2) + /* UP/DOWN */1),
205 
208 };
209 
210 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
211 
215 {
218  unsigned int cavenet_version;
219 
222  char* mod_name;
223 
227 
231 
235 
239 
242  unsigned char flags[1000];
243 
246  unsigned char skip_flags[8];
247 
250  unsigned long long int* npc_transmit_flags;
251 
254  unsigned int npc_count;
255 
259 };
260 
264 {
267  unsigned char cond;
268 
271  int x;
272 
275  int y;
276 
279  int xm;
280 
283  int ym;
284 
287  short life;
288 
291  short max_life;
292 
296 
300 
304 
308 
312 
315  unsigned char weapon_level;
316 
320 
324 
327  int direct;
328 
331  int ani_no;
332 
335  int ani_wait;
336 
339  int equip;
340 
343  short star;
344 
347  unsigned char shock;
348 
351  int netanim;
352 
356 
360 
364 
367  signed char boost_sw;
368 
372 
375  unsigned int flag;
376 
379  int up;
380 
383  int down;
384 
387  signed char a;
388 
391  int tgt_x;
392 
395  int tgt_y;
396 
399  int air;
400 
403  int count1;
404 
407  int count2;
408 
411  int count3;
412 
415  int count4;
416 
419  int act_no;
420 
423  int act_wait;
424 
425 };
426 
430 {
433  char* name;
434 
438 
441  CustomPlayer* character;
442 
446 
450 
455 
460 
464 
467  bool use_color;
468 };
469 
470 struct PXDEMO_EVENT_STRUCT;
471 
475 {
479 
483 
486  int frame_no;
487 };
488 
489 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
490 
494 {
498 
501  unsigned int change_flags;
502 
506 };
507 
511 {
515 };
516 
520 {
523  int seed;
524 };
525 
529 {
532  unsigned int npc_idx;
533 
536  unsigned int random_seed;
537 
541 };
542 
546 {
551 
555  unsigned char direct;
556 };
557 
561 {
564  int x;
565 
568  int y;
569 
574  int target;
575 
578  int wait;
579 
582  int quake;
583 
586  int quake2;
587 };
588 
592 {
596 };
597 
601 {
604  unsigned int code_char;
605 
608  unsigned long long int transmit_flags;
609 };
610 
614 {
617  unsigned short tile_x;
618 
621  unsigned short tile_y;
622 
625  unsigned short old_tile_id;
626 
629  unsigned short new_tile_id;
630 
634 
637  bool only_undo;
638 };
639 
643 {
647 
651 
655 
659 
663 
667 
671 
675 
679 };
680 
684 {
688 
691  union PXDEMO_EVENT_UNION data;
692 };
693 
694 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
695 
699 {
703 
706  unsigned int count;
707 };
708 
712 {
716 
719  unsigned int count;
720 };
721 
722 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
723 
727 {
731 
735 
739 
743 
747 
751 };
752 
753 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
754 
759  GAME_DEMO_STATE* pState
760 );
761 
766  GAME_DEMO_STATE* pState
767 );
768 
775  GAME_DEMO_STATE** pFirst
776 );
777 
782  GAME_DEMO_STATE* pState
783 );
784 
789  GAME_DEMO_STATE* pState
790 );
791 
796  GAME_DEMO_STATE* pState
797 );
798 
806  GAME_DEMO_STATE* pState,
807  const char* pFileName
808 );
809 
817  GAME_DEMO_STATE* pState,
818  const char* pFileName
819 );
820 
829  GAME_DEMO_STATE* pDst,
830  GAME_DEMO_STATE* pSource,
831  unsigned int iFrameOffset = 0xFFFFFFFF
832 );
833 
841  GAME_DEMO_STATE* pState,
842  bool bSaveAndLoad
843 );
844 
845 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
846 
855  GAME_DEMO_STATE* pState,
856  const char* pName,
857  SafeClientInterface* pInterface
858 );
859 
867  GAME_DEMO_STATE* pState,
868  const char* pName
869 );
870 
879  GAME_DEMO_STATE* pState,
880  const char* pName,
881  int* pIndex = NULL
882 );
883 
884 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
885 
895  GAME_DEMO_STATE* pState,
896  PXDEMO_EVENT_TYPE iType,
897  unsigned int iFrameNo,
898  unsigned int iInsertNo = 0xFFFFFFFF
899 );
900 
910  GAME_DEMO_STATE* pState,
911  PXDEMO_EVENT_TYPE iType,
912  int iFrameNo,
913  int iStartIndex = 0
914 );
915 
928  GAME_DEMO_STATE* pState,
929  PXDEMO_EVENT_TYPE iType,
930  int iFrameNo,
931  int iStartIndex = 0,
932  PXDEMO_FRAME_STRUCT** pFramePtr = NULL,
933  int* pFrameIndex = NULL,
934  int* pEventIndex = NULL
935 );
936 
937 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
938 
946  GAME_DEMO_STATE* pState,
947  int iFrameNo
948 );
949 
957  GAME_DEMO_STATE* pState,
958  int iFrameNo
959 );
960 
969  GAME_DEMO_STATE* pState,
970  int iFrameNo,
971  int* pIndex = NULL
972 );
973 
974 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
975 
980  GAME_DEMO_STATE* pState
981 );
982 
991  GAME_DEMO_STATE* pState,
992  bool bFreezeFrame = false,
993  bool bDontDraw = false,
994  bool bDrawHUD = true,
995  bool bDrawFade = true
996 );
997 
998 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
999 
1003 
1008  GAME_DEMO_STATE* pState
1009 );
1010 
1011 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1012 
1021  GAME_DEMO_STATE* pState,
1022  const char* pName,
1023  SafeClientInterface* pInterface
1024 );
1025 
1032  GAME_DEMO_STATE* pState
1033 );
1034 
1041  GAME_DEMO_STATE* pState
1042 );
1043 
1052  GAME_DEMO_STATE* pState,
1053  NPCHAR* pNpc,
1054  int iIndex
1055 );
1056 
1065  GAME_DEMO_STATE* pState,
1066  PXDEMO_FADE_TYPE iType,
1067  Directions iDirect
1068 );
1069 
1076  GAME_DEMO_STATE* pState
1077 );
1078 
1085  GAME_DEMO_STATE* pState
1086 );
1087 
1100  GAME_DEMO_STATE* pState,
1101  unsigned short iTileX,
1102  unsigned short iTileY,
1103  unsigned int iOldTileID,
1104  unsigned int iNewTileID,
1105  bool bCreateSmoke,
1106  bool bOnlyUndo
1107 );
1108 
1115  GAME_DEMO_STATE* pState
1116 );
1117 
1118 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1119 
1123 
1124 #include <CSMAPI_endcode.h>
1125 
1127 ///
Directions
Directions.
Definition: CSMAPI_enums.h:37
@ PXDPSC_boost_sw
boost_sw
Definition: GameDemo.h:177
@ PXDPSC_updown
Up / down.
Definition: GameDemo.h:186
@ PXDPSC_cond
cond
Definition: GameDemo.h:102
@ PXDPSC_shock
shock
Definition: GameDemo.h:162
@ PXDPSC_BIGGEST_TYPE
Biggest variable type.
Definition: GameDemo.h:207
@ PXDPSC_physics_normal
physics_normal
Definition: GameDemo.h:168
@ PXDPSC_xm
xm
Definition: GameDemo.h:111
@ PXDPSC_max_life
max_life
Definition: GameDemo.h:120
@ PXDPSC_UNIQUE_COUNT
Number of recordable variables (with unique change flags)
Definition: GameDemo.h:204
@ PXDPSC_ignore_water
ignore_water
Definition: GameDemo.h:174
@ PXDPSC_weapon_level
weapon_level
Definition: GameDemo.h:138
@ PXDPSC_input_flags
input_flags
Definition: GameDemo.h:123
@ PXDPSC_weapon_code
weapon_code
Definition: GameDemo.h:129
@ PXDPSC_y
y
Definition: GameDemo.h:108
@ PXDPSC_boost_cnt
boost_cnt
Definition: GameDemo.h:180
@ PXDPSC_flag
Flags.
Definition: GameDemo.h:183
@ PXDPSC_x
x
Definition: GameDemo.h:105
@ PXDPSC_weapon_max_ammo
weapon_max_ammo
Definition: GameDemo.h:135
@ PXDPSC_netanim
unit
Definition: GameDemo.h:165
@ PXDPSC_act_no
Count2.
Definition: GameDemo.h:195
@ PXDPSC_ym
ym
Definition: GameDemo.h:114
@ PXDPSC_counts
Count1.
Definition: GameDemo.h:189
@ PXDPSC_star
star
Definition: GameDemo.h:159
@ PXDPSC_input_flags_trg
input_flags_trg
Definition: GameDemo.h:126
@ PXDPSC_weapon_exp
weapon_exp
Definition: GameDemo.h:141
@ PXDPSC_life
life
Definition: GameDemo.h:117
@ PXDPSC_act_wait
Count2.
Definition: GameDemo.h:192
@ PXDPSC_ani_wait
ani_wait
Definition: GameDemo.h:153
@ PXDPSC_direct
direct
Definition: GameDemo.h:147
@ PXDPSC_equip
equip
Definition: GameDemo.h:156
@ PXDPSC_ani_no
ani_no
Definition: GameDemo.h:150
@ PXDPSC_COUNT
Number of recordable variables for playerstate.
Definition: GameDemo.h:201
@ PXDPSC_weapon_ammo
weapon_ammo
Definition: GameDemo.h:132
@ PXDPSC_ALL_FLAGS
All flags combined.
Definition: GameDemo.h:198
@ PXDPSC_physics_underwater
physics_underwater
Definition: GameDemo.h:171
@ PXDPSC_selectedArms
selectedArms
Definition: GameDemo.h:144
@ PXDFT_CLEAR_FADE
Stop fading.
Definition: GameDemo.h:83
@ PXDFT_FADE_OUT
Fade out.
Definition: GameDemo.h:89
@ PXDFT_FADE_IN
Fade in.
Definition: GameDemo.h:86
@ PXDFT_MAX_FADES
How many fade types there.
Definition: GameDemo.h:92
CAVESTORY_MOD_API void CSM_GameDemo_Act(GAME_DEMO_STATE *pState, bool bFreezeFrame=false, bool bDontDraw=false, bool bDrawHUD=true, bool bDrawFade=true)
Act for a frame.
CAVESTORY_MOD_API bool CSM_GameDemo_Optimize(GAME_DEMO_STATE *pState, bool bSaveAndLoad)
Optimize a game demo.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_NpcState(GAME_DEMO_STATE *pState, NPCHAR *pNpc, int iIndex)
Record the state of an NPC.
CAVESTORY_MOD_API void CSM_GameDemo_Unlink(GAME_DEMO_STATE *pState)
Unregister a demo from the active linkage list.
CAVESTORY_MOD_API PXDEMO_FRAME_STRUCT * CSM_GameDemo_Frames_Add(GAME_DEMO_STATE *pState, int iFrameNo)
Add af rame to the demo.
CAVESTORY_MOD_API int CSM_GameDemo_Record_NewFrame(GAME_DEMO_STATE *pState)
Increment the simulated frame count.
CAVESTORY_MOD_API GAME_DEMO_STATE * gRecordingDemo
A pointer to the current recording demo.
CAVESTORY_MOD_API bool CSM_GameDemo_FirstLink(GAME_DEMO_STATE **pFirst)
Get the first in the gamestate link.
CAVESTORY_MOD_API int CSM_GameDemo_Load(GAME_DEMO_STATE *pState, const char *pFileName)
Load a game demo.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_Timer(GAME_DEMO_STATE *pState)
Record the game's timer.
PXDEMO_EVENT_TYPE
GameDemo Event Types.
Definition: GameDemo.h:43
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.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_RandomSeed(GAME_DEMO_STATE *pState)
Record the current random seed.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Events_Add(GAME_DEMO_STATE *pState, PXDEMO_EVENT_TYPE iType, unsigned int iFrameNo, unsigned int iInsertNo=0xFFFFFFFF)
Add an event to the demo.
PXDEMO_PLAYERSTATE_CHANGE
Changed playerstate variables between frames.
Definition: GameDemo.h:100
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_Stage(GAME_DEMO_STATE *pState)
Record the current stage index.
CAVESTORY_MOD_API void CSM_GameDemo_Init(GAME_DEMO_STATE *pState)
Initialize a GAME_DEMO_STATE object without linking it.
CAVESTORY_MOD_API void CSM_GameDemo_Init_Relink(GAME_DEMO_STATE *pState)
Initialize a GAME_DEMO_STATE object whilst also re-linking it.
CAVESTORY_MOD_API void CSM_GameDemo_Link(GAME_DEMO_STATE *pState)
Register a demo to the active linkage list.
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.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_Camera(GAME_DEMO_STATE *pState)
Record the game camera's current details.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_PlayerState(GAME_DEMO_STATE *pState, const char *pName, SafeClientInterface *pInterface)
Record a player's state.
CAVESTORY_MOD_API PXDEMO_FRAME_STRUCT * CSM_GameDemo_Frames_Find(GAME_DEMO_STATE *pState, int iFrameNo, int *pIndex=NULL)
Find a frame.
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.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_MapTileChange(GAME_DEMO_STATE *pState, unsigned short iTileX, unsigned short iTileY, unsigned int iOldTileID, unsigned int iNewTileID, bool bCreateSmoke, bool bOnlyUndo)
Record a maptile change.
CAVESTORY_MOD_API void CSM_GameDemo_Free(GAME_DEMO_STATE *pState)
Free a GAME_DEMO_STATE object.
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.
CAVESTORY_MOD_API bool CSM_GameDemo_Frames_Remove(GAME_DEMO_STATE *pState, int iFrameNo)
Remove a frame from the demo.
CAVESTORY_MOD_API PXDEMO_EVENT_STRUCT * CSM_GameDemo_Record_Fade(GAME_DEMO_STATE *pState, PXDEMO_FADE_TYPE iType, Directions iDirect)
Record a screen fade.
CAVESTORY_MOD_API PXDEMO_PLAYER_STRUCT * CSM_GameDemo_Players_Add(GAME_DEMO_STATE *pState, const char *pName, SafeClientInterface *pInterface)
Add a player to the demo state.
CAVESTORY_MOD_API void CSM_GameDemo_LoadGamestate(GAME_DEMO_STATE *pState)
Load a demo's gamestate.
CAVESTORY_MOD_API bool CSM_GameDemo_Players_Remove(GAME_DEMO_STATE *pState, const char *pName)
Remove a player from the demo state.
CAVESTORY_MOD_API int CSM_GameDemo_Save(GAME_DEMO_STATE *pState, const char *pFileName)
Save a game demo.
PXDEMO_FADE_TYPE
Fade effect types.
Definition: GameDemo.h:81
CAVESTORY_MOD_API bool CSM_GameDemo_CombineDemos(GAME_DEMO_STATE *pDst, GAME_DEMO_STATE *pSource, unsigned int iFrameOffset=0xFFFFFFFF)
Combine game demos.
@ PXDET_SET_NPC_STATE
Set an NPC.
Definition: GameDemo.h:57
@ PXDET_SET_RANDOM_SEED
Set the random seed.
Definition: GameDemo.h:54
@ PXDET_SET_MAP_TILE
Set a map tile.
Definition: GameDemo.h:72
@ PXDET_DO_SCREEN_FADE
Fade in or fade out the screen.
Definition: GameDemo.h:60
@ PXDET_SET_TIMER
Set the game timer.
Definition: GameDemo.h:66
@ PXDET_SET_PLAYER_STATE
Set the state of a player.
Definition: GameDemo.h:48
@ PXDET_SET_NPC_DATA
Set the game timer.
Definition: GameDemo.h:69
@ PXDET_SET_CAMERA
Set the game camera's details.
Definition: GameDemo.h:63
@ PXDET_SET_STAGE
Transfer to a new stage.
Definition: GameDemo.h:51
@ PXDET_INVALID_EVENT
Invalid.
Definition: GameDemo.h:45
@ PXDET_MAX_EVENTS
How many events there can be.
Definition: GameDemo.h:75
#define CAVESTORY_MOD_API
Exports / imports Cavestory Mod API functions & classes.
Definition: CSMAPI_begincode.h:30
#define ARMS_MAX
How many weapons can be initialized at one time for each client.
Definition: CSMAPI_defines.h:43
Weapon object.
Definition: CSMAPI_types.h:1264
Event: Do a screen fade in / out.
Definition: GameDemo.h:546
PXDEMO_FADE_TYPE type
The fade type.
Definition: GameDemo.h:550
unsigned char direct
The direction of the fade.
Definition: GameDemo.h:555
Event: Set camera details.
Definition: GameDemo.h:561
int quake2
Quake amount (2).
Definition: GameDemo.h:586
int x
The X position of the camera.
Definition: GameDemo.h:564
int quake
Quake amount.
Definition: GameDemo.h:582
int target
The focus target for this camera.
Definition: GameDemo.h:574
int wait
Camera speed.
Definition: GameDemo.h:578
int y
The Y position of the camera.
Definition: GameDemo.h:568
Event: Set map tile.
Definition: GameDemo.h:614
bool only_undo
Only undo.
Definition: GameDemo.h:637
unsigned short tile_y
The NPC type to parse.
Definition: GameDemo.h:621
unsigned short new_tile_id
The NPC type to parse.
Definition: GameDemo.h:629
unsigned short old_tile_id
The NPC type to parse.
Definition: GameDemo.h:625
unsigned short tile_x
The NPC type to parse.
Definition: GameDemo.h:617
bool show_smoke
Show smoke.
Definition: GameDemo.h:633
Event: Set NPC data.
Definition: GameDemo.h:601
unsigned int code_char
The NPC type to parse.
Definition: GameDemo.h:604
unsigned long long int transmit_flags
Transmit flags for this NPC type.
Definition: GameDemo.h:608
Event: Set the state of an NPC at the given slot.
Definition: GameDemo.h:529
unsigned int npc_idx
The NPC's slot index.
Definition: GameDemo.h:532
unsigned int random_seed
Random seed.
Definition: GameDemo.h:536
NPCHAR state
The state of the NPC.
Definition: GameDemo.h:540
Event: Set player state.
Definition: GameDemo.h:494
unsigned int change_flags
The flags that determine what has changed between the last state and this one.
Definition: GameDemo.h:501
int player_idx
The player's index.
Definition: GameDemo.h:497
PXDEMO_PLAYERSTATE_STRUCT state
The player's new state.
Definition: GameDemo.h:505
Event: Set the random seed.
Definition: GameDemo.h:520
int seed
The new random seed.
Definition: GameDemo.h:523
Event: Set current stage.
Definition: GameDemo.h:511
int stage_idx
The stage's index that we want to switch to.
Definition: GameDemo.h:514
Event: Set game timer.
Definition: GameDemo.h:592
int time_passed
The timer position.
Definition: GameDemo.h:595
Holds a game demo's state.
Definition: GameDemo.h:727
static GAME_DEMO_STATE * first
First demo state.
Definition: GameDemo.h:730
PXDEMO_DEMOINFO_STRUCT mInfo
The game details.
Definition: GameDemo.h:734
PXDEMO_FRAME_CHUNK mFrames
Frames.
Definition: GameDemo.h:742
PXDEMO_PLAYER_CHUNK mPlayers
Players.
Definition: GameDemo.h:738
GAME_DEMO_STATE * mNext
Next demo state.
Definition: GameDemo.h:746
int mChecksum
The checksum of this gamedemo.
Definition: GameDemo.h:750
Manages colors.
Definition: CSMAPI_types.h:497
Physics specifier for MYCHAR.
Definition: CSMAPI_types.h:1359
NPC object.
Definition: CSMAPI_types.h:2021
Game info.
Definition: GameDemo.h:215
int random_seed
The random seed.
Definition: GameDemo.h:238
unsigned char flags[1000]
NPC flags.
Definition: GameDemo.h:242
int mod_version
The version of the mod at the time.
Definition: GameDemo.h:226
unsigned int cavenet_version
The version of CaveNet at the time.
Definition: GameDemo.h:218
unsigned char skip_flags[8]
Skip flags.
Definition: GameDemo.h:246
int play_frame
The current play frame.
Definition: GameDemo.h:234
unsigned int npc_count
Transmit flags.
Definition: GameDemo.h:254
unsigned long long int * npc_transmit_flags
Transmit flags.
Definition: GameDemo.h:250
int total_sim_frames
The frame length for this demo.
Definition: GameDemo.h:230
int game_flags
Game flags.
Definition: GameDemo.h:258
char * mod_name
The loaded mod's internal name.
Definition: GameDemo.h:222
Main event info struct.
Definition: GameDemo.h:684
PXDEMO_EVENT_TYPE type
Event type.
Definition: GameDemo.h:687
union PXDEMO_EVENT_UNION data
A union containing all possible data for this event.
Definition: GameDemo.h:691
Holds all frames.
Definition: GameDemo.h:712
unsigned int count
The size of list.
Definition: GameDemo.h:719
PXDEMO_FRAME_STRUCT * list
An allocated list that holds the frames.
Definition: GameDemo.h:715
Frame info.
Definition: GameDemo.h:475
int event_count
Size of event_list.
Definition: GameDemo.h:482
PXDEMO_EVENT_STRUCT * event_list
An allocated list of events to perform for this frame.
Definition: GameDemo.h:478
int frame_no
This frame's number.
Definition: GameDemo.h:486
Holds all the players.
Definition: GameDemo.h:699
PXDEMO_PLAYER_STRUCT * list
An allocated list that holds the players.
Definition: GameDemo.h:702
unsigned int count
The size of list.
Definition: GameDemo.h:706
Player info.
Definition: GameDemo.h:430
bool use_color
Whether to use custom color or not.
Definition: GameDemo.h:467
int last_state_event_idx
The event index of this player's last state.
Definition: GameDemo.h:459
PXDEMO_PLAYERSTATE_STRUCT state
This player's state.
Definition: GameDemo.h:449
int last_state_frame_idx
This player's last state.
Definition: GameDemo.h:454
char * character_name
This player's character name.
Definition: GameDemo.h:445
CustomPlayer * character
This player's character.
Definition: GameDemo.h:441
char * name
This player's name.
Definition: GameDemo.h:433
ARMS arms[ARMS_MAX]
This player's ARMS tables.
Definition: GameDemo.h:437
GUI_COLOR char_color
This character's color.
Definition: GameDemo.h:463
State of a player.
Definition: GameDemo.h:264
int input_flags_trg
Trg input flags.
Definition: GameDemo.h:299
unsigned char weapon_level
The held weapon's max ammo.
Definition: GameDemo.h:315
int equip
Equip flags.
Definition: GameDemo.h:339
int tgt_y
Target Y.
Definition: GameDemo.h:395
int down
Looking down.
Definition: GameDemo.h:383
int ym
Current Y motion.
Definition: GameDemo.h:283
signed char a
a
Definition: GameDemo.h:387
short max_life
The max life of this player.
Definition: GameDemo.h:291
int xm
Current X motion.
Definition: GameDemo.h:279
signed char boost_sw
Booster SW.
Definition: GameDemo.h:367
int selectedArms
Selected weapon.
Definition: GameDemo.h:323
unsigned char shock
Player damage invulnerability counter.
Definition: GameDemo.h:347
short life
The life of this player.
Definition: GameDemo.h:287
int x
Current X position.
Definition: GameDemo.h:271
int count1
Count.
Definition: GameDemo.h:403
short star
Amount of stars.
Definition: GameDemo.h:343
int weapon_code
The held weapon index.
Definition: GameDemo.h:303
int count2
Count.
Definition: GameDemo.h:407
int y
Current Y position.
Definition: GameDemo.h:275
int act_no
Act number.
Definition: GameDemo.h:419
int up
Looking up.
Definition: GameDemo.h:379
int weapon_ammo
The held weapon's ammo.
Definition: GameDemo.h:307
int ani_wait
Animation wait.
Definition: GameDemo.h:335
int tgt_x
Target X.
Definition: GameDemo.h:391
unsigned char cond
Condition of the player.
Definition: GameDemo.h:267
int direct
Direction.
Definition: GameDemo.h:327
int netanim
Player state.
Definition: GameDemo.h:351
int weapon_max_ammo
The held weapon's max ammo.
Definition: GameDemo.h:311
MYCHAR_PHYSICS physics_underwater
Underwater physics.
Definition: GameDemo.h:359
int weapon_exp
The held weapon's exp.
Definition: GameDemo.h:319
unsigned int flag
Flags.
Definition: GameDemo.h:375
int count4
Count.
Definition: GameDemo.h:415
int air
Current air.
Definition: GameDemo.h:399
MYCHAR_PHYSICS physics_normal
Normal physics.
Definition: GameDemo.h:355
int boost_cnt
Booster count.
Definition: GameDemo.h:371
int input_flags
Input flags.
Definition: GameDemo.h:295
bool ignore_water
Ignore water.
Definition: GameDemo.h:363
int ani_no
Animation number.
Definition: GameDemo.h:331
int act_wait
Act wait.
Definition: GameDemo.h:423
int count3
Count.
Definition: GameDemo.h:411
SafeClientInterface.
Definition: CSMAPI_types.h:1775
A union containing all possibilities for an event.
Definition: GameDemo.h:643
EVENT_SETNPCDATA_STRUCT npc_data
PXDEMO_EVENT_TYPE::PXDET_SET_NPC_DATA.
Definition: GameDemo.h:674
EVENT_SETNPCSTATE_STRUCT npc_state
PXDEMO_EVENT_TYPE::PXDET_SET_NPC_STATE.
Definition: GameDemo.h:658
EVENT_SETTIMER_STRUCT timer
PXDEMO_EVENT_TYPE::PXDET_SET_TIMER.
Definition: GameDemo.h:670
EVENT_SETMAPTILE_STRUCT map_tile
PXDEMO_EVENT_TYPE::PXDET_SET_MAP_TILE.
Definition: GameDemo.h:678
EVENT_SETPLAYERSTATE_STRUCT player_state
PXDEMO_EVENT_TYPE::PXDET_SET_PLAYER_STATE.
Definition: GameDemo.h:646
EVENT_SETCAMERA_STRUCT camera
PXDEMO_EVENT_TYPE::PXDET_SET_CAMERA.
Definition: GameDemo.h:666
EVENT_DOSCREENFADE_STRUCT screen_fade
PXDEMO_EVENT_TYPE::PXDET_DO_SCREEN_FADE.
Definition: GameDemo.h:662
EVENT_SETRANDOMSEED_STRUCT random_seed
PXDEMO_EVENT_TYPE::PXDET_SET_RANDOM_SEED.
Definition: GameDemo.h:654
EVENT_SETSTAGE_STRUCT stage
PXDEMO_EVENT_TYPE::PXDET_SET_STAGE.
Definition: GameDemo.h:650