2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
14 * $Source: /cvs/cvsroot/d2x/main/editor/kview.c,v $
17 * $Date: 2004-12-19 13:54:27 $
19 * Functions for changing viewer's position
21 * $Log: not supported by cvs2svn $
22 * Revision 1.1.1.1 1999/06/14 22:03:34 donut
23 * Import of d1x 1.37 source.
25 * Revision 2.0 1995/02/27 11:34:21 john
26 * Version 2.0! No anonymous unions, Watcom 10.0, with no need
29 * Revision 1.11 1993/12/02 12:39:41 matt
30 * Removed extra includes
32 * Revision 1.10 1993/11/16 13:47:54 john
33 * Xchanged move away/closer
35 * Revision 1.9 1993/11/16 13:45:32 john
36 * Exchanged zoom in/out.
38 * Revision 1.8 1993/11/05 17:32:56 john
42 * Revision 1.7 1993/11/03 12:10:21 yuan
43 * No keypress associated with chase mode
45 * Revision 1.6 1993/11/02 17:06:55 yuan
48 * Revision 1.5 1993/11/01 12:48:59 yuan
49 * Added Chase mode icon to status bar.
51 * Revision 1.4 1993/10/29 19:12:55 yuan
52 * Added diagnostic messages
54 * Revision 1.3 1993/10/27 18:26:16 matt
55 * Made zoom & related keys not do anything if no current view
57 * Revision 1.2 1993/10/19 20:54:33 matt
58 * Changed/cleaned up window updates
60 * Revision 1.1 1993/10/13 18:53:34 john
67 static char rcsid[] = "$Id: kview.c,v 1.1 2004-12-19 13:54:27 btb Exp $";
73 // ---------- zoom control on current window ----------
76 if (!current_view) return 0.0;
78 current_view->ev_zoom = fixmul(current_view->ev_zoom,62259);
79 current_view->ev_changed = 1;
85 if (!current_view) return 0.0;
87 current_view->ev_zoom = fixmul(current_view->ev_zoom,68985);
88 current_view->ev_changed = 1;
92 // ---------- distance-of-viewer control on current window ----------
95 if (!current_view) return 0.0;
97 current_view->ev_dist = fixmul(current_view->ev_dist,62259);
98 current_view->ev_changed = 1;
104 if (!current_view) return 0.0;
106 current_view->ev_dist = fixmul(current_view->ev_dist,68985);
107 current_view->ev_changed = 1;
111 // ---------- Toggle chase mode. ----------
113 int ToggleChaseMode()
115 Funky_chase_mode = !Funky_chase_mode;
116 set_view_target_from_segment(Cursegp);
117 if (Funky_chase_mode == 1) {
118 diagnostic_message("Chase mode ON.");
120 if (Funky_chase_mode == 0) {
121 diagnostic_message("Chase mode OFF.");
123 return Funky_chase_mode;