mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Merge pull request #109 from kichikuou/sact
Change the second parameter of `sact_SP_SetShow` from bool to int
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ int sact_SP_SetY(int sp_no, int y);
|
||||
int sact_SP_SetZ(int sp, int z);
|
||||
int sact_SP_GetBlendRate(int sp_no);
|
||||
int sact_SP_SetBlendRate(int sp_no, int rate);
|
||||
int sact_SP_SetShow(int sp_no, bool show);
|
||||
int sact_SP_SetShow(int sp_no, int show);
|
||||
int sact_SP_SetDrawMethod(int sp_no, int method);
|
||||
int sact_SP_GetDrawMethod(int sp_no);
|
||||
int sact_SP_IsUsing(int sp_no);
|
||||
|
||||
+2
-2
@@ -361,11 +361,11 @@ int sact_SP_SetBlendRate(int sp_no, int rate)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int sact_SP_SetShow(int sp_no, bool show)
|
||||
int sact_SP_SetShow(int sp_no, int show)
|
||||
{
|
||||
struct sact_sprite *sp = sact_get_sprite(sp_no);
|
||||
if (!sp) return 0;
|
||||
sprite_set_show(sp, show);
|
||||
sprite_set_show(sp, !!show);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -175,6 +175,11 @@ struct texture *sprite_get_texture(struct sact_sprite *sp)
|
||||
return &sp->texture;
|
||||
}
|
||||
|
||||
static void _sprite_print(struct sprite *sp)
|
||||
{
|
||||
sprite_print((struct sact_sprite*)sp);
|
||||
}
|
||||
|
||||
void sprite_set_cg(struct sact_sprite *sp, struct cg *cg)
|
||||
{
|
||||
gfx_delete_texture(&sp->texture);
|
||||
@@ -184,6 +189,7 @@ void sprite_set_cg(struct sact_sprite *sp, struct cg *cg)
|
||||
sp->sp.has_pixel = true;
|
||||
sp->sp.has_alpha = cg->metrics.has_alpha;
|
||||
sp->sp.render = sprite_render;
|
||||
sp->sp.debug_print = _sprite_print;
|
||||
sprite_dirty(sp);
|
||||
}
|
||||
|
||||
@@ -212,6 +218,7 @@ void sprite_set_cg_2x(struct sact_sprite *sp, struct cg *cg)
|
||||
sp->sp.has_pixel = true;
|
||||
sp->sp.has_alpha = cg->metrics.has_alpha;
|
||||
sp->sp.render = sprite_render;
|
||||
sp->sp.debug_print = _sprite_print;
|
||||
sprite_dirty(sp);
|
||||
gfx_delete_texture(&tmp);
|
||||
}
|
||||
@@ -263,11 +270,6 @@ int sprite_save_cg(struct sact_sprite *sp, const char *path)
|
||||
return gfx_save_texture(sprite_get_texture(sp), path, ALCG_QNT);
|
||||
}
|
||||
|
||||
static void _sprite_print(struct sprite *sp)
|
||||
{
|
||||
sprite_print((struct sact_sprite*)sp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach pixel data to a sprite. The texture is initialized lazily.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user