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.7 by root, Thu Sep 14 22:34:03 2006 UTC vs.
Revision 1.28 by root, Sun Jul 1 05:00:19 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
3 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
4 Copyright (C) 2001 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
6 7 *
7 This program is free software; you can redistribute it and/or modify 8 * Crossfire TRT is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version. 11 * (at your option) any later version.
11 12 *
12 This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 16 * GNU General Public License for more details.
16 17 *
17 You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 *
20
21 The authors can be reached via e-mail to <crossfire@schmorp.de> 21 * The authors can be reached via e-mail to <crossfire@schmorp.de>
22*/ 22 */
23 23
24#include <global.h> 24#include <global.h>
25#include <living.h> 25#include <living.h>
26#include <spells.h> 26#include <spells.h>
27#include <skills.h> 27#include <skills.h>
30 30
31/** 31/**
32 * Check if objects on a square interfere with building 32 * Check if objects on a square interfere with building
33 */ 33 */
34int 34int
35can_build_over (mapstruct *map, object *tmp, short x, short y) 35can_build_over (maptile *map, object *tmp, short x, short y)
36{ 36{
37 object *ob; 37 object *ob;
38 38
39 ob = GET_MAP_OB (map, x, y); 39 ob = GET_MAP_OB (map, x, y);
40 while (ob) 40 while (ob)
41 { 41 {
42 /* if ob is not a marking rune or floor, then check special cases */ 42 /* if ob is not a marking rune or floor, then check special cases */
43 if (strcmp (ob->arch->name, "rune_mark") && ob->type != FLOOR) 43 if (strcmp (ob->arch->archname, "rune_mark") && ob->type != FLOOR)
44 { 44 {
45 switch (tmp->type) 45 switch (tmp->type)
46 { 46 {
47 case SIGN: 47 case SIGN:
48 case MAGIC_EAR: 48 case MAGIC_EAR:
73 73
74/** 74/**
75 * Erases marking runes at specified location 75 * Erases marking runes at specified location
76 */ 76 */
77void 77void
78remove_marking_runes (mapstruct *map, short x, short y) 78remove_marking_runes (maptile *map, short x, short y)
79{ 79{
80 object *rune; 80 object *rune;
81 object *next; 81 object *next;
82 82
83 rune = GET_MAP_OB (map, x, y); 83 rune = GET_MAP_OB (map, x, y);
84 while (rune) 84 while (rune)
85 { 85 {
86 next = rune->above; 86 next = rune->above;
87
87 if ((rune->type == SIGN) && (!strcmp (rune->arch->name, "rune_mark"))) 88 if ((rune->type == SIGN) && (!strcmp (rune->arch->archname, "rune_mark")))
88 { 89 rune->destroy ();
89 remove_ob (rune); 90
90 free_object (rune);
91 }
92 rune = next; 91 rune = next;
93 } 92 }
94} 93}
95 94
96/** 95/**
99 * \return 'connected' value with no item, or -1 if failure. 98 * \return 'connected' value with no item, or -1 if failure.
100 * 99 *
101 * Tries 1000 random values, then returns -1. 100 * Tries 1000 random values, then returns -1.
102 */ 101 */
103int 102int
104find_unused_connected_value (mapstruct *map) 103find_unused_connected_value (maptile *map)
105{ 104{
106 int connected = 0; 105 int connected = 0;
107 int itest = 0; 106 int itest = 0;
108 oblinkpt *obp; 107 oblinkpt *obp;
109 108
146 } 145 }
147 146
148 /* Now, find force in player's inventory */ 147 /* Now, find force in player's inventory */
149 force = pl->inv; 148 force = pl->inv;
150 while (force 149 while (force
151 && ((force->type != FORCE) || (!force->slaying) || (strcmp (force->slaying, pl->map->path)) || (!force->msg) 150 && ((force->type != FORCE) || !force->slaying || force->slaying != pl->map->path || !force->msg
152 || (strcmp (force->msg, rune->msg)))) 151 || force->msg != rune->msg))
153 force = force->below; 152 force = force->below;
154 153
155 if (!force) 154 if (!force)
156 /* No force, need to create & insert one */ 155 /* No force, need to create & insert one */
157 { 156 {
162 new_draw_info (NDI_UNIQUE, 0, pl, "Could not create more groups."); 161 new_draw_info (NDI_UNIQUE, 0, pl, "Could not create more groups.");
163 return -1; 162 return -1;
164 } 163 }
165 164
166 force = get_archetype (FORCE_NAME); 165 force = get_archetype (FORCE_NAME);
167 force->speed = 0;
168 update_ob_speed (force);
169 force->slaying = pl->map->path; 166 force->slaying = pl->map->path;
170 force->msg = rune->msg; 167 force->msg = rune->msg;
171 force->path_attuned = connected; 168 force->path_attuned = connected;
169 force->set_speed (0);
172 insert_ob_in_ob (force, pl); 170 insert_ob_in_ob (force, pl);
173 171
174 return connected; 172 return connected;
175 } 173 }
176 174
185get_connection_rune (object *pl, short x, short y) 183get_connection_rune (object *pl, short x, short y)
186{ 184{
187 object *rune; 185 object *rune;
188 186
189 rune = GET_MAP_OB (pl->map, x, y); 187 rune = GET_MAP_OB (pl->map, x, y);
190 while (rune && ((rune->type != SIGN) || (strcmp (rune->arch->name, "rune_mark")))) 188 while (rune && ((rune->type != SIGN) || (strcmp (rune->arch->archname, "rune_mark"))))
191 rune = rune->above; 189 rune = rune->above;
192 return rune; 190 return rune;
193} 191}
194 192
195/** 193/**
205 book = book->above; 203 book = book->above;
206 return book; 204 return book;
207} 205}
208 206
209/** 207/**
210 * Returns first item of type WALL. 208 * Returns first item of type BUILDABLE_WALL.
211 */ 209 */
212object * 210object *
213get_wall (mapstruct *map, int x, int y) 211get_wall (maptile *map, int x, int y)
214{ 212{
215 object *wall; 213 object *wall;
216 214
217 wall = GET_MAP_OB (map, x, y); 215 wall = GET_MAP_OB (map, x, y);
218 while (wall && (WALL != wall->type)) 216 while (wall && (BUILDABLE_WALL != wall->type))
219 wall = wall->above; 217 wall = wall->above;
220 218
221 return wall; 219 return wall;
222} 220}
223 221
231 * Basically it ensures the correct wall is put where needed. 229 * Basically it ensures the correct wall is put where needed.
232 * 230 *
233 * Note: x & y must be valid map coordinates. 231 * Note: x & y must be valid map coordinates.
234 */ 232 */
235void 233void
236fix_walls (mapstruct *map, int x, int y) 234fix_walls (maptile *map, int x, int y)
237{ 235{
238 int connect;
239 object *wall; 236 object *wall;
240 char archetype[MAX_BUF]; 237 char archetype[MAX_BUF];
241 char *underscore; 238 char *underscore;
242 uint32 old_flags[4];
243 struct archetype *new_arch; 239 struct archetype *new_arch;
244 int flag; 240
245 241
246 /* First, find the wall on that spot */ 242 /* First, find the wall on that spot */
247 wall = get_wall (map, x, y); 243 wall = get_wall (map, x, y);
248 if (!wall) 244 if (!wall)
249 /* Nothing -> bail out */ 245 /* Nothing -> bail out */
250 return; 246 return;
251 247
252 /* Find base name */ 248 /* Find base name */
253 strcpy (archetype, wall->arch->name); 249 assign (archetype, wall->arch->archname);
254 underscore = strchr (archetype, '_'); 250 underscore = strchr (archetype, '_');
255 251
252 /* search for the first _ before a number */
253 while (underscore && !isdigit (*(underscore + 1)))
254 underscore = strchr (underscore + 1, '_');
255
256 if (!underscore || (!isdigit (*(underscore + 1)))) 256 if (!underscore || !isdigit (*(underscore + 1)))
257 /* Not in a format we can change, bail out */ 257 /* Not in a format we can change, bail out */
258 return; 258 return;
259 259
260 underscore++; 260 underscore++;
261 *underscore = '\0'; 261 *underscore = '\0';
262 262
263 connect = 0; 263 int connect = 0;
264 264
265 if ((x > 0) && get_wall (map, x - 1, y)) 265 if ((x > 0) && get_wall (map, x - 1, y))
266 connect |= 1; 266 connect |= 1;
267 if ((x < MAP_WIDTH (map) - 1) && get_wall (map, x + 1, y)) 267 if ((x < map->width - 1) && get_wall (map, x + 1, y))
268 connect |= 2; 268 connect |= 2;
269 269
270 if ((y > 0) && get_wall (map, x, y - 1)) 270 if ((y > 0) && get_wall (map, x, y - 1))
271 connect |= 4; 271 connect |= 4;
272 272
273 if ((y < MAP_HEIGHT (map) - 1) && get_wall (map, x, y + 1)) 273 if ((y < map->height - 1) && get_wall (map, x, y + 1))
274 connect |= 8; 274 connect |= 8;
275 275
276 switch (connect) 276 switch (connect)
277 { 277 {
278 case 0: 278 case 0:
351 return; 351 return;
352 352
353 /* Now delete current wall, and insert new one 353 /* Now delete current wall, and insert new one
354 * We save flags to avoid any trouble with buildable/non buildable, and so on 354 * We save flags to avoid any trouble with buildable/non buildable, and so on
355 */ 355 */
356 for (flag = 0; flag < 4; flag++) 356 object::flags_t old_flags = wall->flag; // elmex: this is where C++ pays off
357 old_flags[flag] = wall->flags[flag]; 357
358 remove_ob (wall); 358 wall->destroy ();
359 free_object (wall);
360 359
361 wall = arch_to_object (new_arch); 360 wall = arch_to_object (new_arch);
362 wall->type = WALL; 361 wall->type = BUILDABLE_WALL;
363 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y); 362 insert_ob_in_map_at (wall, map, NULL, INS_ABOVE_FLOOR_ONLY, x, y);
364 for (flag = 0; flag < 4; flag++)
365 wall->flags[flag] = old_flags[flag]; 363 wall->flag = old_flags;
366} 364}
367 365
368/** 366/**
369 * \brief Floor building function 367 * \brief Floor building function
370 * 368 *
398 if (tmp) 396 if (tmp)
399 { 397 {
400 while (tmp) 398 while (tmp)
401 { 399 {
402 above = tmp->above; 400 above = tmp->above;
403 if (WALL == tmp->type) 401 if (BUILDABLE_WALL == tmp->type)
404 { 402 {
405 /* There was a wall, remove it & keep its archetype to make new walls */ 403 /* There was a wall, remove it & keep its archetype to make new walls */
406 new_wall = tmp->arch; 404 new_wall = tmp->arch;
407 remove_ob (tmp); 405 tmp->destroy ();
408 free_object (tmp);
409 sprintf (message, "You destroy the wall and redo the floor."); 406 sprintf (message, "You destroy the wall and redo the floor.");
410 } 407 }
411 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR))) 408 else if ((FLOOR == tmp->type) || (QUERY_FLAG (tmp, FLAG_IS_FLOOR)))
412 { 409 {
413 remove_ob (tmp); 410 tmp->destroy ();
414 free_object (tmp);
415 floor_removed = 1; 411 floor_removed = 1;
416 } 412 }
417 else 413 else
418 { 414 {
419 if (floor_removed) 415 if (floor_removed)
461 /* Insert wall if exists. Note: if it doesn't, the map is weird... */ 457 /* Insert wall if exists. Note: if it doesn't, the map is weird... */
462 if (new_wall) 458 if (new_wall)
463 { 459 {
464 tmp = arch_to_object (new_wall); 460 tmp = arch_to_object (new_wall);
465 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 461 SET_FLAG (tmp, FLAG_IS_BUILDABLE);
466 tmp->type = WALL; 462 tmp->type = BUILDABLE_WALL;
467 insert_ob_in_map_at (tmp, pl->map, 0, 0, xt, yt); 463 insert_ob_in_map_at (tmp, pl->map, 0, 0, xt, yt);
468 } 464 }
469 } 465 }
470 } 466 }
471 467
486 /* And tell player about the fix */ 482 /* And tell player about the fix */
487 new_draw_info (NDI_UNIQUE, 0, pl, message); 483 new_draw_info (NDI_UNIQUE, 0, pl, message);
488} 484}
489 485
490/** 486/**
487 * Wall radius fix function
488 */
489void fix_walls_around (maptile *map, int x, int y)
490{
491 for (int xt = x - 1; xt <= x + 1; xt++)
492 for (int yt = y - 1; yt <= y + 1; yt++)
493 {
494 if (OUT_OF_REAL_MAP (map, xt, yt))
495 continue;
496
497 fix_walls (map, xt, yt);
498 }
499}
500
501/**
491 * Wall building function 502 * Wall building function
492 * 503 *
493 * Walls can be build: 504 * Walls can be build:
494 * - on a floor without anything else 505 * - on a floor without anything else
495 * - on an existing wall, with or without a floor 506 * - on an existing wall, with or without a floor
508 /* Grab existing wall, if any */ 519 /* Grab existing wall, if any */
509 current_wall = NULL; 520 current_wall = NULL;
510 tmp = GET_MAP_OB (pl->map, x, y); 521 tmp = GET_MAP_OB (pl->map, x, y);
511 while (tmp && !current_wall) 522 while (tmp && !current_wall)
512 { 523 {
513 if (WALL == tmp->type) 524 if (BUILDABLE_WALL == tmp->type)
514 current_wall = tmp; 525 current_wall = tmp;
515 526
516 tmp = tmp->above; 527 tmp = tmp->above;
517 } 528 }
518 529
526 LOG (llevError, "apply_builder_wall: unable to find archetype %s\n", &material->slaying); 537 LOG (llevError, "apply_builder_wall: unable to find archetype %s\n", &material->slaying);
527 return; 538 return;
528 } 539 }
529 540
530 tmp = arch_to_object (new_wall); 541 tmp = arch_to_object (new_wall);
531 tmp->type = WALL; 542 tmp->type = BUILDABLE_WALL;
532 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 543 SET_FLAG (tmp, FLAG_IS_BUILDABLE);
533 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y); 544 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y);
534 545
535 /* If existing wall, remove it, no need to fix other walls */ 546 /* If existing wall, remove it, no need to fix other walls */
536 if (current_wall) 547 if (current_wall)
537 { 548 {
538 remove_ob (current_wall); 549 current_wall->destroy ();
539 free_object (current_wall);
540 fix_walls (pl->map, x, y); 550 fix_walls (pl->map, x, y);
541 sprintf (message, "You redecorate the wall to better suit your tastes."); 551 sprintf (message, "You redecorate the wall to better suit your tastes.");
542 } 552 }
543 else 553 else
544 { 554 {
628 case PEDESTAL: 638 case PEDESTAL:
629 case CF_HANDLE: 639 case CF_HANDLE:
630 case MAGIC_EAR: 640 case MAGIC_EAR:
631 case SIGN: 641 case SIGN:
632 /* Signs don't need a connection, but but magic mouths do. */ 642 /* Signs don't need a connection, but but magic mouths do. */
633 if (tmp->type == SIGN && strcmp (tmp->arch->name, "magic_mouth")) 643 if (tmp->type == SIGN && strcmp (tmp->arch->archname, "magic_mouth"))
634 break; 644 break;
635 con_rune = get_connection_rune (pl, x, y); 645 con_rune = get_connection_rune (pl, x, y);
636 connected = find_or_create_connection_for_map (pl, x, y, con_rune); 646 connected = find_or_create_connection_for_map (pl, x, y, con_rune);
637 if (connected == -1) 647 if (connected == -1)
638 { 648 {
639 /* Player already informed of failure by the previous function */ 649 /* Player already informed of failure by the previous function */
640 free_object (tmp); 650 tmp->destroy ();
641 return; 651 return;
642 } 652 }
643 /* Remove marking rune */ 653 /* Remove marking rune */
644 remove_ob (con_rune); 654 con_rune->destroy ();
645 free_object (con_rune);
646 } 655 }
647 656
648 /* For magic mouths/ears, and signs, take the msg from a book of scroll */ 657 /* For magic mouths/ears, and signs, take the msg from a book of scroll */
649 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR)) 658 if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR))
650 { 659 {
651 if (adjust_sign_msg (pl, x, y, tmp) == -1) 660 if (adjust_sign_msg (pl, x, y, tmp) == -1)
652 { 661 {
653 free_object (tmp); 662 tmp->destroy ();
654 return; 663 return;
655 } 664 }
656 } 665 }
657 666
658 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y); 667 insert_ob_in_map_at (tmp, pl->map, floor, insert_flag, x, y);
681 item = GET_MAP_OB (pl->map, x, y); 690 item = GET_MAP_OB (pl->map, x, y);
682 if (!item) 691 if (!item)
683 { 692 {
684 /* Should not happen with previous tests, but we never know */ 693 /* Should not happen with previous tests, but we never know */
685 new_draw_info (NDI_UNIQUE, 0, pl, "Invalid square."); 694 new_draw_info (NDI_UNIQUE, 0, pl, "Invalid square.");
686 LOG (llevError, "apply_builder_remove: (null) square at (%d, %d, %s)\n", x, y, pl->map->path); 695 LOG (llevError, "apply_builder_remove: (null) square at (%d, %d, %s)\n", x, y, &pl->map->path);
687 return; 696 return;
688 } 697 }
689 698
690 if (item->type == FLOOR || QUERY_FLAG (item, FLAG_IS_FLOOR)) 699 if (item->type == FLOOR || QUERY_FLAG (item, FLAG_IS_FLOOR))
691 item = item->above; 700 item = item->above;
692 701
693 if (!item) 702 if (!item)
694 {
695 new_draw_info (NDI_UNIQUE, 0, pl, "Nothing to remove."); 703 new_draw_info (NDI_UNIQUE, 0, pl, "Nothing to remove.");
696 return; 704 else if (item->type == BUILDABLE_WALL)
697 }
698
699 /* Now remove object, with special cases (buttons & such) */
700 switch (item->type)
701 {
702 case WALL:
703 new_draw_info (NDI_UNIQUE, 0, pl, "Can't remove a wall with that, build a floor."); 705 new_draw_info (NDI_UNIQUE, 0, pl, "Can't remove a wall with that, build a floor.");
704 return; 706 else if (!item->flag [FLAG_IS_BUILDABLE])
705 707 new_draw_info_format (NDI_UNIQUE, 0, pl, "You can't remove the %s, it's not buildable!", query_name (item));
706 case DOOR: 708 else
707 case BUTTON: 709 {
708 case GATE:
709 case TIMED_GATE:
710 case DETECTOR:
711 case PEDESTAL:
712 case CF_HANDLE:
713 case MAGIC_EAR:
714 case SIGN:
715 /* Special case: must unconnect */
716 if (QUERY_FLAG (item, FLAG_IS_LINKED))
717 remove_button_link (item);
718
719 /* Fall through */
720
721 default:
722 /* Remove generic item */
723 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item)); 710 new_draw_info_format (NDI_UNIQUE, 0, pl, "You remove the %s", query_name (item));
724 remove_ob (item); 711 item->destroy ();
725 free_object (item);
726 } 712 }
727} 713}
728 714
729/** 715/**
730 * Global building function 716 * Global building function
756 } 742 }
757 743
758 x = pl->x + freearr_x[dir]; 744 x = pl->x + freearr_x[dir];
759 y = pl->y + freearr_y[dir]; 745 y = pl->y + freearr_y[dir];
760 746
761 if ((1 > x) || (1 > y) || ((MAP_WIDTH (pl->map) - 2) < x) || ((MAP_HEIGHT (pl->map) - 2) < y)) 747 if ((1 > x) || (1 > y) || ((pl->map->width - 2) < x) || ((pl->map->height - 2) < y))
762 { 748 {
763 new_draw_info (NDI_UNIQUE, 0, pl, "Can't build on map edge..."); 749 new_draw_info (NDI_UNIQUE, 0, pl, "Can't build on map edge...");
764 return; 750 return;
765 } 751 }
766 752
773 759
774 tmp = GET_MAP_OB (pl->map, x, y); 760 tmp = GET_MAP_OB (pl->map, x, y);
775 if (!tmp) 761 if (!tmp)
776 { 762 {
777 /* Nothing, meaning player is standing next to an undefined square... */ 763 /* Nothing, meaning player is standing next to an undefined square... */
778 LOG (llevError, "apply_map_builder: undefined square at (%d, %d, %s)\n", x, y, pl->map->path); 764 LOG (llevError, "apply_map_builder: undefined square at (%d, %d, %s)\n", x, y, &pl->map->path);
779 new_draw_info (NDI_UNIQUE, 0, pl, "You'd better not build here, it looks weird."); 765 new_draw_info (NDI_UNIQUE, 0, pl, "You'd better not build here, it looks weird.");
780 return; 766 return;
781 } 767 }
768
782 tmp2 = find_marked_object (pl); 769 tmp2 = find_marked_object (pl);
783 while (tmp) 770 while (tmp)
784 { 771 {
785 if (!QUERY_FLAG (tmp, FLAG_IS_BUILDABLE) && ((tmp->type != SIGN) || (strcmp (tmp->arch->name, "rune_mark")))) 772 if (!QUERY_FLAG (tmp, FLAG_IS_BUILDABLE) && ((tmp->type != SIGN) || (strcmp (tmp->arch->archname, "rune_mark"))))
786 { 773 {
787 /* The item building function already has it's own special 774 /* The item building function already has it's own special
788 * checks for this 775 * checks for this
789 */ 776 */
790 if ((!tmp2) || (tmp2->subtype != ST_MAT_ITEM)) 777 if ((!tmp2) || (tmp2->subtype != ST_MAT_ITEM))
795 } 782 }
796 tmp = tmp->above; 783 tmp = tmp->above;
797 } 784 }
798 785
799 /* Now we know the square is ok */ 786 /* Now we know the square is ok */
800 builder = pl->contr->ranges[range_builder]; 787 builder = pl->contr->ranged_ob;
801 788
802 if (builder->subtype == ST_BD_REMOVE) 789 if (builder->subtype == ST_BD_REMOVE)
803 /* Remover -> call specific function and bail out */ 790 /* Remover -> call specific function and bail out */
804 { 791 {
805 apply_builder_remove (pl, dir); 792 apply_builder_remove (pl, dir);
891 } 878 }
892 879
893 tmp->face = book->face; 880 tmp->face = book->face;
894 tmp->invisible = 0; 881 tmp->invisible = 0;
895 } 882 }
896 remove_ob (book); 883
897 free_object (book); 884 book->destroy ();
898 return 0; 885 return 0;
899} 886}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines