mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-22 15:02:20 +00:00
[BUG] The library could now be used in C++
This commit is contained in:
parent
7643508990
commit
2f9443033d
2 changed files with 21 additions and 14 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "../libpng/pngu/pngu.h"
|
||||
#include "../libjpeg/jpeglib.h"
|
||||
#include "GRRLIB.h"
|
||||
|
||||
#define DEFAULT_FIFO_SIZE (256 * 1024)
|
||||
|
||||
u32 fb = 0;
|
||||
|
@ -149,11 +150,11 @@ GRRLIB_texImg GRRLIB_LoadTexturePNG(const unsigned char my_png[]) {
|
|||
* @param height
|
||||
*/
|
||||
static void RawTo4x4RGBA(const unsigned char *src, void *dst, const unsigned int width, const unsigned int height) {
|
||||
unsigned int block = 0;
|
||||
unsigned int i = 0;
|
||||
unsigned int c = 0;
|
||||
unsigned int ar = 0;
|
||||
unsigned int gb = 0;
|
||||
unsigned int block;
|
||||
unsigned int i;
|
||||
unsigned int c;
|
||||
unsigned int ar;
|
||||
unsigned int gb;
|
||||
unsigned char *p = (unsigned char*)dst;
|
||||
|
||||
for (block = 0; block < height; block += 4) {
|
||||
|
@ -383,7 +384,7 @@ inline void GRRLIB_DrawTile(f32 xpos, f32 ypos, GRRLIB_texImg tex, float degrees
|
|||
* @param zoom
|
||||
* @param ... Optional arguments.
|
||||
*/
|
||||
void GRRLIB_Printf(f32 xpos, f32 ypos, GRRLIB_texImg tex, u32 color, f32 zoom, char *text, ...){
|
||||
void GRRLIB_Printf(f32 xpos, f32 ypos, GRRLIB_texImg tex, u32 color, f32 zoom, const char *text, ...){
|
||||
int i, size;
|
||||
char tmp[1024];
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
#include <gccore.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @struct GRRLIB_texImg
|
||||
|
@ -57,7 +60,7 @@ void GRRLIB_InitTileSet(struct GRRLIB_texImg *tex, unsigned int tilew, unsigned
|
|||
inline void GRRLIB_DrawImg(f32 xpos, f32 ypos, GRRLIB_texImg tex, float degrees, float scaleX, f32 scaleY, u32 color );
|
||||
inline void GRRLIB_DrawTile(f32 xpos, f32 ypos, GRRLIB_texImg tex, float degrees, float scaleX, f32 scaleY, u32 color, int frame);
|
||||
|
||||
void GRRLIB_Printf(f32 xpos, f32 ypos, GRRLIB_texImg tex, u32 color, f32 zoom, char *text,...);
|
||||
void GRRLIB_Printf(f32 xpos, f32 ypos, GRRLIB_texImg tex, u32 color, f32 zoom, const char *text, ...);
|
||||
|
||||
|
||||
void GRRLIB_GXEngine(Vector v[], u32 color, long count, u8 fmt);
|
||||
|
@ -67,5 +70,8 @@ void GRRLIB_InitVideo ();
|
|||
void GRRLIB_Start();
|
||||
void GRRLIB_Render ();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue