mrlachatte: (Default)
mrlachatte ([personal profile] mrlachatte) wrote2005-03-19 01:10 am

When my fetish gets the best of me

Before:



After:



As you can see, the menu system is working well, the floodfill is working quickly (probably inefficient but it really doesn't matter), I added selector arrows to the character set and +/- now work as they do in mzx. Score.

PS - [livejournal.com profile] zell_1388, here's the floodfill algorithm I used:

void flood_fill(charset *c,unsigned char ch,int row,int bit)
{
  if(c->set[ch*14+row]&(1<<bit)) return;
  else {
    c->set[ch*14+row] |= (1<<bit);
    if(bit<7) flood_fill(c,ch,row,bit+1);
    if(row>0) flood_fill(c,ch,row-1,bit);
    if(bit>0) flood_fill(c,ch,row,bit-1);
    if(row<13) flood_fill(c,ch,row+1,bit);
  }
}

[identity profile] crankgod.livejournal.com 2005-03-19 03:09 am (UTC)(link)
Yeah, I love recursion for flood fill etc