Advertisement
totoyo

[Basic Casio] Moteur de déplacements en mode graphique 1

Sep 12th, 2014
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. Les bases d'un moteur de déplacements avec gestion des collisions en mode graphique en Basic Casio
  2. - version sans Background (BG-None)
  3. par Totoyo pour Planète Casio
  4. https://www.youtube.com/watch?v=UVni4c_7Egs
  5.  
  6. BG-None
  7. ViewWindow 1,127,0,1,63,0
  8. 1->Z
  9. 62->A
  10. 2->B
  11. Do
  12. Cls
  13. Int (2RanList#(4->List 1 (voir variante sans RanList# à la fin)
  14. 1->List 1[Z
  15. If List 1[1
  16. Then F-Line 49,47,49,63
  17. F-Line 79,47,79,63
  18. Else F-Line 49,47,79,47
  19. IfEnd
  20. If List 1[2
  21. Then F-Line 79,47,127,47
  22. F-Line 79,16,127,16
  23. Else F-Line 79,47,79,16
  24. IfEnd
  25. If List 1[3
  26. Then F-Line 49,1,49,16
  27. F-Line 79,1,79,16
  28. Else F-Line 49,16,79,16
  29. IfEnd
  30. If List 1[4
  31. Then F-Line 49,16,1,16
  32. F-Line 49,47,1,47
  33. Else F-Line 49,16,49,47
  34. IfEnd
  35. Do
  36. Text B,A,"H"
  37. Do
  38. Getkey->K
  39. LpWhile Not K
  40. Text B,A," "
  41. If K=27 And Not PxlTest(B,A+4) And Not PxlTest(B+5,A+4)
  42. Then Isz A
  43. IfEnd
  44. If K=28 And Not PxlTest(B-1,A) And Not PxlTest(B-1,A+3)
  45. Then Dsz B
  46. IfEnd
  47. If K=37 And Not PxlTest(B+6,A) And Not PxlTest(B+6,A+3)
  48. Then Isz B
  49. IfEnd
  50. If K=38 And Not PxlTest(B,A-1) And Not PxlTest(B+5,A-1)
  51. Then Dsz A
  52. IfEnd
  53. LpWhile A≥2 And A≤122 And B≥2 And B≤56
  54. If A<2
  55. Then 2->Z:122->A
  56. IfEnd
  57. If A>122
  58. Then 4->Z:2->A
  59. IfEnd
  60. If B<2
  61. Then 3->Z:56->B
  62. IfEnd
  63. If B>56
  64. Then 1->Z:2->B
  65. IfEnd
  66. LpWhile 1
  67.  
  68.  
  69. - Variante de "Int (2RanList#(4->List 1"
  70. For 1->W To 4
  71. Int (2Ran# ->List 1[W
  72. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement