diff options
Diffstat (limited to 'kon/konstage.h')
| -rw-r--r-- | kon/konstage.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kon/konstage.h b/kon/konstage.h index 6c3b909..f19c5f0 100644 --- a/kon/konstage.h +++ b/kon/konstage.h @@ -62,7 +62,9 @@ typedef enum kon_prop { KON_PROP_X, KON_PROP_Y, KON_PROP_ALPHA, /* 0 to 1 */ - KON_PROP_SCALE, + KON_PROP_SCALE_X, + KON_PROP_SCALE_Y, + KON_PROP_ROTATION, /* radians, positive turns clockwise on screen, around the anchor */ KON_PROP_BRIGHTNESS, /* 1 as drawn, lower darkens it, the usual way to show who is not talking */ KON_PROP_COUNT } kon_prop_t; @@ -76,6 +78,8 @@ typedef struct kon_stageSprite { int flip; kon_layer_t layer; int z; /* higher is in front inside its layer, sprites with the same z go in the order they were added */ + kon_blend_t blend; /* add and screen for glows and light, multiply for shadows and colouring */ + uint32_t color; /* multiplies the picture's colours, 0xFFFFFFFF as drawn. only the colour is used, the alpha comes from KON_PROP_ALPHA */ int hiding; /* removes itself when it has faded out */ } kon_stageSprite_t; @@ -108,7 +112,7 @@ void kon_stageBackground(kon_stage_t *stage, const kon_image *image, kon_fit_t f a new background starts at zoom 1, focus 0.5 */ void kon_stageBackgroundView(kon_stage_t *stage, float zoom, float focusX, float focusY, float seconds, kon_ease_t ease); -/* a new sprite at 0, 0 in view, not faded in. returns its index or -1 when there is no room. src NULL is the whole image. +/* a new sprite at 0, 0 in view, not faded in. any picture can be a sprite: a face, a CG, a light beam in add blend, a vignette over the screen. returns its index or -1 when there is no room. src NULL is the whole image. it stands on the bottom middle of itself, change anchorX and anchorY on the sprite for anything else */ int kon_stageAdd(kon_stage_t *stage, const kon_image *image, const kon_rect_t *src, kon_layer_t layer); void kon_stageRemove(kon_stage_t *stage, int index); @@ -121,6 +125,10 @@ void kon_stageFrame(kon_stage_t *stage, int index, const kon_image *image, const void kon_stageTween(kon_stage_t *stage, int index, kon_prop_t prop, float to, float seconds, kon_ease_t ease); +/* a size as a multiple of the picture's own, 1 is as drawn. a negative one flips */ +void kon_stageScale(kon_stage_t *stage, int index, float scaleX, float scaleY, float seconds, kon_ease_t ease); +void kon_stageRotate(kon_stage_t *stage, int index, float radians, float seconds, kon_ease_t ease); + /* shorthands for a move, a fade and for walking to a slot along the bottom of the view */ void kon_stageMove(kon_stage_t *stage, int index, float x, float y, float seconds, kon_ease_t ease); void kon_stageFade(kon_stage_t *stage, int index, float alpha, float seconds, kon_ease_t ease); |
