1 /* $Id: kcurve.c,v 1.2 2004-12-19 14:52:48 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Functions for curve stuff.
22 static char rcsid[] = "$Id: kcurve.c,v 1.2 2004-12-19 14:52:48 btb Exp $";
31 static fix r1scale, r4scale;
42 if ( (Markedsegp != 0) && !IS_CHILD(Markedsegp->children[Markedside])) {
43 r1scale = r4scale = F1_0*20;
44 autosave_mine( mine_filename );
45 diagnostic_message("Curve Generated.");
46 Update_flags |= UF_WORLD_CHANGED;
47 curve = generate_curve(r1scale, r4scale);
50 strcpy(undo_status[Autosave_count], "Curve Generation UNDONE.\n");
52 if (curve == 0) diagnostic_message("Cannot generate curve -- check Current segment.");
54 else diagnostic_message("Cannot generate curve -- check Marked segment.");
55 warn_if_concave_segments();
63 Update_flags |= UF_WORLD_CHANGED;
66 generate_curve(r1scale, r4scale);
67 diagnostic_message("R4 vector decreased.");
69 warn_if_concave_segments();
77 Update_flags |= UF_WORLD_CHANGED;
80 generate_curve(r1scale, r4scale);
81 diagnostic_message("R4 vector increased.");
83 warn_if_concave_segments();
91 Update_flags |= UF_WORLD_CHANGED;
94 generate_curve(r1scale, r4scale);
95 diagnostic_message("R1 vector decreased.");
97 warn_if_concave_segments();
105 Update_flags |= UF_WORLD_CHANGED;
108 generate_curve(r1scale, r4scale);
109 diagnostic_message("R1 vector increased.");
111 warn_if_concave_segments();
118 // fix_bogus_uvs_all();
119 set_average_light_on_curside();
122 Update_flags |= UF_WORLD_CHANGED;
126 diagnostic_message("Curve Deleted.");
127 warn_if_concave_segments();
134 if (curve) curve = 0;
135 //autosave_mine( mine_filename );
136 //strcpy(undo_status[Autosave_count], "Curve Generation UNDONE.\n");