| 849 | } |
| 850 | |
| 851 | void pilot::set_hud_data(uint8_t *hmode, uint16_t *hstat, uint16_t *hgraphicalstat, int *gw_w, int *gw_h) { |
| 852 | if (hmode) { |
| 853 | // should do checking here |
| 854 | switch (*hmode) { |
| 855 | case HUD_COCKPIT: |
| 856 | case HUD_FULLSCREEN: |
| 857 | hud_mode = *hmode; |
| 858 | write_pending = true; |
| 859 | break; |
| 860 | default: |
| 861 | mprintf(0, "PILOT: Trying to set hode mode to invalid mode (%d)\n", *hmode); |
| 862 | } |
| 863 | } |
| 864 | |
| 865 | if (hstat) { |
| 866 | hud_stat = *hstat; |
| 867 | write_pending = true; |
| 868 | } |
| 869 | |
| 870 | if (hgraphicalstat) { |
| 871 | hud_graphical_stat = *hgraphicalstat; |
| 872 | write_pending = true; |
| 873 | } |
| 874 | |
| 875 | if (gw_w) { |
| 876 | game_window_w = *gw_w; |
| 877 | write_pending = true; |
| 878 | } |
| 879 | |
| 880 | if (gw_h) { |
| 881 | game_window_h = *gw_h; |
| 882 | write_pending = true; |
| 883 | } |
| 884 | } |
| 885 | void pilot::get_hud_data(uint8_t *hmode, uint16_t *hstat, uint16_t *hgraphicalstat, int *gw_w, int *gw_h) { |
| 886 | if (hmode) { |
| 887 | *hmode = hud_mode; |
no outgoing calls
no test coverage detected