Source:NetHack 1.3d/rm.h
Jump to navigation
Jump to search
Below is the full text to rm.h from the source code of NetHack 1.3d. To link to a particular line, write [[NetHack 1.3d/rm.h#line123]], for example.
Warning! This is the source code from an old release. For the latest release, see Source code
Screenshots and source code from Hack are used under the CWI license.
1. /* SCCS Id: @(#)rm.h 1.3 87/07/14 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* rm.h - version 1.0.2 */ 4. 5. /* Level location types */ 6. #define HWALL 1 7. #define VWALL 2 8. #define SDOOR 3 9. #define SCORR 4 10. #define LDOOR 5 11. #define POOL 6 /* not yet fully implemented */ 12. /* this should in fact be a bit like lit */ 13. #define DOOR 7 14. #define CORR 8 15. #define ROOM 9 16. #define STAIRS 10 17. #define FOUNTAIN 11 18. #define THRONE 12 19. 20. /* 21. * Avoid using the level types in inequalities: 22. * these types are subject to change. 23. * Instead, use one of the macros below. 24. */ 25. #define IS_WALL(typ) ((typ) <= VWALL) 26. #define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */ 27. #define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */ 28. #define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM or STAIRS */ 29. #define ZAP_POS(typ) ((typ) > DOOR) 30. #define IS_POOL(typ) ((typ) == POOL) 31. #define IS_THRONE(typ) ((typ) == THRONE) 32. #define IS_FOUNTAIN(typ) ((typ) == FOUNTAIN) 33. 34. /* 35. * A few of the associated symbols are not hardwired. 36. */ 37. #ifdef QUEST 38. #define CORR_SYM ':' 39. #else 40. #define CORR_SYM '#' 41. #endif 42. #define POOL_SYM '}' 43. #define FOUNTAIN_SYM '{' 44. #define THRONE_SYM '\\' 45. #define WEB_SYM '"' 46. #define DOOR_SYM '+' 47. 48. #define ERRCHAR ']' 49. 50. /* 51. * The structure describing a coordinate position. 52. * Before adding fields, remember that this will significantly affect 53. * the size of temporary files and save files. 54. */ 55. #ifdef MSDOS 56. /* Save disk space by using unsigned char's instead of unsigned ints 57. */ 58. struct rm { 59. uchar scrsym; 60. uchar typ:5; 61. uchar new:1; 62. uchar seen:1; 63. uchar lit:1; 64. }; 65. #else 66. struct rm { 67. char scrsym; 68. Bitfield(typ,5); 69. Bitfield(new,1); 70. Bitfield(seen,1); 71. Bitfield(lit,1); 72. }; 73. #endif /* MSDOS /**/ 74. extern struct rm levl[COLNO][ROWNO]; 75. 76. #ifdef DGK 77. #define ACTIVE 1 78. #define SWAPPED 2 79. 80. struct finfo { 81. int where; 82. long time; 83. long size; 84. }; 85. extern struct finfo fileinfo[]; 86. #endif