Skip to content

Commit 811316d

Browse files
author
dashodanger
committed
Bump GL back to 1.5; rework movie player to not hijack application loop
1 parent 2903498 commit 811316d

25 files changed

+360
-901
lines changed

libraries/glad/include/glad/glad.h

+4-371
Large diffs are not rendered by default.

libraries/glad/src/glad.c

+7-199
Large diffs are not rendered by default.

source_files/edge/con_con.cc

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "hu_stuff.h"
4444
#include "hu_style.h"
4545
#include "i_defs_gl.h"
46+
#include "i_movie.h"
4647
#include "i_system.h"
4748
#include "m_argv.h"
4849
#include "n_network.h"
@@ -1536,6 +1537,9 @@ bool ConsoleResponder(InputEvent *ev)
15361537

15371538
void ConsoleTicker(void)
15381539
{
1540+
if (playing_movie)
1541+
return;
1542+
15391543
console_cursor = (console_cursor + 1) & 31;
15401544

15411545
if (console_visible != kConsoleVisibilityNotVisible)

source_files/edge/dm_defs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum GameState
4040
kGameStateTitleScreen,
4141
kGameStateLevel,
4242
kGameStateIntermission,
43-
kGameStateFinale,
43+
kGameStateFinale
4444
};
4545

4646
//

source_files/edge/e_input.cc

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "epi_sdl.h"
4040
#include "epi_str_util.h"
4141
#include "hu_stuff.h"
42+
#include "i_movie.h"
4243
#include "m_math.h"
4344
#include "m_misc.h"
4445
#include "r_misc.h"
@@ -682,6 +683,9 @@ void ProcessInputEvents(void)
682683
{
683684
ev = &events[event_tail];
684685

686+
if (MovieResponder(ev))
687+
continue;
688+
685689
if (ConsoleResponder(ev))
686690
continue; // Console ate the event
687691

source_files/edge/e_main.cc

+55-48
Original file line numberDiff line numberDiff line change
@@ -605,73 +605,79 @@ void EdgeDisplay(void)
605605

606606
HUDFrameSetup();
607607

608-
switch (game_state)
608+
if (!playing_movie)
609609
{
610-
case kGameStateLevel:
611-
PaletteTicker();
610+
switch (game_state)
611+
{
612+
case kGameStateLevel:
613+
PaletteTicker();
612614

613-
if (LuaUseLuaHUD())
614-
LuaRunHUD();
615-
else
616-
COALRunHUD();
615+
if (LuaUseLuaHUD())
616+
LuaRunHUD();
617+
else
618+
COALRunHUD();
617619

618-
if (need_save_screenshot)
619-
{
620-
CreateSaveScreenshot();
621-
need_save_screenshot = false;
622-
}
620+
if (need_save_screenshot)
621+
{
622+
CreateSaveScreenshot();
623+
need_save_screenshot = false;
624+
}
623625

624-
HUDDrawer();
625-
ScriptDrawer();
626-
break;
626+
HUDDrawer();
627+
ScriptDrawer();
628+
break;
627629

628-
case kGameStateIntermission:
629-
IntermissionDrawer();
630-
break;
630+
case kGameStateIntermission:
631+
IntermissionDrawer();
632+
break;
631633

632-
case kGameStateFinale:
633-
FinaleDrawer();
634-
break;
634+
case kGameStateFinale:
635+
FinaleDrawer();
636+
break;
635637

636-
case kGameStateTitleScreen:
637-
TitleDrawer();
638-
break;
638+
case kGameStateTitleScreen:
639+
TitleDrawer();
640+
break;
639641

640-
case kGameStateNothing:
641-
break;
642-
}
642+
case kGameStateNothing:
643+
break;
644+
}
643645

644-
if (wipe_gl_active)
645-
{
646-
// -AJA- Wipe code for GL. Sorry for all this ugliness, but it just
647-
// didn't fit into the existing wipe framework.
648-
//
649-
if (DoWipe())
646+
if (wipe_gl_active)
650647
{
651-
StopWipe();
652-
wipe_gl_active = false;
648+
// -AJA- Wipe code for GL. Sorry for all this ugliness, but it just
649+
// didn't fit into the existing wipe framework.
650+
//
651+
if (DoWipe())
652+
{
653+
StopWipe();
654+
wipe_gl_active = false;
655+
}
653656
}
654-
}
655657

656-
// save the current screen if about to wipe
657-
if (need_wipe)
658-
{
659-
need_wipe = false;
660-
wipe_gl_active = true;
658+
// save the current screen if about to wipe
659+
if (need_wipe)
660+
{
661+
need_wipe = false;
662+
wipe_gl_active = true;
661663

662-
InitializeWipe(wipe_method);
663-
}
664+
InitializeWipe(wipe_method);
665+
}
664666

665-
if (paused)
666-
DisplayPauseImage();
667+
if (paused)
668+
DisplayPauseImage();
667669

668-
// menus go directly to the screen
669-
MenuDrawer(); // menu is drawn even on top of everything (except console)
670+
// menus go directly to the screen
671+
MenuDrawer(); // menu is drawn even on top of everything (except console)
672+
}
673+
else
674+
MovieDrawer();
670675

671676
// process mouse and keyboard events
672677
NetworkUpdate();
673678

674-
ConsoleDrawer();
679+
if (!playing_movie)
680+
ConsoleDrawer();
675681

676682
if (!hud_overlays.at(video_overlay.d_).empty())
677683
{
@@ -2447,6 +2453,7 @@ void EdgeTicker(void)
24472453
GameTicker();
24482454

24492455
// user interface stuff (skull anim, etc)
2456+
MovieTicker();
24502457
ConsoleTicker();
24512458
MenuTicker();
24522459
SoundTicker();

source_files/edge/g_game.cc

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "epi_str_util.h"
4343
#include "f_finale.h"
4444
#include "f_interm.h"
45+
#include "i_movie.h"
4546
#include "i_system.h"
4647
#include "m_cheat.h"
4748
#include "m_menu.h"
@@ -417,6 +418,9 @@ static void CheckPlayersReborn(void)
417418

418419
void DoBigGameStuff(void)
419420
{
421+
if (playing_movie)
422+
return;
423+
420424
// do things to change the game state
421425
while (game_action != kGameActionNothing)
422426
{
@@ -466,6 +470,9 @@ void DoBigGameStuff(void)
466470

467471
void GameTicker(void)
468472
{
473+
if (playing_movie)
474+
return;
475+
469476
// ANIMATE FLATS AND TEXTURES GLOBALLY
470477
AnimationTicker();
471478

0 commit comments

Comments
 (0)