1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
int usePlex::getPixID(int croc,int chain, int board, int pixel)
{
fseek(f,0,SEEK_SET);
int thiscroc,thischain,thisboard,thispixel;
int pixID=-1;
fgets(line,256,f);
while(fgets(line,256,f))
{
sscanf(line,"%d %*d (%d,%d,%d,%d)",&pixID,&thiscroc,&thischain,&thisboard,&thispixel);
if((thiscroc==croc)&&(thischain==chain)&&(thisboard==board)&&(thispixel==pixel)) break;
}
return pixID;
}
int usePlex::getPixID(int location, int mod_frame, int view_tower, int plane_story, int strip_bar)
{
fseek(f,0,SEEK_SET);
int thislocation,thismod_frame,thisview_tower,thisplane_story,thisstrip_bar;
int pixID=-1;
fgets(line,256,f);
while(fgets(line,256,f))
{
sscanf(line,"%d %*d (%*d,%*d,%*d,%*d) (%d,%d,%d,%d,%d)",&pixID,&thislocation,&thismod_frame,&thisview_tower,&thisplane_story,&thisstrip_bar);
if((thislocation==location)&&(thismod_frame==mod_frame)&&(thisview_tower==view_tower)&&(thisplane_story==plane_story)&&(thisstrip_bar==strip_bar)) break;
}
return pixID;
}
|