code
unknown
c_cpp
4 years ago
2.1 kB
10
Indexable
int objs[1200] = {3,4,-151,121,145,512,100,-205,-301,-104,3,0,0,0,0,0,0,0,1};
int meshes[6000];
void drawobj(int object){
int temp1=0;
int tempc;
int temp2;
int temp3;
int temp102;
if(temp1==object){
temp2 = meshes[tempc+1];
}else{
while(temp1!=object){
temp2 = meshes[tempc+1];
tempc+=11+temp2*2;
temp1+=1;
}
}
for(int i;i<meshes[tempc]*6;i+=6){
int temp11=0;
drawtriangle((SVECTOR){meshes[i+tempc],meshes[i+tempc+1],meshes[i+tempc+2],0},
(SVECTOR){meshes[i+tempc+3],meshes[i+tempc+4],meshes[i+tempc+5],0},
(SVECTOR){meshes[i+(tempc*2)],meshes[i+(tempc*2)+1],meshes[i+(tempc*2)+2],0},
(VECTOR){0,0,0},
(SVECTOR){0,0,0,0});
drawtriangle((SVECTOR){meshes[i+(tempc*2)],meshes[i+(tempc*2)+1],meshes[i+(tempc*2)+2],0},
(SVECTOR){meshes[i+(tempc*2)+3],meshes[i+(tempc*2)+4],meshes[i+(tempc*2)+5],0},
(SVECTOR){meshes[i+tempc+3],meshes[i+tempc+4],meshes[i+tempc+5],0},
(VECTOR){0,0,0},
(SVECTOR){0,0,0,0});
}
}
void updateobj(int object){
int temp1=0;
int tempc;
int temp2;
if(temp1==object){
temp2 = objs[tempc+1]+9;
}else{
while(temp1!=object){
temp2 = objs[tempc+1]+9;
tempc+=(temp2*2)+1;
temp1+=1;
}
}
int temp12=0;
int tempc2;
int temp22;
int temp102;
if(temp12==object){
temp22 = meshes[tempc];
}else{
while(temp12!=object){
temp22 = meshes[tempc];
tempc2+=1+temp22;
temp12+=1;
}
}
meshify(tempc+1,tempc2,objs[tempc+(temp2*2)]);
}
void meshify(int offset, int offset2, int thick){
int temp1 = objs[offset];
int temp2;
int temp3;
int temp4;
meshes[offset2]=temp1*6;
for(int i;i<temp1;i++){
temp2 = objs[offset+1+(i*2)];
temp3 = objs[offset+2+(i*2)];
temp4 = 1+offset2+(i*3);
meshes[temp4]=temp2;
meshes[temp4+1]=temp3;
meshes[temp4+2]=0;
}
for(int i;i<temp1;i++){
temp2 = objs[offset+(i*2)+1];
temp3 = objs[offset+(i*2)+2];
temp4 = 1+offset2+(i*3+(temp1*3));
meshes[temp4]=temp2;
meshes[temp4+1]=temp3;
meshes[temp4+2]=thick*ONE;
}
}Editor is loading...