diff --git a/README.md b/README.md index 5ad6b6659fcb7a81b867ee4c5c24834625bd2ddc..e621f4f747b3d1f717011122f8fcdb25e5928a2c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ ## Images -[Screen_shot_0](assets/images/Screenshot_0.png) +<p float="left"> + <img src="assets/images/Screenshot_0.png" width="280" /> + <img src="assets/images/Screenshot_1.png" width="280" /> +</p> + ## Building diff --git a/assets/images/Screenshot_1.png b/assets/images/Screenshot_1.png new file mode 100644 index 0000000000000000000000000000000000000000..d6e94ab13b545f3715c4738c99da6fe35b83bf2b Binary files /dev/null and b/assets/images/Screenshot_1.png differ diff --git a/source/main.cpp b/source/main.cpp index 1a7e2905d9ce09d619bf17d1d2916475cdeb0a19..71c6376aa083d33cf3f6b63edad7e97f11493949 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -46,7 +46,7 @@ int main(int argc, const char * argv[]) { std::cout << "Group Inited" << std::endl; //? Image 1 - std::vector<int> map = { + /*std::vector<int> map = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 2, 2, 3, 0, 0, 0, @@ -57,6 +57,24 @@ int main(int argc, const char * argv[]) { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + };*/ + + std::vector<int> map = { + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, + 2, 0, 0, 1, 3, 1, 1, 2, 1, 1, 3, 1, 0, 0, 2, + 2, 0, 0, 3, 1, 1, 2, 2, 2, 1, 1, 3, 0, 0, 2, + 1, 0, 0, 1, 1, 1, 2, 1, 2, 1, 1, 1, 0, 0, 1, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, + 1, 1, 0, 0, 2, 2, 0, 1, 0, 2, 2, 0, 0, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, }; size_t x = 0; @@ -64,17 +82,20 @@ int main(int argc, const char * argv[]) { std::vector<std::unique_ptr<megu::Image>> images; + megu::Texture texture_0; + texture_0.store(megu::TextureBuffer("assets/textures/Cube_White.png")); + megu::Texture texture_1; - texture_1.store(megu::TextureBuffer("assets/textures/Cube_GLab_1.png")); + texture_1.store(megu::TextureBuffer("assets/textures/Cube_White.png")); megu::Texture texture_2; - texture_2.store(megu::TextureBuffer("assets/textures/Cube_GLab_2.png")); + texture_2.store(megu::TextureBuffer("assets/textures/Cube_Red.png")); megu::Texture texture_3; - texture_3.store(megu::TextureBuffer("assets/textures/Cube_GLab_3.png")); + texture_3.store(megu::TextureBuffer("assets/textures/Cube_Blue.png")); for(auto id : map) { - if(x == 10) { + if(x == 15) { x = 0; ++y; } @@ -93,11 +114,15 @@ int main(int argc, const char * argv[]) { case 3: images.push_back(std::make_unique<megu::Image>(texture_3)); break; + + default: + images.push_back(std::make_unique<megu::Image>(texture_0)); + break; } - glm::vec2 pos = to_screen_coordinate({x, y}, 32.f, 32.f, 1.f); + glm::vec2 pos = to_screen_coordinate({x, y}, 32.f, 32.f, 0.f); - images.back()->setPosition({pos.x + window.width()/2 - 16.f, pos.y + window.height()/4}); + images.back()->setPosition({pos.x + window.width()/2 + 24.f, pos.y + window.height()/8}); } ++x; @@ -163,8 +188,8 @@ int main(int argc, const char * argv[]) { engine.push(0, basic_renderer); - engine.push(0, 1, group); - engine.push(0, 0, group_2); + engine.push(0, 0, group); + //engine.push(0, 0, group_2); //? Render Loop std::cout << "Render Loop Begin !" << std::endl;