summaryrefslogtreecommitdiff
path: root/src/hackvr.c
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-04-18 01:33:44 -0500
committerepoch <epoch@hacking.allowed.org>2017-04-18 01:33:44 -0500
commita204330db26a0c3f5b4e88bdc495af350e262ab4 (patch)
treed92a57aca247f796c590eb5606ca64be4b8ed3af /src/hackvr.c
parent34628f9a0df01adc1d17e44f569600dc7d9d1414 (diff)
downloadhackvr-a204330db26a0c3f5b4e88bdc495af350e262ab4.tar.gz
hackvr-a204330db26a0c3f5b4e88bdc495af350e262ab4.zip
the changes needed to get tictactoe running pretty.
Diffstat (limited to 'src/hackvr.c')
-rw-r--r--src/hackvr.c15
1 files changed, 11 insertions, 4 deletions
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;k<j;k++) {
+ l=k;
while(global.shape[l] == 0 && l < j) l++;
global.shape[k]=global.shape[l];
}
@@ -206,6 +208,11 @@ int load_stdin() {//what is this returning?
global.shape[j]->id=strdup(a[3]);
}
}
+ gr=get_group_rotation(a[2]);
+ if(gr) {
+ free(gr->id);
+ gr->id=strdup(a[3]);
+ }
}
continue;
}