Compare commits

1 Commits
v1.0.0 ... main

Author SHA1 Message Date
Kuz Goga
e2377006ba upd: README; move assets into the same folder 2025-11-02 09:41:16 +07:00
10 changed files with 22 additions and 7 deletions

View File

@@ -7,7 +7,6 @@ set(BUILD_SHARED_LIBS OFF)
set(SFML_USE_STATIC_STD_LIBS ON) set(SFML_USE_STATIC_STD_LIBS ON)
set(SFML_BUILD_AUDIO ON) set(SFML_BUILD_AUDIO ON)
set(SFML_BUILD_GRAPHICS ON) set(SFML_BUILD_GRAPHICS ON)
set(SFML_BUILD_WINDOW OFF)
set(SFML_BUILD_NETWORK OFF) set(SFML_BUILD_NETWORK OFF)
set(SFML_USE_SYSTEM_DEPS OFF) set(SFML_USE_SYSTEM_DEPS OFF)
set(SFML_BUILD_EXAMPLES OFF) set(SFML_BUILD_EXAMPLES OFF)

16
README.md Normal file
View File

@@ -0,0 +1,16 @@
# Candy Crush
## Наш ответ буржуйским игрушкам
![image](./demo.png)
## Установка зависимостей
```
sudo apt-get install libX11-devel libudev-devel libGL-devel libopenal-devel libvorbis-devel libflac-devel libXrandr-devel libXcursor-devel libXi-devel libfreetype-devel
```
## Сборка
```bash
mkdir build && cd build
cmake ..
cmake --build .
```

View File

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

Before

Width:  |  Height:  |  Size: 1022 B

After

Width:  |  Height:  |  Size: 1022 B

View File

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 222 KiB

BIN
demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

View File

@@ -17,7 +17,7 @@ candy map[10][10];
void playMusic() void playMusic()
{ {
static sf::Music background_music; static sf::Music background_music;
if (!background_music.openFromFile("music/background.ogg")) if (!background_music.openFromFile("assets/music/background.ogg"))
{ {
std::cerr << "Ошибка загрузки музыки" << std::endl; std::cerr << "Ошибка загрузки музыки" << std::endl;
} }
@@ -39,9 +39,9 @@ int main()
playMusic(); playMusic();
Texture bg_texture, candys_texture, button_texture; Texture bg_texture, candys_texture, button_texture;
if (!bg_texture.loadFromFile("images/background.png")) return -1; if (!bg_texture.loadFromFile("assets/images/background.png")) return -1;
if (!candys_texture.loadFromFile("images/candys.png")) return -1; if (!candys_texture.loadFromFile("assets/images/candys.png")) return -1;
if (!button_texture.loadFromFile("images/button_bg.png")) return -1; if (!button_texture.loadFromFile("assets/images/button_bg.png")) return -1;
candys_texture.setSmooth(false); candys_texture.setSmooth(false);
@@ -49,8 +49,8 @@ int main()
button_bg.setPosition({490, 150}); button_bg.setPosition({490, 150});
Font font_regular, font_black; Font font_regular, font_black;
if (!font_regular.openFromFile("fonts/Inter-Regular.ttf")) return -1; if (!font_regular.openFromFile("assets/fonts/Inter-Regular.ttf")) return -1;
if (!font_black.openFromFile("fonts/Inter-Black.ttf")) return -1; if (!font_black.openFromFile("assets/fonts/Inter-Black.ttf")) return -1;
Text points_text(font_regular, "0", 20); Text points_text(font_regular, "0", 20);
points_text.setPosition({10, 5}); points_text.setPosition({10, 5});