-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriver_Settings.cpp
More file actions
101 lines (73 loc) · 3.63 KB
/
Driver_Settings.cpp
File metadata and controls
101 lines (73 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#pragma once
#ifndef TERMINAL_DRIVER_SETTINGS_CPP
#define TERMINAL_DRIVER_SETTINGS_CPP
/* WorldSim: Driver_Settings.cpp
#include "Driver_Settings.cpp"
Gameplay settings and other global settings go here. Some of this stuff will probably end up in an .ini file.
*/
#include <limits.h> // We need ULONG_MAX for absolute coords.
// GAME FLAGS
// number of times to cycle a running program each tick. Default 1.
// Higher value will make programs run faster.
unsigned short int PROGRAM_CYCLES_PER_TICK = 1;
// SYSTEM STRINGS
const std::string VERSION = "0.0.079 Win32 dev";
const std::string G_WINDOW_TITLE = "Terminal";
const std::string SAVE_FOLDER_PATH = "savedata";
// WINDOW STUFF
unsigned int RESOLUTIONX=800, RESOLUTIONY=600;
const bool MAXIMISE_WINDOW = false;
// MAIN MENU ENUMS
// I use a global enum to decide what menu we are in. Makes like much easier.
enum enumMenu { MENU_UNKNOWN, MENU_TITLE };
//Set the menu the game boots into
enumMenu activeMenu = MENU_TITLE;
bool HOTKEYS_ENABLED = false;
bool CLEAN_SAVES_ON_EXIT = true;
/* Will output the framerate. */
const bool OUTPUT_FRAMERATE = true;
const int OUTPUT_FRAMERATE_SAMPLE_SIZE = 50;
int FRAME_COUNTER=0;
const bool LIMIT_FRAMERATE = false;
const double FRAMERATE = 30; // SETTING IT TO A REASONABLE VALUE CAN GREATLY REDUCE STRESS ON GPU
const double POLLSPERSECOND = 60; // NOT CURRENTLY IMPLEMENTED
double LOGIC_PER_SECOND = 30;
const double PHYSICS_PER_SECOND = 10;
double ANIMATION_PER_SECOND = 10; // SETS SPEED OF ANIMATIONS
// SLOW FRAMERATE CAN BE ACTIVATED TO GET EXTRA CYCLES FOR GAMEPLAY.
int SLOW_FRAMERATE = 1000000/2;
// TURNS ON SLOW FRAMERATE
bool SLOW_FRAMERATE_ACTIVE = false;
int UFRAMERATE = 1000000/FRAMERATE;
const int UPOLLSPERSECOND = 1000000/POLLSPERSECOND;
int U_LOGIC_PER_SECOND = 1000000/LOGIC_PER_SECOND;
const int U_PHYSICS_PER_SECOND = 1000000/PHYSICS_PER_SECOND;
const int UANIMATIONSPERSECOND = 1000000/ANIMATION_PER_SECOND;
int CURRENT_ANIMATION_FRAME = 0; /* 0 - 99 */
// RENDER AND FRAME STUFF
/* Double buffering will make the frame transitions smoother, but it is slower. */
const bool DOUBLE_BUFFERING = false;
/* BUSY_WAIT will cause the program to enter a busy wait if rendering is almost ready. Not sure if it works very well. */
const bool BUSY_WAIT = false;
const int BUSY_WAIT_USEC = 2000;
/* If CPU isn't relinquished, then OpenGL tends to run at 100% CPU for some reason. */
/* This uses MsgWaitForMultipleObjects, which will let the OS do other things until any kind of input event occurs */
const bool RELINQUISH_CPU = true;
const unsigned int RELINQUISH_CPU_TIMEOUT = 100; /* Anywhere from 10-100 seems to be okay. Maximum amount of time to relinquish */
bool NO_BACKLOG=false;
bool RENDER_NEXT_FRAME=true; /* If there has been no input or state change, there's no need to render */
const bool LAZY_RENDERING=false; /* Only render if something happened */
const bool COMPRESS_TEXTURES = false; /* Probably saves graphics memory, however seems to significantly slow rendering */
// GLOBAL FLAGS
bool QUIT_FLAG = false;
bool DONT_RENDER = false; /* In debugging, rendering can be disabled by pressing R. */
bool LIMIT_LOGIC = true; /* Press S. */
bool FORCE_LOGIC_FRAME = false; /* True will trigger next logic frame immediately. */
bool PAUSE_LOGIC = false; /* True will suspend logic. */
// MAKES COUT MUCH FASTER BUT DOES NOT GUARANTEE ORDER OR COMPLETION BEFORE EXIT/CRASH.
const bool FAST_COUT = false;
bool EMULATE_2_BUTTON_MIDDLE_CLICK = true; // Allows middle click with mice without middle click by pressing left and right click.
// MORE STRINGS
const char THOUSANDS_DELIMITER = ',';
const char DECIMAL_DELIMITER = '.';
#endif