diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-10-15 22:14:58 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-10-15 22:14:58 -0400 |
commit | 7ec200353eb6e4b91ae46792c973767fd8177caa (patch) | |
tree | 1dbfc2f867739c2c34f54a028f00c078c5793d5c | |
parent | 70246dc0be67aee794cb9e4dfcc6bc3b41a4c9be (diff) |
Add table assertions to slot machine data
-rw-r--r-- | engine/games/slot_machine.asm | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index aaede41e..b9ff965f 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -1,12 +1,16 @@ -SLOTS_NO_BIAS EQU -1 +; wSlotMatched values + const_def 0, 4 + const SLOTS_SEVEN ; $00 + const SLOTS_POKEBALL ; $04 + const SLOTS_CHERRY ; $08 + const SLOTS_PIKACHU ; $0c + const SLOTS_SQUIRTLE ; $10 + const SLOTS_STARYU ; $14 +NUM_SLOT_REELS EQU const_value / 4 ; 6 SLOTS_NO_MATCH EQU -1 -SLOTS_SEVEN EQU $00 -SLOTS_POKEBALL EQU $04 -SLOTS_CHERRY EQU $08 -SLOTS_PIKACHU EQU $0c -SLOTS_SQUIRTLE EQU $10 -SLOTS_STARYU EQU $14 +; wSlotBias values +SLOTS_NO_BIAS EQU -1 REEL_SIZE EQU 15 @@ -859,12 +863,14 @@ GetUnknownSlotReelData: ; unreferenced ret .data: + table_width 1, GetUnknownSlotReelData.data db 0 ; SLOTS_SEVEN db 1 ; SLOTS_POKEBALL db 2 ; SLOTS_CHERRY db 3 ; SLOTS_PIKACHU db 4 ; SLOTS_SQUIRTLE db 5 ; SLOTS_STARYU + assert_table_length NUM_SLOT_REELS ReelActionJumptable: ld hl, REEL_ACTION @@ -1830,12 +1836,14 @@ Slots_GetPayout: ret .PayoutTable: - dw 300 - dw 50 - dw 6 - dw 8 - dw 10 - dw 15 + table_width 2, Slots_GetPayout.PayoutTable + dw 300 ; SLOTS_SEVEN + dw 50 ; SLOTS_POKEBALL + dw 6 ; SLOTS_CHERRY + dw 8 ; SLOTS_PIKACHU + dw 10 ; SLOTS_SQUIRTLE + dw 15 ; SLOTS_STARYU + assert_table_length NUM_SLOT_REELS .no_win ld hl, wPayout @@ -1876,12 +1884,14 @@ Slots_PayoutText: ret .PayoutStrings: - dbw "300@", .LinedUpSevens - dbw "50@@", .LinedUpPokeballs - dbw "6@@@", .LinedUpMonOrCherry - dbw "8@@@", .LinedUpMonOrCherry - dbw "10@@", .LinedUpMonOrCherry - dbw "15@@", .LinedUpMonOrCherry + table_width 6, Slots_PayoutText.PayoutStrings + dbw "300@", .LinedUpSevens ; SLOTS_SEVEN + dbw "50@@", .LinedUpPokeballs ; SLOTS_POKEBALL + dbw "6@@@", .LinedUpMonOrCherry ; SLOTS_CHERRY + dbw "8@@@", .LinedUpMonOrCherry ; SLOTS_PIKACHU + dbw "10@@", .LinedUpMonOrCherry ; SLOTS_SQUIRTLE + dbw "15@@", .LinedUpMonOrCherry ; SLOTS_STARYU + assert_table_length NUM_SLOT_REELS .Text_PrintPayout: text_asm |