Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | /* |
| 2 | * Portions of this file are copyright Rebirth contributors and licensed as |
||
| 3 | * described in COPYING.txt. |
||
| 4 | * Portions of this file are copyright Parallax Software and licensed |
||
| 5 | * according to the Parallax license below. |
||
| 6 | * See COPYING.txt for license details. |
||
| 7 | |||
| 8 | THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX |
||
| 9 | SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO |
||
| 10 | END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A |
||
| 11 | ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS |
||
| 12 | IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS |
||
| 13 | SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE |
||
| 14 | FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE |
||
| 15 | CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS |
||
| 16 | AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. |
||
| 17 | COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. |
||
| 18 | */ |
||
| 19 | |||
| 20 | /* |
||
| 21 | * |
||
| 22 | * Prototypes and defines for gauges |
||
| 23 | * |
||
| 24 | */ |
||
| 25 | |||
| 26 | #pragma once |
||
| 27 | |||
| 28 | #include "fwd-player.h" |
||
| 29 | |||
| 30 | struct bitmap_index; |
||
| 31 | |||
| 32 | #ifdef __cplusplus |
||
| 33 | #include "fwd-object.h" |
||
| 34 | |||
| 35 | //from gauges.c |
||
| 36 | |||
| 37 | #if defined(DXX_BUILD_DESCENT_I) |
||
| 38 | #define MAX_GAUGE_BMS_PC 80u // increased from 56 to 80 by a very unhappy MK on 10/24/94. |
||
| 39 | #define MAX_GAUGE_BMS_MAC 85u |
||
| 40 | #define MAX_GAUGE_BMS (MacPig ? MAX_GAUGE_BMS_MAC : MAX_GAUGE_BMS_PC) |
||
| 41 | |||
| 42 | extern std::array<bitmap_index, MAX_GAUGE_BMS_MAC> Gauges; // Array of all gauge bitmaps. |
||
| 43 | #elif defined(DXX_BUILD_DESCENT_II) |
||
| 44 | #define MAX_GAUGE_BMS 100u // increased from 56 to 80 by a very unhappy MK on 10/24/94. |
||
| 45 | |||
| 46 | extern std::array<bitmap_index, MAX_GAUGE_BMS> Gauges; // Array of all gauge bitmaps. |
||
| 47 | extern std::array<bitmap_index, MAX_GAUGE_BMS> Gauges_hires; // hires gauges |
||
| 48 | #endif |
||
| 49 | |||
| 50 | // Flags for gauges/hud stuff |
||
| 51 | |||
| 52 | #ifdef dsx |
||
| 53 | namespace dsx { |
||
| 54 | void add_points_to_score(player_info &, int points); |
||
| 55 | void add_bonus_points_to_score(player_info &, int points); |
||
| 56 | void render_gauges(void); |
||
| 57 | void init_gauges(void); |
||
| 58 | void draw_hud(grs_canvas &, const object &); // draw all the HUD stuff |
||
| 59 | } |
||
| 60 | #endif |
||
| 61 | void close_gauges(void); |
||
| 62 | #ifdef dsx |
||
| 63 | namespace dsx { |
||
| 64 | void show_reticle(grs_canvas &canvas, const player_info &, int reticle_type, int secondary_display); |
||
| 65 | void show_HUD_names(grs_canvas &); |
||
| 66 | } |
||
| 67 | #endif |
||
| 68 | void show_mousefs_indicator(grs_canvas &canvas, int mx, int my, int mz, int x, int y, int size); |
||
| 69 | |||
| 70 | void player_dead_message(grs_canvas &); |
||
| 71 | //extern void say_afterburner_status(void); |
||
| 72 | |||
| 73 | // from testgaug.c |
||
| 74 | |||
| 75 | #ifdef dsx |
||
| 76 | namespace dsx { |
||
| 77 | extern void update_laser_weapon_info(void); |
||
| 78 | void play_homing_warning(const player_info &); |
||
| 79 | } |
||
| 80 | #endif |
||
| 81 | |||
| 82 | struct rgb { |
||
| 83 | ubyte r,g,b; |
||
| 84 | }; |
||
| 85 | |||
| 86 | using rgb_array_t = const std::array<rgb, MAX_PLAYERS>; |
||
| 87 | extern const rgb_array_t player_rgb_normal; |
||
| 88 | |||
| 89 | /* Stub for mods that provide switchable player colors */ |
||
| 90 | class rgb_array_wrapper |
||
| 91 | { |
||
| 92 | public: |
||
| 93 | const rgb &operator[](std::size_t i) const |
||
| 94 | { |
||
| 95 | return player_rgb_normal[i]; |
||
| 96 | } |
||
| 97 | }; |
||
| 98 | |||
| 99 | constexpr rgb_array_wrapper player_rgb{}; |
||
| 100 | |||
| 101 | #if defined(DXX_BUILD_DESCENT_II) |
||
| 102 | #define WBU_WEAPON 0 // the weapons display |
||
| 103 | #define WBU_MISSILE 1 // the missile view |
||
| 104 | #define WBU_ESCORT 2 // the "buddy bot" |
||
| 105 | #define WBU_REAR 3 // the rear view |
||
| 106 | #define WBU_COOP 4 // coop or team member view |
||
| 107 | #define WBU_GUIDED 5 // the guided missile |
||
| 108 | #define WBU_MARKER 6 // a dropped marker |
||
| 109 | #define WBU_STATIC 7 // playing static after missile hits |
||
| 110 | |||
| 111 | namespace dsx { |
||
| 112 | // draws a 3d view into one of the cockpit windows. win is 0 for |
||
| 113 | // left, 1 for right. viewer is object. NULL object means give up |
||
| 114 | // window user is one of the WBU_ constants. If rear_view_flag is |
||
| 115 | // set, show a rear view. If label is non-NULL, print the label at |
||
| 116 | // the top of the window. |
||
| 117 | void do_cockpit_window_view(int win, const object &viewer, int rear_view_flag, int user, const char *label, const player_info * = nullptr); |
||
| 118 | void do_cockpit_window_view(int win, int user); |
||
| 119 | } |
||
| 120 | #endif |
||
| 121 | |||
| 122 | #define GAUGE_HUD_NUMMODES 4 |
||
| 123 | |||
| 124 | extern int Color_0_31_0; |
||
| 125 | |||
| 126 | // defines for the reticle(s) |
||
| 127 | #define RET_TYPE_CLASSIC 0 |
||
| 128 | #define RET_TYPE_CLASSIC_REBOOT 1 |
||
| 129 | #define RET_TYPE_NONE 2 |
||
| 130 | #define RET_TYPE_X 3 |
||
| 131 | #define RET_TYPE_DOT 4 |
||
| 132 | #define RET_TYPE_CIRCLE 5 |
||
| 133 | #define RET_TYPE_CROSS_V1 6 |
||
| 134 | #define RET_TYPE_CROSS_V2 7 |
||
| 135 | #define RET_TYPE_ANGLE 8 |
||
| 136 | |||
| 137 | #define RET_COLOR_DEFAULT_R 0 |
||
| 138 | #define RET_COLOR_DEFAULT_G 32 |
||
| 139 | #define RET_COLOR_DEFAULT_B 0 |
||
| 140 | #define RET_COLOR_DEFAULT_A 0 |
||
| 141 | |||
| 142 | #endif |