diff options
author | Phlosioneer <mattmdrr2@gmail.com> | 2019-04-07 01:56:36 -0400 |
---|---|---|
committer | Phlosioneer <mattmdrr2@gmail.com> | 2019-04-07 01:56:36 -0400 |
commit | d84d94e29a1424dd1d12ff821957bb6b1bc847d6 (patch) | |
tree | c5ba0778afca66a91f71815cd53fe9abef1bdac6 /src/menu_helpers.c | |
parent | ad2a97935e1c1f4362f0dffa58ef437d191bab4e (diff) | |
parent | c3cfd6065825ec8ddd5e1782998071518efaa322 (diff) |
Merge branch 'master' into pokenav-decomp-again
Diffstat (limited to 'src/menu_helpers.c')
-rw-r--r-- | src/menu_helpers.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 3fb5ca40d..801e2546b 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -37,10 +37,10 @@ static const struct OamData sOamData_859F4E8 = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(16x16), .x = 0, .matrixNum = 0, - .size = 1, + .size = SPRITE_SIZE(16x16), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -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; } } |