game_corner_slots.asm 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. StartSlotMachine:
  2. ld a, [wHiddenObjectFunctionArgument]
  3. cp $fd
  4. jr z, .printOutOfOrder
  5. cp $fe
  6. jr z, .printOutToLunch
  7. cp $ff
  8. jr z, .printSomeonesKeys
  9. callba AbleToPlaySlotsCheck
  10. ld a, [wCanPlaySlots]
  11. and a
  12. ret z
  13. ld a, [wLuckySlotHiddenObjectIndex]
  14. ld b, a
  15. ld a, [wHiddenObjectIndex]
  16. inc a
  17. cp b
  18. jr z, .match
  19. ld a, 253
  20. jr .next
  21. .match
  22. ld a, 250
  23. .next
  24. ld [wSlotMachineSevenAndBarModeChance], a
  25. ld a, [H_LOADEDROMBANK]
  26. ld [wSlotMachineSavedROMBank], a
  27. call PromptUserToPlaySlots
  28. ret
  29. .printOutOfOrder
  30. tx_pre_id GameCornerOutOfOrderText
  31. jr .printText
  32. .printOutToLunch
  33. tx_pre_id GameCornerOutToLunchText
  34. jr .printText
  35. .printSomeonesKeys
  36. tx_pre_id GameCornerSomeonesKeysText
  37. .printText
  38. push af
  39. call EnableAutoTextBoxDrawing
  40. pop af
  41. call PrintPredefTextID
  42. ret
  43. GameCornerOutOfOrderText:
  44. TX_FAR _GameCornerOutOfOrderText
  45. db "@"
  46. GameCornerOutToLunchText:
  47. TX_FAR _GameCornerOutToLunchText
  48. db "@"
  49. GameCornerSomeonesKeysText:
  50. TX_FAR _GameCornerSomeonesKeysText
  51. db "@"