Advertisement
NoSloppy

Untitled

Dec 9th, 2021
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1. /*
  2. blaster_BC.h prop file.
  3. http://fredrik.hubbe.net/lightsaber/proffieos.html
  4. Copyright (c) 2016-2019 Fredrik Hubinette
  5. Copyright (c) 2021 Brian Conner with contributions by:
  6. Fredrik Hubinette, Fernando da Rosa, and Matthew McGeary.
  7. Distributed under the terms of the GNU General Public License v3.
  8. http://www.gnu.org/licenses/
  9.  
  10. Includes:
  11. With blaster power on OR off:
  12. - Volume Menu with cycle-thru.
  13. - Spoken battery level in volts or percentage.
  14. - On-Demand battery level.
  15. - Quote player.
  16. - Next / previous preset
  17.  
  18. Self-Destuct overload.
  19. Defaults to KILL on boot.
  20. Separate clipin/clipout/reload sounds to match stun mode.
  21. -(requires clipins, clipouts, and reloads.wavs in font)
  22. No jam if empty.
  23. Autofire mode counts bullets and causes empty if
  24. #define BLASTER_SHOTS_UNTIL_EMPTY is specified.
  25.  
  26. Requires minimum 2 buttons for operation
  27. *note - config can use NUM_BUTTONS 1 for saber mode when using dual_prop.
  28. - the baster mode will still use 2 buttons as FIRE and MODE.
  29.  
  30. ** This version is designed to work well together with saber_BC_buttons.h when
  31. using dual_prop.h: a toggle between 2 prop files triggered by blade detect.
  32. Blade insertion and removal switches between the 2 props, (ie: Ezra blaster and saber.)
  33. Your config file should leave SABER buttons in the CONFIG_BUTTONS section, like:
  34. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  35. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  36.  
  37. For a stand-alone blaster setup, your config file should use BLASTER buttons in
  38. the CONFIG_BUTTONS section, like:
  39. Button FireButton(BUTTON_FIRE, powerButtonPin, "fire");
  40. Button ModeButton(BUTTON_MODE_SELECT, auxPin, "modeselect");
  41.  
  42. Optional defines:
  43. #define ENABLE_BLASTER_AUTO - Enable Autofire/rapid fire mode.
  44. #define BLASTER_SHOTS_UNTIL_EMPTY 15 - whatever number, not defined = unlimited shots.
  45. #define BLASTER_JAM_PERCENTAGE - if this is not defined, random from 0-100%.
  46. #define VOLUME_MENU_CYCLE - This allows the Volume menu to loop through from
  47. maximum back to minimum and vice versa.
  48. #define OLED_SYNCED_EFFECTS - Auto sync OLED display time for effects.
  49.  
  50. Optional Blade style elements:
  51. EFFECT_DESTRUCT - use in blade style to animate self destruct.
  52. EFFECT_BATTERY LEVEL - requires EFFECT_BATTERY_LEVEL to be in blade style,
  53. and uses battery.wav sound effect.
  54.  
  55. ==========================================
  56. | 2 Buttons: FIRE and MODE (POW and AUX) |
  57. ==========================================
  58. Power On / Off - Hold MODE and Double click FIRE (Default is auto-power ON)
  59. Cycle Modes - Double click MODE. Cycles through KILL, AUTOFIRE, and STUN modes.
  60. Next Preset - Long click and release MODE.
  61. Previous Preset - Double click and hold MODE, release after a second.
  62. Start/Stop Track - 4x click MODE.
  63. Volume Menu:
  64. Enter/Exit - 4x click and hold MODE.
  65. Volume UP - Long click and release MODE while in Volume Menu. (just like next preset)
  66. Volume DOWN - Double click and hold MODE, release after a second while in Volume Menu.
  67. (click then long click, just like next preset)
  68. Spoken Battery Level - Includes automatic On-Demand Batt Level // TODO: OLED to display PLI
  69. in volts - Triple click MODE.
  70. in percentage - Triple click and hold MODE.
  71.  
  72. On-Demand Batt Level - Double click and hold MODE until battery level shows and sound plays.
  73. Requires EFFECT_BATTERY_LEVEL to be in blade style in order to see it,
  74. and uses battery.wav sound effect, otherwise, special beep :)
  75.  
  76. Self-Destruct - Press and hold MODE and FIRE until overload starts....then run!
  77. Self-Destructed blaster needs to be powered on manually to use again.
  78. Quote Player - Hold MODE and click FIRE. (requires quote.wavs in font)
  79. Reload - Click MODE.
  80. Fire - Click FIRE. (Hold to Auto / Rapid Fire when AUTO mode selected)
  81. Clip In - Clip Detect pad Latched On.
  82. Clip out - Clip Detect pad Latched Off.
  83. Unjam - Bang the blaster or Reload.
  84.  
  85. - If there's a dedicated POWER button,
  86. Power On / Off - Click POW. - TODO: this with dual_prop is....weird
  87. - If there's a dedicated Relod button,
  88. Reload - Click RELOAD.
  89.  
  90. -TODO: PLI_ON / OFF, CLIP IN etc....
  91.  
  92. Wavs to use for talking Mode (else Talkie voice):
  93. - If these are not present, mode.wav will be used for all modes.
  94. - If no mode.wav either, then Talkie voice speaks selected mode.
  95. mdstun.wav
  96. mdkill.wav
  97. mdauto.wav
  98. Additionally:
  99. quote.wav // for playing quotes
  100. in.wav // for blaster power off
  101. out.wav // for blaster power on
  102. destruct.wav // for self destruct overload
  103. boom.wav // for self destruct explosion
  104. clipins.wv
  105. clipouts.wav
  106. reloads.wav // these last 3 are used to match the more "plasmatic" stun sound.
  107. These are likely best kept in a 'common' folder in your Font Search Path:
  108. battery.wav // for EFFECT_BATTERY_LEVEL
  109. vmbegin.wav // for Begin Volume Menu
  110. vmend.wav // for End Volume Menu
  111. volup.wav // for increse volume
  112. voldown.wav // for decrease volume
  113. volmin.wav // for minimum volume reached
  114. volmax.wav // for maximum volume reached
  115.  
  116. */
  117.  
  118.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement