Skip to content

Commit

Permalink
refactor: corrected some comments and vars, incremented version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Dec 1, 2024
1 parent bb512dc commit e39eb11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
10 changes: 5 additions & 5 deletions include/engine/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ class window {

struct GLFWwindow* glfw_window{nullptr};

uint16_t frame_width{0}; // vid_reader.height
uint16_t frame_height{0}; // vid_reader.height
uint16_t frame_width { 0 }; // vid_reader.height
uint16_t frame_height { 0 }; // vid_reader.height

GLuint video_texture;

glm::vec2 vertices[4] = {{-1, -1}, {-1, 1}, {1, 1}, {1, -1}};
glm::vec2 vertices[4] = { {-1, -1}, {-1, 1}, {1, 1}, {1, -1} };

void render_window_bar();

Expand All @@ -47,8 +47,8 @@ class window {
// This is a temp solution to forcing a video to play next frame.
std::string force_video_to_play{};

int button_texture_width = 0;
int button_texture_height = 0;
int button_texture_width { 0 };
int button_texture_height { 0 };
GLuint button_texture{};
GLuint hovered_button_texture{};
GLuint pressed_button_texture{};
Expand Down
12 changes: 5 additions & 7 deletions src/engine/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ window::window() {
exit(EXIT_FAILURE);
}

glfw_window = glfwCreateWindow(1280, 720, "Hexwave - 0.2", nullptr, nullptr);
glfw_window = glfwCreateWindow(1280, 720, "Hexwave - 0.3", nullptr, nullptr);

if (!glfw_window) {
std::cout << "Failed to create window." << "\n";
Expand Down Expand Up @@ -152,7 +152,7 @@ window::window() {
* End of ImGUI stuff
*/

result = ma_engine_init(NULL, &engine);
result = ma_engine_init(nullptr, &engine);
if (result != MA_SUCCESS) {
std::cerr << "Failed to initialize audio engine." << "\n";
abort();
Expand Down Expand Up @@ -181,18 +181,16 @@ void window::window_loop() {
ma_device_config device_config{};
ma_device device{};

bool started_audio = false;

int window_width{0};
int window_height{0};

int prev_window_width{ 0 };
int prev_window_height{ 0 };

ImVec2 uv0 = ImVec2(0.0f, 0.0f); // UV coordinates for lower-left
ImVec2 uv1 = ImVec2(1, 1);
ImVec2 uv0 = ImVec2(0.0f, 0.0f); // UV coordinates for lower-left
ImVec2 uv1 = ImVec2(1, 1); // UV coordinates for upper-right

ImVec4 bg_col = ImVec4(0.0f, 0.0f, 0.0f, 1.0f); // No Background
ImVec4 bg_col = ImVec4(0.0f, 0.0f, 0.0f, 1.0f); // No Background
ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); // No tint

while (!glfwWindowShouldClose(glfw_window)) {
Expand Down

0 comments on commit e39eb11

Please sign in to comment.