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 for auto-map stuff. |
||
23 | * |
||
24 | */ |
||
25 | |||
26 | #pragma once |
||
27 | |||
28 | #include "pstypes.h" |
||
29 | |||
30 | #ifdef __cplusplus |
||
31 | #include <cstddef> |
||
32 | #include "fwd-segment.h" |
||
33 | #include "dxxsconf.h" |
||
34 | #include "dsx-ns.h" |
||
35 | #include <array> |
||
36 | |||
37 | namespace dcx { |
||
38 | extern int Automap_active; |
||
39 | } |
||
40 | #ifdef dsx |
||
41 | namespace dsx { |
||
42 | void do_automap(); |
||
43 | extern void automap_clear_visited(); |
||
44 | } |
||
45 | #endif |
||
46 | |||
47 | #if defined(DXX_BUILD_DESCENT_II) |
||
48 | #include "object.h" |
||
49 | #include "ntstring.h" |
||
50 | #include "d_array.h" |
||
51 | #include "d_range.h" |
||
52 | #include "fwd-window.h" |
||
53 | #include "segment.h" |
||
54 | |||
55 | namespace dsx { |
||
56 | void DropBuddyMarker(object &objp); |
||
57 | void InitMarkerInput(); |
||
58 | window_event_result MarkerInputMessage(int key); |
||
59 | |||
60 | constexpr std::integral_constant<std::size_t, 16> NUM_MARKERS{}; |
||
61 | constexpr std::integral_constant<std::size_t, 40> MARKER_MESSAGE_LEN{}; |
||
62 | struct marker_message_text_t : ntstring<MARKER_MESSAGE_LEN - 1> |
||
63 | { |
||
64 | constexpr marker_message_text_t() : |
||
65 | ntstring() |
||
66 | { |
||
67 | } |
||
68 | }; |
||
69 | |||
70 | struct d_marker_object_numbers |
||
71 | { |
||
72 | enumerated_array<imobjidx_t, NUM_MARKERS, game_marker_index> imobjidx = {init_object_number_array<imobjidx_t>(std::make_index_sequence<NUM_MARKERS>())}; |
||
73 | }; |
||
74 | |||
75 | struct d_marker_state : d_marker_object_numbers |
||
76 | { |
||
77 | player_marker_index MarkerBeingDefined = player_marker_index::None; |
||
78 | game_marker_index HighlightMarker = game_marker_index::None; |
||
79 | player_marker_index LastMarkerDropped = player_marker_index::None; |
||
80 | enumerated_array<marker_message_text_t, NUM_MARKERS, game_marker_index> message; |
||
81 | bool DefiningMarkerMessage() const |
||
82 | { |
||
83 | return MarkerBeingDefined != player_marker_index::None; |
||
84 | } |
||
85 | static unsigned get_markers_per_player(unsigned game_mode, unsigned netgame_max_players); |
||
86 | }; |
||
87 | |||
88 | game_marker_index convert_player_marker_index_to_game_marker_index(unsigned game_mode, unsigned max_numplayers, unsigned player_num, player_marker_index base_marker_num); |
||
89 | xrange<player_marker_index> get_player_marker_range(unsigned maxdrop); |
||
90 | extern marker_message_text_t Marker_input; |
||
91 | extern d_marker_state MarkerState; |
||
92 | } |
||
93 | #endif |
||
94 | |||
95 | #endif |