rename stretch* to reach*

This commit is contained in:
anon 2025-01-10 12:50:48 +01:00
parent f7366b780f
commit eac7c9c411
2 changed files with 5 additions and 6 deletions

View File

@ -17,7 +17,6 @@
*/
// TODO: further macro hell x, y, width and height so they can be user overwritten too
// TODO: stretch(x|y) naming is meh
// TODO: theres a logical inconsistency between ride-hang and rock-paper; either justify it or normalize it
@ -83,8 +82,8 @@ static inline rect_t rock(rect_t dest, rect_t source);
static inline rect_t paper(rect_t dest, rect_t source);
static inline rect_t next(rect_t source, int n);
static inline rect_t after(rect_t source, int n);
static inline rect_t stretchy(rect_t dest, rect_t source);
static inline rect_t stretchx(rect_t dest, rect_t source);
static inline rect_t reachy(rect_t dest, rect_t source);
static inline rect_t reachx(rect_t dest, rect_t source);
@ -364,7 +363,7 @@ rect_t after(rect_t source, int n) {
}
static inline
rect_t stretchy(rect_t dest, rect_t source) {
rect_t reachy(rect_t dest, rect_t source) {
return (dest.y > source.y) ?
(rect_t) {
.x = source.x,
@ -383,7 +382,7 @@ rect_t stretchy(rect_t dest, rect_t source) {
}
static inline
rect_t stretchx(rect_t dest, rect_t source) {
rect_t reachx(rect_t dest, rect_t source) {
return (dest.x > source.x) ?
(rect_t) {
.x = source.x,

View File

@ -13,7 +13,7 @@ void do_resize(void) {
hotbar = ride(after(get_screen_rect(), 1), scaley(get_screen_rect(), 0.17f));
healt = ride(after(get_screen_rect(), 1), scale(get_unit_rect(), hotbar.height * 1.2f));
manna = paper(hotbar, healt);
inventory = stretchy(hotbar, paper(get_screen_rect(), scalex(get_screen_rect(), 0.5f)));
inventory = reachy(hotbar, paper(get_screen_rect(), scalex(get_screen_rect(), 0.5f)));
inventory_inner = buoyance(inventory, scale(inventory, 0.8f));
inventory_slot = rock(inventory_inner, hang(inventory_inner, scale(get_unit_rect(), inventory_inner.width / 9)));
}