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
Сулимов Игорь Андреевич
Pac-Man
Commits
4ba549ab
Commit
4ba549ab
authored
2 weeks ago
by
Сулимов Игорь Андреевич
Browse files
Options
Download
Patches
Plain Diff
Fix Font asset
parent
2f5c086e
main
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
CMakeLists.txt
+1
-0
CMakeLists.txt
assets/Fonts/Calibri light.ttf
+0
-0
assets/Fonts/Calibri light.ttf
include/Commands/ChangeStateCommand.h
+1
-1
include/Commands/ChangeStateCommand.h
include/Commands/GameCommand.h
+1
-1
include/Commands/GameCommand.h
include/Config.h
+1
-1
include/Config.h
include/Draw/Menu.h
+1
-1
include/Draw/Menu.h
source/Commands/GameCommand.cpp
+3
-3
source/Commands/GameCommand.cpp
source/State/IState.cpp
+0
-3
source/State/IState.cpp
with
8 additions
and
10 deletions
+8
-10
CMakeLists.txt
+
1
−
0
View file @
4ba549ab
...
@@ -17,6 +17,7 @@ add_executable(pac-man
...
@@ -17,6 +17,7 @@ add_executable(pac-man
"source/Draw/Button.cpp"
"source/Draw/Button.cpp"
"source/Draw/MyFont.cpp"
"source/Draw/MyFont.cpp"
"source/Commands/ExitCommand.cpp"
"source/Commands/ExitCommand.cpp"
"source/Commands/GameCommand.cpp"
"source/Maze_Content/Buildings/Room.cpp"
"source/Maze_Content/Buildings/Room.cpp"
)
)
...
...
This diff is collapsed.
Click to expand it.
assets/Fonts/Calibri light.ttf
deleted
100644 → 0
+
0
−
0
View file @
2f5c086e
File deleted
This diff is collapsed.
Click to expand it.
include/Commands/ChangeStateCommand.h
+
1
−
1
View file @
4ba549ab
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
class
ChangeStateCommand
:
public
ISelectCommand
{
class
ChangeStateCommand
:
public
ISelectCommand
{
public:
public:
void
execute
()
override
;
void
execute
()
override
{}
///@todo
public
:
public
:
ChangeStateCommand
(
IStateManager
&
state_manager
)
:
m_ptr_state_manager
(
state_manager
)
{}
ChangeStateCommand
(
IStateManager
&
state_manager
)
:
m_ptr_state_manager
(
state_manager
)
{}
virtual
~
ChangeStateCommand
()
=
default
;
virtual
~
ChangeStateCommand
()
=
default
;
...
...
This diff is collapsed.
Click to expand it.
include/Commands/GameCommand.h
+
1
−
1
View file @
4ba549ab
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
class
GameCommand
:
public
ChangeStateCommand
{
class
GameCommand
:
public
ChangeStateCommand
{
public:
public:
void
execute
()
override
;
void
execute
()
override
{}
///@todo
public
:
public
:
GameCommand
(
IStateManager
&
state_manager
,
std
::
unique_ptr
<
GameBuilderDirector
>&&
ptr_director
);
GameCommand
(
IStateManager
&
state_manager
,
std
::
unique_ptr
<
GameBuilderDirector
>&&
ptr_director
);
private
:
private
:
...
...
This diff is collapsed.
Click to expand it.
include/Config.h
+
1
−
1
View file @
4ba549ab
...
@@ -8,7 +8,7 @@ namespace config {
...
@@ -8,7 +8,7 @@ namespace config {
const
sf
::
Vector2f
BUTTON_SIZE
=
{
250
,
100
};
const
sf
::
Vector2f
BUTTON_SIZE
=
{
250
,
100
};
const
size_t
BUTTON_FONT_SIZE
=
static_cast
<
size_t
>
(
BUTTON_SIZE
.
y
/
1.5
f
);
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
float
BUTTON_FRAME_THICKNESS
=
2.0
f
;
const
char
FONT_FILE
[]
=
"Calibri
Light.ttf"
;
const
char
FONT_FILE
[]
=
"Calibri
-
Light.ttf"
;
const
char
SELECT_LEVEL_TITLE
[]
=
"Select Level"
;
const
char
SELECT_LEVEL_TITLE
[]
=
"Select Level"
;
const
sf
::
VideoMode
SELECT_LEVEL_VIDEO_MODE
{
400
,
600
};
const
sf
::
VideoMode
SELECT_LEVEL_VIDEO_MODE
{
400
,
600
};
const
char
BUTTON_TEXT_EASY
[]
=
"Easy"
;
const
char
BUTTON_TEXT_EASY
[]
=
"Easy"
;
...
...
This diff is collapsed.
Click to expand it.
include/Draw/Menu.h
+
1
−
1
View file @
4ba549ab
...
@@ -8,7 +8,7 @@ public:
...
@@ -8,7 +8,7 @@ public:
void
draw_into
(
sf
::
RenderWindow
&
window
)
const
override
;
void
draw_into
(
sf
::
RenderWindow
&
window
)
const
override
;
void
process_mouse
(
sf
::
Vector2f
pos
,
bool
is_pressed
);
void
process_mouse
(
sf
::
Vector2f
pos
,
bool
is_pressed
);
public:
public:
Menu
(
IStateManager
&
state_manager
)
;
///@todo
Menu
(
IStateManager
&
state_manager
)
{}
///@todo
private
:
private
:
std
::
array
<
Button
,
4
>
m_buttons
;
std
::
array
<
Button
,
4
>
m_buttons
;
};
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Commands/GameCommand.cpp
+
3
−
3
View file @
4ba549ab
...
@@ -4,6 +4,6 @@
...
@@ -4,6 +4,6 @@
GameCommand
::
GameCommand
(
IStateManager
&
state_manager
,
std
::
unique_ptr
<
GameBuilderDirector
>&&
ptr_director
)
:
GameCommand
::
GameCommand
(
IStateManager
&
state_manager
,
std
::
unique_ptr
<
GameBuilderDirector
>&&
ptr_director
)
:
ChangeStateCommand
(
state_manager
),
m_ptr_director
(
std
::
move
(
ptr_director
))
{}
ChangeStateCommand
(
state_manager
),
m_ptr_director
(
std
::
move
(
ptr_director
))
{}
void
GameCommand
::
execute
()
{
//void GameCommand::execute() {
m_ptr_state_manager
.
set_next_state
(
m_ptr_director
->
build
(
m_ptr_state_manager
));
// m_ptr_state_manager.set_next_state(m_ptr_director->build(m_ptr_state_manager));
}
//}
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/State/IState.cpp
deleted
100644 → 0
+
0
−
3
View file @
2f5c086e
//
// Created by Игорь on 07.03.2025.
//
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