![]() |
|
tiling problem |
TurboJudas
Member #7,039
March 2006
![]() |
PROBLEM SOLVED. I had to make the array 22 x 22, and the for loops < 22. I realized the pack_fread function counts in the line changes as two chars. Anyway, thanks for the help guys. Hi, I´ve been starring at this code the whole day, so I was hoping someone with fresh eyes could help me out why the tiles are not lining up properly on screen. I suspect it has something to do with the size of the maptab array or loadbuffer.
Here is the map file (20 x 20):
|
umperio
Member #3,474
April 2003
![]() |
Quote: tiles are not lining up properly on screen What you mean exactly? Can you maybe provide a screenshot of what's going wrong? Regards |
GullRaDriel
Member #3,861
September 2003
![]() |
If you're waiting for diamond-shape style tilemap, you're not using the right formulae. Other thing: your storing-loading routine is not common ... maybe you should re-thing to it "Code is like shit - it only smells if it is not yours" |
TurboJudas
Member #7,039
March 2006
![]() |
I figured some things out, I changed if( maptab[ y ][ x ] == 1) to if( maptab[ y ][ x ] == '1') as I remembered a char is 8 numbers, and the maptab array to char allso. but it still looks a bit twisted: http://www.cc.puv.fi/~e0400536/tile.JPG this works:
it looks like this (this is what it should look like) http://www.cc.puv.fi/~e0400536/tile2.JPG but, I specifically would want to load my maps from files. PROBLEM SOLVED. I had to make the array 22 x 22, and the for loops < 22. I realized the pack_fread function counts in the line changes as two chars. Anyway, thanks for the help guys. |
|