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. enum debug_flag {
  27. DBG_MENU = (1 << 0),
  28. DBG_MARKER = (1 << 1),
  29. DBG_GOD_MODE = (1 << 2),
  30. DBG_CLEAR_SCORE = (1 << 3),
  31. DBG_FLAG_COUNT = 2
  32. };
  33. #define DEBUG_ENTRY_NAME_LEN 8
  34. struct debug_entry {
  35. char name[DEBUG_ENTRY_NAME_LEN + 1];
  36. enum debug_flag flag;
  37. };
  38. BANKREF_EXTERN(main)
  39. extern enum debug_flag debug_flags;
  40. extern uint8_t debug_menu_index;
  41. #define DEBUG_ENTRY_COUNT 3
  42. extern const struct debug_entry debug_entries[DEBUG_ENTRY_COUNT];
  43. #endif // __MAIN_H__