NESe (pronounced "Nessie") is a NES emulator based on the e6502 emulator, also written in C with a focus on speed and portability for use on embedded platforms, especially ARM.
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.

45 line
1.0KB

  1. #ifndef NESE_MENU_H_
  2. #define NESE_MENU_H_
  3. #include "nes.h"
  4. #include "render.h"
  5. #include "input.h"
  6. #define color_white (0xFFffffffU)
  7. #define color_black (0xFF000000U)
  8. #define color_red (0xFFff371aU)
  9. #define color_orange (0xFFff7b59U)
  10. #define color_yellow (0xFFffa233U)
  11. #define color_green (0xFF51d96aU)
  12. #define color_blue (0xFF6f84ffU)
  13. #define color_purple (0xFFd56fffU)
  14. #define color_background color_blue
  15. #define color_menu color_white
  16. #define color_highlight color_yellow
  17. #define color_error color_red
  18. typedef struct {
  19. int cursor;
  20. int top;
  21. } menu_state;
  22. // Returns filename of selected ROM
  23. char* run_main_menu(menu_state*, nes_Renderer*,
  24. nes_Input_Reader*, nes*,
  25. const char* cur_filename);
  26. // Returns nes_Input_Result indicating the choice
  27. int run_game_menu(menu_state*, nes_Renderer*,
  28. nes_Input_Reader*, nes*);
  29. int modal_popup(const char* message,
  30. nes_Renderer*, nes_Input_Reader*, nes*);
  31. #endif // NESE_MENU_H_