Skip to content

Commit

Permalink
Documentation commit.
Browse files Browse the repository at this point in the history
 - Dropped in a doxygen.conf. Tweaked some file to make doxygen happy :
   in xmldoccomments backslashes need to be escaped, and in markdown strict title hierarchy needed.
 - Added few high-level comments in code.
 - (Added wiki entries, but github wikis are external repos.)
  • Loading branch information
Maxzor authored and Maxzor committed Jul 26, 2020
1 parent 98e4a52 commit fb52ed1
Show file tree
Hide file tree
Showing 26 changed files with 2,661 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

# CA1712: Do not prefix enum values with type name
dotnet_diagnostic.CA1712.severity = none

vc_generate_documentation_comments = xml
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.resx text eof=crlf
*.md text eof=crlf
*.txt text eof=crlf
*.cs text eof=crlf
*.yml text eof=crlf
*.config text eof=crlf
*.csproj text eof=crlf
*.csv text eof=crlf
*.xml text eof=crlf
.gitignore text eof=crlf
LICENSE text eof=crlf
.editorconfig text eof=crlf

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,9 @@ W3Edit.Render/Models/**

# Ignore nuget packages
packages/**

#Ignore doxygen doc
docs/html/*

#Local git wiki repository - preferred to not delve into git submodules/subtree horrors
Wolven-kit.wiki
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Contributing

## Basics
When you work on anything please create an issue for it or comment on the appropriate issue thus people won't work on the same issues voiding their works.
Please make your issue very descriptive and describe what you are trying to achieve with it.
Expand Down
1 change: 1 addition & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Issue template
Overview of functionality you wish to be implemented or fixed in software.

## Steps to reproduce
Expand Down
4 changes: 3 additions & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# <PULL REQUEST TITLE>
# Pull request template

<PULL REQUEST TITLE>

Implemented:
- <Features implemented>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This repository is created to demonstrate how **REDengine 3** reads and writes f
***Copyright Disclaimer:*** Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.".This project is solely made for research and in no way made to generate any revenue.
***

### Team:
## Team:
**Project lead: Traderain**

- George Tziotis
Expand All @@ -33,7 +33,7 @@ This repository is created to demonstrate how **REDengine 3** reads and writes f
- Anras573
- rmemr

### Other people who helped the project:
## Other people who helped the project:
- CAPA
- DJ_Kovrik
- KNG
Expand All @@ -43,7 +43,7 @@ This repository is created to demonstrate how **REDengine 3** reads and writes f

##### *Based on the code from "Sarcen's W3Edit" by Sarcen*.

### Credits:
## Credits:

- https://xentax.com
- https://zenhax.com
Expand Down
3 changes: 3 additions & 0 deletions WolvenKit.App/Controllers/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ namespace WolvenKit.App
using WolvenKit.Common.Wcc;
using WolvenKit.W3Speech;

/// <summary>
/// Supervisor of all subsystem managers. Singleton.
/// </summary>
public class MainController : ObservableObject, ILocalizedStringSource
{
private static MainController mainController;
Expand Down
3 changes: 3 additions & 0 deletions WolvenKit.App/Controllers/RadishController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

namespace WolvenKit.App
{
/// <summary>
/// Radish-modding-community-tools handler
/// </summary>
public class RadishController : ObservableObject
{
public enum ERadishStatus
Expand Down
11 changes: 7 additions & 4 deletions WolvenKit.App/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

namespace WolvenKit.App.ViewModels
{
/// <summary>
///
/// </summary>
public class MainViewModel : ViewModel
{
#region Properties
Expand Down Expand Up @@ -724,7 +727,7 @@ void CleanupInner(string path)

/// <summary>
/// Cooks Files in the ModProject's folders (Bunde, TextureCache etc...)
/// IN: \TextureCache, OUT: \Bundle OR \cooked
/// IN: \\TextureCache, OUT: \\Bundle OR \\cooked
/// </summary>
/// <param name="cachetype"></param>
/// <returns></returns>
Expand Down Expand Up @@ -791,7 +794,7 @@ async Task<int> CookInternal(string cachedir, string outdir, bool dlc = false)

/// <summary>
/// Packs the bundles for the DLC and the Mod.
/// IN: \Bundles, OUT: packed\Mods\mod
/// IN: \\Bundles, OUT: packed\\Mods\\mod
/// </summary>
public async Task<int> Pack()
{
Expand Down Expand Up @@ -845,7 +848,7 @@ async Task<int> PackBundleInternal(string inputDir, string outputDir, bool dlc =

/// <summary>
/// Create Metadata
/// IN: packed\Mods\mod, OUT: same dir
/// IN: packed\\Mods\\mod, OUT: same dir
/// </summary>
/// <returns></returns>
public async Task<int> CreateMetaData()
Expand Down Expand Up @@ -897,7 +900,7 @@ async Task<int> CreateMetaDataInternal(string dir, string outDir, bool dlc = fal

/// <summary>
/// Call wcc buildcache over the uncooked directories
/// IN: \CollisionCache, cooked\Mods\mod\cook.db, OUT: packed\Mods\mod
/// IN: \\CollisionCache, cooked\\Mods\\mod\\cook.db, OUT: packed\\Mods\\mod
/// </summary>
/// <param name="cachetype"></param>
/// <returns></returns>
Expand Down
6 changes: 6 additions & 0 deletions WolvenKit.CR2W/W3ReaderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
using System.IO;
using WolvenKit.CR2W.Types;

/// <summary>
/// Where most of the parsing and handling of atomic game files happens.
/// Three layers of hashes (FNV1a for a big part, Cyclic redundancy check CRC32, custom,...) on
/// header, data blocks, and atomic data.
/// Hashes are checked and their compliance is enforced by wcc_lite.exe, (and other? design history?)
/// </summary>
namespace WolvenKit.CR2W
{
public static class W3ReaderExtensions
Expand Down
2 changes: 1 addition & 1 deletion WolvenKit.Cache/CollisionCache/CollisionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void LoadBundle(string filename)
}

/// <summary>
/// Load every non-mod bundle it can find in ..\..\content and ..\..\DLC, also calls RebuildRootNode()
/// Load every non-mod bundle it can find in ..\\..\\content and ..\\..\\DLC, also calls RebuildRootNode()
/// </summary>
/// <param name="exedir">Path to executable directory</param>
public void LoadAll(string exedir)
Expand Down
3 changes: 3 additions & 0 deletions WolvenKit.Cache/DDS/DDS_Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
using System.Threading.Tasks;
using static WolvenKit.CR2W.Types.Enums;

/// <summary>
/// DDS aka DirectDraw Surface is an obsolete image file format, property Microsoft
/// </summary>
namespace WolvenKit.Cache.DDS
{
public struct DDSMetadata
Expand Down
2 changes: 1 addition & 1 deletion WolvenKit.Cache/TextureCache/TextureManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void LoadBundle(string filename)
}

/// <summary>
/// Load every non-mod bundle it can find in ..\..\content and ..\..\DLC, also calls RebuildRootNode()
/// Load every non-mod bundle it can find in ..\\..\\content and ..\\..\\DLC, also calls RebuildRootNode()
/// </summary>
/// <param name="exedir">Path to executable directory</param>
public void LoadAll(string exedir)
Expand Down
4 changes: 4 additions & 0 deletions WolvenKit.Common/Model/IWitcherArchive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

namespace WolvenKit.Common
{
/// <summary>
/// Top-level game file, holds archived game assets. Types :
/// .bundle, .cache (collision, texture, sound) .w3speech
/// </summary>
public interface IWitcherArchive
{
WitcherTreeNode RootNode { get; set; }
Expand Down
7 changes: 7 additions & 0 deletions WolvenKit.Common/Model/IWitcherFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
using System.Threading.Tasks;
using WolvenKit.Common.Model;

/// <summary>
/// Various enums, mod default filesystem structure, atomic-file compression service manager (Cr2wResourceManager class),
/// FNV1A hash functions, logger service...
/// </summary>
namespace WolvenKit.Common
{
/// <summary>
/// Any game file
/// </summary>
public interface IWitcherFile
{
IWitcherArchiveType Bundle { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion WolvenKit.Common/Model/Wcc/wcc_task.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace WolvenKit.Common.Wcc
using System.Threading;

/// <summary>
///
/// Closed-source program published by CDPR in the official Witcher 3 modkit.
/// Provides a wide range of utilities, mainly cooking/uncooking,
/// but can also monitor in-game performance...
/// </summary>
public class WccLite
{
Expand Down
3 changes: 3 additions & 0 deletions WolvenKit.Common/Tools/FNV1A/FNV1A64HashAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
using System.Security.Cryptography;
using System.Text;

/// <summary>
/// Hash algorithm, Fowler–Noll–Vo
/// </summary>
namespace WolvenKit.Common.FNV1A
{
public sealed class FNV1A64HashAlgorithm : HashAlgorithm
Expand Down
3 changes: 3 additions & 0 deletions WolvenKit.Scaleform/ParseFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
using System.Security.Cryptography;
using System.Text;

/// <summary>
/// .usm video file format
/// </summary>
namespace WolvenKit.Scaleform
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion WolvenKit.W3Speech/SpeechManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void LoadBundle(string filename)
}

/// <summary>
/// Load every non-mod bundle it can find in ..\..\content and ..\..\DLC, also calls RebuildRootNode()
/// Load every non-mod bundle it can find in ..\\..\\content and ..\\..\\DLC, also calls RebuildRootNode()
/// </summary>
/// <param name="exedir">Path to executable directory</param>
public void LoadAll(string exedir)
Expand Down
1 change: 1 addition & 0 deletions WolvenKit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6E63DB95-528E-4816-BE98-7F339599C512}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
doxygen.conf = doxygen.conf
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WolvenKit.Console", "WolvenKit.Console\WolvenKit.Console.csproj", "{B4343A73-9BF6-4F82-9CCE-F2D5F6BCC9E8}"
Expand Down
3 changes: 3 additions & 0 deletions WolvenKit/MockKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace WolvenKit.App
{
/// <summary>
/// View models
/// </summary>
public class MockKernel : ObservableObject
{
private static MockKernel mainController;
Expand Down
10 changes: 5 additions & 5 deletions WolvenKit/Utility/DDSUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

namespace WolvenKit
{
/// <DDSUtility>
/// <summary>
/// Class responsible for importing and exporting .dds images in and out of CSwfTexture variable
/// Probably could be better :P But works.
/// </DDSUtility>
/// </summary>
class DDSUtility
{
#region DDS Structs
Expand Down Expand Up @@ -68,7 +68,7 @@ struct CSwfTextureHeader
}
#endregion

/// <ExportAsDDS>
/// <summary>
/// This method converts a byte array from the CR2W to a dds format byte array
/// This should only be used when exporting from a CSwfTexture var (swfTexture).
/// </summary>
Expand Down Expand Up @@ -117,7 +117,7 @@ public static byte[] ExportAsDDS( byte[] bytes )
return memout.ToArray();
}

/// <ImportFromDDS>
/// <summary>
/// This method takes a dds file, as a binary reader, and converts
/// it into a compatible byte array for importing in a CSwfTexture var
/// </summary>
Expand Down Expand Up @@ -200,7 +200,7 @@ static byte[] ConstructDDSHeader(DDSHeader header)
return memout.ToArray();
}

/// <ReadDDSHeader>
/// <summary>
/// This reads the binary stream from the import file and
/// creates the DDSHeader object from it.
/// </summary>
Expand Down
Binary file added assets/logo_50px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get documentation
Documentation, as the code itself, is still very much work-in-progress. Any help enjoyed!

1. [Overview in github wiki](https://github.com/Traderain/Wolven-kit/wiki/Codebase-structure)
2. Generate [doxygen](https://www.doxygen.nl/index.html) comments. It will create a html directory in docs, with lots of files, among which index.html : you want to open that one in a web browser. At repository root on linux :
> "doxygen doxygen.conf"
3. Read code and comments in code.
Good luck!
Loading

0 comments on commit fb52ed1

Please sign in to comment.