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-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. 18 */ 19 20 /* 21 * 22 * Globals for editor. 23 * 24 */ 25 26 27 #include <stdlib.h> 28 #include "inferno.h" 29 #include "segment.h" 30 #include "object.h" 31 #include "editor.h" 32 #include "editor/esegment.h" 33 34 // Global pointer to current vertices, right now always Vertices. Set in create_new_mine. 35 imsegptridx_t Cursegp = segment_none; // Pointer to current segment in mine. 36 imsegptridx_t Markedsegp = segment_none; // Marked segment, used in conjunction with *Cursegp to form joints. 37 int Curside; // Side index in 0..MAX_SIDES_PER_SEGMENT of active side. 38 int Curedge; // Current edge on current side, in 0..3 39 int Curvert; // Current vertex on current side, in 0..3 40 int AttachSide = WFRONT; // Side on segment to attach. 41 int Markedside; // Marked side on Markedsegp. 42 43 int Draw_all_segments; // Set to 1 means draw_world draws all segments in Segments, else draw only connected segments 44 45 selected_segment_array_t Selected_segs; // List of segment numbers currently selected 46 47 warning_segment_array_t Warning_segs; // List of segment numbers currently selected 48 49 found_segment_array_t Found_segs; // List of warning-worthy segments 50 51 int Show_axes_flag = 0; // 0 = don't show, !0 = do show coordinate axes in *Cursegp orientation 52 53 // Variables global to this editor.c and the k?????.c files. 54 uint Update_flags = UF_ALL; //force total redraw 55 int Funky_chase_mode = 0; 56 vms_angvec Seg_orientation = {0,0,0}; 57 int mine_changed = 0; 58 int ModeFlag; 59 editor_view *current_view; 60 61 int SegSizeMode = 1; // Mode = 0/1 = not/is legal to move bound vertices, 62 63 //the view for the different windows. 64 editor_view LargeView = {0,1, NULL, i2f(100),IDENTITY_MATRIX,f1_0}; 65 66 std::array<editor_view *, 1> Views = {{&LargeView, 67 }}; 68 69 int Lock_view_to_cursegp = 1; // !0 means whenever cursegp changes, view it 70 71 int Num_tilings = 1; // Number of tilings per wall 72 73 objnum_t Cur_object_index = object_none; 74 75 // The current object type and id 76 short Cur_object_type = 4; // OBJ_PLAYER 77 short Cur_object_id = 0; 78 79 // !0 if a degenerate segment has been found. 80 int Degenerate_segment_found=0; 81 82