Github
My continued safari through Brutal Doom led to me feeling the need for a tool that can make sense of a large ZDoom project's object hierarchy. When projects grow as big as this, classes can be inheriting from each other across different files, you can lose track of what similar classes do if you're coding a lot of special effects, and it can be unclear when flags and properties are being carried over from one object to another. What I've ended up with is a tool that I'm calling ZDoc, which churns through DECORATE or ZSCRIPT and produces an HTML report similar to PHPDoc/JavaDoc laying out the declared classes.
It's available as part of my growing PK3Tools download here, for tools that I hope will help other people develop with GZDoom - it's written in PHP, and a compiled EXE is also provided (though the EXE crashes if you try to use the --resizesprites option, I tried and failed to get the compiler to recognize the PNG library I'm using).
Feature bullet points:
- Takes in a DECORATE or ZSCRIPT folder and optionally a SPRITES folder, inteprets the defined classes and prepares an HTML class tree with individual detail pages for each class.
- Will look for comments above classes in DECORATE/ZSCRIPT with the delimiters /** */ and will include these as class descriptions in the tree and pages.
- Shows when a class extends, replaces or is replaced by another.
- Shows declared and inherited flags/properties for each actor.
- Will highlight when a declaration of a flag or property is redundant, i.e. it's declared in actor code but the superclass would have given it that property anyway.
- Includes cute little icons for each class, if you give it a sprites folder!
- Can optionally just produce the class tree and not all the million other pages
It's used from the command line - to get the usage documentation, run it without parameters. An example use would look like:
Code: Select all
php zdoc.php --targetdir=./zdoc/ --decorate=../myproject/pk3/decorate --sprites=../myproject/pk3/sprites --resizesprites
I'd love it if people were to try this on their own projects to see what happens - my parser is not fantastic just now and I'm thinking of entirely replacing it if one already exists, but it's able to interpret a decent amount. Here are some example ZDoc reports:
BDLite
Doom 2
BDLite and Doom 2 together
Beautiful Doom
Golden Souls 2