mirror of
https://github.com/thepigeongenerator/mcaselector-lite
synced 2026-02-08 07:33:35 +01:00
code semantic fixups
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2025 Quinn
|
// Copyright (c) 2025 Quinn
|
||||||
// Licensed under the MIT Licence. See LICENSE for details
|
// Licensed under the MIT Licence. See LICENSE for details
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
void key_callback(GLFWwindow* win, int key, int scancode, int action, int mods);
|
void key_callback(GLFWwindow* win, int key, int scancode, int action, int mods);
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,12 @@
|
|||||||
#undef GLAD_GL_IMPLEMENTATION
|
#undef GLAD_GL_IMPLEMENTATION
|
||||||
|
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "io/window.h"
|
#include "io/window.h"
|
||||||
|
|
||||||
|
|
||||||
#define WIN_NAME "MCA Selector Lite"
|
#define WIN_NAME "MCA Selector Lite"
|
||||||
#define WIN_DEFAULT_WIDTH 640
|
#define WIN_DEFAULT_WIDTH 640
|
||||||
#define WIN_DEFAULT_HEIGHT 480
|
#define WIN_DEFAULT_HEIGHT 480
|
||||||
@@ -29,7 +31,12 @@ static inline void quit(void) {
|
|||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
(void)argc, (void)argv;
|
(void)argc, (void)argv;
|
||||||
|
|
||||||
if (init()) fatal("failed to initialize!");
|
if (init()) fatal("failed to initialize!");
|
||||||
|
|
||||||
window_loop();
|
window_loop();
|
||||||
quit();
|
quit();
|
||||||
|
|
||||||
|
// return success, since some architectures do not follow 0=success
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "../atrb.h"
|
#include "../atrb.h"
|
||||||
|
|
||||||
// stores a 3D point using a floating-point number
|
// stores a 2D point using a floating-point number
|
||||||
struct float2 {
|
struct float2 {
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
@@ -42,7 +42,7 @@ atrb_const static inline float2 float2_div_s(float2 v, float n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
atrb_const static inline float2 float2_neg(float2 v) {
|
atrb_const static inline float2 float2_neg(float2 v) {
|
||||||
return (float2){-v.x, -v.y };
|
return (float2){-v.x, -v.y};
|
||||||
}
|
}
|
||||||
|
|
||||||
// gets the squared magnitude/length of float2
|
// gets the squared magnitude/length of float2
|
||||||
|
|||||||
Reference in New Issue
Block a user