Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .macro ts_jump_random untrap:req, ratio1:req, target1:req, ratio2, target2, ratio3, target3, ratio4, target4, ratio5, target5, ratio6, target6, ratio7, target7, ratio8, target8
- .byte 0xF0
- .byte (1 << 6) | (\untrap << 7)
- .ifnb \ratio2
- .ifnb \ratio3
- .ifnb \ratio4
- .ifnb \ratio5
- .ifnb \ratio6
- .ifnb \ratio7
- .ifnb \ratio8
- .byte 8
- .else
- .byte 7
- .endif
- .else
- .byte 6
- .endif
- .else
- .byte 5
- .endif
- .else
- .byte 4
- .endif
- .else
- .byte 3
- .endif
- .else
- .byte 2
- .endif
- .else
- .byte 1
- .endif
- .byte \ratio1, \target1
- .ifb \ratio2
- .exitm
- .endif
- .ifb \target2
- .error "ts_jump_random: ratio2 specified but not target2!"
- .exitm
- .endif
- .byte \ratio2, \target2
- .ifb \ratio3
- .exitm
- .endif
- .ifb \target3
- .error "ts_jump_random: ratio3 specified but not target3!"
- .exitm
- .endif
- .byte \ratio3, \target3
- .ifb \ratio4
- .exitm
- .endif
- .ifb \target4
- .error "ts_jump_random: ratio4 specified but not target4!"
- .exitm
- .endif
- .byte \ratio4, \target4
- .ifb \ratio5
- .exitm
- .endif
- .ifb \target5
- .error "ts_jump_random: ratio5 specified but not target5!"
- .exitm
- .endif
- .byte \ratio5, \target5
- .ifb \ratio6
- .exitm
- .endif
- .ifb \target6
- .error "ts_jump_random: ratio6 specified but not target6!"
- .exitm
- .endif
- .byte \ratio6, \target6
- .ifb \ratio7
- .exitm
- .endif
- .ifb \target7
- .error "ts_jump_random: ratio7 specified but not target7!"
- .exitm
- .endif
- .byte \ratio7, \target7
- .ifb \ratio8
- .exitm
- .endif
- .ifb \target8
- .error "ts_jump_random: ratio8 specified but not target8!"
- .exitm
- .endif
- .byte \ratio8, \target8
- .endm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement