summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/model/exp004base.sqc11
-rw-r--r--src/model/exp004state.h35
-rw-r--r--src/view/exp004init.c5
-rw-r--r--src/view/exp004view.c4
4 files changed, 18 insertions, 37 deletions
diff --git a/src/model/exp004base.sqc b/src/model/exp004base.sqc
index cbf2291..2742138 100644
--- a/src/model/exp004base.sqc
+++ b/src/model/exp004base.sqc
@@ -4,11 +4,12 @@
44
5#include "exp004base.h"5#include "exp004base.h"
6#include "../view/exp004state0.h"6#include "../view/exp004state0.h"
7#include "../util/check_error.h"
7#include <GL/glut.h>8#include <GL/glut.h>
8#include <stdio.h>9#include <stdio.h>
9#include <string.h>10#include <string.h>
1011#include "sqlca.h"
11EXEC SQL INCLUDE sqlca;12extern struct sqlca sqlca;
1213
13/*14/*
14 * A simple alias to make the code more readable.15 * A simple alias to make the code more readable.
@@ -18,8 +19,6 @@ EXEC SQL INCLUDE sqlca;
18void19void
19exp004base (void)20exp004base (void)
20{21{
21 EXEC SQL CONNECT TO exp004;
22
23 /* 22 /*
24 * This implementation can be improved by mapping the video memory23 * This implementation can be improved by mapping the video memory
25 * directly rather than loading into system memory and then copying24 * directly rather than loading into system memory and then copying
@@ -49,7 +48,7 @@ exp004base (void)
49 EXEC SQL FETCH c2 INTO :coordinates;48 EXEC SQL FETCH c2 INTO :coordinates;
50 while (sqlca.sqlcode != 100)49 while (sqlca.sqlcode != 100)
51 {50 {
52 int i = coordinates.coord_id;51 int i = coordinates.coord_id - 1;
5352
54 strncpy(S.gi_data[i], 53 strncpy(S.gi_data[i],
55 coordinates.gi.data, 54 coordinates.gi.data,
@@ -70,7 +69,7 @@ exp004base (void)
70 /*69 /*
71 * Deselected by default.70 * Deselected by default.
72 */71 */
73 S.selection[i] = false;72 S.selection.set[i] = false;
7473
75 S.base_colors_data[i][0] = DEFAULT_COLOR_R;74 S.base_colors_data[i][0] = DEFAULT_COLOR_R;
76 S.base_colors_data[i][1] = DEFAULT_COLOR_G;75 S.base_colors_data[i][1] = DEFAULT_COLOR_G;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.