Thread: Changing Tile
View Single Post
  #3  
Old 01-09-2012, 01:32 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
I manipulate tiles using the hex numbers instead
so I usually do this.ctiles = {0xFFF,0xAE9};

then
for (i = 0; i < 4096; i++){
if (tiles[i%64,int(i/64)] == this.ctiles[0])
tiles[i%64,int(i/64)] = this.ctiles[1];
}
updateboard(0,0,64,64);

Hope this clarifies things for you
Reply With Quote