1 | /* |
1 | /* |
2 | * static char *rcsid_arch_c = |
2 | * static char *rcsid_arch_c = |
3 | * "$Id: arch.C,v 1.3 2006/08/26 23:36:28 root Exp $"; |
3 | * "$Id: arch.C,v 1.5 2006/08/28 14:05:23 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
399 | |
399 | |
400 | /* |
400 | /* |
401 | * Reads/parses the archetype-file, and copies into a linked list |
401 | * Reads/parses the archetype-file, and copies into a linked list |
402 | * of archetype-structures. |
402 | * of archetype-structures. |
403 | */ |
403 | */ |
404 | void first_arch_pass(FILE *fp) { |
404 | void first_arch_pass(object_thawer &fp) { |
405 | object *op; |
405 | object *op; |
406 | archetype *at,*head=NULL,*last_more=NULL; |
406 | archetype *at,*head=NULL,*last_more=NULL; |
407 | int i,first=2; |
407 | int i,first=2; |
408 | |
408 | |
409 | op=get_object(); |
409 | op=get_object(); |
… | |
… | |
546 | clear_archetable(); |
546 | clear_archetable(); |
547 | LOG(llevDebug," arch-pass 1...\n"); |
547 | LOG(llevDebug," arch-pass 1...\n"); |
548 | #if TIME_ARCH_LOAD |
548 | #if TIME_ARCH_LOAD |
549 | GETTIMEOFDAY(&tv1); |
549 | GETTIMEOFDAY(&tv1); |
550 | #endif |
550 | #endif |
|
|
551 | { |
|
|
552 | object_thawer thawer (fp); |
551 | first_arch_pass(fp); |
553 | first_arch_pass (thawer); |
|
|
554 | } |
552 | #if TIME_ARCH_LOAD |
555 | #if TIME_ARCH_LOAD |
553 | { int sec, usec; |
556 | { int sec, usec; |
554 | GETTIMEOFDAY(&tv2); |
557 | GETTIMEOFDAY(&tv2); |
555 | sec = tv2.tv_sec - tv1.tv_sec; |
558 | sec = tv2.tv_sec - tv1.tv_sec; |
556 | usec = tv2.tv_usec - tv1.tv_usec; |
559 | usec = tv2.tv_usec - tv1.tv_usec; |