Difference between revisions of "Source:NetHack 3.6.0/include/dgn file.h"

From NetHackWiki
Jump to navigation Jump to search
(Created page with "__MIXEDSYNTAXHIGHLIGHT__ Below is the full text to '''dgn_file.h''' from the source code of NetHack 3.6.0. To link to a particular line, writ...")
 
 
Line 3: Line 3:
  
 
{{NGPL}}
 
{{NGPL}}
  <span id="line1">1.   /* NetHack 3.6 dgn_file.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */</span>
+
  <span id="line1">1. /* NetHack 3.6 dgn_file.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */</span>
  <span id="line2">2.   /* Copyright (c) 1989 by M. Stephenson   */</span>
+
  <span id="line2">2. /* Copyright (c) 1989 by M. Stephenson   */</span>
  <span id="line3">3.   /* NetHack may be freely redistributed.  See license for details. */</span>
+
  <span id="line3">3. /* NetHack may be freely redistributed.  See license for details. */</span>
  <span id="line4">4.   </span>
+
  <span id="line4">4. </span>
  <span id="line5">5.   #ifndef DGN_FILE_H</span>
+
  <span id="line5">5. #ifndef DGN_FILE_H</span>
  <span id="line6">6.   #define DGN_FILE_H</span>
+
  <span id="line6">6. #define DGN_FILE_H</span>
  <span id="line7">7.   </span>
+
  <span id="line7">7. </span>
  <span id="line8">8.   #ifndef ALIGN_H</span>
+
  <span id="line8">8. #ifndef ALIGN_H</span>
  <span id="line9">9.   #include "align.h"</span>
+
  <span id="line9">9. #include "align.h"</span>
  <span id="line10">10.   #endif</span>
+
  <span id="line10">10. #endif</span>
  <span id="line11">11.   </span>
+
  <span id="line11">11. </span>
  <span id="line12">12.   /*</span>
+
  <span id="line12">12. /*</span>
  <span id="line13">13.   * Structures manipulated by the dungeon loader & compiler</span>
+
  <span id="line13">13.  * Structures manipulated by the dungeon loader & compiler</span>
  <span id="line14">14.   */</span>
+
  <span id="line14">14.  */</span>
  <span id="line15">15.   </span>
+
  <span id="line15">15. </span>
  <span id="line16">16.   struct couple {</span>
+
  <span id="line16">16. struct couple {</span>
  <span id="line17">17.       short base, rand;</span>
+
  <span id="line17">17.     short base, rand;</span>
  <span id="line18">18.   };</span>
+
  <span id="line18">18. };</span>
  <span id="line19">19.   </span>
+
  <span id="line19">19. </span>
  <span id="line20">20.   struct tmpdungeon {</span>
+
  <span id="line20">20. struct tmpdungeon {</span>
  <span id="line21">21.       char name[24], protoname[24];</span>
+
  <span id="line21">21.     char name[24], protoname[24];</span>
  <span id="line22">22.       struct couple lev;</span>
+
  <span id="line22">22.     struct couple lev;</span>
  <span id="line23">23.       int flags, chance, levels, branches,</span>
+
  <span id="line23">23.     int flags, chance, levels, branches,</span>
  <span id="line24">24.           entry_lev; /* entry level for this dungeon */</span>
+
  <span id="line24">24.         entry_lev; /* entry level for this dungeon */</span>
  <span id="line25">25.       char boneschar;</span>
+
  <span id="line25">25.     char boneschar;</span>
  <span id="line26">26.   };</span>
+
  <span id="line26">26. };</span>
  <span id="line27">27.   </span>
+
  <span id="line27">27. </span>
  <span id="line28">28.   struct tmplevel {</span>
+
  <span id="line28">28. struct tmplevel {</span>
  <span id="line29">29.       char name[24];</span>
+
  <span id="line29">29.     char name[24];</span>
  <span id="line30">30.       struct couple lev;</span>
+
  <span id="line30">30.     struct couple lev;</span>
  <span id="line31">31.       int chance, rndlevs, chain, flags;</span>
+
  <span id="line31">31.     int chance, rndlevs, chain, flags;</span>
  <span id="line32">32.       char boneschar;</span>
+
  <span id="line32">32.     char boneschar;</span>
  <span id="line33">33.   };</span>
+
  <span id="line33">33. };</span>
  <span id="line34">34.   </span>
+
  <span id="line34">34. </span>
  <span id="line35">35.   struct tmpbranch {</span>
+
  <span id="line35">35. struct tmpbranch {</span>
  <span id="line36">36.       char name[24]; /* destination dungeon name */</span>
+
  <span id="line36">36.     char name[24]; /* destination dungeon name */</span>
  <span id="line37">37.       struct couple lev;</span>
+
  <span id="line37">37.     struct couple lev;</span>
  <span id="line38">38.       int chain; /* index into tmplevel array (chained branch)*/</span>
+
  <span id="line38">38.     int chain; /* index into tmplevel array (chained branch)*/</span>
  <span id="line39">39.       int type;  /* branch type (see below) */</span>
+
  <span id="line39">39.     int type;  /* branch type (see below) */</span>
  <span id="line40">40.       int up;    /* branch is up or down */</span>
+
  <span id="line40">40.     int up;    /* branch is up or down */</span>
  <span id="line41">41.   };</span>
+
  <span id="line41">41. };</span>
  <span id="line42">42.   </span>
+
  <span id="line42">42. </span>
  <span id="line43">43.   /*</span>
+
  <span id="line43">43. /*</span>
  <span id="line44">44.   * Values for type for tmpbranch structure.</span>
+
  <span id="line44">44.  * Values for type for tmpbranch structure.</span>
  <span id="line45">45.   */</span>
+
  <span id="line45">45.  */</span>
  <span id="line46">46.   #define TBR_STAIR 0  /* connection with both ends having a staircase */</span>
+
  <span id="line46">46. #define TBR_STAIR 0  /* connection with both ends having a staircase */</span>
  <span id="line47">47.   #define TBR_NO_UP 1  /* connection with no up staircase */</span>
+
  <span id="line47">47. #define TBR_NO_UP 1  /* connection with no up staircase */</span>
  <span id="line48">48.   #define TBR_NO_DOWN 2 /* connection with no down staircase */</span>
+
  <span id="line48">48. #define TBR_NO_DOWN 2 /* connection with no down staircase */</span>
  <span id="line49">49.   #define TBR_PORTAL 3  /* portal connection */</span>
+
  <span id="line49">49. #define TBR_PORTAL 3  /* portal connection */</span>
  <span id="line50">50.   </span>
+
  <span id="line50">50. </span>
  <span id="line51">51.   /*</span>
+
  <span id="line51">51. /*</span>
  <span id="line52">52.   * Flags that map into the dungeon flags bitfields.</span>
+
  <span id="line52">52.  * Flags that map into the dungeon flags bitfields.</span>
  <span id="line53">53.   */</span>
+
  <span id="line53">53.  */</span>
  <span id="line54">54.   #define TOWN 1 /* levels only */</span>
+
  <span id="line54">54. #define TOWN 1 /* levels only */</span>
  <span id="line55">55.   #define HELLISH 2</span>
+
  <span id="line55">55. #define HELLISH 2</span>
  <span id="line56">56.   #define MAZELIKE 4</span>
+
  <span id="line56">56. #define MAZELIKE 4</span>
  <span id="line57">57.   #define ROGUELIKE 8</span>
+
  <span id="line57">57. #define ROGUELIKE 8</span>
  <span id="line58">58.   </span>
+
  <span id="line58">58. </span>
  <span id="line59">59.   #define D_ALIGN_NONE 0</span>
+
  <span id="line59">59. #define D_ALIGN_NONE 0</span>
  <span id="line60">60.   #define D_ALIGN_CHAOTIC (AM_CHAOTIC << 4)</span>
+
  <span id="line60">60. #define D_ALIGN_CHAOTIC (AM_CHAOTIC << 4)</span>
  <span id="line61">61.   #define D_ALIGN_NEUTRAL (AM_NEUTRAL << 4)</span>
+
  <span id="line61">61. #define D_ALIGN_NEUTRAL (AM_NEUTRAL << 4)</span>
  <span id="line62">62.   #define D_ALIGN_LAWFUL (AM_LAWFUL << 4)</span>
+
  <span id="line62">62. #define D_ALIGN_LAWFUL (AM_LAWFUL << 4)</span>
  <span id="line63">63.   </span>
+
  <span id="line63">63. </span>
  <span id="line64">64.   #define D_ALIGN_MASK 0x70</span>
+
  <span id="line64">64. #define D_ALIGN_MASK 0x70</span>
  <span id="line65">65.   </span>
+
  <span id="line65">65. </span>
  <span id="line66">66.   /*</span>
+
  <span id="line66">66. /*</span>
  <span id="line67">67.   * Max number of prototype levels and branches.</span>
+
  <span id="line67">67.  * Max number of prototype levels and branches.</span>
  <span id="line68">68.   */</span>
+
  <span id="line68">68.  */</span>
  <span id="line69">69.   #define LEV_LIMIT 50</span>
+
  <span id="line69">69. #define LEV_LIMIT 50</span>
  <span id="line70">70.   #define BRANCH_LIMIT 32</span>
+
  <span id="line70">70. #define BRANCH_LIMIT 32</span>
  <span id="line71">71.   </span>
+
  <span id="line71">71. </span>
  <span id="line72">72.   #endif /* DGN_FILE_H */</span>
+
  <span id="line72">72. #endif /* DGN_FILE_H */</span>
 
[[Category:NetHack 3.6.0 source code|include/dgn_file.h]]
 
[[Category:NetHack 3.6.0 source code|include/dgn_file.h]]

Latest revision as of 13:21, 15 December 2015

Below is the full text to dgn_file.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/dgn_file.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

 /* NetHack 3.6	dgn_file.h	$NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
 /* Copyright (c) 1989 by M. Stephenson				  */
 /* NetHack may be freely redistributed.  See license for details. */
 
 #ifndef DGN_FILE_H
 #define DGN_FILE_H
 
 #ifndef ALIGN_H
 #include "align.h"
 #endif
 
 /*
  * Structures manipulated by the dungeon loader & compiler
  */
 
 struct couple {
     short base, rand;
 };
 
 struct tmpdungeon {
     char name[24], protoname[24];
     struct couple lev;
     int flags, chance, levels, branches,
         entry_lev; /* entry level for this dungeon */
     char boneschar;
 };
 
 struct tmplevel {
     char name[24];
     struct couple lev;
     int chance, rndlevs, chain, flags;
     char boneschar;
 };
 
 struct tmpbranch {
     char name[24]; /* destination dungeon name */
     struct couple lev;
     int chain; /* index into tmplevel array (chained branch)*/
     int type;  /* branch type (see below) */
     int up;    /* branch is up or down */
 };
 
 /*
  *	Values for type for tmpbranch structure.
  */
 #define TBR_STAIR 0   /* connection with both ends having a staircase */
 #define TBR_NO_UP 1   /* connection with no up staircase */
 #define TBR_NO_DOWN 2 /* connection with no down staircase */
 #define TBR_PORTAL 3  /* portal connection */
 
 /*
  *	Flags that map into the dungeon flags bitfields.
  */
 #define TOWN 1 /* levels only */
 #define HELLISH 2
 #define MAZELIKE 4
 #define ROGUELIKE 8
 
 #define D_ALIGN_NONE 0
 #define D_ALIGN_CHAOTIC (AM_CHAOTIC << 4)
 #define D_ALIGN_NEUTRAL (AM_NEUTRAL << 4)
 #define D_ALIGN_LAWFUL (AM_LAWFUL << 4)
 
 #define D_ALIGN_MASK 0x70
 
 /*
  *	Max number of prototype levels and branches.
  */
 #define LEV_LIMIT 50
 #define BRANCH_LIMIT 32
 
 #endif /* DGN_FILE_H */