author | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-08-14 19:32:39 (GMT) |
---|---|---|
committer | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-08-14 19:32:39 (GMT) |
commit | 815edf7a8fa94b2d576bade39ccb1b1178113f2f (patch) (unidiff) | |
tree | d8e06545daec12c683357b214f5254dab7d6cfdf | |
parent | cae64edae40d4a432fed62ea3d0b9adc3a75049d (diff) | |
download | exp005-815edf7a8fa94b2d576bade39ccb1b1178113f2f.zip exp005-815edf7a8fa94b2d576bade39ccb1b1178113f2f.tar.gz exp005-815edf7a8fa94b2d576bade39ccb1b1178113f2f.tar.bz2 |
Modified to use dynamic memory allocation for the number of nodes.
-rw-r--r-- | src/model/exp004state.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/model/exp004state.h b/src/model/exp004state.h index f6e99c0..1173f87 100644 --- a/src/model/exp004state.h +++ b/src/model/exp004state.h | |||
@@ -25,7 +25,8 @@ | |||
25 | 25 | ||
26 | typedef enum | 26 | typedef enum |
27 | { PROTEIN_GEOMETRY, PROTEIN_SELECTED_GEOMETRY, DENSITY_LEGEND_GEOMETRY, | 27 | { PROTEIN_GEOMETRY, PROTEIN_SELECTED_GEOMETRY, DENSITY_LEGEND_GEOMETRY, |
28 | MAP_GEOMETRY } LISTS; | 28 | MAP_GEOMETRY |
29 | } LISTS; | ||
29 | #define NUM_LISTS 2 | 30 | #define NUM_LISTS 2 |
30 | 31 | ||
31 | /* | 32 | /* |
@@ -33,6 +34,11 @@ typedef enum | |||
33 | */ | 34 | */ |
34 | typedef struct | 35 | typedef struct |
35 | { | 36 | { |
37 | /* | ||
38 | * Number of nodes having coordinates assigned. | ||
39 | */ | ||
40 | unsigned int rows; | ||
41 | |||
36 | /* | 42 | /* |
37 | * Display lists. | 43 | * Display lists. |
38 | */ | 44 | */ |
@@ -85,19 +91,19 @@ typedef struct | |||
85 | unsigned int buffers[1]; | 91 | unsigned int buffers[1]; |
86 | 92 | ||
87 | /* | 93 | /* |
88 | * GI Identifiers indexed by row. | 94 | * GI Identifiers indexed by row. Storage is [rows][20]. |
89 | */ | 95 | */ |
90 | char gi_data[ROWS][20]; | 96 | char *gi_data; |
91 | 97 | ||
92 | /* | 98 | /* |
93 | * 2D coordinates for each protein. | 99 | * 2D coordinates for each protein. Storage is [rows][2]. |
94 | */ | 100 | */ |
95 | float base_vertices_data[ROWS][2]; | 101 | float *base_vertices_data; |
96 | 102 | ||
97 | /* | 103 | /* |
98 | * RGB color for each protein. | 104 | * RGB color for each protein. Storage is [rows][4]. |
99 | */ | 105 | */ |
100 | float base_colors_data[ROWS][4]; | 106 | float *base_colors_data; |
101 | 107 | ||
102 | SELECTION_INFO selection; | 108 | SELECTION_INFO selection; |
103 | 109 | ||