… | |
… | |
46 | is_dragon_pl (const object *op) |
46 | is_dragon_pl (const object *op) |
47 | { |
47 | { |
48 | if (op |
48 | if (op |
49 | && op->type == PLAYER |
49 | && op->type == PLAYER |
50 | && op->arch |
50 | && op->arch |
51 | && op->arch->race |
51 | && op->arch->race == shstr_dragon) |
52 | && !strcmp (op->arch->race, "dragon")) |
|
|
53 | return 1; |
52 | return 1; |
54 | |
53 | |
55 | return 0; |
54 | return 0; |
56 | } |
55 | } |
57 | |
56 | |
… | |
… | |
356 | --cfpod; |
355 | --cfpod; |
357 | do |
356 | do |
358 | buf << *cfpod++; |
357 | buf << *cfpod++; |
359 | while (*cfpod == '\n'); |
358 | while (*cfpod == '\n'); |
360 | } |
359 | } |
361 | else if (*cfpod != ' ') |
360 | else if (*cfpod == ' ') |
|
|
361 | buf << '\n'; |
|
|
362 | else |
362 | buf << ' '; |
363 | buf << ' '; |
363 | |
364 | |
364 | // verbatim block? |
365 | // verbatim block? |
365 | if (*cfpod == ' ') |
366 | if (*cfpod == ' ') |
366 | goto verbatim; |
367 | goto verbatim; |
… | |
… | |
421 | } |
422 | } |
422 | break; |
423 | break; |
423 | |
424 | |
424 | case 'G': // gender |
425 | case 'G': // gender |
425 | { |
426 | { |
426 | expand_cfpod (pl, nest, cfpod, end); |
427 | cfpod = expand_cfpod (pl, nest, cfpod, end); |
427 | nest << '\0'; // zero-terminate |
428 | nest << '\0'; // zero-terminate |
428 | |
429 | |
429 | const char *str = nest.linearise (); |
430 | const char *str = nest.linearise (); |
430 | const char *sep = strchr (str, '|'); |
431 | const char *sep = strchr (str, '|'); |
431 | |
432 | |
432 | if (sep) |
433 | if (sep) |
433 | { |
434 | { |
434 | if (pl->gender || 1) |
435 | if (pl->gender) |
435 | buf.add (sep + 1, nest.size () - (sep - str) - 2); |
436 | buf.add (sep + 1, nest.size () - (sep - str) - 2); |
436 | else |
437 | else |
437 | buf.add (str, sep - str); |
438 | buf.add (str, sep - str); |
438 | } |
439 | } |
439 | |
440 | |
… | |
… | |
461 | do |
462 | do |
462 | { |
463 | { |
463 | buf << "<tt>"; |
464 | buf << "<tt>"; |
464 | cfpod = expand_cfpod (pl, buf, cfpod, -2); |
465 | cfpod = expand_cfpod (pl, buf, cfpod, -2); |
465 | buf << "</tt>\n"; |
466 | buf << "</tt>\n"; |
|
|
467 | |
|
|
468 | while (*cfpod == '\n') |
|
|
469 | buf << *cfpod++; |
466 | } |
470 | } |
467 | while (*cfpod == ' '); |
471 | while (*cfpod == ' '); |
468 | |
472 | |
469 | while (*cfpod == '\n') |
|
|
470 | buf << *cfpod++; |
|
|
471 | |
|
|
472 | break; |
473 | break; |
473 | } |
474 | } |
474 | } |
475 | } |
475 | |
476 | |
476 | dynbuf_text * |
477 | dynbuf_text * |