Filtering Tiles
BlitzMax Forums/BlitzMax Beginners Area/Filtering Tiles
| ||
Hello, I have been trying to make a 128x128 filter a set of 16x16 tiles that are in a map arrar of 32x32, but only 16x14 of the array are shown at a time.![]() here is a picture of what im trying to do... :( if someone could give me a suggestion please post it or contact me thru email. edit: the filter is 128x128 but the tiles are 16x16 some 16x16 won't have the filtering, so I need to breakup the 128x128 image into 16x16 and thru them into the array but keep the 128x128 look I hope that made sense Here is some code Function DrawMap() Local tx:Int, ty:Int For tx = mapx To 15 + mapx For ty = mapy To 13 + mapy DrawImage g_sheet,(tx-mapx)*32,(ty-mapy)*32,tilemap[tx,ty,0] SetBlend(shadeblend) DrawImage g_filter,(tx-mapx)*32,(ty-mapy)*32,filtermap[tx,ty,0] ' THIS IS THE FILTER!!! SetBlend(solidblend) Next Next End Function ' THIS IS THE BREAKIN UP THE FILTER... VVVVVV ... ' THIS IS WHAT ISN'T WORKIN :( Function DrawFilter() Local ox:Int, oy:Int Local curfilter:Int=0, currow:Int=1, curcol:Int=-1 For ox = 0 To 31 curcol = curcol + 1 If curcol > 8 Then curcol = 0 ; currow = currow + 1 For oy = 0 To 31 filtermap[ox,oy,0] = curcol * currow currow = currow + 1 If currow > 7 Then currow = 0 Next Next End Function |
| ||
Could you post an image or something to show what actually happens. |
| ||
THANKS!! FOR THE HELP EDZUP The filtering works great I twick it a bit, but its workin great now :P |