- [NEW] res() without arguments returns width and height of window.
- [NEW] camera() without arguments returns 'x' and 'y' of camera. - [NEW] palcolor() to set or get a color from the palette (replaces setcolor() & getcolor() ). - [NEW] paltrans() to set or get which color index is transparent (replaces settrans() & gettrans() ). - [RENAME] sspr() to blit(), spr_r() to blit_r() - [NEW] mouse() returns both x and y mouse coordinates. - [DEPRECATED] setcolor(), getcolor(), settrans(), gettrans(), spr(), sspr(), spr_r(), mousex(), mousey(), abs(), ceil(), flr(), sgn(), sin(), cos(), atan2(), sqrt(), max(), mid(), min(), tostr(), ascii(), strlen(), fopen(), fopenres(), fclose(), feof(), fwritei(), fwrited(), fwrites(), fwritew(), fwriteb(), fwriteln(), freadi(), freadd(), freads(), freadw(), freadb() - [FIX] Now the background on resizable windows is filled with black instead of garbage. - [FIX] Compiling on Linux uses POSIX functions.
This commit is contained in:
47
mini.h
47
mini.h
@@ -188,8 +188,8 @@ void sset(int x, int y);
|
||||
void sset(int x, int y, uint8_t color);
|
||||
|
||||
void spr(uint8_t n, int x, int y, float w = 1.0f, float h = 1.0f, bool flip_x = false, bool flip_y = false);
|
||||
void sspr(int sx, int sy, int sw, int sh, int dx, int dy, int dw=0, int dh=0, bool flip_x = false, bool flip_y = false, bool invert = false);
|
||||
void spr_r(int sx, int sy, int sw, int sh, int x, int y, float a);
|
||||
void blit(int sx, int sy, int sw, int sh, int dx, int dy, int dw=0, int dh=0, bool flip_x = false, bool flip_y = false, bool invert = false);
|
||||
void blit_r(int sx, int sy, int sw, int sh, int x, int y, float a);
|
||||
|
||||
void tline(int x0, int y0, int x1, int y1, float mx, float my, float mdx=0.125f, float mdy=0.0f);
|
||||
void thline(int x0, int y, int x1, float mx, float my, float mdx=0.125f, float mdy=0.0f);
|
||||
@@ -221,53 +221,10 @@ bool mbtnp(uint8_t i);
|
||||
float time();
|
||||
bool beat(int16_t i);
|
||||
|
||||
//float abs(float x);
|
||||
|
||||
float flr(float x);
|
||||
float sgn(float x);
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
float ceil(float x);
|
||||
float sin(float x);
|
||||
float cos(float x);
|
||||
float atan2(float dx, float dy);
|
||||
float sqrt(float x);
|
||||
#endif
|
||||
|
||||
float max(float x, float y);
|
||||
float mid(float x, float y, float z);
|
||||
float min(float x, float y);
|
||||
|
||||
int utfstrlen(const char *str);
|
||||
|
||||
int rnd(int x);
|
||||
//void srand(int x);
|
||||
|
||||
const char* tostr(int val);
|
||||
|
||||
//void debug(const char *str);
|
||||
#define debug printf
|
||||
|
||||
uint8_t ascii(const char *str, uint8_t index);
|
||||
|
||||
void fopen(const char *filename, uint8_t mode=0);
|
||||
void fopenres(const char *filename);
|
||||
void fclose();
|
||||
bool feof();
|
||||
|
||||
void fwritei(int value);
|
||||
void fwrited(float value);
|
||||
void fwrites(const char *value);
|
||||
void fwritew(const char *value);
|
||||
void fwriteb(bool value);
|
||||
void fwriteln();
|
||||
|
||||
int freadi();
|
||||
float freadd();
|
||||
const char *freads();
|
||||
const char *freadw();
|
||||
bool freadb();
|
||||
|
||||
void playmusic(const char *filename, const int loop=-1);
|
||||
void pausemusic();
|
||||
void resumemusic();
|
||||
|
||||
Reference in New Issue
Block a user