aboutsummaryrefslogtreecommitdiff
path: root/boot/scene.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/scene.c')
-rw-r--r--boot/scene.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/boot/scene.c b/boot/scene.c
index 8033d77fb2..dd1472d4f9 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -209,12 +209,25 @@ int scene_obj_set_pos(struct scene *scn, uint id, int x, int y)
int scene_obj_set_hide(struct scene *scn, uint id, bool hide)
{
+ int ret;
+
+ ret = scene_obj_flag_clrset(scn, id, SCENEOF_HIDE,
+ hide ? SCENEOF_HIDE : 0);
+ if (ret)
+ return log_msg_ret("flg", ret);
+
+ return 0;
+}
+
+int scene_obj_flag_clrset(struct scene *scn, uint id, uint clr, uint set)
+{
struct scene_obj *obj;
obj = scene_obj_find(scn, id, SCENEOBJT_NONE);
if (!obj)
return log_msg_ret("find", -ENOENT);
- obj->hide = hide;
+ obj->flags &= ~clr;
+ obj->flags |= set;
return 0;
}
@@ -358,7 +371,7 @@ int scene_render(struct scene *scn)
int ret;
list_for_each_entry(obj, &scn->obj_head, sibling) {
- if (!obj->hide) {
+ if (!(obj->flags & SCENEOF_HIDE)) {
ret = scene_obj_render(obj, exp->text_mode);
if (ret && ret != -ENOTSUPP)
return log_msg_ret("ren", ret);