summaryrefslogtreecommitdiff
path: root/boot/scene.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-05-02 08:46:31 -0600
committerSimon Glass <sjg@chromium.org>2025-05-30 09:49:32 +0100
commit8aa384d01a079ec2d816f7051a7208a337727338 (patch)
tree88d8384ab93ad5d261238f056e0b68bfc485c97d /boot/scene.c
parent85a2954c29cf8631ccd0fb2c2c348711f8b5260e (diff)
expo: Rename x and y in struct scene_obj_bbox
These coordinates are the top left values, so rename them to x0 and y0 in preparation for changing the width and height to x1 and y1 Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/scene.c')
-rw-r--r--boot/scene.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/boot/scene.c b/boot/scene.c
index a0060c6a97d..49dac90ceed 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -210,8 +210,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->bbox.x = x;
- obj->bbox.y = y;
+ obj->bbox.x0 = x;
+ obj->bbox.y0 = y;
return 0;
}
@@ -368,8 +368,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->bbox.x;
- y = obj->bbox.y;
+ x = obj->bbox.x0;
+ y = obj->bbox.y0;
switch (obj->type) {
case SCENEOBJT_NONE:
@@ -915,15 +915,15 @@ int scene_bbox_union(struct scene *scn, uint id, int inset,
if (!obj)
return log_msg_ret("obj", -ENOENT);
if (bbox->valid) {
- bbox->x0 = min(bbox->x0, obj->bbox.x - inset);
- bbox->y0 = min(bbox->y0, obj->bbox.y);
- bbox->x1 = max(bbox->x1, obj->bbox.x + obj->bbox.w + inset);
- bbox->y1 = max(bbox->y1, obj->bbox.y + obj->bbox.h);
+ bbox->x0 = min(bbox->x0, obj->bbox.x0 - inset);
+ bbox->y0 = min(bbox->y0, obj->bbox.y0);
+ bbox->x1 = max(bbox->x1, obj->bbox.x0 + obj->bbox.w + inset);
+ bbox->y1 = max(bbox->y1, obj->bbox.y0 + obj->bbox.h);
} else {
- bbox->x0 = obj->bbox.x - inset;
- bbox->y0 = obj->bbox.y;
- bbox->x1 = obj->bbox.x + obj->bbox.w + inset;
- bbox->y1 = obj->bbox.y + obj->bbox.h;
+ bbox->x0 = obj->bbox.x0 - inset;
+ bbox->y0 = obj->bbox.y0;
+ bbox->x1 = obj->bbox.x0 + obj->bbox.w + inset;
+ bbox->y1 = obj->bbox.y0 + obj->bbox.h;
bbox->valid = true;
}