diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 83dfed52..1c2fbb1e 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -6,6 +6,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/editor.xml b/.idea/editor.xml
new file mode 100644
index 00000000..c324ce08
--- /dev/null
+++ b/.idea/editor.xml
@@ -0,0 +1,586 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/binocle/core/binocle_app.c b/src/binocle/core/binocle_app.c
index c44052c1..51147cfa 100644
--- a/src/binocle/core/binocle_app.c
+++ b/src/binocle/core/binocle_app.c
@@ -20,7 +20,7 @@ binocle_app binocle_app_new() {
return res;
}
-bool binocle_app_init(binocle_app *app, binocle_app_desc_t *desc) {
+bool binocle_app_init(binocle_app *app, const binocle_app_desc_t *desc) {
// Initialize time stuff
stm_setup();
diff --git a/src/binocle/core/binocle_app.h b/src/binocle/core/binocle_app.h
index a92407d5..9ca531e3 100644
--- a/src/binocle/core/binocle_app.h
+++ b/src/binocle/core/binocle_app.h
@@ -22,7 +22,7 @@ typedef struct binocle_app {
} binocle_app;
binocle_app binocle_app_new();
-bool binocle_app_init(binocle_app *app, binocle_app_desc_t *desc);
+bool binocle_app_init(binocle_app *app, const binocle_app_desc_t *desc);
void binocle_app_destroy(binocle_app *app);
#endif //BINOCLE_APP_H
diff --git a/src/binocle/core/binocle_timer.c b/src/binocle/core/binocle_timer.c
index 6c461ea4..0d265c9e 100644
--- a/src/binocle/core/binocle_timer.c
+++ b/src/binocle/core/binocle_timer.c
@@ -58,15 +58,15 @@ void binocle_timer_unpause(binocle_timer *timer) {
timer->pausedMark = 0;
}
-int32_t binocle_timer_is_running(binocle_timer *timer) {
+int32_t binocle_timer_is_running(const binocle_timer *timer) {
return timer->running;
}
-int32_t binocle_timer_is_paused(binocle_timer *timer) {
+int32_t binocle_timer_is_paused(const binocle_timer *timer) {
return timer->paused;
}
-uint32_t binocle_timer_delta(binocle_timer *timer) {
+uint32_t binocle_timer_delta(const binocle_timer *timer) {
if (binocle_timer_is_running(timer))
return binocle_timer_current_time(timer);
@@ -77,17 +77,17 @@ uint32_t binocle_timer_delta(binocle_timer *timer) {
if (timer->startMark == 0)
return 0;
- return (timer->stopMark) - (timer->startMark);
+ return timer->stopMark - timer->startMark;
}
-uint32_t binocle_timer_delta_ms(binocle_timer *timer) {
+uint32_t binocle_timer_delta_ms(const binocle_timer *timer) {
return binocle_timer_delta(timer) % 1000;
}
-uint32_t binocle_timer_delta_s(binocle_timer *timer) {
+uint32_t binocle_timer_delta_s(const binocle_timer *timer) {
return binocle_timer_delta(timer) / 1000;
}
-uint32_t binocle_timer_current_time(binocle_timer *timer) {
- return (SDL_GetTicks()) - (timer->startMark);
+uint32_t binocle_timer_current_time(const binocle_timer *timer) {
+ return SDL_GetTicks() - timer->startMark;
}
diff --git a/src/binocle/core/binocle_timer.h b/src/binocle/core/binocle_timer.h
index 67276efa..c64d0cde 100644
--- a/src/binocle/core/binocle_timer.h
+++ b/src/binocle/core/binocle_timer.h
@@ -38,22 +38,22 @@ void binocle_timer_restart(binocle_timer *timer);
void binocle_timer_unpause(binocle_timer *timer);
/// Tells if the timer's still running (hasn't called stop())
-int32_t binocle_timer_is_running(binocle_timer *timer);
+int32_t binocle_timer_is_running(const binocle_timer *timer);
/// Tells if the timer's paused.
-int32_t binocle_timer_is_paused(binocle_timer *timer);
+int32_t binocle_timer_is_paused(const binocle_timer *timer);
/// Returns the whole timer's difference in milisseconds.
// @note If the timer's not started, will return 0.
-uint32_t binocle_timer_delta(binocle_timer *timer);
+uint32_t binocle_timer_delta(const binocle_timer *timer);
/// Returns the milisseconds part of the timer's difference.
-uint32_t binocle_timer_delta_ms(binocle_timer *timer);
+uint32_t binocle_timer_delta_ms(const binocle_timer *timer);
/// Returns the seconds part of the timer's difference.
-uint32_t binocle_timer_delta_s(binocle_timer *timer);
+uint32_t binocle_timer_delta_s(const binocle_timer *timer);
/// Returns the difference between timer's start point and now.
-uint32_t binocle_timer_current_time(binocle_timer *timer);
+uint32_t binocle_timer_current_time(const binocle_timer *timer);
#endif //BINOCLE_TIMER_H