diff options
author | Marcus Huderle <huderlem@gmail.com> | 2019-04-06 12:41:55 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-04-06 12:49:09 -0500 |
commit | fe12f2f4b360e68937e49af8672c8b1b1441223c (patch) | |
tree | 703d146f8478957549859be19a12b78d06696b84 /src/menu_helpers.c | |
parent | 6a14cd418e256e0a0c2569cf6da5c95a8cf04b74 (diff) |
Document and cleanup some decoration code
Diffstat (limited to 'src/menu_helpers.c')
-rw-r--r-- | src/menu_helpers.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/menu_helpers.c b/src/menu_helpers.c index b5745d812..801e2546b 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -344,17 +344,17 @@ void sub_812220C(struct ItemSlot *slots, u8 count, u8 *arg2, u8 *usedSlotsCount, *arg2 = (*usedSlotsCount); } -void sub_812225C(u16 *arg0, u16 *arg1, u8 arg2, u8 arg3) +void sub_812225C(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 numItems) { - if ((*arg0) != 0 && (*arg0) + arg2 > arg3) - (*arg0) = arg3 - arg2; + if (*scrollOffset != 0 && *scrollOffset + maxShownItems > numItems) + *scrollOffset = numItems - maxShownItems; - if ((*arg0) + (*arg1) >= arg3) + if (*scrollOffset + *cursorPos >= numItems) { - if (arg3 == 0) - (*arg1) = 0; + if (numItems == 0) + *cursorPos = 0; else - (*arg1) = arg3 - 1; + *cursorPos = numItems - 1; } } |