mrlachatte: (Default)
[personal profile] mrlachatte
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);
  }
}

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

December 2007

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526 272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 11th, 2025 12:36 am
Powered by Dreamwidth Studios