diff --git a/README.md b/README.md index 8e25c67..5edd38e 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ ## Dependencies -- https://miniaud.io/index.html - sdl2 - sdl2_image +- sdl2_mixer +- sdl2_ttf - SFML - ncurses @@ -26,8 +27,7 @@ Change game/graphical lib at runtime ## Install ```bash -cmake . -make +mkdir build && cd build && cmake . && make -j8 ``` ## Usage diff --git a/src/GameLibs/Nibbler/Component/NibblerMapComponent.cpp b/src/GameLibs/Nibbler/Component/NibblerMapComponent.cpp index 1694ca4..2664095 100644 --- a/src/GameLibs/Nibbler/Component/NibblerMapComponent.cpp +++ b/src/GameLibs/Nibbler/Component/NibblerMapComponent.cpp @@ -9,10 +9,10 @@ #include "NibblerCompType.hpp" #include "NibblerMapComponent.hpp" -static const Arcade::Graph::Color foregroundColorDark(0, 220, 0, 0); -static const Arcade::Graph::Color backgroundColorDark(0, 220, 0, 0); -static const Arcade::Graph::Color foregroundColorBright(0, 150, 0, 0); -static const Arcade::Graph::Color backgroundColorBright(0, 150, 0, 0); +static const Arcade::Graph::Color foregroundColorDark(0, 255, 0, 0); +static const Arcade::Graph::Color backgroundColorDark(0, 255, 0, 0); +static const Arcade::Graph::Color foregroundColorBright(0, 200, 0, 0); +static const Arcade::Graph::Color backgroundColorBright(0, 200, 0, 0); #define DARK_PARCELL "assets/snake/normal/bg_green_01.png" #define LIGHT_PARCELL "assets/snake/normal/bg_green_02.png" diff --git a/src/GameLibs/Nibbler/Component/NibblerWallComponent.cpp b/src/GameLibs/Nibbler/Component/NibblerWallComponent.cpp index 6de26f1..757409e 100644 --- a/src/GameLibs/Nibbler/Component/NibblerWallComponent.cpp +++ b/src/GameLibs/Nibbler/Component/NibblerWallComponent.cpp @@ -9,8 +9,8 @@ #include "NibblerCompType.hpp" #include "NibblerWallComponent.hpp" -static const Arcade::Graph::Color foregroundColor(160, 80, 0, 0); -static const Arcade::Graph::Color backgroundColor(120, 80, 0, 0); +static const Arcade::Graph::Color foregroundColor(255, 255, 100, 0); +static const Arcade::Graph::Color backgroundColor(255, 255, 100, 0); #define WALL_PATH "assets/snake/normal/box_02.png" #define DEFAULT_CHAR "#####\n#####\n#####" diff --git a/src/GameLibs/Nibbler/System/SnakeGrowSystem.cpp b/src/GameLibs/Nibbler/System/SnakeGrowSystem.cpp index 1ff9317..81c439f 100644 --- a/src/GameLibs/Nibbler/System/SnakeGrowSystem.cpp +++ b/src/GameLibs/Nibbler/System/SnakeGrowSystem.cpp @@ -119,9 +119,9 @@ void Nibbler::System::SnakeGrowSystem::addNewBodyPartToSnake(Arcade::ECS::IEntit body.path = NIBBLERBODYPATH; body.rect = {0, 0, PARCELL_SIZE, PARCELL_SIZE}; body.currentRectIndex = 0; - body.ttyData.defaultChar = "#"; - body.ttyData.background = {0, 255, 255, 0}; - body.ttyData.foreground = {0, 255, 0, 0}; + body.ttyData.defaultChar = "#####\n#####\n#####"; + body.ttyData.background = {255, 255, 255, 0}; + body.ttyData.foreground = {255, 255, 255, 0}; placeNewBody(entityManager, forward, body, idNbr); entity.addComponent(forward); growCompGrow.lastIdBodyComp = id; diff --git a/src/GameLibs/Snake/Component/SnakeMapComponent.cpp b/src/GameLibs/Snake/Component/SnakeMapComponent.cpp index 48dd384..881b660 100644 --- a/src/GameLibs/Snake/Component/SnakeMapComponent.cpp +++ b/src/GameLibs/Snake/Component/SnakeMapComponent.cpp @@ -8,10 +8,10 @@ #include "GraphStruct.hpp" #include "SnakeMapComponent.hpp" -static const Arcade::Graph::Color foregroundColorDark(0, 220, 0, 0); -static const Arcade::Graph::Color backgroundColorDark(0, 220, 0, 0); -static const Arcade::Graph::Color foregroundColorBright(0, 150, 0, 0); -static const Arcade::Graph::Color backgroundColorBright(0, 150, 0, 0); +static const Arcade::Graph::Color foregroundColorDark(0, 255, 0, 0); +static const Arcade::Graph::Color backgroundColorDark(0, 255, 0, 0); +static const Arcade::Graph::Color foregroundColorBright(0, 200, 0, 0); +static const Arcade::Graph::Color backgroundColorBright(0, 200, 0, 0); #define DARK_PARCELL "assets/snake/normal/bg_green_01.png" #define LIGHT_PARCELL "assets/snake/normal/bg_green_02.png" diff --git a/src/GameLibs/Snake/System/SnakeGrowSystem.cpp b/src/GameLibs/Snake/System/SnakeGrowSystem.cpp index d7eb427..401f12f 100644 --- a/src/GameLibs/Snake/System/SnakeGrowSystem.cpp +++ b/src/GameLibs/Snake/System/SnakeGrowSystem.cpp @@ -119,9 +119,9 @@ void Snake::System::SnakeGrowSystem::addNewBodyPartToSnake(Arcade::ECS::IEntityM body.path = SNAKEBODYPATH; body.rect = {0, 0, PARCELL_SIZE, PARCELL_SIZE}; body.currentRectIndex = 0; - body.ttyData.defaultChar = "#"; - body.ttyData.background = {0, 255, 255, 0}; - body.ttyData.foreground = {0, 255, 0, 0}; + body.ttyData.defaultChar = "#####\n#####\n#####"; + body.ttyData.background = {255, 255, 255, 0}; + body.ttyData.foreground = {255, 255, 255, 0}; placeNewBody(entityManager, forward, body, idNbr); entity.addComponent(forward); growCompGrow.lastIdBodyComp = id; diff --git a/src/MainMenus/Basic/MainMenuScene.cpp b/src/MainMenus/Basic/MainMenuScene.cpp index 078770f..d3f1388 100644 --- a/src/MainMenus/Basic/MainMenuScene.cpp +++ b/src/MainMenus/Basic/MainMenuScene.cpp @@ -30,6 +30,7 @@ bool BasicMenu::MainMenuScene::init() text->fontPath = PATH_FONT; text->text = "Game Libs availible:"; text->textColor = {255, 0, 0, 255}; + text->backgroundColor = {255, 255, 255, 255}; text->pos = compPos; gamesEntity.addComponent(text); compPos.x = 1920.0 / 2.0; @@ -38,6 +39,7 @@ bool BasicMenu::MainMenuScene::init() text->fontPath = PATH_FONT; text->text = "Graphic Libs availible:"; text->textColor = {255, 0, 0, 255}; + text->backgroundColor = {255, 255, 255, 255}; text->pos = compPos; graphicsEntity.addComponent(text); compPos.x = 1920.0 / 3.0; @@ -46,6 +48,7 @@ bool BasicMenu::MainMenuScene::init() text->fontPath = PATH_FONT; text->text = "Scores:"; text->textColor = {255, 0, 0, 255}; + text->backgroundColor = {255, 255, 255, 255}; text->pos = compPos; graphicsEntity.addComponent(text); return (true); diff --git a/src/MainMenus/Basic/MainMenuSystem.cpp b/src/MainMenus/Basic/MainMenuSystem.cpp index 1ecb955..64abd9c 100644 --- a/src/MainMenus/Basic/MainMenuSystem.cpp +++ b/src/MainMenus/Basic/MainMenuSystem.cpp @@ -31,6 +31,7 @@ void BasicMenu::MainMenuSystem::run(double deltaTime, Arcade::ECS::IEventManager text->fontPath = PATH_FONT; text->text = textText; text->textColor = {255, 0, 0, 255}; + text->backgroundColor = {255, 255, 255, 255}; text->pos = compPos; compPos.y += 24; gamesEntity->addComponent(text); @@ -42,6 +43,7 @@ void BasicMenu::MainMenuSystem::run(double deltaTime, Arcade::ECS::IEventManager text->fontPath = PATH_FONT; text->text = textText; text->textColor = {255, 0, 0, 255}; + text->backgroundColor = {255, 255, 255, 255}; text->pos = compPos; compPos.y += 24; graphicsEntity->addComponent(text); @@ -59,6 +61,7 @@ void BasicMenu::MainMenuSystem::run(double deltaTime, Arcade::ECS::IEventManager text->fontPath = PATH_FONT; text->text = textText.first + " : " + textText.second; text->textColor = {255, 0, 0, 255}; + text->backgroundColor = {255, 255, 255, 255}; text->pos = compPos; compPos.y += 24; graphicsEntity->addComponent(text);