Difference between revisions of "Makedefs"

From NetHackWiki
Jump to navigation Jump to search
m (add to annotations cat)
(cat)
Line 15: Line 15:
 
* <tt>-h</tt> creates oracles from oracles.txt and adds one special oracularity defined in makedefs.c itself
 
* <tt>-h</tt> creates oracles from oracles.txt and adds one special oracularity defined in makedefs.c itself
 
* <tt>-z</tt> creates [[vis_tab.h]] and [[vis_tab.c]] (vision lookup tables)
 
* <tt>-z</tt> creates [[vis_tab.h]] and [[vis_tab.c]] (vision lookup tables)
 
[[Category:Source code]]
 
 
[[Category:Annotations]]
 
[[Category:Annotations]]

Revision as of 04:42, 24 September 2011

In util/makedefs.c is the source for a program called makedefs. When you build a copy of NetHack, it uses makedefs to generate date.h, onames.h, pm.h, vis_tab.h, and vis_tab.c. This explains why those files are missing from an unbuilt copy of the source code.

In the Unix Makefiles, makedefs is called from the Makefiles in the src and util directories.

makedefs accepts the following commandline parameters:

  • -o creates onames.h
  • -d creates the database
  • -e creates the dungeon.pdf (from dungeon.def)
  • -m creates monstr.c
  • -v creates date.h and options-file
  • -p creates pm.h
  • -q creates quest-file quest.dat from quest.txt
  • -r creates rumors
  • -h creates oracles from oracles.txt and adds one special oracularity defined in makedefs.c itself
  • -z creates vis_tab.h and vis_tab.c (vision lookup tables)