graphics everywheresvn diff | less! anigif everywheresvn diff | less! :)
This commit is contained in:
parent
f5f3e02331
commit
528a6606e6
|
@ -459,24 +459,40 @@ static void anigif_do(void *data)
|
||||||
{
|
{
|
||||||
void *v;
|
void *v;
|
||||||
img_t img;
|
img_t img;
|
||||||
if (gfx_frame_gif(el_img(el_spic))) {
|
|
||||||
|
if (gfx_frame_gif(el_img(el_spic))) { /* scene */
|
||||||
game_cursor(CURSOR_ON);
|
game_cursor(CURSOR_ON);
|
||||||
gfx_update_gif(el_img(el_spic));
|
gfx_update_gif(el_img(el_spic));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (v = NULL; (img = txt_layout_image(txt_box_layout(el_box(el_inv)), &v)); ) {
|
for (v = NULL; (img = txt_layout_images(txt_box_layout(el_box(el_scene)), &v)); ) { /* scene */
|
||||||
|
if ((img != el_img(el_spic)) && gfx_frame_gif(img)) {
|
||||||
|
game_cursor(CURSOR_ON);
|
||||||
|
gfx_update_gif(img);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (v = NULL; (img = txt_layout_images(txt_box_layout(el_box(el_inv)), &v)); ) { /* inv */
|
||||||
if (gfx_frame_gif(img)) {
|
if (gfx_frame_gif(img)) {
|
||||||
game_cursor(CURSOR_ON);
|
game_cursor(CURSOR_ON);
|
||||||
gfx_update_gif(img);
|
gfx_update_gif(img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (v = NULL; (img = txt_layout_image(txt_box_layout(el_box(el_scene)), &v)); ) {
|
for (v = NULL; (img = txt_layout_images(el_layout(el_title), &v)); ) { /* title */
|
||||||
if ((img != el_img(el_spic)) && gfx_frame_gif(img)) {
|
if (gfx_frame_gif(img)) {
|
||||||
game_cursor(CURSOR_ON);
|
game_cursor(CURSOR_ON);
|
||||||
gfx_update_gif(img);
|
gfx_update_gif(img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (v = NULL; (img = txt_layout_images(el_layout(el_ways), &v)); ) { /* ways */
|
||||||
|
if (gfx_frame_gif(img)) {
|
||||||
|
game_cursor(CURSOR_ON);
|
||||||
|
gfx_update_gif(img);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int counter_fn(int interval, void *p)
|
int counter_fn(int interval, void *p)
|
||||||
|
@ -645,10 +661,10 @@ int el_clear(int n)
|
||||||
o->drawn = 0;
|
o->drawn = 0;
|
||||||
game_clear(x, y, w, h);
|
game_clear(x, y, w, h);
|
||||||
if (o->type == elt_box) {
|
if (o->type == elt_box) {
|
||||||
for (v = NULL; (img = txt_layout_image(txt_box_layout(el_box(n)), &v)); )
|
for (v = NULL; (img = txt_layout_images(txt_box_layout(el_box(n)), &v)); )
|
||||||
gfx_dispose_gif(img);
|
gfx_dispose_gif(img);
|
||||||
} else if (o->type == elt_layout) {
|
} else if (o->type == elt_layout) {
|
||||||
for (v = NULL; (img = txt_layout_image(el_layout(n), &v)); )
|
for (v = NULL; (img = txt_layout_images(el_layout(n), &v)); )
|
||||||
gfx_dispose_gif(img);
|
gfx_dispose_gif(img);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -1173,10 +1173,14 @@ struct image *_layout_lookup_image(struct layout *layout, const char *name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
img_t txt_layout_image(layout_t lay, void **v)
|
img_t txt_layout_images(layout_t lay, void **v)
|
||||||
{
|
{
|
||||||
struct image **g = (struct image **)v;
|
struct image **g = (struct image **)v;
|
||||||
struct layout *layout = (struct layout *)lay;
|
struct layout *layout = (struct layout *)lay;
|
||||||
|
|
||||||
|
if (!layout)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!*g)
|
if (!*g)
|
||||||
*g = layout->images;
|
*g = layout->images;
|
||||||
else
|
else
|
||||||
|
|
|
@ -83,7 +83,7 @@ extern void txt_layout_link_color(layout_t lay, color_t link);
|
||||||
extern void txt_layout_active_color(layout_t lay, color_t link);
|
extern void txt_layout_active_color(layout_t lay, color_t link);
|
||||||
extern void txt_layout_link_style(layout_t lay, int style);
|
extern void txt_layout_link_style(layout_t lay, int style);
|
||||||
extern int txt_layout_add_img(layout_t lay, const char *name, img_t img);
|
extern int txt_layout_add_img(layout_t lay, const char *name, img_t img);
|
||||||
extern img_t txt_layout_image(layout_t lay, void **v); /* enumerator */
|
extern img_t txt_layout_images(layout_t lay, void **v); /* enumerator */
|
||||||
extern void txt_layout_size(layout_t lay, int *w, int *h);
|
extern void txt_layout_size(layout_t lay, int *w, int *h);
|
||||||
extern textbox_t txt_box(int w, int h);
|
extern textbox_t txt_box(int w, int h);
|
||||||
extern layout_t txt_box_layout(textbox_t tbox);
|
extern layout_t txt_box_layout(textbox_t tbox);
|
||||||
|
|
Reference in a new issue