1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607
|
/* File: dungeon.pkg */
/*
* Purpose: Lua interface defitions for dungeon routines.
* To be processed by tolua to generate C source code.
*/
$#include "angband.h"
/** @typedef cptr
* @note String
*/
typedef char* cptr;
/** @typedef errr
* @note Number
*/
typedef int errr;
/** @typedef bool
* @note Boolean
*/
typedef unsigned char bool;
/** @typedef byte
* @note Number
*/
typedef unsigned char byte;
/** @typedef s16b
* @note Number
*/
typedef signed short s16b;
/** @typedef u16b
* @note Number
*/
typedef unsigned short u16b;
/** @typedef s32b
* @note Number
*/
typedef signed int s32b;
/** @typedef u32b
* @note Number
*/
typedef unsigned int u32b;
/** @name Cave Grid
* @note Special cave grid flags
* @{
*/
/** @def CAVE_MARK
* @note memorized feature
*/
#define CAVE_MARK 0x0001
/** @def CAVE_GLOW
* @note self-illuminating
*/
#define CAVE_GLOW 0x0002
/** @def CAVE_ICKY
* @note part of a vault
*/
#define CAVE_ICKY 0x0004
/** @def CAVE_ROOM
* @note part of a room
*/
#define CAVE_ROOM 0x0008
/** @def CAVE_SEEN
* @note seen flag
*/
#define CAVE_SEEN 0x0010
/** @def CAVE_VIEW
* @note view flag
*/
#define CAVE_VIEW 0x0020
/** @def CAVE_TEMP
* @note temp flag
*/
#define CAVE_TEMP 0x0040
/** @def CAVE_WALL
* @note wall flag
*/
#define CAVE_WALL 0x0080
/** @def CAVE_TRDT
* @note trap detected
*/
#define CAVE_TRDT 0x0100
/** @def CAVE_IDNT
* @note grid identified (fountains)
*/
#define CAVE_IDNT 0x0200
/** @def CAVE_SPEC
* @note special mark(quests)
*/
#define CAVE_SPEC 0x0400
/** @def CAVE_FREE
* @note no random generation on it
*/
#define CAVE_FREE 0x0800
/** @def CAVE_DETECT
* @note Traps detected here
*/
#define CAVE_DETECT 0x1000
/** @def CAVE_PLIT
* @note Player lit grid
*/
#define CAVE_PLIT 0x2000
/** @def CAVE_MLIT
* @note Monster lit grid
*/
#define CAVE_MLIT 0x4000
/** @} */
/** @name Terrain Feature Indexes
* @note (see "lib/edit/f_info.txt")
* @{
*/
/* Nothing */
/** @def FEAT_NONE */
#define FEAT_NONE 0x00
/* Basic features */
/** @def FEAT_FLOOR */
#define FEAT_FLOOR 0x01
/** @def FEAT_FOUNTAIN */
#define FEAT_FOUNTAIN 0x02
/** @def FEAT_GLYPH */
#define FEAT_GLYPH 0x03
/** @def FEAT_OPEN */
#define FEAT_OPEN 0x04
/** @def FEAT_BROKEN */
#define FEAT_BROKEN 0x05
/** @def FEAT_LESS */
#define FEAT_LESS 0x06
/** @def FEAT_MORE */
#define FEAT_MORE 0x07
/* Quest features -KMW- */
/** @def FEAT_QUEST_ENTER */
#define FEAT_QUEST_ENTER 0x08
/** @def FEAT_QUEST_EXIT */
#define FEAT_QUEST_EXIT 0x09
/** @def FEAT_QUEST_DOWN */
#define FEAT_QUEST_DOWN 0x0A
/** @def FEAT_QUEST_UP */
#define FEAT_QUEST_UP 0x0B
/* Shafts -GSN- */
/** @def FEAT_SHAFT_DOWN */
#define FEAT_SHAFT_DOWN 0x0D
/** @def FEAT_SHAFT_UP */
#define FEAT_SHAFT_UP 0x0E
/* Basic feature */
/** @def FEAT_EMPTY_FOUNTAIN */
#define FEAT_EMPTY_FOUNTAIN 0x0F
/* Feature 0x10 -- web */
/* Traps */
/** @def FEAT_TRAP */
#define FEAT_TRAP 0x11
/* Features 0x12 - 0x1F -- unused */
/* Doors */
/** @def FEAT_DOOR_HEAD */
#define FEAT_DOOR_HEAD 0x20
/** @def FEAT_DOOR_TAIL */
#define FEAT_DOOR_TAIL 0x2F
/* Extra */
/** @def FEAT_SECRET */
#define FEAT_SECRET 0x30
/** @def FEAT_RUBBLE */
#define FEAT_RUBBLE 0x31
/* Seams */
/** @def FEAT_MAGMA */
#define FEAT_MAGMA 0x32
/** @def FEAT_QUARTZ */
#define FEAT_QUARTZ 0x33
/** @def FEAT_MAGMA_H */
#define FEAT_MAGMA_H 0x34
/** @def FEAT_QUARTZ_H */
#define FEAT_QUARTZ_H 0x35
/** @def FEAT_MAGMA_K */
#define FEAT_MAGMA_K 0x36
/** @def FEAT_QUARTZ_K */
#define FEAT_QUARTZ_K 0x37
/* Walls */
/** @def FEAT_WALL_EXTRA */
#define FEAT_WALL_EXTRA 0x38
/** @def FEAT_WALL_INNER */
#define FEAT_WALL_INNER 0x39
/** @def FEAT_WALL_OUTER */
#define FEAT_WALL_OUTER 0x3A
/** @def FEAT_WALL_SOLID */
#define FEAT_WALL_SOLID 0x3B
/** @def FEAT_PERM_EXTRA */
#define FEAT_PERM_EXTRA 0x3C
/** @def FEAT_PERM_INNER */
#define FEAT_PERM_INNER 0x3D
/** @def FEAT_PERM_OUTER */
#define FEAT_PERM_OUTER 0x3E
/** @def FEAT_PERM_SOLID */
#define FEAT_PERM_SOLID 0x3F
/* Explosive rune */
/** @def FEAT_MINOR_GLYPH */
#define FEAT_MINOR_GLYPH 0x40
/* Pattern */
/** @def FEAT_PATTERN_START */
#define FEAT_PATTERN_START 0x41
/** @def FEAT_PATTERN_1 */
#define FEAT_PATTERN_1 0x42
/** @def FEAT_PATTERN_2 */
#define FEAT_PATTERN_2 0x43
/** @def FEAT_PATTERN_3 */
#define FEAT_PATTERN_3 0x44
/** @def FEAT_PATTERN_4 */
#define FEAT_PATTERN_4 0x45
/** @def FEAT_PATTERN_END */
#define FEAT_PATTERN_END 0x46
/** @def FEAT_PATTERN_OLD */
#define FEAT_PATTERN_OLD 0x47
/** @def FEAT_PATTERN_XTRA1 */
#define FEAT_PATTERN_XTRA1 0x48
/** @def FEAT_PATTERN_XTRA2 */
#define FEAT_PATTERN_XTRA2 0x49
/* Shops */
/** @def FEAT_SHOP */
#define FEAT_SHOP 0x4A
/* Permanent walls for quests */
/** @def FEAT_QUEST1 */
#define FEAT_QUEST1 0x4B
/** @def FEAT_QUEST2 */
#define FEAT_QUEST2 0x4C
/** @def FEAT_QUEST3 */
#define FEAT_QUEST3 0x4D
/** @def FEAT_QUEST4 */
#define FEAT_QUEST4 0x4E
/* Features 0x4F - 0x53 -- unused */
/* Additional terrains */
/** @def FEAT_SHAL_WATER */
#define FEAT_SHAL_WATER 0x54
/** @def FEAT_DEEP_LAVA */
#define FEAT_DEEP_LAVA 0x55
/** @def FEAT_SHAL_LAVA */
#define FEAT_SHAL_LAVA 0x56
/** @def FEAT_DARK_PIT */
#define FEAT_DARK_PIT 0x57
/** @def FEAT_DIRT */
#define FEAT_DIRT 0x58
/** @def FEAT_GRASS */
#define FEAT_GRASS 0x59
/** @def FEAT_ICE */
#define FEAT_ICE 0x5A
/** @def FEAT_SAND */
#define FEAT_SAND 0x5B
/** @def FEAT_DEAD_TREE */
#define FEAT_DEAD_TREE 0x5C
/** @def FEAT_ASH */
#define FEAT_ASH 0x5D
/** @def FEAT_MUD */
#define FEAT_MUD 0x5E
/** @def FEAT_ICE_WALL */
#define FEAT_ICE_WALL 0x5F
/** @def FEAT_TREES */
#define FEAT_TREES 0x60
/** @def FEAT_MOUNTAIN */
#define FEAT_MOUNTAIN 0x61
/** @def FEAT_SANDWALL */
#define FEAT_SANDWALL 0x62
/** @def FEAT_SANDWALL_H */
#define FEAT_SANDWALL_H 0x63
/** @def FEAT_SANDWALL_K */
#define FEAT_SANDWALL_K 0x64
/* Feature 0x65 -- high mountain chain */
/* Feature 0x66 -- nether mist */
/* Features 0x67 - 0x9F -- unused */
/** @def FEAT_BETWEEN
* @note 160
*/
#define FEAT_BETWEEN 0xA0
/* Altars */
/** @def FEAT_ALTAR_HEAD
* @note 161
*/
#define FEAT_ALTAR_HEAD 0xA1
/** @def FEAT_ALTAR_TAIL
* @note 171
*/
#define FEAT_ALTAR_TAIL 0xAB
/** @def FEAT_MARKER
* @note 172
*/
#define FEAT_MARKER 0xAC
/* Feature 0xAD -- Underground Tunnel */
/** @def FEAT_TAINTED_WATER
* @note 174
*/
#define FEAT_TAINTED_WATER 0xAE
/** @def FEAT_MON_TRAP
* @note 175
*/
#define FEAT_MON_TRAP 0xAF
/** @def FEAT_BETWEEN2
* @note 176
*/
#define FEAT_BETWEEN2 0xB0
/** @def FEAT_LAVA_WALL
* @note 177
*/
#define FEAT_LAVA_WALL 0xB1
/** @def FEAT_GREAT_FIRE
* @note 178
*/
#define FEAT_GREAT_FIRE 0xB2
/** @def FEAT_WAY_MORE
* @note 179
*/
#define FEAT_WAY_MORE 0xB3
/** @def FEAT_WAY_LESS
* @note 180
*/
#define FEAT_WAY_LESS 0xB4
/* Feature 0xB5 -- field */
/** @def FEAT_EKKAIA
* @note 182
*/
#define FEAT_EKKAIA 0xB6
/* Features 0xB7 - 0xBA -- unused */
/** @def FEAT_DEEP_WATER
* @note 187
*/
#define FEAT_DEEP_WATER 0xBB
/** @def FEAT_GLASS_WALL
* @note 188
*/
#define FEAT_GLASS_WALL 0xBC
/** @def FEAT_ILLUS_WALL
* @note 189
*/
#define FEAT_ILLUS_WALL 0xBD
/* Feature 0xBE -- grass roof */
/* Feature 0xBF -- grass roof top */
/* Feature 0xC0 -- grass roof chimney */
/* Feature 0xC1 -- brick roof */
/* Feature 0xC2 -- brick roof top */
/* Feature 0xC3 -- brick roof chimney */
/* Feature 0xC4 -- window */
/* Feature 0xC5 -- small window */
/* Feature 0xC6 -- rain barrel */
/** @def FEAT_FLOWER
* @note 199
*/
#define FEAT_FLOWER 0xC7
/* Feature 0xC8 -- cobblestone road */
/* Feature 0xC9 -- cobblestone with outlet */
/** @def FEAT_SMALL_TREES
* @note 202
*/
#define FEAT_SMALL_TREES 0xCA
/** @def FEAT_TOWN
* @note 203
*/
#define FEAT_TOWN 0xCB
/* Feature 0xCC -- Underground Tunnel */
/** @def FEAT_FIRE
* @note 205
*/
#define FEAT_FIRE 0xCD
/* Feature 0xCE -- pile of rubble (permanent) */
/* Features 0xCF - 0xFF -- unused */
/** @} */
/** @name Dungeon Type Flags (part 1)
* @{ */
/** @def DF1_PRINCIPAL
* @note Is a principal dungeon
*/
#define DF1_PRINCIPAL 0x00000001L
/** @def DF1_MAZE
* @note Is a maze-type dungeon
*/
#define DF1_MAZE 0x00000002L
/** @def DF1_SMALLEST
* @note Creates VERY small levels like The Maze
*/
#define DF1_SMALLEST 0x00000004L
/** @def DF1_SMALL
* @note Creates small levels like Dol Goldor
*/
#define DF1_SMALL 0x00000008L
/** @def DF1_BIG
* @note Creates big levels like Moria, and Angband dungeons
*/
#define DF1_BIG 0x00000010L
/** @def DF1_NO_DOORS
* @note No doors on rooms, like Barrowdowns, Old Forest etc)
*/
#define DF1_NO_DOORS 0x00000020L
/** @def DF1_WATER_RIVER
* @note Allow a single water streamer on a level
*/
#define DF1_WATER_RIVER 0x00000040L
/** @def DF1_LAVA_RIVER
* @note Allow a single lava streamer on a level
*/
#define DF1_LAVA_RIVER 0x00000080L
/** @def DF1_WATER_RIVERS
* @note Allow multiple water streamers on a level
*/
#define DF1_WATER_RIVERS 0x00000100L
/** @def DF1_LAVA_RIVERS
* @note Allow multiple lava streamers on a level
*/
#define DF1_LAVA_RIVERS 0x00000200L
/** @def DF1_CAVE
* @note Allow orc-cave like 'fractal' rooms
*/
#define DF1_CAVE 0x00000400L
/** @def DF1_CAVERN
* @note Allow cavern rooms
*/
#define DF1_CAVERN 0x00000800L
/** @def DF1_NO_UP
* @note Disallow up stairs
*/
#define DF1_NO_UP 0x00001000L
/** @def DF1_HOT
* @note Corpses on ground and in pack decay quicker through heat
*/
#define DF1_HOT 0x00002000L
/** @def DF1_COLD
* @note Corpses on ground and in pack decay quicker through cold
*/
#define DF1_COLD 0x00004000L
/** @def DF1_FORCE_DOWN
* @note No up stairs generated
*/
#define DF1_FORCE_DOWN 0x00008000L
/** @def DF1_FORGET
* @note Features are forgotten, like the Maze and Illusory Castle
*/
#define DF1_FORGET 0x00010000L
/** @def DF1_NO_DESTROY
* @note No destroyed levels in dungeon
*/
#define DF1_NO_DESTROY 0x00020000L
/** @def DF1_SAND_VEIN
* @note Like in the sandworm lair
*/
#define DF1_SAND_VEIN 0x00040000L
/** @def DF1_CIRCULAR_ROOMS
* @note Allow circular rooms
*/
#define DF1_CIRCULAR_ROOMS 0x00080000L
/** @def DF1_EMPTY
* @note Allow arena levels
*/
#define DF1_EMPTY 0x00100000L
/** @def DF1_DAMAGE_FEAT
* @note Effect specified in will affect all grids incl. terrain and monsters
*/
#define DF1_DAMAGE_FEAT 0x00200000L
/** @def DF1_FLAT
* @note Creates paths to next areas at edge of level, like Barrowdowns
*/
#define DF1_FLAT 0x00400000L
/** @def DF1_TOWER
* @note You start at bottom and go up rather than the reverse
*/
#define DF1_TOWER 0x00800000L
/** @def DF1_RANDOM_TOWNS
* @note Allow random towns
*/
#define DF1_RANDOM_TOWNS 0x01000000L
/** @def DF1_DOUBLE
* @note Generates everything at double size like Helcaraxe and Erebor
*/
#define DF1_DOUBLE 0x02000000L
/** @def DF1_LIFE_LEVEL
* @note Creates dungeon level on modified 'game of life' algorithm
*/
#define DF1_LIFE_LEVEL 0x04000000L
/** @def DF1_EVOLVE
* @note Evolving, pulsing levels like Heart of the Earth
*/
#define DF1_EVOLVE 0x08000000L
/** @def DF1_ADJUST_LEVEL_1
* @note Minimum monster level will be equal to dungeon level
*/
#define DF1_ADJUST_LEVEL_1 0x10000000L
/** @def DF1_ADJUST_LEVEL_2
* @note Minimum monster level will be double the dungeon level
*/
#define DF1_ADJUST_LEVEL_2 0x20000000L
/** @def DF1_NO_RECALL
* @note No recall allowed
*/
#define DF1_NO_RECALL 0x40000000L
/** @def DF1_NO_STREAMERS
* @note No streamers
*/
#define DF1_NO_STREAMERS 0x80000000L
/** @} */
/** @name Dungeon Type Flags (part 2)
* @{ */
/** @def DF2_ADJUST_LEVEL_1_2
* @note Minimum monster level will be half the dungeon level
*/
#define DF2_ADJUST_LEVEL_1_2 0x00000001L
/** @def DF2_NO_SHAFT
* @note No shafts
*/
#define DF2_NO_SHAFT 0x00000002L
/** @def DF2_ADJUST_LEVEL_PLAYER
* @note Uses player level*2 instead of dungeon level for other ADJUST_LEVEL flags
*/
#define DF2_ADJUST_LEVEL_PLAYER 0x00000004L
/** @def DF2_NO_TELEPORT */
#define DF2_NO_TELEPORT 0x00000008L
/** @def DF2_ASK_LEAVE */
#define DF2_ASK_LEAVE 0x00000010L
/** @def DF2_NO_STAIR */
#define DF2_NO_STAIR 0x00000020L
/** @def DF2_SPECIAL */
#define DF2_SPECIAL 0x00000040L
/** @def DF2_NO_NEW_MONSTER */
#define DF2_NO_NEW_MONSTER 0x00000080L
/** @def DF2_DESC */
#define DF2_DESC 0x00000100L
/** @def DF2_NO_GENO */
#define DF2_NO_GENO 0x00000200L
/** @def DF2_NO_BREATH
* @note Oups, cannot breath here
*/
#define DF2_NO_BREATH 0x00000400L
/** @def DF2_WATER_BREATH
* @note Oups, cannot breath here, need water breathing
*/
#define DF2_WATER_BREATH 0x00000800L
/** @def DF2_ELVEN
* @note Try to create elven monster ego
*/
#define DF2_ELVEN 0x00001000L
/** @def DF2_DWARVEN
* @note Try to create dwarven monster ego
*/
#define DF2_DWARVEN 0x00002000L
/** @def DF2_NO_EASY_MOVE
* @note Forbid stuff like teleport level, probability travel, ...
*/
#define DF2_NO_EASY_MOVE 0x00004000L
/** @def DF2_NO_RECALL_OUT
* @note Cannot recall out of the place
*/
#define DF2_NO_RECALL_OUT 0x00008000L
/** @def DF2_DESC_ALWAYS
* @note Always shows the desc
*/
#define DF2_DESC_ALWAYS 0x00010000L
/** @} */
/** @var level_flags1;
* @brief Number
*/
extern u32b dungeon_flags1@level_flags1;
/** @var level_flags2;
* @brief Number
*/
extern u32b dungeon_flags2@level_flags2;
/** @def MAX_HGT
* @note Maximum dungeon height in grids, must be a multiple of SCREEN_HGT,
* probably hard-coded to SCREEN_HGT * 3.
*/
#define MAX_HGT 66
/** @def MAX_WID
* @note Maximum dungeon width in grids, must be a multiple of SCREEN_WID,
* probably hard-coded to SCREEN_WID * 3.
*/
#define MAX_WID 198
/** @name Town Defines
* @{ */
/** @def TOWN_RANDOM
* @note First random town
*/
#define TOWN_RANDOM 20
/** @def TOWN_DUNGEON
* @note Maximun number of towns per dungeon
*/
#define TOWN_DUNGEON 4
/** @def TOWN_CHANCE
* @note Chance of 1 town
*/
#define TOWN_CHANCE 50
/** @} */
/** @name Wilderness Terrains
* @{
*/
/** @def TERRAIN_EDGE
* @note Edge of the World
*/
#define TERRAIN_EDGE 0
/** @def TERRAIN_TOWN
* @note Town
*/
#define TERRAIN_TOWN 1
/** @def TERRAIN_DEEP_WATER
* @note Deep water
*/
#define TERRAIN_DEEP_WATER 2
/** @def TERRAIN_SHALLOW_WATER
* @note Shallow water
*/
#define TERRAIN_SHALLOW_WATER 3
/** @def TERRAIN_SWAMP
* @note Swamp
*/
#define TERRAIN_SWAMP 4
/** @def TERRAIN_DIRT
* @note Dirt
*/
#define TERRAIN_DIRT 5
/** @def TERRAIN_GRASS
* @note Grass
*/
#define TERRAIN_GRASS 6
/** @def TERRAIN_TREES
* @note Trees
*/
#define TERRAIN_TREES 7
/** @def TERRAIN_DESERT
* @note Desert
*/
#define TERRAIN_DESERT 8
/** @def TERRAIN_SHALLOW_LAVA
* @note Shallow lava
*/
#define TERRAIN_SHALLOW_LAVA 9
/** @def TERRAIN_DEEP_LAVA
* @note Deep lava
*/
#define TERRAIN_DEEP_LAVA 10
/** @def TERRAIN_MOUNTAIN
* @note Mountain
*/
#define TERRAIN_MOUNTAIN 11
/** @def MAX_WILD_TERRAIN */
#define MAX_WILD_TERRAIN 18
/** @} */
/** @struct border_type
* @note Border
*/
struct border_type
{
/** @structvar north[MAX_WID]
* @brief Number
*/
byte north[MAX_WID];
/** @structvar south[MAX_WID]
* @brief Number
*/
byte south[MAX_WID];
/** @structvar east[MAX_HGT]
* @brief Number
*/
byte east[MAX_HGT];
/** @structvar west[MAX_HGT]
* @brief Number
*/
byte west[MAX_HGT];
/** @structvar north_west
* @brief Number
*/
byte north_west;
/** @structvar north_east
* @brief Number
*/
byte north_east;
/** @structvar south_west
* @brief Number
*/
byte south_west;
/** @structvar south_east
* @brief Number
*/
byte south_east;
};
/** @struct wilderness_type_info
* @note A structure describing a wilderness area
* with a terrain, a town or a dungeon entrance
*/
struct wilderness_type_info
{
/** @structvar name
* @brief Number
* @note Name (offset)
*/
u32b name;
/** @structvar text
* @brief Number
* @note Text (offset)
*/
u32b text;
/** @structvar entrance
* @brief Number
* @note Which town is there(<1000 i's a town, >=1000 it a dungeon)
*/
u16b entrance;
/** @structvar road
* @brief Number
* @note Flags of road
*/
byte road;
/** @structvar level
* @brief Number
* @note Difficulty level
*/
int level;
/** @structvar flags1
* @brief Number
* @note Some flags
*/
u32b flags1;
/** @structvar feat
* @brief Number
* @note The feature of f_info.txt that is used to allow passing, ... and to get a char/color/graph
*/
byte feat;
/** @structvar terrain_idx
* @brief Number
* @note Terrain index(defined in defines.h)
*/
byte terrain_idx;
/** @structvar terrain[MAX_WILD_TERRAIN]
* @brief Number
* @note Feature types for the plasma generator
*/
byte terrain[MAX_WILD_TERRAIN];
};
/** @struct wilderness_map
* @note A structure describing a wilderness map
*/
struct wilderness_map
{
/** @structvar feat
* @brief Number
* @note Wilderness feature
*/
int feat;
/** @structvar seed
* @brief Number
* @note Seed for the RNG
*/
u32b seed;
/** @structvar entrance
* @brief Number
* @note Entrance for dungeons
*/
u16b entrance;
/** @structvar known
* @brief Boolean
* @note Is it seen by the player ?
*/
bool known;
};
/** @struct town_type
* @note A structure describing a town with
* stores and buildings
*/
struct town_type
{
/** @structvar name
* @brief String
*/
cptr name;
/** @structvar seed
* @brief Number
* @note Seed for RNG
*/
u32b seed;
/** @structvar *store
* @brief store_type
* @note The stores [max_st_idx]
*/
store_type store[max_st_idx];
/** @structvar numstores
* @brief Number
*/
byte numstores;
/** @structvar flags
* @brief Number
* @note Town flags
*/
byte flags;
/** @structvar stocked
* @brief Boolean
* @note Is the town actually stocked ?
* Left this for the sake of compatibility
*/
bool stocked;
/** @structvar destroyed
* @brief Boolean
* @note Is the town destroyed?
*/
bool destroyed;
};
/** @var max_towns
* @brief Number
*/
extern u16b max_towns;
/** @var town_info[max_towns]
* @brief town_type
*/
extern town_type town_info[max_towns];
/** @struct rule_type
* Define monster generation rules
*/
struct rule_type
{
/** @structvar mode
* @brief Number
* @note Mode of combination of the monster flags
*/
byte mode;
/** @structvar percent
* @brief Number
* @note Percent of monsters affected by the rule
*/
byte percent;
/** @structvar mflags1
* @brief Number
* @note The monster flags that are allowed
*/
u32b mflags1;
/** @structvar mflags2
* @brief Number
*/
u32b mflags2;
/** @structvar mflags3
* @brief Number
*/
u32b mflags3;
/** @structvar mflags4
* @brief Number
*/
u32b mflags4;
/** @structvar mflags5
* @brief Number
*/
u32b mflags5;
/** @structvar mflags6
* @brief Number
*/
u32b mflags6;
/** @structvar mflags7
* @brief Number
*/
u32b mflags7;
/** @structvar mflags8
* @brief Number
*/
u32b mflags8;
/** @structvar mflags9
* @brief Number
*/
u32b mflags9;
/** @structvar r_char[5]
* @brief String
* @note Monster race allowed
*/
char r_char[5];
};
/** @struct obj_theme
* @brief "Themed" objects.
* @note Probability in percent for each class of objects to be dropped.
* This could perhaps be an array - but that wouldn't be as clear.
*/
struct obj_theme
{
/** @structvar treasure
* @brief Number
*/
byte treasure;
/** @structvar combat
* @brief Number
*/
byte combat;
/** @structvar magic
* @brief Number
*/
byte magic;
/** @structvar tools
* @brief Number
*/
byte tools;
};
/** @struct dungeon_info_type
* A structure for the != dungeon types
*/
struct dungeon_info_type
{
/** @structvar name
* @brief Number
* @note Name
*/
u32b name;
/** @structvar text
* @brief Number
* @note Description
*/
u32b text;
/** @structvar short_name[3]
* @brief String
* @note Short name
*/
char short_name[3];
/** @structvar floor1
* @brief Number
* @note Floor tile 1
*/
s16b floor1;
/** @structvar floor_percent1[2]
* @brief Number
* @note Chance of type 1
*/
byte floor_percent1[2];
/** @structvar floor2
* @brief Number
* @note Floor tile 2
*/
s16b floor2;
/** @structvar floor_percent2[2]
* @brief Number
* @note Chance of type 2
*/
byte floor_percent2[2];
/** @structvar floor3
* @brief Number
* @note Floor tile 3
*/
s16b floor3;
/** @structvar floor_percent3[2]
* @brief Number
* @note Chance of type 3
*/
byte floor_percent3[2];
/** @structvar outer_wall
* @brief Number
* @note Outer wall tile
*/
s16b outer_wall;
/** @structvar inner_wall
* @brief Number
* @note Inner wall tile
*/
s16b inner_wall;
/** @structvar fill_type1
* @brief Number
* @note Cave tile 1
*/
s16b fill_type1;
/** @structvar fill_percent1[2]
* @brief Number
* @note Chance of type 1
*/
byte fill_percent1[2];
/** @structvar fill_type2
* @brief Number
* @note Cave tile 2
*/
s16b fill_type2;
/** @structvar fill_percent2[2]
* @brief Number
* @note Chance of type 2
*/
byte fill_percent2[2];
/** @structvar fill_type3
* @brief Number
* @note Cave tile 3
*/
s16b fill_type3;
/** @structvar fill_percent3[2]
* @brief Number
* @note Chance of type 3
*/
byte fill_percent3[2];
/** @structvar fill_method
* @brief Number
* @note Smoothing parameter for the above
*/
byte fill_method;
/** @structvar mindepth
* @brief Number
* @note Minimal depth
*/
s16b mindepth;
/** @structvar maxdepth
* @brief Number
* @note Maximal depth
*/
s16b maxdepth;
/** @structvar principal
* @brief Boolean
* @note If it's a part of the main dungeon
*/
bool principal;
/** @structvar next
* @brief Number
* @note The next part of the main dungeon
*/
byte next;
/** @structvar min_plev
* @brief Number
* @note Minimal plev needed to enter -- it's an anti-cheating mesure
*/
byte min_plev;
/** @structvar min_m_alloc_level
* @brief Number
* @note Minimal number of monsters per level
*/
int min_m_alloc_level;
/** @structvar max_m_alloc_chance
* @brief Number
* @note There is a 1/max_m_alloc_chance chance per round of creating a new monster
*/
int max_m_alloc_chance;
/** @structvar flags1
* @brief Number
* @note Flags 1
*/
u32b flags1;
/** @structvar flags2
* @brief Number
* @note Flags 1
*/
u32b flags2;
/** @structvar size_x
* @brief Number
*/
int size_x;
/** @structvar size_y
* @brief Number
* @note Desired numers of panels
*/
int size_y;
/** @structvar rule_percents[100]
* @brief Number
* @note Flat rule percents
*/
byte rule_percents[100];
/** @structvar rules[5]
* @brief rule_type
* @note Monster generation rules
*/
rule_type rules[5];
/** @structvar final_object
* @brief Number
* @note The object you'll find at the bottom
*/
int final_object;
/** @structvar final_artifact
* @brief Number
* @note The artifact you'll find at the bottom
*/
int final_artifact;
/** @structvar final_guardian
* @brief Number
* @note The artifact's guardian. If an artifact is specified, then it's NEEDED
*/
int final_guardian;
/** @structvar ix
* @brief Number
*/
int ix;
/** @structvar iy
* @brief Number
*/
int iy;
/** @structvar ox
* @brief Number
*/
int ox;
/** @structvar oy
* @brief Number
* @note Wilderness coordinates of the entrance/output of the dungeon
*/
int oy;
/** @structvar objs
* @brief obj_theme
* @note The drops type
*/
obj_theme objs;
/** @structvar d_dice[4]
* @brief Number
* @note Number of dices
*/
int d_dice[4];
/** @structvar d_side[4]
* @brief Number
* @note Number of sides
*/
int d_side[4];
/** @structvar d_frequency[4]
* @brief Number
* @note Frequency of damage (1 is the minimum)
*/
int d_frequency[4];
/** @structvar d_type[4]
* @brief Number
* @note Type of damage
*/
int d_type[4];
/** @structvar t_idx[TOWN_DUNGEON]
* @brief Number
* @note The towns
*/
s16b t_idx[TOWN_DUNGEON];
/** @structvar t_level[TOWN_DUNGEON]
* @brief Number
* @note The towns levels
*/
s16b t_level[TOWN_DUNGEON];
/** @structvar t_num
* @brief Number
* @note Number of towns
*/
s16b t_num;
};
/** @var max_d_idx
* @brief Number
*/
extern u16b max_d_idx;
/** @var d_info[max_d_idx]
* @brief dungeon_info_type
*/
extern dungeon_info_type d_info[max_d_idx];
/** @var *d_name
* @brief String
*/
extern char *d_name;
/** @var *d_text
* @brief String
*/
extern char *d_text;
/** @var max_wild_x
* @brief Number
*/
extern u16b max_wild_x;
/** @var max_wild_y
* @brief Number
*/
extern u16b max_wild_y;
/** @var max_wf_idx
* @brief Number
*/
extern u16b max_wf_idx;
/** @var wf_info[max_wf_idx]
* @brief wilderness_type_info
*/
extern wilderness_type_info wf_info[max_wf_idx];
/** @var *wf_name
* @brief String
*/
extern char *wf_name;
/** @var *wf_text
* @brief String
*/
extern char *wf_text;
/** @var DUNGEON_DEATH
* @brief Number
*/
extern s32b DUNGEON_DEATH;
/** @var current_dungeon_idx;
* @brief Number
*/
extern byte dungeon_type@current_dungeon_idx;
/*
* tolua doesnt like wierd arraysn, I'll use accessing functions
* extern wilderness_map wild_map[max_wild_y][max_wild_x];
*/
$static wilderness_map* lua_get_wild_map(int y, int x) { return &wild_map[y][x]; }
/** @fn wild_map(int y, int x);
* @brief Return a map of the wilderness at coordinate (y,x).\n
* @param y Number \n y coordinate of wilderness map
* @brief Y-coordinate
* @param x Number \n x coordinate of wilderness map
* @brief X-coordinate
* @return wilderness_map \n map of wilderness at coordinate (y,x)
* @note (see file w_dun.c)
*/
wilderness_map* lua_get_wild_map@wild_map(int y, int x);
/** @fn place_trap(int y, int x)
* @brief Place a random trap at the given location.\n
* @param y Number \n y coordinate of dungeon
* @brief Y-coordinate
* @param x Number \n x coordinate of dungeon
* @brief X-coordinate
* @note
* Places a random trap at the given location.\n
* The location must be a valid, empty, clean, floor grid.
* @note (see file traps.c)
*/
extern void place_trap(int y, int x);
/** @fn place_floor(int y, int x)
* @brief Place floor terrain at (y, x).\n
* @param y Number \n y coordinate of dungeon
* @brief Y-coordinate
* @param x Number \n x coordinate of dungeon
* @brief X-coordinate
* @note
* Place floor terrain at (y, x) according to dungeon info.
* @note (see file cave.c)
*/
extern void place_floor(int y, int x);
/** @fn place_filler(int y, int x)
* @brief Place a cave filler at (y, x).\n
* @param y Number \n y coordinate of dungeon
* @brief Y-coordinate
* @param x Number \n x coordinate of dungeon
* @brief X-coordinate
* @note (see file generate.c)
*/
extern void place_filler(int y, int x);
/** @fn new_player_spot(int branch)
* @brief Places player in a new location.\n
* @param branch Number \n branch is the dungeon branch (if any).
* @brief Dungeon branch
* @return Boolean \n TRUE if player was placed successfully, otherwise FALSE.
* The global values py and px are updated.
* @note
* Up to 5000 attempts are made to place the player in the dungeon. The grid
* must be a naked floor and not an anti-teleport grid. In some circumstances
* stairs or ways in/out may be created under the player.
* @note (see file generate.c)
*/
extern bool new_player_spot(int branch);
/** @fn get_level_desc(char *buf)
* @brief Return the special level desc.\n
* @param *buf String
* @brief Description
* @return *buf String \n The level description
* @return Boolean \n TRUE if a level description was returned, otherwise FALSE
* @note
* This is the 'D' line in the dngn files.
* @note (see file levels.c)
*/
extern bool get_level_desc(char *buf);
/** @fn get_level_flags()
* These are the 'F' lines in the dngn files.
* @note (see file levels.c)
*/
extern void get_level_flags();
/** @fn get_dungeon_name(char *buf)
* @brief Return the special level name.\n
* @param *buf String
* @brief Name
* @return *buf String \n The level name
* @return Boolean \n TRUE if a level name was returned, otherwise FALSE
* @note
* This is the 'N' line in the dngn files.
* @note (see file levels.c)
*/
extern bool get_dungeon_name(char *buf);
/** @fn get_dungeon_special(char *buf)
* @brief Return the map filename.\n
* @param *buf String
* @brief Map filename
* @return *buf String \n The map filename
* @return Boolean \n TRUE if a map filename was returned, otherwise FALSE
* @note
* This is the 'S' line in the dngn files.
* @note (see file levels.c)
*/
extern bool get_dungeon_special(char *buf);
/** @fn get_command(const char *file, char comm, char *param)
* @brief Return the parameter of command "comm" in file "*file".\n
* @param *file String \n name of the dungeon file.
* @brief Dungeon file
* @param comm String \n The command \n
* 'A' = father branch, 'B' = branch, 'D' = desccription, 'L' = father level,
* 'N' = name, 'S' = savefile extension, 'U' = map filename
* @brief Command
* @param *param String
* @brief Parameter
* @return *param String \n The result of the command
* @return Boolean \n TRUE if a result is returned, otherwise FALSE
* @note (see file levels.c)
*/
extern bool get_command(const char *file, char comm, char *param);
/** @fn get_branch()
* @brief return the dungeon branch starting form the current dungeon/level.
* @return Number \n The branch
* @note
* This is the 'B' line in the dngn files.
* @note (see file levels.c)
*/
extern int get_branch();
/** @fn get_fbranch()
* @brief Return the father dungeon branch.
* @return Number \n The father branch
* @note
* This is the 'A' line in the dngn files.
* @note (see file levels.c)
*/
extern int get_fbranch();
/** @fn get_flevel()
* @brief Return the father dungeon level.
* @return Number \n The father level
* @note
* This is the 'L' line in the dngn files.
* @note (see file levels.c)
*/
extern int get_flevel();
/** @fn get_dungeon_save(char *buf)
* @brief Return the extension of the savefile for the level.\n
* @param *buf String
* @brief Savefile extension
* @return *buf String \n The savefile extension
* @return Boolean \n TRUE if a savefile extension was returned, otherwise FALSE
* This is the 'S' line in the dngn files.
* @note (see file levels.c)
*/
extern bool get_dungeon_save(char *buf);
|