Advertisement
paul_nicholls

exported animations from editor

May 7th, 2019
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. animation33DAE00: {
  2. animateCount: .byte 0
  3. animateMax: .byte 8
  4.  
  5. update: {
  6. inc animateCount
  7. lda animateCount
  8. cmp animateMax
  9. // if animateCount < animateMax branch to !:
  10. bcc !+
  11.  
  12. // reset animateCount and scroll char down
  13. lda #0
  14. sta animateCount
  15.  
  16. :set16im(CHARSET+(135*8),addressPntr1)
  17. jsr scrollCharDown
  18.  
  19. !:
  20. rts
  21. }
  22. }
  23.  
  24. animation33DCC60: {
  25. animateCount: .byte 0
  26. animateMax: .byte 8
  27.  
  28. update: {
  29. inc animateCount
  30. lda animateCount
  31. cmp animateMax
  32. // if animateCount < animateMax branch to !:
  33. bcc !+
  34.  
  35. // reset animateCount and scroll char down
  36. lda #0
  37. sta animateCount
  38.  
  39. :set16im(CHARSET+(136*8),addressPntr1)
  40. jsr scrollCharDown
  41.  
  42. !:
  43. rts
  44. }
  45. }
  46.  
  47. animation33DCC80: {
  48. animateCount: .byte 0
  49. animateMax: .byte 8
  50.  
  51. update: {
  52. inc animateCount
  53. lda animateCount
  54. cmp animateMax
  55. // if animateCount < animateMax branch to !:
  56. bcc !+
  57.  
  58. // reset animateCount and scroll char down
  59. lda #0
  60. sta animateCount
  61.  
  62. :set16im(CHARSET+(137*8),addressPntr1)
  63. jsr scrollCharDown
  64.  
  65. !:
  66. rts
  67. }
  68. }
  69.  
  70. animation33DCBC0: {
  71. animateCount: .byte 0
  72. animateMax: .byte 8
  73.  
  74. update: {
  75. inc animateCount
  76. lda animateCount
  77. cmp animateMax
  78. // if animateCount < animateMax branch to !:
  79. bcc !+
  80.  
  81. // reset animateCount and scroll char down
  82. lda #0
  83. sta animateCount
  84.  
  85. :set16im(CHARSET+(138*8),addressPntr1)
  86. jsr scrollCharDown
  87.  
  88. !:
  89. rts
  90. }
  91. }
  92.  
  93. animation33FFE70: {
  94. animateCount: .byte 0
  95. animateMax: .byte 1
  96. dataIndex: .byte 0
  97. charData:
  98. .byte $08,$10,$9A,$65,$24,$1C,$64,$04
  99. .byte $08,$10,$9A,$65,$24,$1C,$64,$04
  100. .byte $10,$20,$1F,$A4,$64,$1A,$12,$20
  101. .byte $20,$26,$38,$24,$A6,$59,$00,$10
  102.  
  103. update: {
  104. inc animateCount
  105. lda animateCount
  106. cmp animateMax
  107. // if animateCount < animateMax branch to !:
  108. bcc !+
  109.  
  110. // reset animateCount and copy char data
  111. // to the character
  112. lda #0
  113. sta animateCount
  114.  
  115. lda dataIndex
  116. asl
  117. asl
  118. asl
  119. tax
  120.  
  121. ldy #0
  122. copyData:
  123. lda charData,x
  124. sta CHARSET+(210*8),y
  125. inx
  126. iny
  127. cpy #8
  128. // not done yet? Loop back
  129. bne copyData
  130.  
  131. inc dataIndex
  132. lda dataIndex
  133. cmp #4
  134. bne !+
  135.  
  136. lda #0
  137. sta dataIndex
  138. !:
  139. rts
  140. }
  141. }
  142.  
  143. animations: {
  144. update: {
  145. jsr animation33DAE00.update
  146. jsr animation33DCC60.update
  147. jsr animation33DCC80.update
  148. jsr animation33DCBC0.update
  149. jsr animation33FFE70.update
  150. rts
  151. }
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement