1 /* $Id: kview.c,v 1.3 2004-12-19 15:21:11 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 changing viewer's position
22 static char rcsid[] = "$Id: kview.c,v 1.3 2004-12-19 15:21:11 btb Exp $";
32 // ---------- zoom control on current window ----------
35 if (!current_view) return 0.0;
37 current_view->ev_zoom = fixmul(current_view->ev_zoom,62259);
38 current_view->ev_changed = 1;
44 if (!current_view) return 0.0;
46 current_view->ev_zoom = fixmul(current_view->ev_zoom,68985);
47 current_view->ev_changed = 1;
51 // ---------- distance-of-viewer control on current window ----------
54 if (!current_view) return 0.0;
56 current_view->ev_dist = fixmul(current_view->ev_dist,62259);
57 current_view->ev_changed = 1;
63 if (!current_view) return 0.0;
65 current_view->ev_dist = fixmul(current_view->ev_dist,68985);
66 current_view->ev_changed = 1;
70 // ---------- Toggle chase mode. ----------
74 Funky_chase_mode = !Funky_chase_mode;
75 set_view_target_from_segment(Cursegp);
76 if (Funky_chase_mode == 1) {
77 diagnostic_message("Chase mode ON.");
79 if (Funky_chase_mode == 0) {
80 diagnostic_message("Chase mode OFF.");
82 return Funky_chase_mode;