fork/training-mode-ce

git clone https://git.julia.blue/fork/training-mode-ce

Alex Harrisonplan1d3ec21

techchase-camera
2.2 KiB115 linesraw
1planned:
2    - perfect recreation of start state through a set duration
3
4not planned:
5    - seeking to arbitrary frame (would need to savestate every frame - too much mem)
6
7PER FRAME STUFF
8    - rng seed (TODO test how)
9    - stage state (TODO find where and what)
10    - 
11
12FORMAT #################################################################
13
14header:
15    u16 version_major
16    u8 version_minor
17    u8 version_patch
18    
19    u16 rec_count
20    
21    meta *meta
22    state *state
23    rec *rec
24    
25META ------------------------------------------------------------------
26
27meta:
28    // info ---------------------
29    char filename[32]
30    
31    u8 char_hmn
32    u8 costume_hmn
33    u8 char_cpu
34    u8 costume_cpu
35    u8 stage_ext
36    u8 stage_int
37    
38    u16 year
39    u8 month
40    u8 day
41    u8 hour
42    u8 min
43    u8 second
44    
45    u8 rec_idx_hmn
46    u8 rec_idx_cpu
47    rec_info *info // counted by rec_count
48    
49rec_info:
50    u16 chance
51    
52SAVESTATE ------------------------------------------------------------------
53
54savestate:
55    u32 write_count
56    data_write *writes
57    u32 ptrlink_count
58    ptrlink *ptrlinks
59
60target:
61    run_target_type type
62    u24 target_type_param
63
64data_write:
65    target target
66    u16 data_len
67    u16 target_offset
68    u8 *data
69
70ptrlink:
71    target dst
72    target src
73    u16 dst_offset
74    u16 src_offset
75
76enum run_target_type (u8)
77    null
78    Addr
79    FighterGOBJ
80    FighterData
81    StageGOBJ
82    StageData
83    
84RECORDING ------------------------------------------------------------------
85
86rec:
87    u32 frame_count
88    u16 *frame_event_idx
89    frame_event_type *events_start
90    payload *payload_start
91    
92// payload is always 4 bytes?
93enum frame_event_type (u8)
94    null
95    
96    // lstick/trigger and buttons/cstick are merged to align their payload to 4 bytes
97    SetLStickAndTriggers_HMN:
98    SetLStickAndTriggers_CPU:
99        s8 lstick_x
100        s8 lstick_y
101        s8 trigger_l
102        s8 trigger_r
103    SetButtonsAndCStick_HMN:
104    SetButtonsAndCStick_CPU:
105        u16 buttons
106        s8 cstick_x
107        s8 cstick_y
108    
109    SetRNGSeed:
110        u32 seed
111    WhispyBlowChange:
112        u32 dir (none = 0, left = 1, right = 2)
113    FODPlatHeight_L:
114    FODPlatHeight_R:
115        f32 height