Skip to content

Commit

Permalink
Declare global data in intro.cpp; rename to g_snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Jul 10, 2024
1 parent a8e0e3e commit 790ccca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions libid/include/intro.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

extern bool g_slow_display;

void intro();
4 changes: 2 additions & 2 deletions libid/intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <ctime>
#include <vector>

bool slowdisplay = false;
bool g_slow_display{};

void intro()
{
Expand Down Expand Up @@ -81,7 +81,7 @@ void intro()
driver_hide_text_cursor();
while (! driver_key_pressed())
{
if (slowdisplay)
if (g_slow_display)
{
delaymax *= 15;
}
Expand Down
4 changes: 2 additions & 2 deletions unix/d_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@
#include "x11_frame.h"
#include "x11_text.h"
#include "x11_plot.h"
#include "intro.h"

#ifdef LINUX
#define FNDELAY O_NDELAY
#endif

// external variables (set in the id.cfg file, but findable here

extern bool slowdisplay;
extern int g_dot_mode; // video access method (= 19)
extern int g_screen_x_dots, g_screen_y_dots; // total # of dots on the screen
extern int g_logical_screen_x_offset, g_logical_screen_y_offset; // offset of drawing area
Expand Down Expand Up @@ -359,7 +359,7 @@ int X11Driver::check_arg(int argc, char **argv, int *i)
}
else if (std::strcmp(argv[*i], "-slowdisplay") == 0)
{
slowdisplay = true;
g_slow_display = true;
return 1;
}
else if (std::strcmp(argv[*i], "-sync") == 0)
Expand Down

0 comments on commit 790ccca

Please sign in to comment.