summaryrefslogtreecommitdiff
path: root/boot/scene.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-06-01 19:22:49 +0300
committerTom Rini <trini@konsulko.com>2023-07-14 19:54:51 +0300
commitae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa (patch)
treea77c33ad3ee30774bb303dc653fba5c2b899f707 /boot/scene.c
parent2d6ee92c6af06eeb7f7410180d5faa8f5e840bbb (diff)
downloadu-boot-ae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa.tar.xz
expo: Add width and height to objects
At present objects only have a position so it is not possible to determine the amount of space they take up on the display. Add width and height properties, using a struct to keep all the dimensions together. For now this is not used. Future work will set up these new properties. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/scene.c')
-rw-r--r--boot/scene.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/boot/scene.c b/boot/scene.c
index 2ac9bfcdbd..8033d77fb2 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -201,8 +201,8 @@ int scene_obj_set_pos(struct scene *scn, uint id, int x, int y)
obj = scene_obj_find(scn, id, SCENEOBJT_NONE);
if (!obj)
return log_msg_ret("find", -ENOENT);
- obj->x = x;
- obj->y = y;
+ obj->dim.x = x;
+ obj->dim.y = y;
return 0;
}
@@ -272,8 +272,8 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode)
struct udevice *cons = text_mode ? NULL : exp->cons;
int x, y, ret;
- x = obj->x;
- y = obj->y;
+ x = obj->dim.x;
+ y = obj->dim.y;
switch (obj->type) {
case SCENEOBJT_NONE: