Don't create stubs for unimplemented HLL functions

hll_call() prints the same message as the old stub functions if no
implementation is provided. This makes the --audit option more accurate.
This commit is contained in:
Nunuhara Cabbage
2020-08-26 17:30:22 -07:00
parent 3ee8fff8ae
commit d69bc33449
15 changed files with 404 additions and 404 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ static struct hll_function *link_static_library(struct ain_library *ainlib, stru
}
}
if (!dst[i].fun)
WARNING("Unimplemented library function: %s.%s", ainlib->name, ainlib->functions[i].name);
;//WARNING("Unimplemented library function: %s.%s", ainlib->name, ainlib->functions[i].name);
else if (ainlib->functions[i].nr_arguments >= HLL_MAX_ARGS)
ERROR("Too many arguments to library function: %s", ainlib->functions[i].name);
}
+7 -7
View File
@@ -29,7 +29,7 @@
struct acx *acx = NULL;
bool ACXLoader_Load(struct string *filename)
static bool ACXLoader_Load(struct string *filename)
{
char *path = gamedir_path(filename->text);
acx = acx_load(path);
@@ -37,23 +37,23 @@ bool ACXLoader_Load(struct string *filename)
return !!acx;
}
void ACXLoader_Release(void)
static void ACXLoader_Release(void)
{
acx_free(acx);
acx = NULL;
}
int ACXLoader_GetNumofLine(void)
static int ACXLoader_GetNumofLine(void)
{
return acx ? acx->nr_lines : 0;
}
int ACXLoader_GetNumofColumn(void)
static int ACXLoader_GetNumofColumn(void)
{
return acx ? acx->nr_columns : 0;
}
bool ACXLoader_GetDataInt(int line, int col, int *ptr)
static bool ACXLoader_GetDataInt(int line, int col, int *ptr)
{
if (!acx)
return false;
@@ -65,7 +65,7 @@ bool ACXLoader_GetDataInt(int line, int col, int *ptr)
return true;
}
bool ACXLoader_GetDataString(int line, int col, struct string **ptr)
static bool ACXLoader_GetDataString(int line, int col, struct string **ptr)
{
if (!acx)
return false;
@@ -77,7 +77,7 @@ bool ACXLoader_GetDataString(int line, int col, struct string **ptr)
return true;
}
bool ACXLoader_GetDataStruct(int line, struct page **page)
static bool ACXLoader_GetDataStruct(int line, struct page **page)
{
if (!acx)
return false;
+5 -5
View File
@@ -19,11 +19,11 @@
HLL_WARN_UNIMPLEMENTED( , void, Confirm2, Init, void *imainsystem);
HLL_WARN_UNIMPLEMENTED(1, int, Confirm2, ExistKeyFile, struct string *filename, int keynum);
HLL_UNIMPLEMENTED(int, Confirm2, CheckProtectFile, struct string *filename, int keynum);
HLL_UNIMPLEMENTED(int, Confirm2, CreateKeyFile, struct string *filename, int keynum);
//int Confirm2_CheckProtectFile(struct string *filename, int keynum);
//int Confirm2_CreateKeyFile(struct string *filename, int keynum);
void Confirm2_ExistKeyFile2(possibly_unused struct string *pIFileName, possibly_unused int nKeyNum, struct string **pIResult)
static void Confirm2_ExistKeyFile2(possibly_unused struct string *pIFileName, possibly_unused int nKeyNum, struct string **pIResult)
{
// XXX: this is the magic value for Yokubori Saboten
// need to check if this works for other games
@@ -33,6 +33,6 @@ void Confirm2_ExistKeyFile2(possibly_unused struct string *pIFileName, possibly_
HLL_LIBRARY(Confirm2,
HLL_EXPORT(Init, Confirm2_Init),
HLL_EXPORT(ExistKeyFile, Confirm2_ExistKeyFile),
HLL_EXPORT(CheckProtectFile, Confirm2_CheckProtectFile),
HLL_EXPORT(CreateKeyFile, Confirm2_CreateKeyFile),
//HLL_EXPORT(CheckProtectFile, Confirm2_CheckProtectFile),
//HLL_EXPORT(CreateKeyFile, Confirm2_CreateKeyFile),
HLL_EXPORT(ExistKeyFile2, Confirm2_ExistKeyFile2));
+135 -134
View File
@@ -21,102 +21,102 @@
#define TEX(sp_no) sact_get_texture(sp_no)
void DrawGraph_Copy(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_Copy(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_copy(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_CopyBright(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int rate)
static void DrawGraph_CopyBright(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int rate)
{
gfx_copy_bright(TEX(dst), dx, dy, TEX(src), sx, sy, w, h, rate);
}
void DrawGraph_CopyAMap(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_CopyAMap(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_copy_amap(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_CopySprite(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b)
static void DrawGraph_CopySprite(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b)
{
gfx_copy_sprite(TEX(dst), dx, dy, TEX(src), sx, sy, w, h, COLOR(r, g, b, 0));
}
void DrawGraph_CopyUseAMapUnder(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha)
static void DrawGraph_CopyUseAMapUnder(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha)
{
gfx_copy_use_amap_under(TEX(dst), dx, dy, TEX(src), sx, sy, w, h, alpha);
}
void DrawGraph_CopyUseAMapBorder(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha)
static void DrawGraph_CopyUseAMapBorder(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha)
{
gfx_copy_use_amap_border(TEX(dst), dx, dy, TEX(src), sx, sy, w, h, alpha);
}
void DrawGraph_CopyAMapMax(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_CopyAMapMax(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_copy_amap_max(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_CopyAMapMin(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_CopyAMapMin(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_copy_amap_min(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_BlendAMap(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_BlendAMap(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_blend_amap(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_BlendAMapAlpha(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha)
static void DrawGraph_BlendAMapAlpha(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha)
{
gfx_blend_amap_alpha(TEX(dst), dx, dy, TEX(src), sx, sy, w, h, alpha);
}
void DrawGraph_Fill(int dst, int x, int y, int w, int h, int r, int g, int b)
static void DrawGraph_Fill(int dst, int x, int y, int w, int h, int r, int g, int b)
{
gfx_fill(TEX(dst), x, y, w, h, r, g, b);
}
void DrawGraph_FillAlphaColor(int dst, int x, int y, int w, int h, int r, int g, int b, int rate)
static void DrawGraph_FillAlphaColor(int dst, int x, int y, int w, int h, int r, int g, int b, int rate)
{
gfx_fill_alpha_color(TEX(dst), x, y, w, h, r, g, b, rate);
}
void DrawGraph_FillAMap(int dst, int x, int y, int w, int h, int alpha)
static void DrawGraph_FillAMap(int dst, int x, int y, int w, int h, int alpha)
{
gfx_fill_amap(TEX(dst), x, y, w, h, alpha);
}
void DrawGraph_AddDA_DAxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_AddDA_DAxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_add_da_daxsa(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_CopyStretch(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh)
static void DrawGraph_CopyStretch(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh)
{
gfx_copy_stretch(TEX(dst), dx, dy, dw, dh, TEX(src), sx, sy, sw, sh);
}
void DrawGraph_CopyStretchAMap(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh)
static void DrawGraph_CopyStretchAMap(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh)
{
gfx_copy_stretch_amap(TEX(dst), dx, dy, dw, dh, TEX(src), sx, sy, sw, sh);
}
void DrawGraph_DrawTextToPMap(int dst, int x, int y, struct string *s)
static void DrawGraph_DrawTextToPMap(int dst, int x, int y, struct string *s)
{
gfx_draw_text_to_pmap(TEX(dst), x, y, s->text);
}
void DrawGraph_DrawTextToAMap(int dst, int x, int y, struct string *s)
static void DrawGraph_DrawTextToAMap(int dst, int x, int y, struct string *s)
{
gfx_draw_text_to_amap(TEX(dst), x, y, s->text);
}
void DrawGraph_SetFontColor(int r, int g, int b)
static void DrawGraph_SetFontColor(int r, int g, int b)
{
gfx_set_font_color(COLOR(r, g, b, 255));
}
void DrawGraph_GetFontColor(int *r, int *g, int *b)
static void DrawGraph_GetFontColor(int *r, int *g, int *b)
{
SDL_Color c = gfx_get_font_color();
*r = c.r;
@@ -124,144 +124,144 @@ void DrawGraph_GetFontColor(int *r, int *g, int *b)
*b = c.b;
}
void DrawGraph_CopyRotZoom(int dst, int src, int sx, int sy, int w, int h, float rotate, float mag)
static void DrawGraph_CopyRotZoom(int dst, int src, int sx, int sy, int w, int h, float rotate, float mag)
{
gfx_copy_rot_zoom(TEX(dst), TEX(src), sx, sy, w, h, rotate, mag);
}
void DrawGraph_CopyRotZoomAMap(int dst, int src, int sx, int sy, int w, int h, float rotate, float mag)
static void DrawGraph_CopyRotZoomAMap(int dst, int src, int sx, int sy, int w, int h, float rotate, float mag)
{
gfx_copy_rot_zoom_amap(TEX(dst), TEX(src), sx, sy, w, h, rotate, mag);
}
void DrawGraph_CopyRotZoomUseAMap(int dst, int src, int sx, int sy, int w, int h, float rotate, float mag)
static void DrawGraph_CopyRotZoomUseAMap(int dst, int src, int sx, int sy, int w, int h, float rotate, float mag)
{
gfx_copy_rot_zoom_use_amap(TEX(dst), TEX(src), sx, sy, w, h, rotate, mag);
}
void DrawGraph_CopyReverseLR(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_CopyReverseLR(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_copy_reverse_LR(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
void DrawGraph_CopyReverseAMapLR(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
static void DrawGraph_CopyReverseAMapLR(int dst, int dx, int dy, int src, int sx, int sy, int w, int h)
{
gfx_copy_reverse_amap_LR(TEX(dst), dx, dy, TEX(src), sx, sy, w, h);
}
bool DrawGraph_GetAlphaColor(int surface, int x, int y, int *a)
static bool DrawGraph_GetAlphaColor(int surface, int x, int y, int *a)
{
*a = sact_SP_GetAMapValue(surface, x, y);
return true;
}
void DrawGraph_SetFontName(struct string *text)
static void DrawGraph_SetFontName(struct string *text)
{
gfx_set_font_name(text->text);
}
HLL_UNIMPLEMENTED(void, DrawGraph, CopyColorReverse, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, Blend, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendSrcBright, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha, int rate);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendAddSatur, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendAMapSrcOnly, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendAMapColor, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendAMapColorAlpha, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b, int a);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendAMapBright, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int rate);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendAMapAlphaSrcBright, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha, int rate);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendUseAMapColor, int dst, int dx, int dy, int alpha, int ax, int ay, int w, int h, int r, int g, int b, int rate);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendScreen, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendMultiply, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendScreenAlpha, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha);
HLL_UNIMPLEMENTED(void, DrawGraph, FillAMapOverBorder, int dst, int x, int y, int w, int h, int alpha, int border);
HLL_UNIMPLEMENTED(void, DrawGraph, FillAMapUnderBorder, int dst, int x, int y, int w, int h, int alpha, int border);
HLL_UNIMPLEMENTED(void, DrawGraph, FillAMapGradationUD, int dst, int x, int y, int w, int h, int up_a, int down_a);
HLL_UNIMPLEMENTED(void, DrawGraph, FillScreen, int dst, int x, int y, int w, int h, int r, int g, int b);
HLL_UNIMPLEMENTED(void, DrawGraph, FillMultiply, int dst, int x, int y, int w, int h, int r, int g, int b);
HLL_UNIMPLEMENTED(void, DrawGraph, SaturDP_DPxSA, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, ScreenDA_DAxSA, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, SpriteCopyAMap, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int key);
HLL_UNIMPLEMENTED(void, DrawGraph, BlendDA_DAxSA, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, SubDA_DAxSA, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, BrightDestOnly, int dst, int x, int y, int w, int h, int rate);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyTextureWrap, int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh, int u, int v);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyTextureWrapAlpha, int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh, int u, int v, int alpha);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyStretchBlend, int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh, int alpha);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyStretchBlendAMap, int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyStretchInterp, int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyStretchAMapInterp, int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh);
//void DrawGraph_CopyColorReverse(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_Blend(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha);
//void DrawGraph_BlendSrcBright(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha, int rate);
//void DrawGraph_BlendAddSatur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_BlendAMapSrcOnly(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_BlendAMapColor(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b);
//void DrawGraph_BlendAMapColorAlpha(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int r, int g, int b, int a);
//void DrawGraph_BlendAMapBright(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int rate);
//void DrawGraph_BlendAMapAlphaSrcBright(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha, int rate);
//void DrawGraph_BlendUseAMapColor(int dst, int dx, int dy, int alpha, int ax, int ay, int w, int h, int r, int g, int b, int rate);
//void DrawGraph_BlendScreen(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_BlendMultiply(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_BlendScreenAlpha(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int alpha);
//void DrawGraph_FillAMapOverBorder(int dst, int x, int y, int w, int h, int alpha, int border);
//void DrawGraph_FillAMapUnderBorder(int dst, int x, int y, int w, int h, int alpha, int border);
//void DrawGraph_FillAMapGradationUD(int dst, int x, int y, int w, int h, int up_a, int down_a);
//void DrawGraph_FillScreen(int dst, int x, int y, int w, int h, int r, int g, int b);
//void DrawGraph_FillMultiply(int dst, int x, int y, int w, int h, int r, int g, int b);
//void DrawGraph_SaturDP_DPxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_ScreenDA_DAxSA(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_SpriteCopyAMap(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int key);
//void DrawGraph_BlendDA_DAxSA, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_SubDA_DAxSA, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_BrightDestOnly(int dst, int x, int y, int w, int h, int rate);
//void DrawGraph_CopyTextureWrap(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh, int u, int v);
//void DrawGraph_CopyTextureWrapAlpha(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh, int u, int v, int alpha);
//void DrawGraph_CopyStretchBlend(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh, int alpha);
//void DrawGraph_CopyStretchBlendAMap(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh);
//void DrawGraph_CopyStretchInterp(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh);
//void DrawGraph_CopyStretchAMapInterp(int dst, int dx, int dy, int dw, int dh, int src, int sx, int sy, int sw, int sh);
HLL_WARN_UNIMPLEMENTED(&EMPTY_STRING, struct string*, DrawGraph, GetFontName, void);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotZoom2Bilinear, int dst, float cx, float cy, int src, float scx, float scy, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateY, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateYUseAMap, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateYFixL, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateYFixR, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateYFixLUseAMap, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateYFixRUseAMap, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateX, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateXUseAMap, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateXFixU, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateXFixD, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateXFixUUseAMap, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyRotateXFixDUseAMap, int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyReverseUD, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyReverseAMapUD, int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyWidthBlur, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyHeightBlur, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyAMapWidthBlur, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
HLL_UNIMPLEMENTED(void, DrawGraph, CopyAMapHeightBlur, int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
HLL_UNIMPLEMENTED(void, DrawGraph, DrawLine, int dst, int x0, int y0, int x1, int y1, int r, int g, int b);
HLL_UNIMPLEMENTED(void, DrawGraph, DrawLineToAMap, int dst, int x0, int y0, int x1, int y1, int alpha);
HLL_UNIMPLEMENTED(void, DrawGraph, DrawPolygon, int dst, int tex, float x0, float y0, float z0, float u0, float v0, float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2);
HLL_UNIMPLEMENTED(void, DrawGraph, DrawColorPolygon, int dst, int tex, float x0, float y0, float z0, int r0, int g0, int b0, int a0, float x1, float y1, float z1, int r1, int g1, int b1, int a1, float x2, float y2, float z2, int r2, int g2, int b2, int a2);
//void DrawGraph_CopyRotZoom2Bilinear(int dst, float cx, float cy, int src, float scx, float scy, float rot, float mag);
//void DrawGraph_CopyRotateY(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateYUseAMap(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateYFixL(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateYFixR(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateYFixLUseAMap(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateYFixRUseAMap(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateX(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateXUseAMap(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateXFixU(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateXFixD(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateXFixUUseAMap(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyRotateXFixDUseAMap(int write, int dst, int src, int sx, int sy, int w, int h, float rot, float mag);
//void DrawGraph_CopyReverseUD(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_CopyReverseAMapUD(int dst, int dx, int dy, int src, int sx, int sy, int w, int h);
//void DrawGraph_CopyWidthBlur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
//void DrawGraph_CopyHeightBlur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
//void DrawGraph_CopyAMapWidthBlur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
//void DrawGraph_CopyAMapHeightBlur(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int blur);
//void DrawGraph_DrawLine(int dst, int x0, int y0, int x1, int y1, int r, int g, int b);
//void DrawGraph_DrawLineToAMap(int dst, int x0, int y0, int x1, int y1, int alpha);
//void DrawGraph_DrawPolygon(int dst, int tex, float x0, float y0, float z0, float u0, float v0, float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2);
//void DrawGraph_DrawColorPolygon(int dst, int tex, float x0, float y0, float z0, int r0, int g0, int b0, int a0, float x1, float y1, float z1, int r1, int g1, int b1, int a1, float x2, float y2, float z2, int r2, int g2, int b2, int a2);
HLL_LIBRARY(DrawGraph,
HLL_EXPORT(Copy, DrawGraph_Copy),
HLL_EXPORT(CopyBright, DrawGraph_CopyBright),
HLL_EXPORT(CopyAMap, DrawGraph_CopyAMap),
HLL_EXPORT(CopySprite, DrawGraph_CopySprite),
HLL_EXPORT(CopyColorReverse, DrawGraph_CopyColorReverse),
//HLL_EXPORT(CopyColorReverse, DrawGraph_CopyColorReverse),
HLL_EXPORT(CopyUseAMapUnder, DrawGraph_CopyUseAMapUnder),
HLL_EXPORT(CopyUseAMapBorder, DrawGraph_CopyUseAMapBorder),
HLL_EXPORT(CopyAMapMax, DrawGraph_CopyAMapMax),
HLL_EXPORT(CopyAMapMin, DrawGraph_CopyAMapMin),
HLL_EXPORT(Blend, DrawGraph_Blend),
HLL_EXPORT(BlendSrcBright, DrawGraph_BlendSrcBright),
HLL_EXPORT(BlendAddSatur, DrawGraph_BlendAddSatur),
//HLL_EXPORT(Blend, DrawGraph_Blend),
//HLL_EXPORT(BlendSrcBright, DrawGraph_BlendSrcBright),
//HLL_EXPORT(BlendAddSatur, DrawGraph_BlendAddSatur),
HLL_EXPORT(BlendAMap, DrawGraph_BlendAMap),
HLL_EXPORT(BlendAMapSrcOnly, DrawGraph_BlendAMapSrcOnly),
HLL_EXPORT(BlendAMapColor, DrawGraph_BlendAMapColor),
HLL_EXPORT(BlendAMapColorAlpha, DrawGraph_BlendAMapColorAlpha),
//HLL_EXPORT(BlendAMapSrcOnly, DrawGraph_BlendAMapSrcOnly),
//HLL_EXPORT(BlendAMapColor, DrawGraph_BlendAMapColor),
//HLL_EXPORT(BlendAMapColorAlpha, DrawGraph_BlendAMapColorAlpha),
HLL_EXPORT(BlendAMapAlpha, DrawGraph_BlendAMapAlpha),
HLL_EXPORT(BlendAMapBright, DrawGraph_BlendAMapBright),
HLL_EXPORT(BlendAMapAlphaSrcBright, DrawGraph_BlendAMapAlphaSrcBright),
HLL_EXPORT(BlendUseAMapColor, DrawGraph_BlendUseAMapColor),
HLL_EXPORT(BlendScreen, DrawGraph_BlendScreen),
HLL_EXPORT(BlendMultiply, DrawGraph_BlendMultiply),
HLL_EXPORT(BlendScreenAlpha, DrawGraph_BlendScreenAlpha),
//HLL_EXPORT(BlendAMapBright, DrawGraph_BlendAMapBright),
//HLL_EXPORT(BlendAMapAlphaSrcBright, DrawGraph_BlendAMapAlphaSrcBright),
//HLL_EXPORT(BlendUseAMapColor, DrawGraph_BlendUseAMapColor),
//HLL_EXPORT(BlendScreen, DrawGraph_BlendScreen),
//HLL_EXPORT(BlendMultiply, DrawGraph_BlendMultiply),
//HLL_EXPORT(BlendScreenAlpha, DrawGraph_BlendScreenAlpha),
HLL_EXPORT(Fill, DrawGraph_Fill),
HLL_EXPORT(FillAlphaColor, DrawGraph_FillAlphaColor),
HLL_EXPORT(FillAMap, DrawGraph_FillAMap),
HLL_EXPORT(FillAMapOverBorder, DrawGraph_FillAMapOverBorder),
HLL_EXPORT(FillAMapUnderBorder, DrawGraph_FillAMapUnderBorder),
HLL_EXPORT(FillAMapGradationUD, DrawGraph_FillAMapGradationUD),
HLL_EXPORT(FillScreen, DrawGraph_FillScreen),
HLL_EXPORT(FillMultiply, DrawGraph_FillMultiply),
HLL_EXPORT(SaturDP_DPxSA, DrawGraph_SaturDP_DPxSA),
HLL_EXPORT(ScreenDA_DAxSA, DrawGraph_ScreenDA_DAxSA),
//HLL_EXPORT(FillAMapOverBorder, DrawGraph_FillAMapOverBorder),
//HLL_EXPORT(FillAMapUnderBorder, DrawGraph_FillAMapUnderBorder),
//HLL_EXPORT(FillAMapGradationUD, DrawGraph_FillAMapGradationUD),
//HLL_EXPORT(FillScreen, DrawGraph_FillScreen),
//HLL_EXPORT(FillMultiply, DrawGraph_FillMultiply),
//HLL_EXPORT(SaturDP_DPxSA, DrawGraph_SaturDP_DPxSA),
//HLL_EXPORT(ScreenDA_DAxSA, DrawGraph_ScreenDA_DAxSA),
HLL_EXPORT(AddDA_DAxSA, DrawGraph_AddDA_DAxSA),
HLL_EXPORT(SpriteCopyAMap, DrawGraph_SpriteCopyAMap),
HLL_EXPORT(BlendDA_DAxSA, DrawGraph_BlendDA_DAxSA),
HLL_EXPORT(SubDA_DAxSA, DrawGraph_SubDA_DAxSA),
HLL_EXPORT(BrightDestOnly, DrawGraph_BrightDestOnly),
HLL_EXPORT(CopyTextureWrap, DrawGraph_CopyTextureWrap),
HLL_EXPORT(CopyTextureWrapAlpha, DrawGraph_CopyTextureWrapAlpha),
//HLL_EXPORT(SpriteCopyAMap, DrawGraph_SpriteCopyAMap),
//HLL_EXPORT(BlendDA_DAxSA, DrawGraph_BlendDA_DAxSA),
//HLL_EXPORT(SubDA_DAxSA, DrawGraph_SubDA_DAxSA),
//HLL_EXPORT(BrightDestOnly, DrawGraph_BrightDestOnly),
//HLL_EXPORT(CopyTextureWrap, DrawGraph_CopyTextureWrap),
//HLL_EXPORT(CopyTextureWrapAlpha, DrawGraph_CopyTextureWrapAlpha),
HLL_EXPORT(CopyStretch, DrawGraph_CopyStretch),
HLL_EXPORT(CopyStretchBlend, DrawGraph_CopyStretchBlend),
HLL_EXPORT(CopyStretchBlendAMap, DrawGraph_CopyStretchBlendAMap),
//HLL_EXPORT(CopyStretchBlend, DrawGraph_CopyStretchBlend),
//HLL_EXPORT(CopyStretchBlendAMap, DrawGraph_CopyStretchBlendAMap),
HLL_EXPORT(CopyStretchAMap, DrawGraph_CopyStretchAMap),
HLL_EXPORT(CopyStretchInterp, DrawGraph_CopyStretchInterp),
HLL_EXPORT(CopyStretchAMapInterp, DrawGraph_CopyStretchAMapInterp),
//HLL_EXPORT(CopyStretchInterp, DrawGraph_CopyStretchInterp),
//HLL_EXPORT(CopyStretchAMapInterp, DrawGraph_CopyStretchAMapInterp),
HLL_EXPORT(CopyReduce, DrawGraph_CopyStretch),
HLL_EXPORT(CopyReduceAMap, DrawGraph_CopyStretchAMap),
HLL_EXPORT(DrawTextToPMap, DrawGraph_DrawTextToPMap),
@@ -283,30 +283,31 @@ HLL_LIBRARY(DrawGraph,
HLL_EXPORT(CopyRotZoom, DrawGraph_CopyRotZoom),
HLL_EXPORT(CopyRotZoomAMap, DrawGraph_CopyRotZoomAMap),
HLL_EXPORT(CopyRotZoomUseAMap, DrawGraph_CopyRotZoomUseAMap),
HLL_EXPORT(CopyRotZoom2Bilinear, DrawGraph_CopyRotZoom2Bilinear),
HLL_EXPORT(CopyRotateY, DrawGraph_CopyRotateY),
HLL_EXPORT(CopyRotateYUseAMap, DrawGraph_CopyRotateYUseAMap),
HLL_EXPORT(CopyRotateYFixL, DrawGraph_CopyRotateYFixL),
HLL_EXPORT(CopyRotateYFixR, DrawGraph_CopyRotateYFixR),
HLL_EXPORT(CopyRotateYFixLUseAMap, DrawGraph_CopyRotateYFixLUseAMap),
HLL_EXPORT(CopyRotateYFixRUseAMap, DrawGraph_CopyRotateYFixRUseAMap),
HLL_EXPORT(CopyRotateX, DrawGraph_CopyRotateX),
HLL_EXPORT(CopyRotateXUseAMap, DrawGraph_CopyRotateXUseAMap),
HLL_EXPORT(CopyRotateXFixU, DrawGraph_CopyRotateXFixU),
HLL_EXPORT(CopyRotateXFixD, DrawGraph_CopyRotateXFixD),
HLL_EXPORT(CopyRotateXFixUUseAMap, DrawGraph_CopyRotateXFixUUseAMap),
HLL_EXPORT(CopyRotateXFixDUseAMap, DrawGraph_CopyRotateXFixDUseAMap),
//HLL_EXPORT(CopyRotZoom2Bilinear, DrawGraph_CopyRotZoom2Bilinear),
//HLL_EXPORT(CopyRotateY, DrawGraph_CopyRotateY),
//HLL_EXPORT(CopyRotateYUseAMap, DrawGraph_CopyRotateYUseAMap),
//HLL_EXPORT(CopyRotateYFixL, DrawGraph_CopyRotateYFixL),
//HLL_EXPORT(CopyRotateYFixR, DrawGraph_CopyRotateYFixR),
//HLL_EXPORT(CopyRotateYFixLUseAMap, DrawGraph_CopyRotateYFixLUseAMap),
//HLL_EXPORT(CopyRotateYFixRUseAMap, DrawGraph_CopyRotateYFixRUseAMap),
//HLL_EXPORT(CopyRotateX, DrawGraph_CopyRotateX),
//HLL_EXPORT(CopyRotateXUseAMap, DrawGraph_CopyRotateXUseAMap),
//HLL_EXPORT(CopyRotateXFixU, DrawGraph_CopyRotateXFixU),
//HLL_EXPORT(CopyRotateXFixD, DrawGraph_CopyRotateXFixD),
//HLL_EXPORT(CopyRotateXFixUUseAMap, DrawGraph_CopyRotateXFixUUseAMap),
//HLL_EXPORT(CopyRotateXFixDUseAMap, DrawGraph_CopyRotateXFixDUseAMap),
HLL_EXPORT(CopyReverseLR, DrawGraph_CopyReverseLR),
HLL_EXPORT(CopyReverseUD, DrawGraph_CopyReverseUD),
//HLL_EXPORT(CopyReverseUD, DrawGraph_CopyReverseUD),
HLL_EXPORT(CopyReverseAMapLR, DrawGraph_CopyReverseAMapLR),
HLL_EXPORT(CopyReverseAMapUD, DrawGraph_CopyReverseAMapUD),
HLL_EXPORT(CopyWidthBlur, DrawGraph_CopyWidthBlur),
HLL_EXPORT(CopyHeightBlur, DrawGraph_CopyHeightBlur),
HLL_EXPORT(CopyAMapWidthBlur, DrawGraph_CopyAMapWidthBlur),
HLL_EXPORT(CopyAMapHeightBlur, DrawGraph_CopyAMapHeightBlur),
HLL_EXPORT(DrawLine, DrawGraph_DrawLine),
HLL_EXPORT(DrawLineToAMap, DrawGraph_DrawLineToAMap),
//HLL_EXPORT(CopyReverseAMapUD, DrawGraph_CopyReverseAMapUD),
//HLL_EXPORT(CopyWidthBlur, DrawGraph_CopyWidthBlur),
//HLL_EXPORT(CopyHeightBlur, DrawGraph_CopyHeightBlur),
//HLL_EXPORT(CopyAMapWidthBlur, DrawGraph_CopyAMapWidthBlur),
//HLL_EXPORT(CopyAMapHeightBlur, DrawGraph_CopyAMapHeightBlur),
//HLL_EXPORT(DrawLine, DrawGraph_DrawLine),
//HLL_EXPORT(DrawLineToAMap, DrawGraph_DrawLineToAMap),
HLL_EXPORT(GetPixelColor, sact_SP_GetPixelValue),
HLL_EXPORT(GetAlphaColor, DrawGraph_GetAlphaColor),
HLL_EXPORT(DrawPolygon, DrawGraph_DrawPolygon),
HLL_EXPORT(DrawColorPolygon, DrawGraph_DrawColorPolygon));
HLL_EXPORT(GetAlphaColor, DrawGraph_GetAlphaColor)
//HLL_EXPORT(DrawPolygon, DrawGraph_DrawPolygon),
//HLL_EXPORT(DrawColorPolygon, DrawGraph_DrawColorPolygon)
);
+22 -13
View File
@@ -36,7 +36,7 @@ static char *file_contents = NULL;
static size_t file_size = 0;
static size_t file_cursor = 0;
int File_Open(struct string *filename, int type)
static int File_Open(struct string *filename, int type)
{
const char *mode;
if (type == 1) {
@@ -62,7 +62,7 @@ int File_Open(struct string *filename, int type)
return !!current_file;
}
int File_Close(void)
static int File_Close(void)
{
if (!current_file) {
VM_ERROR("File.Close called, but no open file");
@@ -77,7 +77,7 @@ int File_Close(void)
return r;
}
int File_Read(struct page **_page)
static int File_Read(struct page **_page)
{
struct page *page = *_page;
if (page->type != STRUCT_PAGE) {
@@ -121,7 +121,7 @@ int File_Read(struct page **_page)
return 1;
}
int File_Write(struct page *page)
static int File_Write(struct page *page)
{
if (!current_file) {
VM_ERROR("File.Write called, but no open file");
@@ -157,7 +157,7 @@ struct tagSaveDate {
*/
int File_GetTime(struct string *filename, struct page **page)
static int File_GetTime(struct string *filename, struct page **page)
{
struct stat s;
char *path = unix_path(filename->text);
@@ -187,7 +187,7 @@ int File_GetTime(struct string *filename, struct page **page)
return 1;
}
int File_Delete(struct string *name)
static int File_Delete(struct string *name)
{
char *path = unix_path(name->text);
if (remove(path)) {
@@ -198,20 +198,29 @@ int File_Delete(struct string *name)
return 1;
}
HLL_UNIMPLEMENTED(int, File, Copy, struct string *src, struct string *dst);
HLL_UNIMPLEMENTED(int, File, SetFind, struct string *name);
HLL_UNIMPLEMENTED(int, File, GetFind, struct string **name);
HLL_UNIMPLEMENTED(int, File, MakeDirectory, struct string *name);
static int File_MakeDirectory(struct string *name)
{
char *path = unix_path(name->text);
if (mkdir_p(path)) {
WARNING("mkdir_p: %s", strerror(errno));
}
free(path);
return 1;
}
//int File_Copy(struct string *src, struct string *dst);
//int File_SetFind(struct string *name);
//int File_GetFind(struct string **name);
HLL_LIBRARY(File,
HLL_EXPORT(Open, File_Open),
HLL_EXPORT(Close, File_Close),
HLL_EXPORT(Read, File_Read),
HLL_EXPORT(Write, File_Write),
HLL_EXPORT(Copy, File_Copy),
//HLL_EXPORT(Copy, File_Copy),
HLL_EXPORT(Delete, File_Delete),
HLL_EXPORT(GetTime, File_GetTime),
HLL_EXPORT(SetFind, File_SetFind),
HLL_EXPORT(GetFind, File_GetFind),
//HLL_EXPORT(SetFind, File_SetFind),
//HLL_EXPORT(GetFind, File_GetFind),
HLL_EXPORT(MakeDirectory, File_MakeDirectory));
+7 -7
View File
@@ -31,7 +31,7 @@ static Point pos;
static struct string *result;
void InputString_ClearResultString(void)
static void InputString_ClearResultString(void)
{
if (result)
free_string(result);
@@ -45,24 +45,24 @@ struct string *InputString_GetResultString(void)
return s;
}
void InputString_SetFont(int nSize, possibly_unused struct string *pIName, int nWeight)
static void InputString_SetFont(int nSize, possibly_unused struct string *pIName, int nWeight)
{
font_size = nSize;
font_weight = nWeight;
}
void InputString_SetPos(int nX, int nY)
static void InputString_SetPos(int nX, int nY)
{
pos.x = nX;
pos.y = nY;
}
void InputString_Begin(void)
static void InputString_Begin(void)
{
InputString_ClearResultString();
}
void InputString_End(void)
static void InputString_End(void)
{
InputString_ClearResultString();
}
@@ -81,14 +81,14 @@ static void handle_input(const char *text)
//{
//}
void InputString_OpenIME(void)
static void InputString_OpenIME(void)
{
register_input_handler(handle_input);
// register_editing_handler(handle_editing);
SDL_StartTextInput();
}
void InputString_CloseIME(void)
static void InputString_CloseIME(void)
{
SDL_StopTextInput();
clear_input_handler();
+20 -20
View File
@@ -28,56 +28,56 @@ static inline float deg2rad(float deg)
return deg * (M_PI / 180.0);
}
float Math_Cos(float x)
static float Math_Cos(float x)
{
return cosf(deg2rad(x));
}
float Math_Sin(float x)
static float Math_Sin(float x)
{
return sinf(deg2rad(x));
}
int Math_Min(int a, int b)
static int Math_Min(int a, int b)
{
return a < b ? a : b;
}
float Math_MinF(float a, float b)
static float Math_MinF(float a, float b)
{
return a < b ? a : b;
}
int Math_Max(int a, int b)
static int Math_Max(int a, int b)
{
return a > b ? a : b;
}
float Math_MaxF(float a, float b)
static float Math_MaxF(float a, float b)
{
return a > b ? a : b;
}
void Math_Swap(int *a, int *b)
static void Math_Swap(int *a, int *b)
{
int tmp = *a;
*a = *b;
*b = tmp;
}
void Math_SwapF(float *a, float *b)
static void Math_SwapF(float *a, float *b)
{
float tmp = *a;
*a = *b;
*b = tmp;
}
HLL_UNIMPLEMENTED(void, Math, SetRandMode, int mode);
HLL_UNIMPLEMENTED(float, Math, RandF, void);
HLL_UNIMPLEMENTED(void, Math, RandTableInit, int num, int size);
HLL_UNIMPLEMENTED(int, Math, RandTable, int num);
HLL_UNIMPLEMENTED(void, Math, RandTable2Init, int num, struct page *array);
HLL_UNIMPLEMENTED(int, Math, RandTable2, int num);
//void Math_SetRandMode(int mode);
//float Math_RandF(void);
//void Math_RandTableInit(int num, int size);
//int Math_RandTable(int num);
//void Math_RandTable2Init(int num, struct page *array);
//int Math_RandTable2(int num);
HLL_LIBRARY(Math,
HLL_EXPORT(Cos, Math_Cos),
@@ -89,13 +89,13 @@ HLL_LIBRARY(Math,
HLL_EXPORT(AbsF, fabsf),
HLL_EXPORT(Pow, powf),
HLL_EXPORT(SetSeed, srand),
HLL_EXPORT(SetRandMode, Math_SetRandMode),
//HLL_EXPORT(SetRandMode, Math_SetRandMode),
HLL_EXPORT(Rand, rand),
HLL_EXPORT(RandF, Math_RandF),
HLL_EXPORT(RandTableInit, Math_RandTableInit),
HLL_EXPORT(RandTable, Math_RandTable),
HLL_EXPORT(RandTable2Init, Math_RandTable2Init),
HLL_EXPORT(RandTable2, Math_RandTable2),
//HLL_EXPORT(RandF, Math_RandF),
//HLL_EXPORT(RandTableInit, Math_RandTableInit),
//HLL_EXPORT(RandTable, Math_RandTable),
//HLL_EXPORT(RandTable2Init, Math_RandTable2Init),
//HLL_EXPORT(RandTable2, Math_RandTable2),
HLL_EXPORT(Min, Math_Min),
HLL_EXPORT(MinF, Math_MinF),
HLL_EXPORT(Max, Math_Max),
+4 -4
View File
@@ -31,12 +31,12 @@ static size_t log_viewer_size = 0;
static size_t log_viewer_i = 0;
static struct log_data *log_viewer = NULL;
int MsgLogViewer_Numof(void)
static int MsgLogViewer_Numof(void)
{
return log_viewer_i;
}
void MsgLogViewer_Clear(void)
static void MsgLogViewer_Clear(void)
{
for (size_t i = 0; i < log_viewer_i; i++) {
free_string(log_viewer[i].text);
@@ -49,7 +49,7 @@ void MsgLogViewer_Clear(void)
HLL_WARN_UNIMPLEMENTED( , void, MsgLogViewer, Add, struct page *log);
void MsgLogViewer_Get(int index, struct page **log)
static void MsgLogViewer_Get(int index, struct page **log)
{
// ???
if ((size_t)index >= log_viewer_i) {
@@ -85,7 +85,7 @@ static void log_viewer_push(struct string *s, int voice, int separator)
int MsgLogManager_Numof(void);
void MsgLogViewer_ConvertFromMsgLogManager(possibly_unused int msg_log_manager)
static void MsgLogViewer_ConvertFromMsgLogManager(possibly_unused int msg_log_manager)
{
int log_size = MsgLogManager_Numof();
MsgLogViewer_Clear();
+7 -7
View File
@@ -50,7 +50,7 @@ static void msgskip_save(void)
static bool msgskip_initialized = false;
int MsgSkip_Init(struct string *name)
static int MsgSkip_Init(struct string *name)
{
if (msgskip_initialized)
return 1;
@@ -78,36 +78,36 @@ int MsgSkip_Init(struct string *name)
return 1;
}
void MsgSkip_SetFlag(int msgnum)
static void MsgSkip_SetFlag(int msgnum)
{
if (msgnum >= nr_flags)
return;
flags[msgnum] = 1;
}
int MsgSkip_GetFlag(int msgnum)
static int MsgSkip_GetFlag(int msgnum)
{
if (msgnum >= nr_flags)
return 0;
return !!flags[msgnum];
}
void MsgSkip_SetEnable(int enable)
static void MsgSkip_SetEnable(int enable)
{
enabled = !!enable;
}
int MsgSkip_GetEnable(void)
static int MsgSkip_GetEnable(void)
{
return enabled;
}
void MsgSkip_SetState(int _state)
static void MsgSkip_SetState(int _state)
{
state = _state;
}
int MsgSkip_GetState(void)
static int MsgSkip_GetState(void)
{
return state;
}
+1 -1
View File
@@ -19,7 +19,7 @@
#include "system4/string.h"
#include "system4/utfsjis.h"
void OutputLog_Output(int handle, struct string *s)
static void OutputLog_Output(int handle, struct string *s)
{
char *u = sjis2utf(s->text, s->size);
printf("%s", u);
+12 -11
View File
@@ -17,16 +17,17 @@
#include "hll.h"
HLL_WARN_UNIMPLEMENTED(0, int, PlayMovie, Init, void);
HLL_UNIMPLEMENTED(int, PlayMovie, Load, struct string *filename);
HLL_UNIMPLEMENTED(int, PlayMovie, Play, void);
HLL_UNIMPLEMENTED(void, PlayMovie, Stop, void);
HLL_UNIMPLEMENTED(int, PlayMovie, IsPlay, void);
HLL_UNIMPLEMENTED(void, PlayMovie, Release, void);
//int PlayMovie_Load(struct string *filename);
//int PlayMovie_Play(void);
//void PlayMovie_Stop(void);
//int PlayMovie_IsPlay(void);
//void PlayMovie_Release(void);
HLL_LIBRARY(PlayMovie,
HLL_EXPORT(Init, PlayMovie_Init),
HLL_EXPORT(Load, PlayMovie_Load),
HLL_EXPORT(Play, PlayMovie_Play),
HLL_EXPORT(Stop, PlayMovie_Stop),
HLL_EXPORT(IsPlay, PlayMovie_IsPlay),
HLL_EXPORT(Release, PlayMovie_Release));
HLL_EXPORT(Init, PlayMovie_Init)
//HLL_EXPORT(Load, PlayMovie_Load),
//HLL_EXPORT(Play, PlayMovie_Play),
//HLL_EXPORT(Stop, PlayMovie_Stop),
//HLL_EXPORT(IsPlay, PlayMovie_IsPlay),
//HLL_EXPORT(Release, PlayMovie_Release)
);
+108 -108
View File
@@ -31,12 +31,12 @@
#include "sact.h"
#include "xsystem4.h"
int sact_GAME_MSG_GetNumOf(void)
static int sact_GAME_MSG_GetNumOf(void)
{
return ain->nr_messages;
}
void sact_IntToZenkaku(struct string **s, int value, int figures, int zero_pad)
static void sact_IntToZenkaku(struct string **s, int value, int figures, int zero_pad)
{
int i;
char buf[512];
@@ -46,7 +46,7 @@ void sact_IntToZenkaku(struct string **s, int value, int figures, int zero_pad)
string_append_cstr(s, buf, i);
}
void sact_IntToHankaku(struct string **s, int value, int figures, int zero_pad)
static void sact_IntToHankaku(struct string **s, int value, int figures, int zero_pad)
{
int i;
char buf[512];
@@ -56,41 +56,41 @@ void sact_IntToHankaku(struct string **s, int value, int figures, int zero_pad)
string_append_cstr(s, buf, i);
}
int sact_Mouse_GetPos(int *x, int *y)
static int sact_Mouse_GetPos(int *x, int *y)
{
handle_events();
mouse_get_pos(x, y);
return mouse_focus && keyboard_focus;
}
int sact_Mouse_SetPos(int x, int y)
static int sact_Mouse_SetPos(int x, int y)
{
handle_events();
mouse_set_pos(x, y);
return mouse_focus && keyboard_focus;
}
void sact_Mouse_ClearWheel(void)
static void sact_Mouse_ClearWheel(void)
{
mouse_clear_wheel();
}
void sact_Mouse_GetWheel(int *forward, int *back)
static void sact_Mouse_GetWheel(int *forward, int *back)
{
mouse_get_wheel(forward, back);
}
void sact_Joypad_ClearKeyDownFlag(int n)
static void sact_Joypad_ClearKeyDownFlag(int n)
{
// TODO
}
int sact_Joypad_IsKeyDown(int num, int key)
static int sact_Joypad_IsKeyDown(int num, int key)
{
return 0; // TODO
}
bool sact_Joypad_GetAnalogStickStatus(int num, int type, float *degree, float *power)
static bool sact_Joypad_GetAnalogStickStatus(int num, int type, float *degree, float *power)
{
//hll_unimplemented_warning(SACT2, Joypad_GetAnalogStickStatus);
*degree = 0.0;
@@ -98,7 +98,7 @@ bool sact_Joypad_GetAnalogStickStatus(int num, int type, float *degree, float *p
return true;
}
bool sact_Joypad_GetDigitalStickStatus(int num, int type, bool *left, bool *right, bool *up, bool *down)
static bool sact_Joypad_GetDigitalStickStatus(int num, int type, bool *left, bool *right, bool *up, bool *down)
{
//hll_unimplemented_warning(SACT2, Joypad_GetDigitalStickStatus);
*left = false;
@@ -108,109 +108,109 @@ bool sact_Joypad_GetDigitalStickStatus(int num, int type, bool *left, bool *righ
return 1;
}
int sact_Key_ClearFlag(void)
static int sact_Key_ClearFlag(void)
{
key_clear_flag();
return 1;
}
int sact_Key_IsDown(int keycode)
static int sact_Key_IsDown(int keycode)
{
handle_events();
return key_is_down(keycode);
}
int sact_CG_IsExist(int cg_no)
static int sact_CG_IsExist(int cg_no)
{
return ald[ALDFILE_CG] && archive_exists(ald[ALDFILE_CG], cg_no - 1);
}
int sact_Music_IsExist(int n)
static int sact_Music_IsExist(int n)
{
return bgm_exists(n - 1);
}
int sact_Music_Prepare(int ch, int n)
static int sact_Music_Prepare(int ch, int n)
{
return bgm_prepare(ch, n - 1);
}
int sact_Music_Unprepare(int ch)
static int sact_Music_Unprepare(int ch)
{
return bgm_unprepare(ch);
}
int sact_Music_Play(int ch)
static int sact_Music_Play(int ch)
{
return bgm_play(ch);
}
int sact_Music_Stop(int ch)
static int sact_Music_Stop(int ch)
{
return bgm_stop(ch);
}
int sact_Music_IsPlay(int ch)
static int sact_Music_IsPlay(int ch)
{
return bgm_is_playing(ch);
}
int sact_Music_Fade(int ch, int time, int volume, int stop)
static int sact_Music_Fade(int ch, int time, int volume, int stop)
{
return bgm_fade(ch, time, volume, stop);
}
int sact_Sound_IsExist(int n)
static int sact_Sound_IsExist(int n)
{
return wav_exists(n - 1);
}
int sact_Sound_GetUnuseChannel(void)
static int sact_Sound_GetUnuseChannel(void)
{
return wav_get_unused_channel();
}
int sact_Sound_Prepare(int ch, int n)
static int sact_Sound_Prepare(int ch, int n)
{
return wav_prepare(ch, n - 1);
}
int sact_Sound_Unprepare(int ch)
static int sact_Sound_Unprepare(int ch)
{
return wav_unprepare(ch);
}
int sact_Sound_Play(int ch)
static int sact_Sound_Play(int ch)
{
return wav_play(ch);
}
int sact_Sound_Stop(int ch)
static int sact_Sound_Stop(int ch)
{
return wav_stop(ch);
}
int sact_Sound_IsPlay(int ch)
static int sact_Sound_IsPlay(int ch)
{
return wav_is_playing(ch);
}
int sact_Sound_Fade(int ch, int time, int volume, int stop)
static int sact_Sound_Fade(int ch, int time, int volume, int stop)
{
return wav_fade(ch, time, volume, stop);
}
int sact_Sound_ReverseLR(int ch)
static int sact_Sound_ReverseLR(int ch)
{
return wav_reverse_LR(ch);
}
int sact_Sound_GetTimeLength(int ch)
static int sact_Sound_GetTimeLength(int ch)
{
return wav_get_time_length(ch);
}
void sact_System_GetDate(int *year, int *month, int *mday, int *wday)
static void sact_System_GetDate(int *year, int *month, int *mday, int *wday)
{
time_t t = time(NULL);
struct tm *tm = localtime(&t);
@@ -221,7 +221,7 @@ void sact_System_GetDate(int *year, int *month, int *mday, int *wday)
*wday = tm->tm_wday;
}
void sact_System_GetTime(int *hour, int *min, int *sec, int *ms)
static void sact_System_GetTime(int *hour, int *min, int *sec, int *ms)
{
time_t t = time(NULL);
struct tm *tm = localtime(&t);
@@ -234,41 +234,41 @@ void sact_System_GetTime(int *hour, int *min, int *sec, int *ms)
*ms = ts.tv_nsec / 1000000;
}
void sact_CG_BlendAMapBin(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int border)
static void sact_CG_BlendAMapBin(int dst, int dx, int dy, int src, int sx, int sy, int w, int h, int border)
{
gfx_copy_use_amap_border(sact_get_texture(dst), dx, dy, sact_get_texture(src), sx, sy, w, h, border);
}
HLL_UNIMPLEMENTED(int, SACT2, Error, struct string *err);
HLL_UNIMPLEMENTED(int, SACT2, WP_GetSP, int sp);
HLL_UNIMPLEMENTED(int, SACT2, WP_SetSP, int sp);
//int SACT2_Error(struct string *err);
//int SACT2_WP_GetSP(int sp);
//int SACT2_WP_SetSP(int sp);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, EffectSetMask, int cg);
HLL_UNIMPLEMENTED(int, SACT2, EffectSetMaskSP, int sp);
//int SACT2_EffectSetMaskSP(int sp);
HLL_WARN_UNIMPLEMENTED( , void, SACT2, QuakeScreen, int amp_x, int amp_y, int time, int key);
HLL_UNIMPLEMENTED(void, SACT2, QUAKE_SET_CROSS, int amp_x, int amp_y);
HLL_UNIMPLEMENTED(void, SACT2, QUAKE_SET_ROTATION, int amp, int cycle);
HLL_UNIMPLEMENTED(int, SACT2, SP_SetCGFromFile, int sp, struct string *filename);
HLL_UNIMPLEMENTED(int, SACT2, SP_SaveCG, int sp, struct string *filename);
HLL_UNIMPLEMENTED(int, SACT2, SP_CreateCustom, int sp);
HLL_UNIMPLEMENTED(int, SACT2, SP_TextBackSpace, int sp_no);
HLL_UNIMPLEMENTED(void, SACT2, GAME_MSG_Get, int index, struct string **text);
HLL_UNIMPLEMENTED(int, SACT2, StringPopFront, struct string **dst, struct string **src);
HLL_UNIMPLEMENTED(int, SACT2, Joypad_GetNumof, void);
//void SACT2_QUAKE_SET_CROSS(int amp_x, int amp_y);
//void SACT2_QUAKE_SET_ROTATION(int amp, int cycle);
//int SACT2_SP_SetCGFromFile(int sp, struct string *filename);
//int SACT2_SP_SaveCG(int sp, struct string *filename);
//int SACT2_SP_CreateCustom(int sp);
//int SACT2_SP_TextBackSpace(int sp_no);
//void SACT2_GAME_MSG_Get(int index, struct string **text);
//int SACT2_StringPopFront(struct string **dst, struct string **src);
//int SACT2_Joypad_GetNumof(void);
HLL_WARN_UNIMPLEMENTED( , void, SACT2, JoypadQuake_Set, int num, int type, int magnitude);
HLL_UNIMPLEMENTED(int, SACT2, CSV_Load, struct string *filename);
HLL_UNIMPLEMENTED(int, SACT2, CSV_Save, void);
HLL_UNIMPLEMENTED(int, SACT2, CSV_SaveAs, struct string *filename);
HLL_UNIMPLEMENTED(int, SACT2, CSV_CountLines, void);
HLL_UNIMPLEMENTED(int, SACT2, CSV_CountColumns, void);
HLL_UNIMPLEMENTED(void, SACT2, CSV_Get, struct string **s, int line, int column);
HLL_UNIMPLEMENTED(int, SACT2, CSV_Set, int line, int column, struct string *data);
HLL_UNIMPLEMENTED(int, SACT2, CSV_GetInt, int line, int column);
HLL_UNIMPLEMENTED(void, SACT2, CSV_SetInt, int line, int column, int data);
HLL_UNIMPLEMENTED(void, SACT2, CSV_Realloc, int lines, int columns);
//int SACT2_CSV_Load(struct string *filename);
//int SACT2_CSV_Save(void);
//int SACT2_CSV_SaveAs(struct string *filename);
//int SACT2_CSV_CountLines(void);
//int SACT2_CSV_CountColumns(void);
//void SACT2_CSV_Get(struct string **s, int line, int column);
//int SACT2_CSV_Set(int line, int column, struct string *data);
//int SACT2_CSV_GetInt(int line, int column);
//void SACT2_CSV_SetInt(int line, int column, int data);
//void SACT2_CSV_Realloc(int lines, int columns);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_SetLoopCount, int ch, int count);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_GetLoopCount, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Music_SetLoopStartPos, int ch, int pos);
HLL_UNIMPLEMENTED(int, SACT2, Music_SetLoopEndPos, int ch, int pos);
//int SACT2_Music_SetLoopStartPos(int ch, int pos);
//int SACT2_Music_SetLoopEndPos(int ch, int pos);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_StopFade, int ch);
HLL_WARN_UNIMPLEMENTED(0, int, SACT2, Music_IsFade, int ch);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_Pause, int ch);
@@ -279,49 +279,49 @@ HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_GetLength, int ch);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_GetSamplePos, int ch);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_GetSampleLength, int ch);
HLL_WARN_UNIMPLEMENTED(1, int, SACT2, Music_Seek, int ch, int pos);
HLL_UNIMPLEMENTED(int, SACT2, Sound_SetLoopCount, int ch, int count);
HLL_UNIMPLEMENTED(int, SACT2, Sound_GetLoopCount, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Sound_StopFade, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Sound_IsFade, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Sound_GetPos, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Sound_GetLength, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Sound_GetVolume, int ch);
HLL_UNIMPLEMENTED(int, SACT2, Sound_GetGroupNum, int ch);
HLL_UNIMPLEMENTED(bool, SACT2, Sound_PrepareFromFile, int ch, struct string *filename);
HLL_UNIMPLEMENTED(void, SACT2, CG_RotateRGB, int dst, int dx, int dy, int w, int h, int rotate_type);
HLL_UNIMPLEMENTED(void, SACT2, Debug_Pause, void);
HLL_UNIMPLEMENTED(void, SACT2, Debug_GetFuncStack, struct string **s, int nest);
//int SACT2_Sound_SetLoopCount(int ch, int count);
//int SACT2_Sound_GetLoopCount(int ch);
//int SACT2_Sound_StopFade(int ch);
//int SACT2_Sound_IsFade(int ch);
//int SACT2_Sound_GetPos(int ch);
//int SACT2_Sound_GetLength(int ch);
//int SACT2_Sound_GetVolume(int ch);
//int SACT2_Sound_GetGroupNum(int ch);
//bool SACT2_Sound_PrepareFromFile(int ch, struct string *filename);
//void SACT2_CG_RotateRGB(int dst, int dx, int dy, int w, int h, int rotate_type);
//void SACT2_Debug_Pause(void);
//void SACT2_Debug_GetFuncStack(struct string **s, int nest);
HLL_WARN_UNIMPLEMENTED(0, int, SACT2, SP_SetBrightness, int sp_no, int brightness);
HLL_WARN_UNIMPLEMENTED(0, int, SACT2, SP_GetBrightness, int sp_no);
HLL_LIBRARY(SACT2,
HLL_EXPORT(_ModuleFini, sact_ModuleFini),
HLL_EXPORT(Init, sact_Init),
HLL_EXPORT(Error, SACT2_Error),
//HLL_EXPORT(Error, SACT2_Error),
HLL_EXPORT(SetWP, sact_SetWP),
HLL_EXPORT(SetWP_Color, sact_SetWP_Color),
HLL_EXPORT(WP_GetSP, SACT2_WP_GetSP),
HLL_EXPORT(WP_SetSP, SACT2_WP_SetSP),
//HLL_EXPORT(WP_GetSP, SACT2_WP_GetSP),
//HLL_EXPORT(WP_SetSP, SACT2_WP_SetSP),
HLL_EXPORT(GetScreenWidth, sact_GetScreenWidth),
HLL_EXPORT(GetScreenHeight, sact_GetScreenHeight),
HLL_EXPORT(GetMainSurfaceNumber, sact_GetMainSurfaceNumber),
HLL_EXPORT(Update, sact_Update),
HLL_EXPORT(Effect, sact_Effect),
HLL_EXPORT(EffectSetMask, SACT2_EffectSetMask),
HLL_EXPORT(EffectSetMaskSP, SACT2_EffectSetMaskSP),
//HLL_EXPORT(EffectSetMaskSP, SACT2_EffectSetMaskSP),
HLL_EXPORT(QuakeScreen, SACT2_QuakeScreen),
HLL_EXPORT(QUAKE_SET_CROSS, SACT2_QUAKE_SET_CROSS),
HLL_EXPORT(QUAKE_SET_ROTATION, SACT2_QUAKE_SET_ROTATION),
//HLL_EXPORT(QUAKE_SET_CROSS, SACT2_QUAKE_SET_CROSS),
//HLL_EXPORT(QUAKE_SET_ROTATION, SACT2_QUAKE_SET_ROTATION),
HLL_EXPORT(SP_GetUnuseNum, sact_SP_GetUnuseNum),
HLL_EXPORT(SP_Count, sact_SP_Count),
HLL_EXPORT(SP_Enum, sact_SP_Enum),
HLL_EXPORT(SP_GetMaxZ, sact_SP_GetMaxZ),
HLL_EXPORT(SP_SetCG, sact_SP_SetCG),
HLL_EXPORT(SP_SetCGFromFile, SACT2_SP_SetCGFromFile),
HLL_EXPORT(SP_SaveCG, SACT2_SP_SaveCG),
//HLL_EXPORT(SP_SetCGFromFile, SACT2_SP_SetCGFromFile),
//HLL_EXPORT(SP_SaveCG, SACT2_SP_SaveCG),
HLL_EXPORT(SP_Create, sact_SP_Create),
HLL_EXPORT(SP_CreatePixelOnly, sact_SP_CreatePixelOnly),
HLL_EXPORT(SP_CreateCustom, SACT2_SP_CreateCustom),
//HLL_EXPORT(SP_CreateCustom, SACT2_SP_CreateCustom),
HLL_EXPORT(SP_Delete, sact_SP_Delete),
HLL_EXPORT(SP_SetPos, sact_SP_SetPos),
HLL_EXPORT(SP_SetX, sact_SP_SetX),
@@ -348,7 +348,7 @@ HLL_LIBRARY(SACT2,
HLL_EXPORT(SP_TextClear, sact_SP_TextClear),
HLL_EXPORT(SP_TextHome, sact_SP_TextHome),
HLL_EXPORT(SP_TextNewLine, sact_SP_TextNewLine),
HLL_EXPORT(SP_TextBackSpace, SACT2_SP_TextBackSpace),
//HLL_EXPORT(SP_TextBackSpace, SACT2_SP_TextBackSpace),
HLL_EXPORT(SP_TextCopy, sact_SP_TextCopy),
HLL_EXPORT(SP_GetTextHomeX, sact_SP_GetTextHomeX),
HLL_EXPORT(SP_GetTextHomeY, sact_SP_GetTextHomeY),
@@ -359,17 +359,17 @@ HLL_LIBRARY(SACT2,
HLL_EXPORT(SP_IsPtIn, sact_SP_IsPtIn),
HLL_EXPORT(SP_IsPtInRect, sact_SP_IsPtInRect),
HLL_EXPORT(GAME_MSG_GetNumof, sact_GAME_MSG_GetNumOf),
HLL_EXPORT(GAME_MSG_Get, SACT2_GAME_MSG_Get),
//HLL_EXPORT(GAME_MSG_Get, SACT2_GAME_MSG_Get),
HLL_EXPORT(IntToZenkaku, sact_IntToZenkaku),
HLL_EXPORT(IntToHankaku, sact_IntToHankaku),
HLL_EXPORT(StringPopFront, SACT2_StringPopFront),
//HLL_EXPORT(StringPopFront, SACT2_StringPopFront),
HLL_EXPORT(Mouse_GetPos, sact_Mouse_GetPos),
HLL_EXPORT(Mouse_SetPos, sact_Mouse_SetPos),
HLL_EXPORT(Mouse_ClearWheel, sact_Mouse_ClearWheel),
HLL_EXPORT(Mouse_GetWheel, sact_Mouse_GetWheel),
HLL_EXPORT(Joypad_ClearKeyDownFlag, sact_Joypad_ClearKeyDownFlag),
HLL_EXPORT(Joypad_IsKeyDown, sact_Joypad_IsKeyDown),
HLL_EXPORT(Joypad_GetNumof, SACT2_Joypad_GetNumof),
//HLL_EXPORT(Joypad_GetNumof, SACT2_Joypad_GetNumof),
HLL_EXPORT(JoypadQuake_Set, SACT2_JoypadQuake_Set),
HLL_EXPORT(Joypad_GetAnalogStickStatus, sact_Joypad_GetAnalogStickStatus),
HLL_EXPORT(Joypad_GetDigitalStickStatus, sact_Joypad_GetDigitalStickStatus),
@@ -378,16 +378,16 @@ HLL_LIBRARY(SACT2,
HLL_EXPORT(Timer_Get, vm_time),
HLL_EXPORT(CG_IsExist, sact_CG_IsExist),
HLL_EXPORT(CG_GetMetrics, sact_CG_GetMetrics),
HLL_EXPORT(CSV_Load, SACT2_CSV_Load),
HLL_EXPORT(CSV_Save, SACT2_CSV_Save),
HLL_EXPORT(CSV_SaveAs, SACT2_CSV_SaveAs),
HLL_EXPORT(CSV_CountLines, SACT2_CSV_CountLines),
HLL_EXPORT(CSV_CountColumns, SACT2_CSV_CountColumns),
HLL_EXPORT(CSV_Get, SACT2_CSV_Get),
HLL_EXPORT(CSV_Set, SACT2_CSV_Set),
HLL_EXPORT(CSV_GetInt, SACT2_CSV_GetInt),
HLL_EXPORT(CSV_SetInt, SACT2_CSV_SetInt),
HLL_EXPORT(CSV_Realloc, SACT2_CSV_Realloc),
//HLL_EXPORT(CSV_Load, SACT2_CSV_Load),
//HLL_EXPORT(CSV_Save, SACT2_CSV_Save),
//HLL_EXPORT(CSV_SaveAs, SACT2_CSV_SaveAs),
//HLL_EXPORT(CSV_CountLines, SACT2_CSV_CountLines),
//HLL_EXPORT(CSV_CountColumns, SACT2_CSV_CountColumns),
//HLL_EXPORT(CSV_Get, SACT2_CSV_Get),
//HLL_EXPORT(CSV_Set, SACT2_CSV_Set),
//HLL_EXPORT(CSV_GetInt, SACT2_CSV_GetInt),
//HLL_EXPORT(CSV_SetInt, SACT2_CSV_SetInt),
//HLL_EXPORT(CSV_Realloc, SACT2_CSV_Realloc),
HLL_EXPORT(Music_IsExist, sact_Music_IsExist),
HLL_EXPORT(Music_Prepare, sact_Music_Prepare),
HLL_EXPORT(Music_Unprepare, sact_Music_Unprepare),
@@ -396,8 +396,8 @@ HLL_LIBRARY(SACT2,
HLL_EXPORT(Music_IsPlay, sact_Music_IsPlay),
HLL_EXPORT(Music_SetLoopCount, SACT2_Music_SetLoopCount),
HLL_EXPORT(Music_GetLoopCount, SACT2_Music_GetLoopCount),
HLL_EXPORT(Music_SetLoopStartPos, SACT2_Music_SetLoopStartPos),
HLL_EXPORT(Music_SetLoopEndPos, SACT2_Music_SetLoopEndPos),
//HLL_EXPORT(Music_SetLoopStartPos, SACT2_Music_SetLoopStartPos),
//HLL_EXPORT(Music_SetLoopEndPos, SACT2_Music_SetLoopEndPos),
HLL_EXPORT(Music_Fade, sact_Music_Fade),
HLL_EXPORT(Music_StopFade, SACT2_Music_StopFade),
HLL_EXPORT(Music_IsFade, SACT2_Music_IsFade),
@@ -416,24 +416,24 @@ HLL_LIBRARY(SACT2,
HLL_EXPORT(Sound_Play, sact_Sound_Play),
HLL_EXPORT(Sound_Stop, sact_Sound_Stop),
HLL_EXPORT(Sound_IsPlay, sact_Sound_IsPlay),
HLL_EXPORT(Sound_SetLoopCount, SACT2_Sound_SetLoopCount),
HLL_EXPORT(Sound_GetLoopCount, SACT2_Sound_GetLoopCount),
//HLL_EXPORT(Sound_SetLoopCount, SACT2_Sound_SetLoopCount),
//HLL_EXPORT(Sound_GetLoopCount, SACT2_Sound_GetLoopCount),
HLL_EXPORT(Sound_Fade, sact_Sound_Fade),
HLL_EXPORT(Sound_StopFade, SACT2_Sound_StopFade),
HLL_EXPORT(Sound_IsFade, SACT2_Sound_IsFade),
HLL_EXPORT(Sound_GetPos, SACT2_Sound_GetPos),
HLL_EXPORT(Sound_GetLength, SACT2_Sound_GetLength),
//HLL_EXPORT(Sound_StopFade, SACT2_Sound_StopFade),
//HLL_EXPORT(Sound_IsFade, SACT2_Sound_IsFade),
//HLL_EXPORT(Sound_GetPos, SACT2_Sound_GetPos),
//HLL_EXPORT(Sound_GetLength, SACT2_Sound_GetLength),
HLL_EXPORT(Sound_ReverseLR, sact_Sound_ReverseLR),
HLL_EXPORT(Sound_GetVolume, SACT2_Sound_GetVolume),
//HLL_EXPORT(Sound_GetVolume, SACT2_Sound_GetVolume),
HLL_EXPORT(Sound_GetTimeLength, sact_Sound_GetTimeLength),
HLL_EXPORT(Sound_GetGroupNum, SACT2_Sound_GetGroupNum),
HLL_EXPORT(Sound_PrepareFromFile, SACT2_Sound_PrepareFromFile),
//HLL_EXPORT(Sound_GetGroupNum, SACT2_Sound_GetGroupNum),
//HLL_EXPORT(Sound_PrepareFromFile, SACT2_Sound_PrepareFromFile),
HLL_EXPORT(System_GetDate, sact_System_GetDate),
HLL_EXPORT(System_GetTime, sact_System_GetTime),
HLL_EXPORT(CG_RotateRGB, SACT2_CG_RotateRGB),
//HLL_EXPORT(CG_RotateRGB, SACT2_CG_RotateRGB),
HLL_EXPORT(CG_BlendAMapBin, sact_CG_BlendAMapBin),
HLL_EXPORT(Debug_Pause, SACT2_Debug_Pause),
HLL_EXPORT(Debug_GetFuncStack, SACT2_Debug_GetFuncStack),
//HLL_EXPORT(Debug_Pause, SACT2_Debug_Pause),
//HLL_EXPORT(Debug_GetFuncStack, SACT2_Debug_GetFuncStack),
HLL_EXPORT(SP_GetAMapValue, sact_SP_GetAMapValue),
HLL_EXPORT(SP_GetPixelValue, sact_SP_GetPixelValue),
HLL_EXPORT(SP_SetBrightness, SACT2_SP_SetBrightness),
+64 -70
View File
@@ -85,38 +85,35 @@ static unsigned get_font_face(int font, float height)
}
*/
void SengokuRanceFont_AlphaComposite(int spriteNumberDest, int destX, int destY, int spriteNumberSrc, int srcX, int srcY, int w, int h);
//static void SengokuRanceFont_AlphaComposite(int spriteNumberDest, int destX, int destY, int spriteNumberSrc, int srcX, int srcY, int w, int h);
void SengokuRanceFont_SetFontType(int type)
static void SengokuRanceFont_SetFontType(int type)
{
WARNING("SengokuRanceFont.SetFontType(%d)", type);
}
void SengokuRanceFont_SetFontSize(float size)
static void SengokuRanceFont_SetFontSize(float size)
{
sr_tm.size = size;
}
void SengokuRanceFont_SetFontColor(int r, int g, int b)
static void SengokuRanceFont_SetFontColor(int r, int g, int b)
{
sr_tm.color.r = r;
sr_tm.color.g = g;
sr_tm.color.b = b;
}
void SengokuRanceFont_SetBoldWidth(float boldWidth)
{
// ???
}
//static void SengokuRanceFont_SetBoldWidth(float boldWidth);
void SengokuRanceFont_SetEdgeColor(int r, int g, int b)
static void SengokuRanceFont_SetEdgeColor(int r, int g, int b)
{
sr_tm.outline_color.r = r;
sr_tm.outline_color.g = g;
sr_tm.outline_color.b = b;
}
void SengokuRanceFont_SetEdgeWidth(float w)
static void SengokuRanceFont_SetEdgeWidth(float w)
{
sr_tm.outline_left = w;
sr_tm.outline_up = w;
@@ -124,28 +121,25 @@ void SengokuRanceFont_SetEdgeWidth(float w)
sr_tm.outline_down = w;
}
float SengokuRanceFont_GetTextWidth(struct string *str)
static float SengokuRanceFont_GetTextWidth(struct string *str)
{
return str->size * 8;
}
float SengokuRanceFont_GetCharacterWidth(int charCode)
{
return 8;
}
//static float SengokuRanceFont_GetCharacterWidth(int charCode);
void SengokuRanceFont_SetTextX(float x);
void SengokuRanceFont_SetTextY(int y);
void SengokuRanceFont_SetTextPos(float x, int y);
void SengokuRanceFont_SetScaleX(float scaleX);
void SengokuRanceFont_DrawTextToSprite(int spriteNumber, struct string *str);
void SengokuRanceFont_DrawTextPreload(struct string *str);
void SengokuRanceFont_SetFontFileName(struct string *fontName);
void SengokuRanceFont_SetCharacterSpacing(float characterSpacing);
void SengokuRanceFont_SetSpaceScaleX(float spaceScaleX);
void SengokuRanceFont_SetReduceDescender(int reduceDescender);
//static void SengokuRanceFont_SetTextX(float x);
//static void SengokuRanceFont_SetTextY(int y);
//static void SengokuRanceFont_SetTextPos(float x, int y);
//static void SengokuRanceFont_SetScaleX(float scaleX);
//static void SengokuRanceFont_DrawTextToSprite(int spriteNumber, struct string *str);
//static void SengokuRanceFont_DrawTextPreload(struct string *str);
//static void SengokuRanceFont_SetFontFileName(struct string *fontName);
//static void SengokuRanceFont_SetCharacterSpacing(float characterSpacing);
//static void SengokuRanceFont_SetSpaceScaleX(float spaceScaleX);
//static void SengokuRanceFont_SetReduceDescender(int reduceDescender);
void SengokuRanceFont_SP_ClearState(int sp_no)
static void SengokuRanceFont_SP_ClearState(int sp_no)
{
struct sact_sprite *sp = sact_get_sprite(sp_no);
if (!sp)
@@ -156,37 +150,37 @@ void SengokuRanceFont_SP_ClearState(int sp_no)
sp->text.pos.y = 0;
}
float SengokuRanceFont_SP_GetTextCharSpace(int spriteNumber);
float SengokuRanceFont_SP_GetTextHomeX(int spriteNumber);
int SengokuRanceFont_SP_GetTextHomeY(int spriteNumber);
int SengokuRanceFont_SP_GetTextLineSpace(int spriteNumber);
float SengokuRanceFont_SP_GetTextPosX(int spriteNumber);
int SengokuRanceFont_SP_GetTextPosY(int spriteNumber);
void SengokuRanceFont_SP_SetTextCharSpace(int spriteNumber, float characterSpacing);
//static float SengokuRanceFont_SP_GetTextCharSpace(int spriteNumber);
//static float SengokuRanceFont_SP_GetTextHomeX(int spriteNumber);
//static int SengokuRanceFont_SP_GetTextHomeY(int spriteNumber);
//static int SengokuRanceFont_SP_GetTextLineSpace(int spriteNumber);
//static float SengokuRanceFont_SP_GetTextPosX(int spriteNumber);
//static int SengokuRanceFont_SP_GetTextPosY(int spriteNumber);
//static void SengokuRanceFont_SP_SetTextCharSpace(int spriteNumber, float characterSpacing);
void SengokuRanceFont_SP_SetTextHome(int sp_no, float x, int y)
static void SengokuRanceFont_SP_SetTextHome(int sp_no, float x, int y)
{
sact_SP_SetTextHome(sp_no, x, y);
}
//void SengokuRanceFont_SP_SetTextLineSpace(int spriteNumber, int lineSpacing) {}
//static void SengokuRanceFont_SP_SetTextLineSpace(int spriteNumber, int lineSpacing) {}
void SengokuRanceFont_SP_SetTextPos(int sp_no, float x, int y)
static void SengokuRanceFont_SP_SetTextPos(int sp_no, float x, int y)
{
sact_SP_SetTextPos(sp_no, x, y);
}
//void SengokuRanceFont_SP_TextClear(int spriteNumber) {}
//void SengokuRanceFont_SP_TextCopy(int destSpriteNumber, int sourceSpriteNumber) {}
//static void SengokuRanceFont_SP_TextClear(int spriteNumber) {}
//static void SengokuRanceFont_SP_TextCopy(int destSpriteNumber, int sourceSpriteNumber) {}
void SengokuRanceFont_SP_TextHome(int sp_no, float size)
static void SengokuRanceFont_SP_TextHome(int sp_no, float size)
{
sact_SP_TextHome(sp_no, size);
}
void SengokuRanceFont_SP_TextNewLine(int spriteNumber, float fontSize);
//static void SengokuRanceFont_SP_TextNewLine(int spriteNumber, float fontSize);
void SengokuRanceFont_SP_SetTextMetricsClassic(int sp_no, struct page *page)
static void SengokuRanceFont_SP_SetTextMetricsClassic(int sp_no, struct page *page)
{
struct text_style *ts = get_sp_metrics(sp_no);
ts->font_type = get_font_type(256);
@@ -209,7 +203,7 @@ void SengokuRanceFont_SP_SetTextMetricsClassic(int sp_no, struct page *page)
ts->font_size = fnl_get_font_size(&fontlib->fonts[ts->font_type], ts->size);
}
void SengokuRanceFont_SP_SetTextStyle(int sp_no, struct page *page)
static void SengokuRanceFont_SP_SetTextStyle(int sp_no, struct page *page)
{
struct text_style *ts = get_sp_metrics(sp_no);
ts->font_type = get_font_type(page->values[0].i < 0 ? 256 : page->values[0].i);
@@ -235,7 +229,7 @@ void SengokuRanceFont_SP_SetTextStyle(int sp_no, struct page *page)
}
void SengokuRanceFont_SP_TextDraw(int sp_no, struct string *text)
static void SengokuRanceFont_SP_TextDraw(int sp_no, struct string *text)
{
struct sact_sprite *sp = sact_get_sprite(sp_no);
struct text_style *ts = get_sp_metrics(sp_no);
@@ -260,41 +254,41 @@ void SengokuRanceFont_SP_TextDraw(int sp_no, struct string *text)
sp->text.pos.x += fnl_draw_text(fontlib, ts, &sp->text.texture, sp->text.pos.x, sp->text.pos.y, text->text);
}
void SengokuRanceFont_SP_TextDrawPreload(int spriteNumber, struct string *text);
void SengokuRanceFont_SP_SetFontSize(int spriteNumber, float fontSize);
void SengokuRanceFont_SP_SetFontType(int spriteNumber, int fontType);
void SengokuRanceFont_SP_SetFontColor(int spriteNumber, int r, int g, int b);
void SengokuRanceFont_SP_SetBoldWidth(int spriteNumber, float boldWidth);
void SengokuRanceFont_SP_SetEdgeColor(int spriteNumber, int r, int g, int b);
void SengokuRanceFont_SP_SetEdgeWidth(int spriteNumber, float edgeWidth);
void SengokuRanceFont_SP_SetScaleX(int spriteNumber, float scaleX);
void SengokuRanceFont_SP_SetSpaceScaleX(int spriteNumber, float spaceScaleX);
float SengokuRanceFont_SP_GetFontSize(int spriteNumber);
int SengokuRanceFont_SP_GetFontType(int spriteNumber);
void SengokuRanceFont_SP_GetFontColor(int spriteNumber, int *r, int *g, int *b);
float SengokuRanceFont_SP_GetBoldWidth(int spriteNumber);
void SengokuRanceFont_SP_GetEdgeColor(int spriteNumber, int *r, int *g, int *b);
float SengokuRanceFont_SP_GetEdgeWidth(int spriteNumber);
float SengokuRanceFont_SP_GetScaleX(int spriteNumber);
float SengokuRanceFont_SP_GetSpaceScaleX(int spriteNumber);
//static void SengokuRanceFont_SP_TextDrawPreload(int spriteNumber, struct string *text);
//static void SengokuRanceFont_SP_SetFontSize(int spriteNumber, float fontSize);
//static void SengokuRanceFont_SP_SetFontType(int spriteNumber, int fontType);
//static void SengokuRanceFont_SP_SetFontColor(int spriteNumber, int r, int g, int b);
//static void SengokuRanceFont_SP_SetBoldWidth(int spriteNumber, float boldWidth);
//static void SengokuRanceFont_SP_SetEdgeColor(int spriteNumber, int r, int g, int b);
//static void SengokuRanceFont_SP_SetEdgeWidth(int spriteNumber, float edgeWidth);
//static void SengokuRanceFont_SP_SetScaleX(int spriteNumber, float scaleX);
//static void SengokuRanceFont_SP_SetSpaceScaleX(int spriteNumber, float spaceScaleX);
//static float SengokuRanceFont_SP_GetFontSize(int spriteNumber);
//static int SengokuRanceFont_SP_GetFontType(int spriteNumber);
//static void SengokuRanceFont_SP_GetFontColor(int spriteNumber, int *r, int *g, int *b);
//static float SengokuRanceFont_SP_GetBoldWidth(int spriteNumber);
//static void SengokuRanceFont_SP_GetEdgeColor(int spriteNumber, int *r, int *g, int *b);
//static float SengokuRanceFont_SP_GetEdgeWidth(int spriteNumber);
//static float SengokuRanceFont_SP_GetScaleX(int spriteNumber);
//static float SengokuRanceFont_SP_GetSpaceScaleX(int spriteNumber);
float SengokuRanceFont_GetActualFontSize(int font_type, float font_size)
static float SengokuRanceFont_GetActualFontSize(int font_type, float font_size)
{
font_type = get_font_type(font_type);
return fnl_get_font_size(&fontlib->fonts[font_type], font_size)->size;
}
float SengokuRanceFont_GetActualFontSizeRoundDown(int fontType, float fontSize);
int SengokuRanceFont_SP_GetTextLastCharCode(int spriteNumber);
void SengokuRanceFont_SP_SetTextLastCharCode(int spriteNumber, int lastChar);
int SengokuRanceFont_SP_GetReduceDescender(int spriteNumber);
//static float SengokuRanceFont_GetActualFontSizeRoundDown(int fontType, float fontSize);
//static int SengokuRanceFont_SP_GetTextLastCharCode(int spriteNumber);
//static void SengokuRanceFont_SP_SetTextLastCharCode(int spriteNumber, int lastChar);
//static int SengokuRanceFont_SP_GetReduceDescender(int spriteNumber);
void SengokuRanceFont_SP_SetReduceDescender(int spriteNumber, int reduceDescender)
static void SengokuRanceFont_SP_SetReduceDescender(int spriteNumber, int reduceDescender)
{
WARNING("SengokuRanceFont.SP_SetReduceDescender(%d, %d)", spriteNumber, reduceDescender);
}
void SengokuRanceFont_ModuleInit(void)
static void SengokuRanceFont_ModuleInit(void)
{
DIR *dir;
struct dirent *d;
@@ -326,10 +320,10 @@ HLL_LIBRARY(SengokuRanceFont,
//HLL_EXPORT(AlphaComposite, SengokuRanceFont_AlphaComposite),
HLL_EXPORT(SetFontType, SengokuRanceFont_SetFontType),
HLL_EXPORT(SetFontSize, SengokuRanceFont_SetFontSize),
//HLL_EXPORT(SetFontColor, SengokuRanceFont_SetFontColor),
HLL_EXPORT(SetFontColor, SengokuRanceFont_SetFontColor),
//HLL_EXPORT(SetBoldWidth, SengokuRanceFont_SetBoldWidth),
//HLL_EXPORT(SetEdgeColor, SengokuRanceFont_SetEdgeColor),
//HLL_EXPORT(SetEdgeWidth, SengokuRanceFont_SetEdgeWidth),
HLL_EXPORT(SetEdgeColor, SengokuRanceFont_SetEdgeColor),
HLL_EXPORT(SetEdgeWidth, SengokuRanceFont_SetEdgeWidth),
HLL_EXPORT(GetTextWidth, SengokuRanceFont_GetTextWidth),
//HLL_EXPORT(GetCharacterWidth, SengokuRanceFont_GetCharacterWidth),
//HLL_EXPORT(SetTextX, SengokuRanceFont_SetTextX),
+11 -11
View File
@@ -17,23 +17,23 @@
#include "hll.h"
#include "gfx/gfx.h"
int SystemServiceEx_GetOverlayPresent(void)
static int SystemServiceEx_GetOverlayPresent(void)
{
return 0;
}
HLL_UNIMPLEMENTED(int, SystemServiceEx, GetUpdateResult, void);
//int SystemServiceEx_GetUpdateResult(void);
HLL_WARN_UNIMPLEMENTED(0, int, SystemServiceEx, GetOverlayActive, void);
HLL_UNIMPLEMENTED(void, SystemServiceEx, UpdateMainSurface, int x, int y, int w, int h);
HLL_UNIMPLEMENTED(int, SystemServiceEx, GetHasPresented, void);
HLL_UNIMPLEMENTED(void, SystemServiceEx, ClearHasPresented, void);
//void SystemServiceEx_UpdateMainSurface(int x, int y, int w, int h);
//int SystemServiceEx_GetHasPresented(void);
//void SystemServiceEx_ClearHasPresented(void);
HLL_LIBRARY(SystemServiceEx,
HLL_EXPORT(GetUpdateResult, SystemServiceEx_GetUpdateResult),
//HLL_EXPORT(GetUpdateResult, SystemServiceEx_GetUpdateResult),
HLL_EXPORT(GetOverlayPresent, SystemServiceEx_GetOverlayPresent),
HLL_EXPORT(GetOverlayActive, SystemServiceEx_GetOverlayActive),
HLL_EXPORT(UpdateMainSurface, SystemServiceEx_UpdateMainSurface),
HLL_EXPORT(SetWaitVSync, gfx_set_wait_vsync),
HLL_EXPORT(GetHasPresented, SystemServiceEx_GetHasPresented),
HLL_EXPORT(ClearHasPresented, SystemServiceEx_ClearHasPresented));
//HLL_EXPORT(UpdateMainSurface, SystemServiceEx_UpdateMainSurface),
HLL_EXPORT(SetWaitVSync, gfx_set_wait_vsync)
//HLL_EXPORT(GetHasPresented, SystemServiceEx_GetHasPresented),
//HLL_EXPORT(ClearHasPresented, SystemServiceEx_ClearHasPresented)
);
-5
View File
@@ -24,11 +24,6 @@
#include "vm.h"
#include "system4.h"
#define HLL_UNIMPLEMENTED(rtype, libname, fname, ...) \
static rtype libname ## _ ## fname(__VA_ARGS__) { \
VM_ERROR("Unimplemented HLL function: " #libname "." #fname); \
}
#define HLL_WARN_UNIMPLEMENTED(rval, rtype, libname, fname, ...)\
static rtype libname ## _ ## fname(__VA_ARGS__) { \
WARNING("Unimplemented HLL function: " #libname "." #fname); \