dxx-rebirth/common/main/automap.h

94 lines
3 KiB
C
Raw Normal View History

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 for auto-map stuff.
*
*/
2015-01-29 04:27:36 +00:00
#pragma once
2006-03-20 17:12:09 +00:00
2013-10-26 03:40:50 +00:00
#include "pstypes.h"
2013-12-28 18:56:34 +00:00
#include <cstddef>
#include "fwd-segment.h"
2013-12-15 17:01:40 +00:00
#include "dxxsconf.h"
#include "dsx-ns.h"
#include <array>
2015-12-13 18:00:49 +00:00
namespace dcx {
extern int Automap_active;
}
2016-01-09 16:38:15 +00:00
#ifdef dsx
2015-12-13 18:00:49 +00:00
namespace dsx {
2014-07-16 02:35:14 +00:00
void do_automap();
void automap_clear_visited(d_level_unique_automap_state &LevelUniqueAutomapState);
}
#if defined(DXX_BUILD_DESCENT_II)
2018-09-09 01:00:39 +00:00
#include "object.h"
2014-12-22 04:35:48 +00:00
#include "ntstring.h"
2020-07-22 03:11:18 +00:00
#include "d_array.h"
#include "d_range.h"
#include "fwd-event.h"
#include "fwd-game.h"
2018-06-06 04:53:45 +00:00
#include "segment.h"
2015-12-13 18:00:49 +00:00
namespace dsx {
void DropBuddyMarker(object &objp);
2012-11-11 00:14:30 +00:00
void InitMarkerInput();
window_event_result MarkerInputMessage(int key, control_info &Controls);
2006-03-20 17:12:09 +00:00
constexpr std::integral_constant<std::size_t, 16> NUM_MARKERS{};
constexpr std::integral_constant<std::size_t, 40> MARKER_MESSAGE_LEN{};
struct marker_message_text_t : ntstring<MARKER_MESSAGE_LEN - 1>
{
constexpr marker_message_text_t() :
ntstring()
{
}
};
struct d_marker_object_numbers
{
2020-07-22 03:11:18 +00:00
enumerated_array<imobjidx_t, NUM_MARKERS, game_marker_index> imobjidx = {init_object_number_array<imobjidx_t>(std::make_index_sequence<NUM_MARKERS>())};
};
struct d_marker_state : d_marker_object_numbers
{
2020-07-22 03:11:18 +00:00
player_marker_index MarkerBeingDefined = player_marker_index::None;
game_marker_index HighlightMarker = game_marker_index::None;
player_marker_index LastMarkerDropped = player_marker_index::None;
enumerated_array<marker_message_text_t, NUM_MARKERS, game_marker_index> message;
bool DefiningMarkerMessage() const
{
2020-07-22 03:11:18 +00:00
return MarkerBeingDefined != player_marker_index::None;
}
static unsigned get_markers_per_player(game_mode_flags game_mode, unsigned netgame_max_players);
};
2006-03-20 17:12:09 +00:00
game_marker_index convert_player_marker_index_to_game_marker_index(game_mode_flags game_mode, unsigned max_numplayers, unsigned player_num, player_marker_index base_marker_num);
2020-07-22 03:11:18 +00:00
xrange<player_marker_index> get_player_marker_range(unsigned maxdrop);
2013-12-28 18:56:34 +00:00
extern marker_message_text_t Marker_input;
extern d_marker_state MarkerState;
}
#endif
#endif