Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fd6b9f2
chore: documented typetraits
Zffu Nov 12, 2025
7a77faa
chore: documented platform
Zffu Nov 12, 2025
f8ff34a
chore: documented math
Zffu Nov 12, 2025
dbb3754
Update rand.hpp
Zffu Nov 12, 2025
2b1f1de
Update server.hpp
Zffu Nov 12, 2025
c5db22a
Update server.hpp
Zffu Nov 12, 2025
73c4c1b
Update chunkGen.hpp
Zffu Nov 12, 2025
9621e75
Merge pull request #36 from Cavernfall/master
Zffu Nov 16, 2025
ee5f5b7
feat: started working on doc gen
Zffu Nov 16, 2025
480d110
feat: added docs generation
Zffu Nov 16, 2025
f0a8fed
Merge branch 'chore/doxygen' of https://github.com/Cavernfall/CavernS…
Zffu Nov 16, 2025
d9dd523
pull
Zffu Nov 16, 2025
4e4ab56
added docs
Zffu Nov 16, 2025
92ed8e0
chore: added documentation to chunk defintiinos
Zffu Nov 16, 2025
441b590
chore: finished with chunk documentation
Zffu Nov 16, 2025
0f44920
chore: added material doc
Zffu Nov 16, 2025
f6639ea
chore: added block doc
Zffu Nov 16, 2025
a1f4e35
chore: added world doc
Zffu Nov 16, 2025
b2743e5
chore: added save doc
Zffu Nov 16, 2025
fd15ef4
chore: added biome doc
Zffu Nov 16, 2025
4db3eef
chore: added config and constants doc
Zffu Nov 16, 2025
bb81b27
chore: added entity doc
Zffu Nov 16, 2025
f1b65e4
chore: added player doc
Zffu Nov 18, 2025
6f6ac01
chore: added entity tracker doc
Zffu Nov 18, 2025
ba29349
feat: added view engine defs
Zffu Nov 18, 2025
e663a57
chore: network buff doc
Zffu Nov 18, 2025
573fb89
chore: added connection dc
Zffu Nov 18, 2025
bd831c8
chore: started working on ISocket docs
Zffu Nov 18, 2025
966c782
chore: added isocket doc
Zffu Nov 18, 2025
90f148e
chore: added server doc
Zffu Nov 18, 2025
51d46dd
chore: added packet doc
Zffu Nov 18, 2025
f27fd0b
chore: added client packet doc
Zffu Nov 18, 2025
3f02320
chore: added server packet doc
Zffu Nov 18, 2025
f6d598d
chore: ctx doc
Zffu Nov 19, 2025
e583cbb
chore: added res doc
Zffu Nov 19, 2025
0d3519b
chore: added client doc
Zffu Nov 19, 2025
ecc648c
chore: added player doc
Zffu Nov 19, 2025
5a3c031
chore: added utils doc
Zffu Nov 19, 2025
f3a1e52
chore: added pos doc
Zffu Nov 19, 2025
c559401
chore: added math doc
Zffu Nov 19, 2025
38068a6
chore: added macro definitions
Zffu Nov 19, 2025
5d9b671
chore: added vec docs
Zffu Nov 19, 2025
c3bcdf8
Merge pull request #38 from Cavernfall/master
Zffu Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ extension_api.json
.vscode/

build
builds/

testing.*
testing
docs/build
world/

world/
testing.*
9 changes: 9 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PROJECT_NAME = "CavernServer"
OUTPUT_DIRECTORY = builds/docs

GENERATE_XML = YES
XML_OUTPUT = xml
GENERATE_HTML = NO
FILE_PATTERNS = *.c *.h *.hpp
INPUT = src includes
RECURSIVE = YES
9 changes: 9 additions & 0 deletions docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

mkdir -p builds/docs

doxygen Doxyfile

cd docs
sphinx-build -b html source build/html
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
30 changes: 30 additions & 0 deletions docs/source/_static/doxygen.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.doxygenindex,
.doxygenclass,
.doxygennamespace,
.doxygenfile,
.doxygenfunction,
.doxygengroup,
.doxygenstruct {
margin-top: 2rem !important;
margin-bottom: 2rem !important;
line-height: 1.6;
}

.doxygenindex p,
.doxygenclass p,
.doxygenfile p,
.doxygenstruct p {
margin: 0.6em 0 !important;
}

dl.cpp,
dl.c {
margin-top: 1.4rem !important;
margin-bottom: 1.4rem !important;
}

div.highlight {
padding: 1rem !important;
border-radius: 8px;
margin: 1rem 0 !important;
}
5 changes: 5 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
API
===

.. doxygenindex::
:project: CavernServer
47 changes: 47 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import os
import sys

sys.path.insert(0, os.path.abspath('.'))


# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'CavernServer'
copyright = '2025, Cavernfall Interactives'
author = 'Cavernfall Interactives'
release = '1.0.0-dev'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = []

breathe_projects = {
"CavernServer": "../../builds/docs/xml"
}
breathe_default_project = "CavernServer"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

extensions = [
"breathe",
]

html_theme = "furo"
html_static_path = ['_static']

html_css_files = [
"doxygen.css"
]

breathe_default_members = ("members", "undoc-members")
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. CavernServer documentation master file, created by
sphinx-quickstart on Sun Nov 16 02:53:19 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to CavernServer's documentation!
========================================

.. toctree::
:maxdepth: 2
:caption: Contents:

api

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
19 changes: 18 additions & 1 deletion includes/cavernfall/config.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
/**
* @file config.hpp
* @brief Definitions for Cavernfall configurations.
* @details Usually contains default feature flag values and more.
*/

#pragma once

#ifndef WORLD_REGION_SIZE
/**
* @brief The side-size of a world region (in terms of chunks).
*/
#define WOLRD_REGION_SIZE 8
#endif

#ifndef WORLD_CHUNK_SIZE
/**
* @brief The side-size of a chunk (in terms of blocks).
*/
#define WORLD_CHUNK_SIZE 32
#endif
#endif

/**
* @brief The total size of a chunk (in terms of blocks).
*/
#define WORLD_CHUNK_SIZE_TOTAL WORLD_CHUNK_SIZE * WORLD_CHUNK_SIZE
30 changes: 26 additions & 4 deletions includes/cavernfall/constants.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
/**
* @file constants.hpp
* @details Cavernfall constants definitions.
*/

#pragma once

/**
* @brief The lowest health point an entity can be at.
* @details The lowest health value possible before an entity dies.
*/
#define HEALTH_POINT_LOWEST 0

/**
* @brief The maximum veritcal motion.
* @details The maximum vertical motion an entity can do in one motion tick from the velocity.
*/
#define MAX_VERTICAL_MOTION_IN_ONE_TICK 0.10
#define MAX_MOTION_IN_ONE_TICK 0.15

#define CHUNK_SIDE_SIZE 32
#define CHUNK_SIZE_TOTAL CHUNK_SIDE_SIZE * CHUNK_SIDE_SIZE
#define CHUNK_MAX_HEIGHT 50
/**
* @brief The maximum horizontal motion.
* @details The maximum horizontal motion an entity can do in one motion tick from the velocity.
*/
#define MAX_MOTION_IN_ONE_TICK 0.15

/**
* @brief The maximum health level of a player.
* @deprecated Should be soon removed as it not important enough to be here.
*/
#define PLAYER_MAX_HEALTH 100

/**
* @brief The player's render distance in terms of chunks.
*/
#define PLAYER_RENDER_DISTANCE 8
Loading
Loading