vwf_config.asm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. INCLUDE "hardware.inc/hardware.inc"
  2. ; The example code uses `lb`. Only it, though, so it's defined here.
  3. MACRO lb
  4. ld \1, (\2) << 8 | (\3)
  5. endm
  6. ;; The following defines are a sort of "configuration" passed to the VWF engine
  7. ;; The engine generally cares about whether they're present, not their value
  8. ; The engine expects to be able to read held buttons from `hHeldKeys`, and buttons just pressed from `hPressedKeys`
  9. ; `main.asm` (intentionally) defines `hHeldButtons` and `hPressedButtons` instead
  10. ; If this problem arises, here's how to work around it:
  11. hPressedKeys equs "hPressedButtons"
  12. hHeldKeys equs "hHeldButtons"
  13. ; The engine similarly expects to be able to read the current ROM bank from `hCurROMBank`.
  14. ; Do like above if necessary.
  15. ; Charset IDs increase 2 by 2
  16. CHARSET_0 equs "fonts/BaseSeven.vwf"
  17. CHARSET_2 equs "fonts/BaseSevenBold_vx8.vwf"
  18. NB_CHARSETS equ 10
  19. SKIP_HELD_KEYS equ PADF_B
  20. SKIP_PRESSED_KEYS equ PADF_A
  21. EXPORT_CONTROL_CHARS equ 1
  22. PRINT_CHARMAP equ 1
  23. INCLUDE "vwf.asm"
  24. ; It's possible to export symbols from `vwf.asm`, and use them elsewhere, like so
  25. ; Do so at your own risk, this isn't officially supported functionality
  26. ;EXPORT _PrintVWFChar
  27. ;EXPORT NB_FONT_CHARACTERS