2006-03-20 17:12:09 +00:00
|
|
|
/*
|
2014-06-01 17:55:23 +00:00
|
|
|
* Portions of this file are copyright Rebirth contributors and licensed as
|
|
|
|
* described in COPYING.txt.
|
|
|
|
* Portions of this file are copyright Parallax Software and licensed
|
|
|
|
* according to the Parallax license below.
|
|
|
|
* See COPYING.txt for license details.
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Prototypes and defines for gauges
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-01-29 04:27:36 +00:00
|
|
|
#pragma once
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-07-25 23:10:45 +00:00
|
|
|
#include "fwd-player.h"
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-01-29 04:27:35 +00:00
|
|
|
struct bitmap_index;
|
|
|
|
|
2015-10-10 03:44:14 +00:00
|
|
|
#include "fwd-object.h"
|
2020-10-12 03:28:26 +00:00
|
|
|
#include "kconfig.h"
|
2012-11-11 22:12:51 +00:00
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
//from gauges.c
|
|
|
|
|
2020-08-10 03:45:13 +00:00
|
|
|
namespace dcx {
|
|
|
|
|
|
|
|
enum class gauge_inset_window_view : unsigned
|
|
|
|
{
|
|
|
|
primary,
|
|
|
|
secondary,
|
|
|
|
};
|
|
|
|
|
2020-10-12 03:28:26 +00:00
|
|
|
void show_mousefs_indicator(grs_canvas &canvas, int mx, int my, int mz, int x, int y, int size);
|
2020-08-10 03:45:13 +00:00
|
|
|
}
|
|
|
|
|
2013-03-03 01:03:33 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_I)
|
2016-02-06 22:12:54 +00:00
|
|
|
#define MAX_GAUGE_BMS_PC 80u // increased from 56 to 80 by a very unhappy MK on 10/24/94.
|
|
|
|
#define MAX_GAUGE_BMS_MAC 85u
|
2013-03-03 01:03:33 +00:00
|
|
|
#define MAX_GAUGE_BMS (MacPig ? MAX_GAUGE_BMS_MAC : MAX_GAUGE_BMS_PC)
|
|
|
|
|
2020-05-02 21:18:42 +00:00
|
|
|
extern std::array<bitmap_index, MAX_GAUGE_BMS_MAC> Gauges; // Array of all gauge bitmaps.
|
2013-03-03 01:03:33 +00:00
|
|
|
#elif defined(DXX_BUILD_DESCENT_II)
|
2016-02-06 22:12:54 +00:00
|
|
|
#define MAX_GAUGE_BMS 100u // increased from 56 to 80 by a very unhappy MK on 10/24/94.
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2020-05-02 21:18:42 +00:00
|
|
|
extern std::array<bitmap_index, MAX_GAUGE_BMS> Gauges; // Array of all gauge bitmaps.
|
|
|
|
extern std::array<bitmap_index, MAX_GAUGE_BMS> Gauges_hires; // hires gauges
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// Flags for gauges/hud stuff
|
|
|
|
|
2016-08-25 04:05:32 +00:00
|
|
|
#ifdef dsx
|
|
|
|
namespace dsx {
|
2021-09-12 16:20:52 +00:00
|
|
|
void add_points_to_score(player_info &, unsigned points, game_mode_flags);
|
|
|
|
void add_bonus_points_to_score(player_info &, unsigned points, game_mode_flags);
|
2021-09-12 16:20:52 +00:00
|
|
|
void render_gauges(grs_canvas &, game_mode_flags game_mode);
|
2006-03-20 17:12:09 +00:00
|
|
|
void init_gauges(void);
|
2021-09-12 16:20:52 +00:00
|
|
|
void draw_hud(grs_canvas &, const object &, const control_info &Controls, game_mode_flags); // draw all the HUD stuff
|
2016-08-25 04:05:32 +00:00
|
|
|
}
|
|
|
|
#endif
|
2008-10-28 13:28:10 +00:00
|
|
|
void close_gauges(void);
|
2016-08-25 04:05:32 +00:00
|
|
|
#ifdef dsx
|
|
|
|
namespace dsx {
|
2017-03-11 19:56:22 +00:00
|
|
|
void show_reticle(grs_canvas &canvas, const player_info &, int reticle_type, int secondary_display);
|
2021-09-12 16:20:52 +00:00
|
|
|
void show_HUD_names(grs_canvas &, game_mode_flags);
|
2016-08-25 04:05:32 +00:00
|
|
|
}
|
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2017-02-11 21:42:46 +00:00
|
|
|
void player_dead_message(grs_canvas &);
|
2006-03-20 17:12:09 +00:00
|
|
|
//extern void say_afterburner_status(void);
|
|
|
|
|
|
|
|
// from testgaug.c
|
|
|
|
|
2016-08-25 04:05:32 +00:00
|
|
|
#ifdef dsx
|
|
|
|
namespace dsx {
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void update_laser_weapon_info(void);
|
2016-12-11 01:56:43 +00:00
|
|
|
void play_homing_warning(const player_info &);
|
2016-08-25 04:05:32 +00:00
|
|
|
}
|
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-12-22 22:03:07 +00:00
|
|
|
struct rgb {
|
2006-03-20 17:12:09 +00:00
|
|
|
ubyte r,g,b;
|
2013-12-22 22:03:07 +00:00
|
|
|
};
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2020-05-02 21:18:42 +00:00
|
|
|
using rgb_array_t = const std::array<rgb, MAX_PLAYERS>;
|
2015-03-09 03:33:07 +00:00
|
|
|
extern const rgb_array_t player_rgb_normal;
|
|
|
|
|
|
|
|
/* Stub for mods that provide switchable player colors */
|
|
|
|
class rgb_array_wrapper
|
|
|
|
{
|
|
|
|
public:
|
2015-03-21 21:11:12 +00:00
|
|
|
const rgb &operator[](std::size_t i) const
|
2015-03-09 03:33:07 +00:00
|
|
|
{
|
|
|
|
return player_rgb_normal[i];
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
constexpr rgb_array_wrapper player_rgb{};
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-03-03 01:03:33 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_II)
|
2019-03-03 00:31:08 +00:00
|
|
|
namespace dsx {
|
2020-08-10 03:45:13 +00:00
|
|
|
|
2021-01-17 22:23:23 +00:00
|
|
|
enum class weapon_box_user : uint8_t
|
|
|
|
{
|
|
|
|
weapon,
|
|
|
|
missile,
|
|
|
|
escort,
|
|
|
|
rear,
|
|
|
|
coop,
|
|
|
|
guided,
|
|
|
|
marker,
|
|
|
|
post_missile_static,
|
|
|
|
};
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
// draws a 3d view into one of the cockpit windows. win is 0 for
|
|
|
|
// left, 1 for right. viewer is object. NULL object means give up
|
|
|
|
// window user is one of the WBU_ constants. If rear_view_flag is
|
|
|
|
// set, show a rear view. If label is non-NULL, print the label at
|
|
|
|
// the top of the window.
|
2021-09-12 16:20:52 +00:00
|
|
|
void do_cockpit_window_view(grs_canvas &, gauge_inset_window_view win, const object &viewer, int rear_view_flag, weapon_box_user user, const char *label, const player_info * = nullptr);
|
2021-01-17 22:23:23 +00:00
|
|
|
void do_cockpit_window_view(gauge_inset_window_view win, weapon_box_user user);
|
2019-03-03 00:31:08 +00:00
|
|
|
}
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-04-08 12:28:41 +00:00
|
|
|
#define GAUGE_HUD_NUMMODES 4
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2012-11-11 00:14:30 +00:00
|
|
|
extern int Color_0_31_0;
|
2007-10-05 23:47:16 +00:00
|
|
|
|
2011-01-10 15:12:04 +00:00
|
|
|
// defines for the reticle(s)
|
|
|
|
#define RET_TYPE_CLASSIC 0
|
|
|
|
#define RET_TYPE_CLASSIC_REBOOT 1
|
|
|
|
#define RET_TYPE_NONE 2
|
|
|
|
#define RET_TYPE_X 3
|
|
|
|
#define RET_TYPE_DOT 4
|
|
|
|
#define RET_TYPE_CIRCLE 5
|
|
|
|
#define RET_TYPE_CROSS_V1 6
|
|
|
|
#define RET_TYPE_CROSS_V2 7
|
|
|
|
#define RET_TYPE_ANGLE 8
|
|
|
|
|
|
|
|
#define RET_COLOR_DEFAULT_R 0
|
|
|
|
#define RET_COLOR_DEFAULT_G 32
|
|
|
|
#define RET_COLOR_DEFAULT_B 0
|
|
|
|
#define RET_COLOR_DEFAULT_A 0
|