Skip to content

Commit

Permalink
simplify FMV skip
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Mar 16, 2021
1 parent fd869be commit a092dec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/specific/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ void S_Wait(int32_t nframes)

int32_t WinPlayFMV(int32_t sequence, int32_t mode)
{
if (T1MConfig.disable_fmv) {
return -1;
}

int32_t result = 0;
void *movie_context = NULL;
void *fmv_context = NULL;
Expand Down Expand Up @@ -138,10 +142,6 @@ int32_t WinPlayFMV(int32_t sequence, int32_t mode)

int32_t S_PlayFMV(int32_t sequence, int32_t mode)
{
if (T1MConfig.disable_fmv) {
return -1;
}

if (GameMemoryPointer) {
free(GameMemoryPointer);
}
Expand Down
22 changes: 10 additions & 12 deletions src/specific/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,18 @@ void GameMain()
sub_408E41();
S_Wait(60);

if (!T1MConfig.disable_fmv) {
if (IsHardwareRenderer) {
HardwarePrepareFMV();
}
WinPlayFMV(FMV_CORE, 1);
WinPlayFMV(FMV_ESCAPE, 1);
WinPlayFMV(FMV_INTRO, 1);
if (IsHardwareRenderer) {
HardwarePrepareFMV();
}
WinPlayFMV(FMV_CORE, 1);
WinPlayFMV(FMV_ESCAPE, 1);
WinPlayFMV(FMV_INTRO, 1);
if (!IsHardwareRenderer) {
HiRes = -1;
} else {
HardwareFMVDone();
if (!IsHardwareRenderer) {
HiRes = -1;
} else {
HardwareFMVDone();
if (!IsHardwareRenderer) {
HiRes = -1;
}
}
}

Expand Down

0 comments on commit a092dec

Please sign in to comment.