-
Notifications
You must be signed in to change notification settings - Fork 1
/
Defines.h
executable file
·44 lines (42 loc) · 1.55 KB
/
Defines.h
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
#ifndef DEFINES_H
#define DEFINES_H
#include "Character.h"
#include <SFML/Network.hpp>
// all
#define windowDesignSize sf::Vector2u(800, 500) // map designed for these resolutions
static sf::Vector2u windowSize(1920, 1080); // current window size
#define respawnTime 5.0f // time to respawn in seconds
#define totalMatchTime 1800 // time in seconds per match/game
#define preMatchTime 30 // time in seconds before restarting match/game
#define timeout 10.0f // seconds before stoping the client from attempt to connect to server
// main and character
#define moveUpKey sf::Keyboard::W // up
#define moveDownKey sf::Keyboard::S // down
#define moveLeftKey sf::Keyboard::A // left
#define moveRightKey sf::Keyboard::D // right
// character
#define PI 3.14159265f
#define playerSize 20.0f // size of the character
// Server and Client
struct userInfo {
std::string name = ""; // name of the user
sf::IpAddress ip = sf::IpAddress::None; // ip used to connect to server
unsigned short port = 1000; // port used to connect to server
};
// client
#define damageTakenVisualTime 1.0f // time to display that u are taking damage (in seconds)
// main
enum screenTypes {
title = 0, // title screen
createServer = 1, // create a server screen
joinServer = 2, // join a server screen
ingame = 3, // in game screen
};
enum classTypes {
knight = 0,
ranger = 1,
mage = 2
};
#define classSelectionDisplayKey sf::Keyboard::H // class selection
#define classChangeCooldownTime 1.0f // time in seconds before can change class again
#endif // !DEFINES_H