aboutsummaryrefslogtreecommitdiff
path: root/src/settings.h
blob: b5d703d8db0a231af618185296ac2a175978a7d0 (plain)
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
#include "gameCommon.h"

#ifndef SETTINGS_H
#define SETTINGS_H

// What is the player using for control.
typedef enum ControlMode {
	JOYSTICK_CONTROL,
	KEYBOARD_AND_MOUSE_CONTROL
} ControlMode;

typedef struct Settings {
	// Player control stuff.
	ControlMode controlMode;

	// Keyboard and mouse control.
	float mouseSensitivity;
	float speedMod;
	float scrollBarSpeed;
	bool lockMouse;

	// Joystick control.
	int gamePadNum;
	int pitchStick;
	int yawStick;
	int rollStick;
	int speedStick;
	float joystickSensitivity;

	// Fps shit.
	int fps;
	bool drawFps;

	// World render shit.
	int renderWidth;
	int renderHeight;
	bool useWorldRenderTexture;
} Settings;

void initSettings(Settings * settings);
void applySettings(Settings * settings);

#endif