Skip to content

Commit

Permalink
Fixed all games: During the transition between the GS_INTERMISSION an…
Browse files Browse the repository at this point in the history
…d GS_INFINE game states there is a single gametic where neither the player's view is drawn (gamestate != GS_MAP) or the (de)briefing is visible (an fi script command hasn't yet executed yet the gamestate has already changed to GS_INFINE. The result of which is a visible viewborder and HOM for a split second. We now catch this and clear the screen to black.

Todo: This is not the best solution. Perhaps we should delay changing the gamestate until the first fi command is executed when playing a (de)briefing?
  • Loading branch information
danij committed Jan 4, 2009
1 parent 2cfcc09 commit 0d17ce0
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doomsday/plugins/common/include/f_infine.h
Expand Up @@ -43,21 +43,22 @@ typedef enum infinemode_e {
FIMODE_AFTER
} infinemode_t;

extern boolean fiActive;
extern boolean briefDisabled;
extern boolean fiActive;
extern boolean fiCmdExecuted; // Set to true after first command.
extern boolean briefDisabled;

void FI_Reset(void);
void FI_Start(char *finalescript, infinemode_t mode);
void FI_Start(char* finalescript, infinemode_t mode);
void FI_End(void);
void FI_SetCondition(int index, boolean value);
int FI_Briefing(int episode, int map);
int FI_Debriefing(int episode, int map);
void FI_DemoEnds(void);
int FI_SkipRequest(void);
void FI_Ticker(void);
int FI_Responder(event_t *ev);
int FI_Responder(event_t* ev);
void FI_Drawer(void);
boolean FI_IsMenuTrigger(event_t *ev);
boolean FI_IsMenuTrigger(event_t* ev);

DEFCC(CCmdStartInFine);
DEFCC(CCmdStopInFine);
Expand Down
10 changes: 10 additions & 0 deletions doomsday/plugins/jdoom/src/d_refresh.c
Expand Up @@ -389,6 +389,16 @@ void D_Display2(void)
//M_WriteText2(5, 188, "WAITING... PRESS ESC FOR MENU", huFontA, 1, 0, 0, 1);
break;

case GS_INFINE:
if(!fiCmdExecuted)
{ // A (de)briefing is in process but the script hasn't started yet.
// Just clear the screen, then.
DGL_Disable(DGL_TEXTURING);
GL_DrawRect(0, 0, 320, 200, 0, 0, 0, 1);
DGL_Enable(DGL_TEXTURING);
}
break;

default:
break;
}
Expand Down
10 changes: 10 additions & 0 deletions doomsday/plugins/jdoom64/src/d_refresh.c
Expand Up @@ -381,6 +381,16 @@ void D_Display2(void)
//M_WriteText2(5, 188, "WAITING... PRESS ESC FOR MENU", huFontA, 1, 0, 0, 1);
break;

case GS_INFINE:
if(!fiCmdExecuted)
{ // A (de)briefing is in process but the script hasn't started yet.
// Just clear the screen, then.
DGL_Disable(DGL_TEXTURING);
GL_DrawRect(0, 0, 320, 200, 0, 0, 0, 1);
DGL_Enable(DGL_TEXTURING);
}
break;

default:
break;
}
Expand Down
10 changes: 10 additions & 0 deletions doomsday/plugins/jheretic/src/h_refresh.c
Expand Up @@ -367,6 +367,16 @@ void H_Display2(void)
//gl.Clear(DGL_COLOR_BUFFER_BIT);
break;

case GS_INFINE:
if(!fiCmdExecuted)
{ // A (de)briefing is in process but the script hasn't started yet.
// Just clear the screen, then.
DGL_Disable(DGL_TEXTURING);
GL_DrawRect(0, 0, 320, 200, 0, 0, 0, 1);
DGL_Enable(DGL_TEXTURING);
}
break;

default:
break;
}
Expand Down
10 changes: 10 additions & 0 deletions doomsday/plugins/jhexen/src/hrefresh.c
Expand Up @@ -334,6 +334,16 @@ void G_Display2(void)
//MN_DrCenterTextA_CS("WAITING... PRESS ESC FOR MENU", 160, 188);
break;

case GS_INFINE:
if(!fiCmdExecuted)
{ // A (de)briefing is in process but the script hasn't started yet.
// Just clear the screen, then.
DGL_Disable(DGL_TEXTURING);
GL_DrawRect(0, 0, 320, 200, 0, 0, 0, 1);
DGL_Enable(DGL_TEXTURING);
}
break;

default:
break;
}
Expand Down

0 comments on commit 0d17ce0

Please sign in to comment.