diff --git a/legacy/LICENSE b/LICENSE similarity index 100% rename from legacy/LICENSE rename to LICENSE diff --git a/legacy/README.md b/README.md similarity index 98% rename from legacy/README.md rename to README.md index 1ebaa06..90c7eba 100644 --- a/legacy/README.md +++ b/README.md @@ -41,7 +41,7 @@ make -j4 test - [x] Basic input handling (currently at cave man stage) - [x] Entity system (Partially functional currently) - [ ] Basic UI functionality - - [x] Buttons + - [ ] Buttons - [x] Text - [ ] Dropdown menu - [ ] Slider diff --git a/games/Ping-Pong/src/pong_entry.cpp b/games/Ping-Pong/src/pong_entry.cpp index ad76d12..c183588 100644 --- a/games/Ping-Pong/src/pong_entry.cpp +++ b/games/Ping-Pong/src/pong_entry.cpp @@ -230,22 +230,29 @@ int main(int argc, char **argv) { switch (event.key.keysym.scancode) { + /* Arrow keys */ /* Up arrow */ case (82): playerMovementDirection = Side::Up; break; - case (14): - playerMovementDirection = Side::Up; - break; - + /* Down arrow */ case (81): playerMovementDirection = Side::Down; break; + /* Vim keys */ + /* k */ + case (14): + playerMovementDirection = Side::Up; + break; + + /* j */ case (13): playerMovementDirection = Side::Down; break; + + /* Controller */ default: playerMovementDirection = Side::None; diff --git a/src/renderwindow.cpp b/src/renderwindow.cpp index c49167f..1cdded6 100644 --- a/src/renderwindow.cpp +++ b/src/renderwindow.cpp @@ -32,7 +32,7 @@ namespace Birb2D return; Debug::Log("Initializing SDL..."); - if (SDL_Init(SDL_INIT_VIDEO) > 0) + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) > 0) { Debug::Log("SDL Init failed: " + (std::string)SDL_GetError(), Debug::error); exit(2); @@ -220,7 +220,6 @@ namespace Birb2D void Render::DrawCircle(SDL_Color color, Vector2int pos, int radius) { - //SDL_SetRenderDrawColor(Global::RenderVars::Renderer, color.r, color.g, color.b, color.a); Uint32 uColor = (255<<24) + (int(color.b)<<16) + (int(color.g)<<8) + int(color.r);; filledCircleColor(Global::RenderVars::Renderer, pos.x, pos.y, radius, uColor); ResetDrawColor();