Skip to content

Commit

Permalink
feat: itch release!
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcop committed Jul 31, 2023
1 parent 92ce712 commit 1807ea0
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 206 deletions.
File renamed without changes.
Binary file removed public/test/simplified/Level_0/Background.png
Binary file not shown.
Binary file removed public/test/simplified/Level_0/_bg.png
Binary file not shown.
Binary file removed public/test/simplified/Level_0/_composite.png
Binary file not shown.
194 changes: 0 additions & 194 deletions public/test/simplified/Level_0/data.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/engine/renderer/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool Shader::log_err(unsigned int shader_id, std::string type) const
}
else
{
glGetShaderiv(shader_id, GL_LINK_STATUS, &success);
glGetProgramiv(shader_id, GL_LINK_STATUS, &success);
if (!success)
{
glGetProgramInfoLog(shader_id, 1024, NULL, info_log);
Expand Down
2 changes: 1 addition & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void Game::init()

// Load some level data:
ldtk::Project ldtk_project;
ldtk_project.loadFromFile("./public/test.ldtk");
ldtk_project.loadFromFile("./public/level.ldtk");
const auto& world = ldtk_project.getWorld();
const auto& level = world.getLevel("Level_0");
const auto& layer = level.getLayer("Background");
Expand Down
24 changes: 14 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ int main(int argc, char* argv[])
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
glfwWindowHint(GLFW_RESIZABLE, true);

const GLFWvidmode* mode = glfwGetVideoMode(glfwGetPrimaryMonitor());

glfwWindowHint(GLFW_RED_BITS, mode->redBits);
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);

GLFWwindow* window = glfwCreateWindow(mode->width, mode->height, "Breakout", glfwGetPrimaryMonitor(), nullptr);
glfwMakeContextCurrent(window);

Expand Down Expand Up @@ -102,14 +106,14 @@ int main(int argc, char* argv[])
{
frameCounter = 0;

ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
//ImGui_ImplOpenGL3_NewFrame();
//ImGui_ImplGlfw_NewFrame();
//ImGui::NewFrame();

ImGui::Begin("Debug");
ImGui::SetWindowFontScale(1.5f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
ImGui::End();
//ImGui::Begin("Debug");
//ImGui::SetWindowFontScale(1.5f);
//ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
//ImGui::End();

// fixed update
// ------------
Expand All @@ -120,9 +124,9 @@ int main(int argc, char* argv[])
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
game->render();
ImGui::Render();
//ImGui::Render();

ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
//ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
glfwSwapBuffers(window);
}

Expand Down

0 comments on commit 1807ea0

Please sign in to comment.