-rw-r--r-- | src/model/exp004base.sqc | 11 | ||||
-rw-r--r-- | src/model/exp004state.h | 35 | ||||
-rw-r--r-- | src/view/exp004init.c | 5 | ||||
-rw-r--r-- | src/view/exp004view.c | 4 |
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 @@ #include "exp004base.h" #include "../view/exp004state0.h" +#include "../util/check_error.h" #include <GL/glut.h> #include <stdio.h> #include <string.h> - -EXEC SQL INCLUDE sqlca; +#include "sqlca.h" +extern struct sqlca sqlca; /* * A simple alias to make the code more readable. @@ -18,8 +19,6 @@ EXEC SQL INCLUDE sqlca; void exp004base (void) { - EXEC SQL CONNECT TO exp004; - /* * This implementation can be improved by mapping the video memory * directly rather than loading into system memory and then copying @@ -49,7 +48,7 @@ exp004base (void) EXEC SQL FETCH c2 INTO :coordinates; while (sqlca.sqlcode != 100) { - int i = coordinates.coord_id; + int i = coordinates.coord_id - 1; strncpy(S.gi_data[i], coordinates.gi.data, @@ -70,7 +69,7 @@ exp004base (void) /* * Deselected by default. */ - S.selection[i] = false; + S.selection.set[i] = false; S.base_colors_data[i][0] = DEFAULT_COLOR_R; S.base_colors_data[i][1] = DEFAULT_COLOR_G; |