Difference between revisions of "Talk:NetHack 3.6.0 source code"

From NetHackWiki
Jump to navigation Jump to search
(Files generated by makedefs.c)
(Re: files generated by makedefs.c)
Line 25: Line 25:
  
 
Am I right in thinking that some of the missing files here (those generated by makedefs.c) may vary depending on platform and config.h options? If so, we should probably include a "typical" version and mark it as such. --[[User:Jayt|Jayt]] 23:00, 26 August 2006 (UTC)
 
Am I right in thinking that some of the missing files here (those generated by makedefs.c) may vary depending on platform and config.h options? If so, we should probably include a "typical" version and mark it as such. --[[User:Jayt|Jayt]] 23:00, 26 August 2006 (UTC)
 +
 +
:This is at least true of [[vis_tab.c]]; if [[config.h#line290|VISION_TABLES]] is enabled, a [[vis_tab.c (long form)|longer form]] of it is generaed. --[[User:Ray Chason|Ray Chason]] 01:08, 27 August 2006 (UTC)

Revision as of 01:08, 27 August 2006

Is nethack vanilla C or ANSI C? -- PraetorFenix 03:26, 25 June 2006 (UTC)

It's definitely not ANSI C, but I don't know exactly which specification it tries to adhere to. --Jayt 18:04, 25 June 2006 (UTC)
I have started an ANSI C article. It seems that NetHack is sometimes in ANSI C, but sometimes not, depending on conditions in tradstdc.h. (Having source code here helped me much in starting an ANSI C page.) --Kernigh 04:52, 29 June 2006 (UTC)

In the Source Code what files define the corpse weights? -- PraetorFenix 08:43, 25 June 2006 (UTC)

They're in monst.c#line101. The first number in that line says giant ants (and also their corpses) have weight 10. --Jayt 18:04, 25 June 2006 (UTC)

What does it mean to be able to "annotate" the code on this wiki? Is it just the ability to provide links to the code on other wiki pages, or could we add in commentary on the source page itself? 146.145.99.210 19:09, 10 July 2006 (UTC)

Kernigh writes: It is a wiki, so you could try anything! Just go to a source code page, click "edit" and do something interesting...
For example, I have been reading artifact.c and saving my notes about artifact invocations in there. The one thing that we are not doing is that we are not editing the C code itself. However, it is possible to use square brackets to insert links. --Kernigh 02:07, 11 July 2006 (UTC)
I would add that the overall goal of annotation is to explain the source code; in particular, to document what each bit means in terms of gameplay. So you can add any kind of annoation between source code lines, but it would be nice to keep comments like "What the hell was he on when he wrote rnz()?" to the discussion pages :-) --Jayt 13:52, 11 July 2006 (UTC)

Function/macro reference

I've been thinking about making a page that lists all the functions and macros in the source, with links to the point where it is defined. Any thoughts on that before I start doing it? GreyKnight 02:19, 23 August 2006 (UTC)

I think it'd be a wonderful reference. I've been going through the source and adding h2 tags to function definitions, so part of the work is done. I haven't been doing macros though, because they're generally only one line long; for those I suppose you can just link to file.ext#lineN. --Eidolos 04:21, 23 August 2006 (UTC)
I also like this. Are you aware of Doxygen? If you can figure out how to customize its output, then it will do all the heavy lifting for you, depending on what it is you have in mind. --Jayt 21:40, 25 August 2006 (UTC)

Files generated by makedefs.c

Am I right in thinking that some of the missing files here (those generated by makedefs.c) may vary depending on platform and config.h options? If so, we should probably include a "typical" version and mark it as such. --Jayt 23:00, 26 August 2006 (UTC)

This is at least true of vis_tab.c; if VISION_TABLES is enabled, a longer form of it is generaed. --Ray Chason 01:08, 27 August 2006 (UTC)