Dimenticare

input.gml

Aug 29th, 2020
3,444
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enum InputVerbs {
  2.     A, B, X, Y,
  3.     LEFT, RIGHT, UP, DOWN,
  4.     LOOK_LEFT, LOOK_RIGHT, LOOK_UP, LOOK_DOWN,
  5.     PAD_LEFT, PAD_RIGHT, PAD_UP, PAD_DOWN,
  6.     PAUSE, UNPAUSE, RUN,
  7.     SHOULDERL,          // unused
  8.     SHOULDERR,          // unused
  9.     SHOULDERR2,         // unused
  10.     SPELL_FIRE, SPELL_WATER, SPELL_THUNDER,
  11.     SPELL_EARTH, SPELL_WIND, SPELL_AETHER,
  12.     SPELL_NONE,
  13. }
  14.  
  15. input_cursor_verbs(InputVerbs.LOOK_LEFT, InputVerbs.LOOK_RIGHT, InputVerbs.LOOK_UP, InputVerbs.LOOK_DOWN, 5);
  16.  
  17. input_default_key(ord("A"), InputVerbs.LEFT);
  18. input_default_key(ord("D"), InputVerbs.RIGHT);
  19. input_default_key(ord("W"), InputVerbs.UP);
  20. input_default_key(ord("S"), InputVerbs.DOWN);
  21. input_default_key(vk_left, InputVerbs.PAD_LEFT);
  22. input_default_key(vk_right, InputVerbs.PAD_RIGHT);
  23. input_default_key(vk_up, InputVerbs.PAD_UP);
  24. input_default_key(vk_down, InputVerbs.PAD_DOWN);
  25. input_default_key(vk_numpad1, InputVerbs.LOOK_LEFT);
  26. input_default_key(vk_numpad2, InputVerbs.LOOK_RIGHT);
  27. input_default_key(vk_numpad3, InputVerbs.LOOK_UP);
  28. input_default_key(vk_numpad4, InputVerbs.LOOK_DOWN);
  29. input_default_key(ord("Z"), InputVerbs.A); input_default_mouse_button(mb_left, InputVerbs.A, 1);
  30. input_default_key(ord("X"), InputVerbs.B); input_default_mouse_button(mb_right, InputVerbs.B, 1);
  31. input_default_key(ord("C"), InputVerbs.X);
  32. input_default_key(vk_tab, InputVerbs.Y);
  33. input_default_key(vk_escape, InputVerbs.PAUSE);
  34. input_default_key(vk_backspace, InputVerbs.UNPAUSE);
  35. input_default_key(vk_shift, InputVerbs.RUN);
  36. input_default_key(ord("U"), InputVerbs.SPELL_NONE);
  37. input_default_key(ord("I"), InputVerbs.SPELL_FIRE);
  38. input_default_key(ord("O"), InputVerbs.SPELL_WATER);
  39. input_default_key(ord("P"), InputVerbs.SPELL_AETHER);
  40. input_default_key(ord("I"), InputVerbs.SPELL_THUNDER);
  41. input_default_key(ord("J"), InputVerbs.SPELL_EARTH);
  42. input_default_key(ord("K"), InputVerbs.SPELL_WIND);
  43.  
  44. input_default_gamepad_axis(gp_axislh, true, InputVerbs.LEFT);
  45. input_default_gamepad_axis(gp_axislh, false, InputVerbs.RIGHT);
  46. input_default_gamepad_axis(gp_axislv, true, InputVerbs.UP);
  47. input_default_gamepad_axis(gp_axislv, false, InputVerbs.DOWN);
  48. input_default_gamepad_axis(gp_axisrh, true, InputVerbs.LOOK_LEFT);
  49. input_default_gamepad_axis(gp_axisrh, false, InputVerbs.LOOK_RIGHT);
  50. input_default_gamepad_axis(gp_axisrv, true, InputVerbs.LOOK_UP);
  51. input_default_gamepad_axis(gp_axisrv, false, InputVerbs.LOOK_DOWN);
  52. input_default_gamepad_button(gp_padl, InputVerbs.PAD_LEFT);
  53. input_default_gamepad_button(gp_padr, InputVerbs.PAD_RIGHT);
  54. input_default_gamepad_button(gp_padu, InputVerbs.PAD_UP);
  55. input_default_gamepad_button(gp_padd, InputVerbs.PAD_DOWN);
  56. input_default_gamepad_button(gp_face1, InputVerbs.A);
  57. input_default_gamepad_button(gp_face2, InputVerbs.B);
  58. input_default_gamepad_button(gp_face3, InputVerbs.X);
  59. input_default_gamepad_button(gp_face4, InputVerbs.Y);
  60. input_default_gamepad_button(gp_start, InputVerbs.PAUSE);
  61. input_default_gamepad_button(gp_select, InputVerbs.UNPAUSE);
  62. input_default_gamepad_button(gp_shoulderl, InputVerbs.SHOULDERL);
  63. input_default_gamepad_button(gp_shoulderlb, InputVerbs.RUN);
  64. input_default_gamepad_button(gp_shoulderrb, InputVerbs.SHOULDERR2);
  65. input_default_gamepad_button(gp_shoulderr, InputVerbs.SHOULDERR);
  66.  
  67. #macro INPUT_PLAYER_UP                          input_check(InputVerbs.UP, controller_index)
  68. #macro INPUT_PLAYER_DOWN                        input_check(InputVerbs.DOWN, controller_index)
  69. #macro INPUT_PLAYER_LEFT                        input_check(InputVerbs.LEFT, controller_index)
  70. #macro INPUT_PLAYER_RIGHT                       input_check(InputVerbs.RIGHT, controller_index)
  71. #macro INPUT_PLAYER_LOOK_UP                     input_check(InputVerbs.LOOK_UP, controller_index)
  72. #macro INPUT_PLAYER_LOOK_DOWN                   input_check(InputVerbs.LOOK_DOWN, controller_index)
  73. #macro INPUT_PLAYER_LOOK_LEFT                   input_check(InputVerbs.LOOK_LEFT, controller_index)
  74. #macro INPUT_PLAYER_LOOK_RIGHT                  input_check(InputVerbs.LOOK_RIGHT, controller_index)
  75. #macro INPUT_PLAYER_PAD_UP                      input_check(InputVerbs.PAD_UP, controller_index)
  76. #macro INPUT_PLAYER_PAD_DOWN                    input_check(InputVerbs.PAD_DOWN, controller_index)
  77. #macro INPUT_PLAYER_PAD_LEFT                    input_check(InputVerbs.PAD_LEFT, controller_index)
  78. #macro INPUT_PLAYER_PAD_RIGHT                   input_check(InputVerbs.PAD_RIGHT, controller_index)
  79. #macro INPUT_PLAYER_A                           input_check(InputVerbs.A, controller_index)
  80. #macro INPUT_PLAYER_B                           input_check(InputVerbs.B, controller_index)
  81. #macro INPUT_PLAYER_X                           input_check(InputVerbs.X, controller_index)
  82. #macro INPUT_PLAYER_Y                           input_check(InputVerbs.Y, controller_index)
  83. #macro INPUT_PLAYER_PAUSE                       input_check(InputVerbs.PAUSE, controller_index)
  84. #macro INPUT_PLAYER_UNPAUSE                     input_check(InputVerbs.UNPAUSE, controller_index)
  85. #macro INPUT_PLAYER_RUN                         input_check(InputVerbs.RUN, controller_index)
  86. #macro INPUT_PLAYER_SPELL_FIRE                  input_check(InputVerbs.SPELL_FIRE, controller_index)
  87. #macro INPUT_PLAYER_SPELL_WATER                 input_check(InputVerbs.SPELL_WATER, controller_index)
  88. #macro INPUT_PLAYER_SPELL_AETHER                input_check(InputVerbs.SPELL_AETHER, controller_index)
  89. #macro INPUT_PLAYER_SPELL_THUNDER               input_check(InputVerbs.SPELL_THUNDER, controller_index)
  90. #macro INPUT_PLAYER_SPELL_EARTH                 input_check(InputVerbs.SPELL_EARTH, controller_index)
  91. #macro INPUT_PLAYER_SPELL_WIND                  input_check(InputVerbs.SPELL_WIND, controller_index)
  92. #macro INPUT_PLAYER_SPELL_NONE                  input_check(InputVerbs.SPELL_NONE, controller_index)
  93.  
  94. #macro INPUT_PLAYER_PRESS_UP                    input_check_press(InputVerbs.UP, controller_index)
  95. #macro INPUT_PLAYER_PRESS_DOWN                  input_check_press(InputVerbs.DOWN, controller_index)
  96. #macro INPUT_PLAYER_PRESS_LEFT                  input_check_press(InputVerbs.LEFT, controller_index)
  97. #macro INPUT_PLAYER_PRESS_RIGHT                 input_check_press(InputVerbs.RIGHT, controller_index)
  98. #macro INPUT_PLAYER_PRESS_LOOK_UP               input_check_press(InputVerbs.LOOK_UP, controller_index)
  99. #macro INPUT_PLAYER_PRESS_LOOK_DOWN             input_check_press(InputVerbs.LOOK_DOWN, controller_index)
  100. #macro INPUT_PLAYER_PRESS_LOOK_LEFT             input_check_press(InputVerbs.LOOK_LEFT, controller_index)
  101. #macro INPUT_PLAYER_PRESS_LOOK_RIGHT            input_check_press(InputVerbs.LOOK_RIGHT, controller_index)
  102. #macro INPUT_PLAYER_PRESS_PAD_UP                input_check_press(InputVerbs.PAD_UP, controller_index)
  103. #macro INPUT_PLAYER_PRESS_PAD_DOWN              input_check_press(InputVerbs.PAD_DOWN, controller_index)
  104. #macro INPUT_PLAYER_PRESS_PAD_LEFT              input_check_press(InputVerbs.PAD_LEFT, controller_index)
  105. #macro INPUT_PLAYER_PRESS_PAD_RIGHT             input_check_press(InputVerbs.PAD_RIGHT, controller_index)
  106. #macro INPUT_PLAYER_PRESS_A                     input_check_press(InputVerbs.A, controller_index)
  107. #macro INPUT_PLAYER_PRESS_B                     input_check_press(InputVerbs.B, controller_index)
  108. #macro INPUT_PLAYER_PRESS_X                     input_check_press(InputVerbs.X, controller_index)
  109. #macro INPUT_PLAYER_PRESS_Y                     input_check_press(InputVerbs.Y, controller_index)
  110. #macro INPUT_PLAYER_PRESS_PAUSE                 input_check_press(InputVerbs.PAUSE, controller_index)
  111. #macro INPUT_PLAYER_PRESS_UNPAUSE               input_check_press(InputVerbs.UNPAUSE, controller_index)
  112. #macro INPUT_PLAYER_PRESS_RUN                   input_check_press(InputVerbs.RUN, controller_index)
  113. #macro INPUT_PLAYER_PRESS_SPELL_FIRE            input_check_press(InputVerbs.SPELL_FIRE, controller_index)
  114. #macro INPUT_PLAYER_PRESS_SPELL_WATER           input_check_press(InputVerbs.SPELL_WATER, controller_index)
  115. #macro INPUT_PLAYER_PRESS_SPELL_AETHER          input_check_press(InputVerbs.SPELL_AETHER, controller_index)
  116. #macro INPUT_PLAYER_PRESS_SPELL_THUNDER         input_check_press(InputVerbs.SPELL_THUNDER, controller_index)
  117. #macro INPUT_PLAYER_PRESS_SPELL_EARTH           input_check_press(InputVerbs.SPELL_EARTH, controller_index)
  118. #macro INPUT_PLAYER_PRESS_SPELL_WIND            input_check_press(InputVerbs.SPELL_WIND, controller_index)
  119. #macro INPUT_PLAYER_PRESS_SPELL_NONE            input_check_press(InputVerbs.SPELL_NONE, controller_index)
  120.  
  121. #macro INPUT_PLAYER_RELEASE_UP                  input_check_release(InputVerbs.UP, controller_index)
  122. #macro INPUT_PLAYER_RELEASE_DOWN                input_check_release(InputVerbs.DOWN, controller_index)
  123. #macro INPUT_PLAYER_RELEASE_LEFT                input_check_release(InputVerbs.LEFT, controller_index)
  124. #macro INPUT_PLAYER_RELEASE_RIGHT               input_check_release(InputVerbs.RIGHT, controller_index)
  125. #macro INPUT_PLAYER_RELEASE_A                   input_check_release(InputVerbs.A, controller_index)
  126. #macro INPUT_PLAYER_RELEASE_B                   input_check_release(InputVerbs.B, controller_index)
  127. #macro INPUT_PLAYER_RELEASE_X                   input_check_release(InputVerbs.X, controller_index)
  128. #macro INPUT_PLAYER_RELEASE_Y                   input_check_release(InputVerbs.Y, controller_index)
  129. #macro INPUT_PLAYER_RELEASE_PAUSE               input_check_release(InputVerbs.PAUSE, controller_index)
  130. #macro INPUT_PLAYER_RELEASE_UNPAUSE             input_check_release(InputVerbs.UNPAUSE, controller_index)
  131. #macro INPUT_PLAYER_RELEASE_RUN                 input_check_release(InputVerbs.RUN, controller_index)
  132. #macro INPUT_PLAYER_RELEASE_SPELL_FIRE          input_check_release(InputVerbs.SPELL_FIRE, controller_index)
  133. #macro INPUT_PLAYER_RELEASE_SPELL_WATER         input_check_release(InputVerbs.SPELL_WATER, controller_index)
  134. #macro INPUT_PLAYER_RELEASE_SPELL_AETHER        input_check_release(InputVerbs.SPELL_AETHER, controller_index)
  135. #macro INPUT_PLAYER_RELEASE_SPELL_THUNDER       input_check_release(InputVerbs.SPELL_THUNDER, controller_index)
  136. #macro INPUT_PLAYER_RELEASE_SPELL_EARTH         input_check_release(InputVerbs.SPELL_EARTH, controller_index)
  137. #macro INPUT_PLAYER_RELEASE_SPELL_WIND          input_check_release(InputVerbs.SPELL_WIND, controller_index)
  138. #macro INPUT_PLAYER_RELEASE_SPELL_NONE          input_check_release(InputVerbs.SPELL_NONE, controller_index)
  139.  
  140. #macro INPUT_UP                                 input_check(InputVerbs.UP)
  141. #macro INPUT_DOWN                               input_check(InputVerbs.DOWN)
  142. #macro INPUT_LEFT                               input_check(InputVerbs.LEFT)
  143. #macro INPUT_RIGHT                              input_check(InputVerbs.RIGHT)
  144. #macro INPUT_LOOK_UP                            input_check(InputVerbs.LOOK_UP)
  145. #macro INPUT_LOOK_DOWN                          input_check(InputVerbs.LOOK_DOWN)
  146. #macro INPUT_LOOK_LEFT                          input_check(InputVerbs.LOOK_LEFT)
  147. #macro INPUT_LOOK_RIGHT                         input_check(InputVerbs.LOOK_RIGHT)
  148. #macro INPUT_PAD_UP                             input_check(InputVerbs.PAD_UP)
  149. #macro INPUT_PAD_DOWN                           input_check(InputVerbs.PAD_DOWN)
  150. #macro INPUT_PAD_LEFT                           input_check(InputVerbs.PAD_LEFT)
  151. #macro INPUT_PAD_RIGHT                          input_check(InputVerbs.PAD_RIGHT)
  152. #macro INPUT_A                                  input_check(InputVerbs.A)
  153. #macro INPUT_B                                  input_check(InputVerbs.B)
  154. #macro INPUT_X                                  input_check(InputVerbs.X)
  155. #macro INPUT_Y                                  input_check(InputVerbs.Y)
  156. #macro INPUT_PAUSE                              input_check(InputVerbs.PAUSE)
  157. #macro INPUT_UNPAUSE                            input_check(InputVerbs.UNPAUSE)
  158. #macro INPUT_RUN                                input_check(InputVerbs.RUN)
  159.  
  160. #macro INPUT_PRESS_UP                           input_check_press(InputVerbs.UP)
  161. #macro INPUT_PRESS_DOWN                         input_check_press(InputVerbs.DOWN)
  162. #macro INPUT_PRESS_LEFT                         input_check_press(InputVerbs.LEFT)
  163. #macro INPUT_PRESS_RIGHT                        input_check_press(InputVerbs.RIGHT)
  164. #macro INPUT_PRESS_LOOK_UP                      input_check_press(InputVerbs.LOOK_UP)
  165. #macro INPUT_PRESS_LOOK_DOWN                    input_check_press(InputVerbs.LOOK_DOWN)
  166. #macro INPUT_PRESS_LOOK_LEFT                    input_check_press(InputVerbs.LOOK_LEFT)
  167. #macro INPUT_PRESS_LOOK_RIGHT                   input_check_press(InputVerbs.LOOK_RIGHT)
  168. #macro INPUT_PRESS_PAD_UP                       input_check_press(InputVerbs.PAD_UP)
  169. #macro INPUT_PRESS_PAD_DOWN                     input_check_press(InputVerbs.PAD_DOWN)
  170. #macro INPUT_PRESS_PAD_LEFT                     input_check_press(InputVerbs.PAD_LEFT)
  171. #macro INPUT_PRESS_PAD_RIGHT                    input_check_press(InputVerbs.PAD_RIGHT)
  172. #macro INPUT_PRESS_A                            input_check_press(InputVerbs.A)
  173. #macro INPUT_PRESS_B                            input_check_press(InputVerbs.B)
  174. #macro INPUT_PRESS_X                            input_check_press(InputVerbs.X)
  175. #macro INPUT_PRESS_Y                            input_check_press(InputVerbs.Y)
  176. #macro INPUT_PRESS_PAUSE                        input_check_press(InputVerbs.PAUSE)
  177. #macro INPUT_PRESS_UNPAUSE                      input_check_press(InputVerbs.UNPAUSE)
  178. #macro INPUT_PRESS_RUN                          input_check_press(InputVerbs.RUN)
  179.  
  180. #macro INPUT_RELEASE_UP                         input_check_release(InputVerbs.UP)
  181. #macro INPUT_RELEASE_DOWN                       input_check_release(InputVerbs.DOWN)
  182. #macro INPUT_RELEASE_LEFT                       input_check_release(InputVerbs.LEFT)
  183. #macro INPUT_RELEASE_RIGHT                      input_check_release(InputVerbs.RIGHT)
  184. #macro INPUT_RELEASE_LOOK_UP                    input_check_release(InputVerbs.LOOK_UP)
  185. #macro INPUT_RELEASE_LOOK_DOWN                  input_check_release(InputVerbs.LOOK_DOWN)
  186. #macro INPUT_RELEASE_LOOK_LEFT                  input_check_release(InputVerbs.LOOK_LEFT)
  187. #macro INPUT_RELEASE_LOOK_RIGHT                 input_check_release(InputVerbs.LOOK_RIGHT)
  188. #macro INPUT_RELEASE_PAD_UP                     input_check_release(InputVerbs.PAD_UP)
  189. #macro INPUT_RELEASE_PAD_DOWN                   input_check_release(InputVerbs.PAD_DOWN)
  190. #macro INPUT_RELEASE_PAD_LEFT                   input_check_release(InputVerbs.PAD_LEFT)
  191. #macro INPUT_RELEASE_PAD_RIGHT                  input_check_release(InputVerbs.PAD_RIGHT)
  192. #macro INPUT_RELEASE_A                          input_check_release(InputVerbs.A)
  193. #macro INPUT_RELEASE_B                          input_check_release(InputVerbs.B)
  194. #macro INPUT_RELEASE_X                          input_check_release(InputVerbs.X)
  195. #macro INPUT_RELEASE_Y                          input_check_release(InputVerbs.Y)
  196. #macro INPUT_RELEASE_PAUSE                      input_check_release(InputVerbs.PAUSE)
  197. #macro INPUT_RELEASE_UNPAUSE                    input_check_release(InputVerbs.UNPAUSE)
  198. #macro INPUT_RELEASE_RUN                        input_check_release(InputVerbs.RUN)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×