Difference for server/c_misc.c from version 1.9 to 1.10


version 1.9 version 1.10
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_misc_c =   * static char *rcsid_c_misc_c =
  *   "$Id: c_misc.c,v 1.9 2001/02/23 06:06:35 mwedel Exp $";   *   "$Id: c_misc.c,v 1.10 2001/05/09 06:58:12 mwedel Exp $";
  */   */
   
 /*  /*
Line 124
 
Line 124
   for(pl=first_player,players=0;pl!=NULL;pl=pl->next,players++);    for(pl=first_player,players=0;pl!=NULL;pl=pl->next,players++);
   for(m=first_map,nrofmaps=0;m!=NULL;m=m->next,nrofmaps++)    for(m=first_map,nrofmaps=0;m!=NULL;m=m->next,nrofmaps++)
     if(m->in_memory == MAP_IN_MEMORY)      if(m->in_memory == MAP_IN_MEMORY)
       mapmem+=m->mapx*m->mapy*(sizeof(object *)+sizeof(unsigned char *)*2),        mapmem+=m->mapx*m->mapy*(sizeof(object *)+sizeof(MapLook *)*3),
       nrm++;        nrm++;
   sprintf(errmsg,"Sizeof: object=%ld  player=%ld  map=%ld",    sprintf(errmsg,"Sizeof: object=%ld  player=%ld  map=%ld",
           (long)sizeof(object),(long)sizeof(player),(long)sizeof(mapstruct));            (long)sizeof(object),(long)sizeof(player),(long)sizeof(mapstruct));
Line 1059
 
Line 1059
   return 0;    return 0;
 }  }
   
   int command_style_map_info(object *op, char *params)
   {
       extern mapstruct *styles;
       mapstruct *mp;
       int     maps_used=0, mapmem=0, objects_used=0, x,y;
       object  *tmp;
   
       for (mp = styles; mp!=NULL; mp=mp->next) {
    maps_used++;
    mapmem += mp->mapx*mp->mapy*(sizeof(object *)+sizeof(MapLook *)*3) + sizeof(mapstruct);
    for (x=0; x<mp->mapx; x++) {
        for (y=0; y<mp->mapy; y++) {
    for (tmp=get_map_ob(mp, x, y); tmp!=NULL; tmp=tmp->above)
        objects_used++;
        }
    }
       }
       new_draw_info_format(NDI_UNIQUE, 0, op, "Style maps loaded:    %d", maps_used);
       new_draw_info(NDI_UNIQUE, 0, op, "Memory used, not");
       new_draw_info_format(NDI_UNIQUE, 0, op, "including objects:    %d", mapmem);
       new_draw_info_format(NDI_UNIQUE, 0, op, "Style objects:        %d", objects_used);
       new_draw_info_format(NDI_UNIQUE, 0, op, "Mem for objects:      %d", objects_used * sizeof(object));
       return 0;
   }


Legend:
line(s) removed in v.1.9 
line(s) changed
 line(s) added in v.1.10

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:27