catmario/lib.h

65 lines
1.8 KiB
C
Raw Normal View History

2015-10-31 01:28:53 +08:00
#include <stdint.h>
#include <emscripten.h>
typedef uint8_t byte;
#define TRUE 1
#define FALSE 0
#define DX_FONTTYPE_EDGE (1) // <20><><EFBFBD>å<EFBFBD><C3A5>Ĥ<EFBFBD><C4A4>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>
#define DX_FONTTYPE_NORMAL (0) // <20>Ω`<60>ޥ<EFBFBD><DEA5>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>
2015-10-31 23:32:44 +08:00
#define PAD_INPUT_LEFT (0x01)
#define PAD_INPUT_RIGHT (0x02)
#define PAD_INPUT_DOWN (0x04)
#define PAD_INPUT_UP (0x08)
2015-11-01 14:28:46 +08:00
#define PAD_INPUT_JUMP (0x10)
#define PAD_INPUT_CLICK (0x20)
#define PAD_INPUT_ACTION (PAD_INPUT_JUMP | PAD_INPUT_CLICK)
2015-10-31 01:28:53 +08:00
extern "C" {
void input_init();
int input_waitkey(void);
2015-10-31 23:32:44 +08:00
int input_get();
2015-10-31 01:28:53 +08:00
int graphics_init();
2015-10-31 23:32:44 +08:00
void begindraw();
void enddraw();
2015-10-31 01:28:53 +08:00
int loadimage(const char *FileName);
int subimage(int SrcX, int SrcY, int Width, int Height, int SrcGraphHandle);
void getimagesize(int GrHandle, int *SizeXBuf, int *SizeYBuf);
void clearscreen();
void drawline(int a, int b, int c, int d);
void drawrect(int a, int b, int c, int d);
void fillrect(int a, int b, int c, int d);
void drawarc(int a, int b, int c, int d);
void fillarc(int a, int b, int c, int d);
void setcolor(int red, int green, int blue);
void setc0();
void setc1();
void setmirror(int mirror);
void drawimage(int mx, int a, int b);
void drawimageflip(int mx, int a, int b);
void setfont(int x, int y);
int setfonttype(int FontType);
int drawstring(int x, int y, const char *String);
void sound_init();
void soundplay(int x);
void soundstop(int x);
int soundcheck(int x);
void bgmchange(int x);
void bgmplay();
void bgmstop();
int getrand(int value);
int gettime();
2015-11-01 14:28:46 +08:00
void adshow();
void adhide();
void updatescore(int score, int life);
2015-10-31 01:28:53 +08:00
}