Skip to content

Commit

Permalink
docs(VLensFlare): add documentation for zCVobLensFlare
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Dec 28, 2023
1 parent 6c84fe0 commit 9fbaf72
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
30 changes: 30 additions & 0 deletions docs/engine/objects/zCVobLensFlare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# zCVobLensFlare

!!! abstract inline end "Quick Infos"
**Type:** Virtual Object<br/>
**Format Name:** ZenGin Archive<br/>
**File Extension:** `.ZEN`<br/>
**Class Name:** `zCVobLensFlare`<br/>
**Version Identifiers:**<br />
— Gothic I: `64704`<br/>
— Gothic II: `193`<br/>
**ZenKit Class:** `VLensFlare`

Represents a lens flare effect.

<ul class="sp-list">
<li class="sp-type"><a href="../zCVob/">zCVob</a></li>
<li class="sp-type">
<span>zCVobLight</span>
<ul class="sp-list">
<li class="sp-string"><a href="#lensflareFX">lensflareFX</a> = ""</li>
</ul>
</li>
</ul>

## Properties

<a name="lensflareFX" class="t-str"></a> `lensflareFX`

: The name of the lens flare effect. Must be one of the effects listed in `/_work/data/Presets/Lensflare.zen`.

22 changes: 15 additions & 7 deletions include/zenkit/vobs/Misc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,31 @@ namespace zenkit {
[[nodiscard]] ZKAPI uint16_t get_version_identifier(GameVersion game) const override;
};

/// \brief A VOb representing a [lens flare](https://en.wikipedia.org/wiki/Lens_flare).
/// \brief Represents a lens flare effect.
/// \see https://zk.gothickit.dev/engine/objects/zCVobLensFlare/
struct VLensFlare : VirtualObject {
ZK_OBJECT(ObjectType::zCVobLensFlare);

public:
/// \brief The name of the lens flare effect.
///
/// Must be one of the effects listed in `/_work/data/Presets/Lensflare.zen`.
///
/// \see https://zk.gothickit.dev/engine/objects/zCVobLensFlare/#lensflareFX
std::string fx;

/// \brief Parses a lens flare VOb the given *ZenGin* archive.
/// \param[out] obj The object to read.
/// \param[in,out] ctx The archive reader to read from.
/// \note After this function returns the position of \p ctx will be at the end of the parsed object.
/// \throws ParserError if parsing fails.
/// \see vob::parse
ZKREM("use ::load()") ZKAPI static void parse(VLensFlare& obj, ReadArchive& ctx, GameVersion version);

/// \brief Load this object from the given archive.
/// \param r The archive to read from;
/// \param version The version of the game the object was made for.
ZKAPI void load(ReadArchive& r, GameVersion version) override;

/// \brief Save this object to the given archive.
/// \param w The archive to save to.
/// \param version The version of the game to save for.
ZKAPI void save(WriteArchive& w, GameVersion version) const override;

[[nodiscard]] ZKAPI uint16_t get_version_identifier(GameVersion game) const override;
};

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ nav:
- 'Objects':
- 'zCVob': 'engine/objects/zCVob.md'
- 'zCVobAnimate': 'engine/objects/zCVobAnimate.md'
- 'zCVobLensFlare': 'engine/objects/zCVobLensFlare.md'
- 'zCVobLevelCompo': 'engine/objects/zCVobLevelCompo.md'
- 'zCVobLight': 'engine/objects/zCVobLight.md'
- 'zCVobSpot': 'engine/objects/zCVobSpot.md'
Expand Down

0 comments on commit 9fbaf72

Please sign in to comment.