ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/build_map.C
(Generate patch)

Comparing deliantra/server/server/build_map.C (file contents):
Revision 1.10 by elmex, Mon Dec 4 15:48:13 2006 UTC vs.
Revision 1.11 by root, Tue Dec 12 20:53:03 2006 UTC

84 while (rune) 84 while (rune)
85 { 85 {
86 next = rune->above; 86 next = rune->above;
87 if ((rune->type == SIGN) && (!strcmp (rune->arch->name, "rune_mark"))) 87 if ((rune->type == SIGN) && (!strcmp (rune->arch->name, "rune_mark")))
88 { 88 {
89 remove_ob (rune); 89 rune->remove ();
90 free_object (rune); 90 rune->destroy (0);
91 } 91 }
92 rune = next; 92 rune = next;
93 } 93 }
94} 94}
95 95
358 /* Now delete current wall, and insert new one 358 /* Now delete current wall, and insert new one
359 * We save flags to avoid any trouble with buildable/non buildable, and so on 359 * We save flags to avoid any trouble with buildable/non buildable, and so on
360 */ 360 */
361 for (flag = 0; flag < 4; flag++) 361 for (flag = 0; flag < 4; flag++)
362 old_flags[flag] = wall->flags[flag]; 362 old_flags[flag] = wall->flags[flag];
363 remove_ob (wall); 363 wall->remove ();
364 free_object (wall); 364 wall->destroy (0);
365 365
366 wall = arch_to_object (new_arch); 366 wall = arch_to_object (new_arch);
367 wall->type = WALL; 367 wall->type = WALL;
368 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y); 368 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y);
369 for (flag = 0; flag < 4; flag++) 369 for (flag = 0; flag < 4; flag++)
407 above = tmp->above; 407 above = tmp->above;
408 if (WALL == tmp->type) 408 if (WALL == tmp->type)
409 { 409 {
410 /* There was a wall, remove it & keep its archetype to make new walls */ 410 /* There was a wall, remove it & keep its archetype to make new walls */
411 new_wall = tmp->arch; 411 new_wall = tmp->arch;
412 remove_ob (tmp); 412 tmp->remove ();
413 free_object (tmp); 413 tmp->destroy (0);
414 sprintf (message, "You destroy the wall and redo the floor."); 414 sprintf (message, "You destroy the wall and redo the floor.");
415 } 415 }
416 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR))) 416 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR)))
417 { 417 {
418 remove_ob (tmp); 418 tmp->remove ();
419 free_object (tmp); 419 tmp->destroy (0);
420 floor_removed = 1; 420 floor_removed = 1;
421 } 421 }
422 else 422 else
423 { 423 {
424 if (floor_removed) 424 if (floor_removed)
553 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y); 553 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y);
554 554
555 /* If existing wall, remove it, no need to fix other walls */ 555 /* If existing wall, remove it, no need to fix other walls */
556 if (current_wall) 556 if (current_wall)
557 { 557 {
558 remove_ob (current_wall); 558 current_wall->remove ();
559 free_object (current_wall); 559 current_wall->destroy (0);
560 fix_walls (pl->map, x, y); 560 fix_walls (pl->map, x, y);
561 sprintf (message, "You redecorate the wall to better suit your tastes."); 561 sprintf (message, "You redecorate the wall to better suit your tastes.");
562 } 562 }
563 else 563 else
564 { 564 {
655 con_rune = get_connection_rune (pl, x, y); 655 con_rune = get_connection_rune (pl, x, y);
656 connected = find_or_create_connection_for_map (pl, x, y, con_rune); 656 connected = find_or_create_connection_for_map (pl, x, y, con_rune);
657 if (connected == -1) 657 if (connected == -1)
658 { 658 {
659 /* Player already informed of failure by the previous function */ 659 /* Player already informed of failure by the previous function */
660 free_object (tmp); 660 tmp->destroy (0);
661 return; 661 return;
662 } 662 }
663 /* Remove marking rune */ 663 /* Remove marking rune */
664 remove_ob (con_rune); 664 con_rune->remove ();
665 free_object (con_rune); 665 con_rune->destroy (0);
666 } 666 }
667 667
668 /* For magic mouths/ears, and signs, take the msg from a book of scroll */ 668 /* For magic mouths/ears, and signs, take the msg from a book of scroll */
669 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR)) 669 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR))
670 { 670 {
671 if (adjust_sign_msg (pl, x, y, tmp) == -1) 671 if (adjust_sign_msg (pl, x, y, tmp) == -1)
672 { 672 {
673 free_object (tmp); 673 tmp->destroy (0);
674 return; 674 return;
675 } 675 }
676 } 676 }
677 677
678 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y); 678 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y);
739 /* Fall through */ 739 /* Fall through */
740 740
741 default: 741 default:
742 /* Remove generic item */ 742 /* Remove generic item */
743 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item)); 743 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item));
744 remove_ob (item); 744 item->remove ();
745 free_object (item); 745 item->destroy (0);
746 } 746 }
747} 747}
748 748
749/** 749/**
750 * Global building function 750 * Global building function
911 } 911 }
912 912
913 tmp->face = book->face; 913 tmp->face = book->face;
914 tmp->invisible = 0; 914 tmp->invisible = 0;
915 } 915 }
916 remove_ob (book); 916 book->remove ();
917 free_object (book); 917 book->destroy (0);
918 return 0; 918 return 0;
919} 919}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines