ASCII-GFX
2.0
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include "gfx.h"
#include "scrollarea.h"
Functions | |
void | msleep (float ms) |
sleep for a period of time given in milli seconds More... | |
float | rnd () |
generate a random float number in the range [0,1[ More... | |
bool | is_repeating (float time, float period, float percent) |
check for a repeating time period More... | |
int | strpre (const char *pre, const char *str) |
check if a string starts with a prefix More... | |
const char * | get_arg (int n, int argc, char *argv[]) |
retrieve the n-th argument from the command line arguments More... | |
const char * | get_opt (int n, int argc, char *argv[], double *value, double default_value) |
retrieve the n-th option from the command line arguments More... | |
void | log_text (const char *format,...) |
print log text in overlay More... | |
void | log_float (float v) |
print float value to log overlay More... | |
void | log_vec2 (const Vec2 &v) |
print 2D vector to log overlay More... | |
void | log_vec3 (const Vec3 &v) |
print 3D vector to log overlay More... | |
void | log_mat3 (const Mat3 &m) |
print 3x3 matrix to log overlay More... | |
void | log_clear () |
clear log overlay More... | |
Variables | |
static int | log_line = 0 |
const char* get_arg | ( | int | n, |
int | argc, | ||
char * | argv[] | ||
) |
retrieve the n-th argument from the command line arguments
const char* get_opt | ( | int | n, |
int | argc, | ||
char * | argv[], | ||
double * | value = NULL , |
||
double | default_value = 0 |
||
) |
retrieve the n-th option from the command line arguments
bool is_repeating | ( | float | time, |
float | period, | ||
float | percent = 50 |
||
) |
check for a repeating time period
void log_clear | ( | ) |
clear log overlay
void log_float | ( | float | v | ) |
print float value to log overlay
void log_mat3 | ( | const Mat3 & | m | ) |
print 3x3 matrix to log overlay
void log_text | ( | const char * | format, |
... | |||
) |
print log text in overlay
void log_vec2 | ( | const Vec2 & | v | ) |
print 2D vector to log overlay
void log_vec3 | ( | const Vec3 & | v | ) |
print 3D vector to log overlay
void msleep | ( | float | ms | ) |
sleep for a period of time given in milli seconds
float rnd | ( | ) |
generate a random float number in the range [0,1[
int strpre | ( | const char * | pre, |
const char * | str | ||
) |
check if a string starts with a prefix
|
static |