Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2377006ba |
@@ -7,7 +7,6 @@ set(BUILD_SHARED_LIBS OFF)
|
||||
set(SFML_USE_STATIC_STD_LIBS ON)
|
||||
set(SFML_BUILD_AUDIO ON)
|
||||
set(SFML_BUILD_GRAPHICS ON)
|
||||
set(SFML_BUILD_WINDOW OFF)
|
||||
set(SFML_BUILD_NETWORK OFF)
|
||||
set(SFML_USE_SYSTEM_DEPS OFF)
|
||||
set(SFML_BUILD_EXAMPLES OFF)
|
||||
|
||||
16
README.md
Normal file
16
README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Candy Crush
|
||||
## Наш ответ буржуйским игрушкам
|
||||
|
||||

|
||||
|
||||
## Установка зависимостей
|
||||
```
|
||||
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 .
|
||||
```
|
||||
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 323 KiB |
|
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 1022 B |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
12
src/main.cpp
12
src/main.cpp
@@ -17,7 +17,7 @@ candy map[10][10];
|
||||
void playMusic()
|
||||
{
|
||||
static sf::Music background_music;
|
||||
if (!background_music.openFromFile("music/background.ogg"))
|
||||
if (!background_music.openFromFile("assets/music/background.ogg"))
|
||||
{
|
||||
std::cerr << "Ошибка загрузки музыки" << std::endl;
|
||||
}
|
||||
@@ -39,9 +39,9 @@ int main()
|
||||
playMusic();
|
||||
|
||||
Texture bg_texture, candys_texture, button_texture;
|
||||
if (!bg_texture.loadFromFile("images/background.png")) return -1;
|
||||
if (!candys_texture.loadFromFile("images/candys.png")) return -1;
|
||||
if (!button_texture.loadFromFile("images/button_bg.png")) return -1;
|
||||
if (!bg_texture.loadFromFile("assets/images/background.png")) return -1;
|
||||
if (!candys_texture.loadFromFile("assets/images/candys.png")) return -1;
|
||||
if (!button_texture.loadFromFile("assets/images/button_bg.png")) return -1;
|
||||
|
||||
candys_texture.setSmooth(false);
|
||||
|
||||
@@ -49,8 +49,8 @@ int main()
|
||||
button_bg.setPosition({490, 150});
|
||||
|
||||
Font font_regular, font_black;
|
||||
if (!font_regular.openFromFile("fonts/Inter-Regular.ttf")) return -1;
|
||||
if (!font_black.openFromFile("fonts/Inter-Black.ttf")) return -1;
|
||||
if (!font_regular.openFromFile("assets/fonts/Inter-Regular.ttf")) return -1;
|
||||
if (!font_black.openFromFile("assets/fonts/Inter-Black.ttf")) return -1;
|
||||
|
||||
Text points_text(font_regular, "0", 20);
|
||||
points_text.setPosition({10, 5});
|
||||
|
||||
Reference in New Issue
Block a user