feat: implement grid-of-grids with 8 separate 8x8 clip grids and zoom mode

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-02 23:07:35 +00:00
parent cf42996967
commit 8c9804d2ef
6 changed files with 179 additions and 64 deletions

8
main.c
View File

@@ -84,6 +84,14 @@ int main(int argc, char *argv[]) {
for (int i = 0; i < MAX_CLIPS; i++) {
initial_state.clips[i].state = CLIP_EMPTY;
initial_state.clips[i].buffer = (float *)calloc(MAX_BUFFER_SIZE, sizeof(float));
if (!initial_state.clips[i].buffer) {
fprintf(stderr, "Failed to allocate buffer for clip %d\n", i);
// Cleanup previously allocated buffers
for (int j = 0; j < i; j++) {
free(initial_state.clips[j].buffer);
}
return 1;
}
initial_state.clips[i].buffer_size = 0;
initial_state.clips[i].write_position = 0;
initial_state.clips[i].read_position = 0;