| 1 |
/* |
| 2 |
* This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>. |
| 3 |
* It is copyright by its individual contributors, as recorded in the |
| 4 |
* project's Git history. See COPYING.txt at the top level for license |
| 5 |
* terms and a link to the Git history. |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include <span> |
| 11 |
#include <stdarg.h> |
| 12 |
#include "dxxsconf.h" |
| 13 |
#include "dsx-ns.h" |
| 14 |
#include "fmtcheck.h" |
| 15 |
#include "fwd-gr.h" |
| 16 |
|
| 17 |
#define HUD_MAX_NUM_DISP 4 |
| 18 |
#define HUD_MAX_NUM_STOR 20 |
| 19 |
|
| 20 |
// classes - expanded whenever needed |
| 21 |
#define HM_DEFAULT 1 // just some normal message |
| 22 |
#define HM_MULTI 2 // a message related to multiplayer (game and player messages) |
| 23 |
#define HM_REDUNDANT 4 // "you already have..."-type messages. stuff a player is able to supress |
| 24 |
#define HM_MAYDUPL 8 // messages that might appear once per frame. for these we want to check all messages we have in queue and supress it if so |
| 25 |
|
| 26 |
extern int HUD_toolong; |
| 27 |
extern void HUD_clear_messages(); |
| 28 |
#ifdef DXX_BUILD_DESCENT |
| 29 |
namespace dsx { |
| 30 |
void HUD_render_message_frame(grs_canvas &); |
| 31 |
} |
| 32 |
#endif |
| 33 |
int HUD_init_message(int class_flag, const char * format, ... ) dxx_compiler_attribute_format_printf(2, 3); |
| 34 |
int HUD_init_message_va(int class_flag, const char * format, va_list args) dxx_compiler_attribute_format_printf(2, 0); |
| 35 |
int HUD_init_message_literal(int class_flag, std::span<const char> str); |