Re: Odd Loop
Christopher Bunting <[email protected]>
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <[email protected]> |
Hello,
What exactly is that code? Maps that show in the descriptions or the
overhead map code?
With what you posted, I don't see why it takes so much code.
--------------
void do_thri_look( CHAR_DATA *ch, int min, int max)
{
int x,y;
map[min][min]=SECT_MAX;map[max-1][max-1]=SECT_MAX;
map[min][max-1]=SECT_MAX;map[max-1][min]=SECT_MAX;
for (x = min; x < max; ++x)
{ /* every row */
for (y = min; y < max; ++y)
{ /* every column */
if ( (y==min) || (map[x][y-1]!=map[x][y]) )
.. do sector stuff
------------
There are also more efficient ways of finding the sectors too..
I've never looked at rogue but that is just my take on that code you posted.
Chris
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom