summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@coffee.donpellegrino.com>2009-08-17 17:00:45 (GMT)
committer Don Pellegrino <don@coffee.donpellegrino.com>2009-08-17 17:00:45 (GMT)
commite415bcfa0167c72529af8f80f25e6dfcd6ecfca0 (patch) (side-by-side diff)
tree1f8428af75b752b52349248697b88a9c40239801
parent8af3b6fb74db30540bc877049ca795fc2428f383 (diff)
downloadexp005-e415bcfa0167c72529af8f80f25e6dfcd6ecfca0.zip
exp005-e415bcfa0167c72529af8f80f25e6dfcd6ecfca0.tar.gz
exp005-e415bcfa0167c72529af8f80f25e6dfcd6ecfca0.tar.bz2
Refactored controller package.
-rw-r--r--src/controller/actions/set_ortho.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/controller/actions/set_ortho.c b/src/controller/actions/set_ortho.c
new file mode 100644
index 0000000..83b42f4
--- a/dev/null
+++ b/src/controller/actions/set_ortho.c
@@ -0,0 +1,21 @@
+#include "set_ortho.h"
+#include "../../view/exp004state0.h"
+#include <GL/glut.h>
+
+#define S exp004state0
+
+void
+set_ortho (void)
+{
+ if (S.zoom.active)
+ {
+ gluOrtho2D (S.zoom.coords[0],
+ S.zoom.coords[1], S.zoom.coords[2], S.zoom.coords[3]);
+ }
+ else
+ {
+ gluOrtho2D (S.ortho.min_x, S.ortho.max_x, S.ortho.min_y, S.ortho.max_y);
+ }
+
+ return;
+}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.