stringstream ss(line);
while (ss >> value && linedone < 30)
{
ss >> comma;
dbSetSpriteFrame ( 90, 9 );
dbPasteSprite (90, tilegap, 0 ) ;
tilegap + 32;
linedone ++;
//tilegap = tilegap + 32;
}
That doesn't show anything for some reason, it works outside of a loop for some reason. Any more ideas? Thank you.
This code works great and does everything i want. I just wish i could get it into a loop.
int data[300];
int tile[900], tilecount;
string line = gtile[3];
stringstream ss(line);
while (ss >> value && linedone < 30)
{
ss >> comma;
linedone ++;
data[linedone] = value;
}
dbSetSpriteFrame ( 90, data[1] );
dbPasteSprite (90, 160, 0 ) ;
dbSetSpriteFrame ( 90, data[2]);
dbPasteSprite (90, 192, 0 ) ;
dbSetSpriteFrame ( 90, data[3]);
dbPasteSprite (90, 224, 0 ) ;
dbSetSpriteFrame ( 90, data[4]);
dbPasteSprite (90, 256, 0 ) ;
dbSetSpriteFrame ( 90, data[5] );
dbPasteSprite (90, 288, 0 ) ;
dbSetSpriteFrame ( 90, data[6]);
dbPasteSprite (90, 320, 0 ) ;
dbSetSpriteFrame ( 90, data[7]);
dbPasteSprite (90, 352, 0 ) ;
dbSetSpriteFrame ( 90, data[8]);
dbPasteSprite (90, 384, 0 ) ;
dbSetSpriteFrame ( 90, data[9] );
dbPasteSprite (90, 416, 0 ) ;
dbSetSpriteFrame ( 90, data[10]);
dbPasteSprite (90, 448, 0 ) ;
dbSetSpriteFrame ( 90, data[11]);
dbPasteSprite (90, 480, 0 ) ;
dbSetSpriteFrame ( 90, data[12]);
dbPasteSprite (90, 512, 0 ) ;
dbSetSpriteFrame ( 90, data[13]);
dbPasteSprite (90, 544, 0 ) ;
dbSetSpriteFrame ( 90, data[14]);
dbPasteSprite (90, 576, 0 ) ;
dbSetSpriteFrame ( 90, data[15]);
dbPasteSprite (90, 608, 0 ) ;
dbSetSpriteFrame ( 90, data[16] );
dbPasteSprite (90, 640, 0 ) ;
dbSetSpriteFrame ( 90, data[17]);
dbPasteSprite (90, 672, 0 ) ;
dbSetSpriteFrame ( 90, data[18]);
dbPasteSprite (90, 704, 0 ) ;
dbSetSpriteFrame ( 90, data[19]);
dbPasteSprite (90, 736, 0 ) ;
dbSetSpriteFrame ( 90, data[20] );
dbPasteSprite (90, 768, 0 ) ;
dbSetSpriteFrame ( 90, data[21]);
dbPasteSprite (90, 800, 0 ) ;
dbSetSpriteFrame ( 90, data[22]);
dbPasteSprite (90, 832, 0 ) ;
dbSetSpriteFrame ( 90, data[23]);
dbPasteSprite (90, 864, 0 ) ;
dbSetSpriteFrame ( 90, data[24] );
dbPasteSprite (90, 896, 0 ) ;
dbSetSpriteFrame ( 90, data[25]);
dbPasteSprite (90, 928, 0 ) ;
dbSetSpriteFrame ( 90, data[26]);
dbPasteSprite (90, 960, 0 ) ;
dbSetSpriteFrame ( 90, data[27]);
dbPasteSprite (90, 992, 0 ) ;
dbSetSpriteFrame ( 90, data[28]);
dbPasteSprite (90, 1024, 0 ) ;
dbSetSpriteFrame ( 90, data[29]);
dbPasteSprite (90, 1056, 0 ) ;
dbSetSpriteFrame ( 90, data[30]);
dbPasteSprite (90, 1088, 0 ) ;