From a204330db26a0c3f5b4e88bdc495af350e262ab4 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 18 Apr 2017 01:33:44 -0500 Subject: the changes needed to get tictactoe running pretty. --- src/hackvr.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/hackvr.c') diff --git a/src/hackvr.c b/src/hackvr.c index d97417a..04fa9a2 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -84,6 +84,7 @@ char **line_splitter(char *line,int *rlen) { int load_stdin() {//what is this returning? struct c3_shape s; // struct c3_line l; + c3_group_rot_t *gr; char *command; char *line; char *id; @@ -173,15 +174,16 @@ int load_stdin() {//what is this returning? continue; } if(!strcmp(command,"deletegroup")) { - for(j=0;global.shape[j];j++) {//mark first. compress later. - if(!strcmp(global.shape[j]->id,s.id)) {//??? where is s.id supposed to be set from? - free(global.shape[j]->id); - free(global.shape[j]); + for(j=0;global.shape[j];j++) { + if(!strcmp(global.shape[j]->id,a[2])) { +// free(global.shape[j]->id); +// free(global.shape[j]); global.shape[j]=0; } } l=0; for(k=0;kid=strdup(a[3]); } } + gr=get_group_rotation(a[2]); + if(gr) { + free(gr->id); + gr->id=strdup(a[3]); + } } continue; } -- cgit v1.2.3