Subversion Repositories Games.Descent

Rev

Blame | Last modification | View Log | Download | RSS feed

  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. #pragma once
  8.  
  9. #include "dxxsconf.h"
  10.  
  11. #include "segment.h"
  12. #include "editor/editor.h"
  13. #include <array>
  14.  
  15. #if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
  16. extern imsegptridx_t Cursegp;                           // Pointer to current segment in the mine, the one to which things happen.
  17.  
  18. #define New_segment     (Segments.back())
  19.  
  20. extern  int             Curside;                                        // Side index in 0..MAX_SIDES_PER_SEGMENT of active side.
  21. extern  int             Curedge;                                        //      Current edge on current side, in 0..3
  22. extern  int             Curvert;                                        //      Current vertex on current side, in 0..3
  23. extern  int             AttachSide;                             //      Side on segment to attach
  24. extern  int             Draw_all_segments;      // Set to 1 means draw_world draws all segments in Segments, else draw only connected segments
  25. extern imsegptridx_t Markedsegp;                        // Marked segment, used in conjunction with *Cursegp to form joints.
  26. extern std::array<segment *, MAX_GROUPS+1> Groupsegp;
  27. #endif
  28. extern  int             Markedside;                             // Marked side on Markedsegp.
  29.  
  30. // The extra group in the following arrays is used for group rotation.
  31. extern std::array<group, MAX_GROUPS+1> GroupList;
  32. extern std::array<int, MAX_GROUPS+1> Groupside;
  33. extern  int             current_group;
  34. extern unsigned num_groups;
  35. extern  int             Current_group;
  36.  
  37. struct found_segment_array_t : public count_segment_array_t {};
  38.  
  39. extern found_segment_array_t Found_segs;                        // List of segment numbers "found" under cursor click
  40.  
  41. struct selected_segment_array_t : public count_segment_array_t {};
  42.  
  43. extern selected_segment_array_t Selected_segs;          // List of segment numbers currently selected
  44.  
  45. struct warning_segment_array_t : public count_segment_array_t {};
  46.  
  47. extern warning_segment_array_t Warning_segs;            // List of warning-worthy segments
  48.