small api cleanup

This commit is contained in:
Noel Berry 2020-08-27 19:43:47 -07:00
parent a32b08267a
commit b939391334
2 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
// Error / Abort // error / abort
#ifdef DEBUG #ifdef DEBUG
#include <stdlib.h> #include <stdlib.h>
@ -20,8 +20,9 @@
#endif #endif
#ifndef BLAH_MAX_MESSAGE // maximum length of a print/warn/error message
#define BLAH_MAX_MESSAGE 1024 #ifndef BLAH_MESSAGE
#define BLAH_MESSAGE 1024
#endif #endif
namespace Blah namespace Blah

View File

@ -20,15 +20,25 @@ namespace Blah
// time the application should pause for // time the application should pause for
static float pause_timer; static float pause_timer;
// pauses the entire application for the given time
static void pause_for(float time); static void pause_for(float time);
// returns true on the given time interval
static bool on_interval(float time, float delta, float interval, float offset = 0); static bool on_interval(float time, float delta, float interval, float offset = 0);
// returns true on the given time interval
static bool on_interval(float delta, float interval, float offset = 0); static bool on_interval(float delta, float interval, float offset = 0);
// returns true on the given time interval
static bool on_interval(float interval, float offset = 0); static bool on_interval(float interval, float offset = 0);
// returns true when the given timestamp is passed
static bool on_time(float time, float timestamp); static bool on_time(float time, float timestamp);
// returns true between time intervals
static bool between_interval(float time, float interval, float offset = 0); static bool between_interval(float time, float interval, float offset = 0);
// returns true between time intervals
static bool between_interval(float interval, float offset = 0); static bool between_interval(float interval, float offset = 0);
}; };
} }