Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Bing

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Overland.c Reloaded :)
Forum Rules | Mark all | Recent Posts

Overland.c Reloaded :)
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 30, 2003, 7:51 pm   Last edited Nov 24, 2007, 4:24 pm by Samson
Go to the top of the page
Go to the bottom of the page

kilroy
Magician
GroupMembers
Posts122
JoinedMay 1, 2002

I am still having a slight bug with my new continent - and I have found a few places that I would like to clarify with you guys whether or not they need to be changed / adjusted.

in void save_map of overland.c (right at the bottom)

 {
                   bug( "save_map: Terrain data out of bounds!!! Value found: %d - replacing with Ocean.", terr );
                   terr = SECT_OCEAN;
              }
                fputc( sect_show[terr].graph1, gfp );
                fputc( sect_show[terr].graph2, gfp );
                fputc( sect_show[terr].graph3, gfp );
           }
        }
        FCLOSE( gfp );


Do I need to add additional fputc's for graph4 and 5 ?

also in overland.c

in void reload_map

void reload_map( CHAR_DATA *ch )
{
   sh_int x, y;
 
   if( ch->map map >= MAP_MAX )
   {
        bug( "%s", "reload_map: Trying to reload invalid map!" );
        return;
   }
   
   pager_printf( ch, "&GReinitializing map grid for %s....\r\n", map_names[ch->map] );
   
   for( x = 0; x < MAX_X; x++ )
   {
        for( y = 0; y map, x, y, SECT_OCEAN );
   }
   
   /* Change the names of the continents here to match your world */
   if( ch->map == MAP_ALSHEROK )
   {
      send_to_pager( "Loading continent of Alsherok....\r\n", ch );
      load_continent_one();
        return;
   }
         
   if( ch->map == MAP_ELETAR )
   {
        send_to_pager( "Loading continent of Eletar....\r\n", ch );
        load_continent_two();
        return;
   }
                   
   send_to_pager( "Loading continent of Alatia....\r\n", ch );
   load_continent_three();
                
   return;
            
   send_to_pager( "Loading continent of Minturn....\r\n", ch );
   load_continent_four();
    
   return;
   send_to_pager( "Loading continent of Bengalix....\r\n", ch );
   load_continent_five();

   return;
}


there is a distinct difference between the way alsherok and Elatar are loaded in comparison to Alatia - Is this something that needs to be addressed with uniformity in the code?

THanks Kilroy
       
Post is unread #2 Jun 30, 2003, 9:33 pm   Last edited Nov 24, 2007, 4:24 pm by Samson
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Erm... look more closely at the last block you posted.

It's an if/else, only not written that way.

if map is alsherok, echo Loading Alsherok. If map is Eletar, echo loading eletar. Assume if not the above two, Loading that other one there.

This really should be rewritten to something such as this:
switch(ch->map)
{
case MAP_ALSHEROK: 
send_to_pager("Loading continent of Alsherok....\r\n", ch );
load_continent_one();
return;
break;

case MAP_ELETAR:
send_to_pager("Loading continent of Eletar....\r\n", ch );
load_continent_two();
return;
break;

case MAP_ALATIA: 
send_to_pager("Loading continent of Alatia....\r\n", ch );
load_continent_three();
return;
break;

case default:
bug("%s: Hit default case!", );
break;
}


As for the first block.. i'd assume yes if you're having issues
       
Post is unread #3 Jul 1, 2003, 12:11 pm   Last edited Nov 24, 2007, 4:24 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002


in void save_map of overland.c (right at the bottom)

{
                  bug( "save_map: Terrain data out of bounds!!! Value found: %d - replacing with Ocean.", terr );
                  terr = SECT_OCEAN;
             }
               fputc( sect_show[terr].graph1, gfp );
               fputc( sect_show[terr].graph2, gfp );
               fputc( sect_show[terr].graph3, gfp );
          }
       }
       FCLOSE( gfp );


Do I need to add additional fputc's for graph4 and 5 ?


No. You don't need to do this. What that does is save the RGB values for the particular sector of that map. Adding more to it would only jack you into one of various levels of coding hell :P

Xorith's explanation of the reload function is accurate, so what he said :P
       
Pages:<< prev 1 next >>