well all that is working. I beilve the issue is in this part
tile_src.left = ((Tileset.tiles - 1)%4) *Tileset.Tile_size;
tile_src.top = ((Tileset.tiles - 1) /4) * Tileset.Tile_size ;
Am i doing something wrong when trying to find the rect for the left and the top?
and it is not the destions rect it is the source rect that I am having an issue with.
can you help me figure that part out?
Help with tile rendering problem.[fixed]
I take that back it is not my source rect that is the issue it is the destnation rect that is the issue
dstr.left= (Tileset.x*Tileset.Tile_size)- Tileset.offset_x;
dstr.right = (Tileset.x*Tileset.Tile_size) + (tile_src.right - tile_src.left) ;
the dstr.left when scrooling start to become a negitive number. is that supose to happen?
dstr.left dstr.right results with out scrolling
dstr.left dstr.right results with scrolling
dstr.left= (Tileset.x*Tileset.Tile_size)- Tileset.offset_x;
dstr.right = (Tileset.x*Tileset.Tile_size) + (tile_src.right - tile_src.left) ;
the dstr.left when scrooling start to become a negitive number. is that supose to happen?
dstr.left dstr.right results with out scrolling
0 31 30 62 60 93 90 124 120 155 150 186 180 217 210 248 240 279 270 310 300 341 330 372 360 403 390 434 420 465 450 496 480 527 510 558 540 589 570 620 600 651 630 682 660 713 690 744 720 775 750 806
dstr.left dstr.right results with scrolling
-7 31 23 62 53 93 83 124 113 155 143 186 173 217 203 248 233 279 263 310 293 341 323 372 353 403 383 434 413 465 443 496 473 527 503 558 533 589 563 620 593 651 623 682 653 713 683 744 744 775 774 806
Ok well i fixed it and it was a relly simple fix. and a stupid error on my side.
dstr.left= (Tileset.x*Tileset.Tile_size)- Tileset.offset_x;<-<-<- issue is here
dstr.right = (Tileset.x*Tileset.Tile_size) + (tile_src.right - tile_src.left) ;
I am not doing the same to the right side has I am doing to the left
dstr.left= (Tileset.x*Tileset.Tile_size)- Tileset.offset_x;
dstr.right = (Tileset.x*Tileset.Tile_size) + (tile_src.right - tile_src.left) -Tileset.offset_x;<-<-<- issue is here ;
To bad some one did not see that first whould of saved alot of trouble.
thanks for every ones help
dstr.left= (Tileset.x*Tileset.Tile_size)- Tileset.offset_x;<-<-<- issue is here
dstr.right = (Tileset.x*Tileset.Tile_size) + (tile_src.right - tile_src.left) ;
I am not doing the same to the right side has I am doing to the left
dstr.left= (Tileset.x*Tileset.Tile_size)- Tileset.offset_x;
dstr.right = (Tileset.x*Tileset.Tile_size) + (tile_src.right - tile_src.left) -Tileset.offset_x;<-<-<- issue is here ;
To bad some one did not see that first whould of saved alot of trouble.
thanks for every ones help
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement