replay/state: add skip_frames counter for playback
This commit is contained in:
parent
eede63333a
commit
f272ec5911
2 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,7 @@ void replay_state_init_play(ReplayState *rst, Replay *rpy, ReplayStage *rstage)
|
|||
rst->mode = REPLAY_PLAY;
|
||||
rst->play.desync_frame = -1;
|
||||
rst->play.desync_check_frame = -1;
|
||||
rst->play.skip_frames = rstage->skip_frames;
|
||||
}
|
||||
|
||||
void replay_state_init_record(ReplayState *rst, Replay *rpy) {
|
||||
|
@ -90,4 +91,8 @@ void replay_state_play_advance(ReplayState *rst, int frame, ReplayEventFunc even
|
|||
}
|
||||
|
||||
rst->play.pos = i;
|
||||
|
||||
if(rst->play.skip_frames > 0) {
|
||||
--rst->play.skip_frames;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ typedef struct ReplayState {
|
|||
uint16_t desync_check;
|
||||
int desync_check_frame;
|
||||
int desync_frame;
|
||||
int skip_frames;
|
||||
bool demo_mode;
|
||||
} play;
|
||||
|
||||
|
|
Loading…
Reference in a new issue