Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Кукочкина София Александровна
Lab_3
Commits
90a09177
Commit
90a09177
authored
1 week ago
by
Кукочкина София Александровна
Browse files
Options
Download
Patches
Plain Diff
added file with configuration of the game
parent
fe992e6e
main
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config.h
+49
-0
config.h
with
49 additions
and
0 deletions
+49
-0
config.h
0 → 100644
+
49
−
0
View file @
90a09177
#pragma once
#include
<SFML/Graphics.hpp>
namespace
config
{
// :
const
unsigned
int
FRAME_RATE_LIMIT
=
60
;
// :
const
sf
::
Vector2f
BUTTON_SIZE
=
{
250
,
100
};
const
size_t
BUTTON_FONT_SIZE
=
static_cast
<
size_t
>
(
BUTTON_SIZE
.
y
/
1.5
f
);
const
float
BUTTON_FRAME_THICKNESS
=
2.0
f
;
const
char
FONT_FILE
[]
=
"Calibri-Light.ttf"
;
const
char
SELECT_LEVEL_TITLE
[]
=
"Select Level"
;
const
sf
::
VideoMode
SELECT_LEVEL_VIDEO_MODE
{
400
,
600
};
const
char
BUTTON_TEXT_EASY
[]
=
"Easy"
;
const
char
BUTTON_TEXT_MEDIUM
[]
=
"Medium"
;
const
char
BUTTON_TEXT_HARD
[]
=
"Hard"
;
const
char
BUTTON_TEXT_EXIT
[]
=
"Exit"
;
// :
const
sf
::
VideoMode
GAME_VIDEO_MODE
{
1080
,
720
};
const
char
EASY_GAME_TITLE
[]
=
"Level: Easy"
;
const
char
MEDIUM_GAME_TITLE
[]
=
"Level: Medium"
;
const
char
HARD_GAME_TITLE
[]
=
"Level: Hard"
;
const
float
EASY_GAME_ENEMY_RATIO
=
0.0
f
;
const
float
MEDIUM_GAME_ENEMY_RATIO
=
0.03
f
;
const
float
HARD_GAME_ENEMY_RATIO
=
0.07
f
;
const
float
ROOM_SIZE
=
50
;
const
float
GAME_ENEMY_SIZE
=
ROOM_SIZE
*
0.7
;
const
float
GAME_FOOD_SIZE
=
ROOM_SIZE
*
0.2
;
// :
const
float
GAME_PACMAN_SIZE
=
ROOM_SIZE
*
0.8
;
const
sf
::
Keyboard
::
Key
KEY_LEFT
=
sf
::
Keyboard
::
A
;
const
sf
::
Keyboard
::
Key
KEY_RIGHT
=
sf
::
Keyboard
::
D
;
const
sf
::
Keyboard
::
Key
KEY_UP
=
sf
::
Keyboard
::
W
;
const
sf
::
Keyboard
::
Key
KEY_DOWN
=
sf
::
Keyboard
::
S
;
// :
const
sf
::
Color
BUTTON_COLOR_TEXT
{
0
,
0
,
0
};
const
sf
::
Color
BUTTON_COLOR_FILL
{
180
,
180
,
180
};
const
sf
::
Color
BUTTON_COLOR_SELECTION
{
255
,
180
,
180
};
const
sf
::
Color
BUTTON_COLOR_FRAME
{
0
,
0
,
0
};
const
sf
::
Color
SELECT_LEVEL_BACKGROUND_COLOR
{
230
,
230
,
230
};
const
sf
::
Color
GAME_COLOR_BACKGROUND_INGAME
{
230
,
230
,
230
};
const
sf
::
Color
GAME_COLOR_BACKGROUND_WIN
{
0
,
255
,
0
};
const
sf
::
Color
GAME_COLOR_BACKGROUND_LOST
{
255
,
0
,
0
};
const
sf
::
Color
GAME_COLOR_PACMAN
{
250
,
150
,
0
};
const
sf
::
Color
GAME_COLOR_ROOM
{
255
,
255
,
255
};
const
sf
::
Color
GAME_COLOR_WALL
{
0
,
0
,
0
};
const
sf
::
Color
GAME_FOOD_COLOR
{
0
,
200
,
100
};
const
sf
::
Color
GAME_ENEMY_COLOR
{
255
,
50
,
0
};
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets