summaryrefslogtreecommitdiffstats
Side-by-side diff
-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 @@
#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;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.