GameBoy (Color) port of the GTA San Andreas arcade game Duality
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * main.h
  3. * Duality
  4. *
  5. * Copyright (C) 2025 Thomas Buck <thomas@xythobuz.de>
  6. *
  7. * Based on examples from gbdk-2020:
  8. * https://github.com/gbdk-2020/gbdk-2020/blob/develop/gbdk-lib/examples/gb/rand/rand.c
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation, either version 3 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * See <http://www.gnu.org/licenses/>.
  21. */
  22. #ifndef __MAIN_H__
  23. #define __MAIN_H__
  24. #include <gbdk/platform.h>
  25. #include <stdint.h>
  26. #define ENTRY_NAME_LEN 8
  27. struct conf_entry {
  28. char name[ENTRY_NAME_LEN + 1];
  29. uint8_t *var;
  30. uint8_t max;
  31. };
  32. struct debug_entry {
  33. char name[ENTRY_NAME_LEN + 1];
  34. enum debug_flag flag;
  35. uint8_t max;
  36. };
  37. BANKREF_EXTERN(main)
  38. #define CONF_ENTRY_COUNT 1
  39. extern const struct conf_entry conf_entries[CONF_ENTRY_COUNT];
  40. extern uint8_t debug_menu_index;
  41. extern uint8_t debug_special_value;
  42. #define DEBUG_ENTRY_COUNT 6
  43. extern const struct debug_entry debug_entries[DEBUG_ENTRY_COUNT];
  44. #endif // __MAIN_H__