diff options
author | hondew <pokehondew@gmail.com> | 2020-05-20 17:57:11 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2020-05-24 08:24:20 -0500 |
commit | cfc47e642fab396bb05cf8672bc4daf08da196e5 (patch) | |
tree | 58f2b8815cfdb12d2a3c669c781bcd6ab86bcbfc | |
parent | 26a197847acc0a3f01826e84e6704b4782ca66ed (diff) |
Clean up slot drawing
Fix typos
-rw-r--r-- | include/constants/slot_machine.h | 2 | ||||
-rw-r--r-- | src/slot_machine.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/include/constants/slot_machine.h b/include/constants/slot_machine.h index 0be0e649b..9ecf46d79 100644 --- a/include/constants/slot_machine.h +++ b/include/constants/slot_machine.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_SLOT_MACHINE_H #define GUARD_CONSTANTS_SLOT_MACHINE_H -#define NUM_REELS 3 +#define NUM_REELS 3 #define REEL_NUM_TAGS 21 #define REEL_TAG_HEIGHT 24 #define SLOT_MACHINE_COUNT 12 diff --git a/src/slot_machine.c b/src/slot_machine.c index 1f3c91989..9e94d11f0 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -1727,14 +1727,18 @@ static bool8 AwardPayoutAction_FreeTask(struct Task *task) return FALSE; } -// Get the tag at position `offset` below the top of the reel window +// Get the tag at position `offset` below the top of the reel's tape. Note that +// if `offset` is negative, it wraps around to the bottom of the tape. // .-----------------. -// | 7RD | 7RD | 7RD | <- offset = 0 +// | [ ] | [ ] | [ ] | <- offset = 0 // /-----|-----|-----\ -// screen -> | CHY | CHY | POW | <- offset = 1 -// | AZU | REP | 7BL | <- offset = 2 -// | REP | LOT | REP | <- offset = 3 +// screen -> | [ ] | [ ] | [ ] | <- offset = 1 +// | [ ] | [ ] | [ ] | <- offset = 2 +// | [ ] | [ ] | [ ] | <- offset = 3 // \-----|-----|-----/ +// | ... | ... | ... | +// | [ ] | [ ] | [ ] | <- offset = 20 +// .-----------------. static u8 GetTagAtRest(u8 reel, s16 offset) { s16 pos = (sSlotMachine->reelPositions[reel] + offset) % REEL_NUM_TAGS; |