Merge branch 'MontyTRC89:develop' into develop

This commit is contained in:
davidmarr 2024-12-18 19:23:31 +01:00 committed by GitHub
commit e1c61aca03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 969 additions and 32 deletions

View file

@ -11,6 +11,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Improved engine performance if weather or bubble effects are active. * Improved engine performance if weather or bubble effects are active.
* Fixed silent crashes if loaded level is corrupted or in incorrect format. * Fixed silent crashes if loaded level is corrupted or in incorrect format.
* Fixed occasional crashes if there are static meshes placed within room border walls. * Fixed occasional crashes if there are static meshes placed within room border walls.
* Fixed climbable pushables clipping Lara under the bridges when pulled.
* Fixed incorrect clipping of scaled off-centered static meshes. * Fixed incorrect clipping of scaled off-centered static meshes.
* Fixed incorrect collision detection for off-centered moveables. * Fixed incorrect collision detection for off-centered moveables.
* Fixed incorrect slide directions for sub-click geometry. * Fixed incorrect slide directions for sub-click geometry.
@ -60,6 +61,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Added support for transparency value in Strings.DisplayString class. * Added support for transparency value in Strings.DisplayString class.
* Added extra argument for Sound.SetAmbientTrack() function to specify if new ambient track should play from the beginning. * Added extra argument for Sound.SetAmbientTrack() function to specify if new ambient track should play from the beginning.
* Added new View.CameraType enum entries and return it by View.GetCameraType(), when flyby camera or binoculars/lasersight is active. * Added new View.CameraType enum entries and return it by View.GetCameraType(), when flyby camera or binoculars/lasersight is active.
* Added new primitive Time class, which allows to manipulate and format game time without precision loss.
* Allow to use TR4-like load cameras by playing fixed camera from OnEnd() event and removing loadScreenFile field from level's gameflow entry. * Allow to use TR4-like load cameras by playing fixed camera from OnEnd() event and removing loadScreenFile field from level's gameflow entry.
* Renamed Flow.WeaponType enumeration to Objects.WeaponType, and removed similar Objects.LaraWeaponType enumeration for consistency. * Renamed Flow.WeaponType enumeration to Objects.WeaponType, and removed similar Objects.LaraWeaponType enumeration for consistency.
* Renamed Objects.PlayerAmmoType to Objects.AmmoType for consistency. * Renamed Objects.PlayerAmmoType to Objects.AmmoType for consistency.
@ -70,7 +72,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed incorrect behaviour of Logic.EnableEvent() and Logic.DisableEvent() functions. * Fixed incorrect behaviour of Logic.EnableEvent() and Logic.DisableEvent() functions.
* Fixed Util.HasLineOfSight() not taking static meshes into consideration. * Fixed Util.HasLineOfSight() not taking static meshes into consideration.
* Fixed collision callbacks not properly clearing after leveljump. * Fixed collision callbacks not properly clearing after leveljump.
* Fixed Flow.SetIntroImagePath() not using the correct path * Fixed Flow.SetIntroImagePath() not using the correct path.
## [Version 1.5](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.2) - 2024-11-03 ## [Version 1.5](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.2) - 2024-11-03

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <here>EventSequence</here></li> <li> <here>EventSequence</here></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <here>Timer</here></li> <li> <here>Timer</here></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>

View file

@ -0,0 +1,665 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>&nbsp;TombEngine</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Input.html">Input</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
<li> <a href="../1 modules/Util.html">Util</a></li>
<li> <a href="../1 modules/View.html">View</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.WeaponType.html">Objects.WeaponType</a></li>
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <here>Type</here></li>
</ul>
</div>
<div id="content">
<h1>Lua utility module <code>Type</code></h1>
<p>Type - This molule contains functions that allow to check the data type of a variable.</p>
<p>
<p> It also contains functions that allow to check if the variable is a TEN primitive class or a LevelFuncs.</p>
<p> To use the functions within the scripts, the module must be called:</p>
<pre>
<span class="keyword">local</span> Type = <span class="global">require</span>(<span class="string">"Engine.Type"</span>)
</pre>
<p> Example usage: check if a variable is of type Vec3()</p>
<pre>
<span class="keyword">local</span> Type= <span class="global">require</span>(<span class="string">"Engine.Type"</span>)
LevelFuncs.SetLaraPos = <span class="keyword">function</span> (pos)
<span class="keyword">if</span> Type.IsVec3(pos) <span class="keyword">then</span>
Lara:SetPosition(pos)
<span class="keyword">end</span>
<span class="keyword">end</span>
</pre>
<p> You can use the <code>not</code> keyword together with the functions of the Type module.</p>
<p> Example: checking if variable does not have a null value</p>
<pre>
LevelFuncs.AddProp = <span class="keyword">function</span> (prop)
<span class="keyword">if</span> <span class="keyword">not</span> Type.IsNull(prop) <span class="keyword">then</span>
LevelVars.property = prop
<span class="keyword">end</span>
<span class="keyword">end</span>
</pre>
</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#IsNumber">IsNumber(variable)</a></td>
<td class="summary">Check if the variable is a number.</td>
</tr>
<tr>
<td class="name" ><a href="#IsString">IsString(variable)</a></td>
<td class="summary">Check if the variable is a string.</td>
</tr>
<tr>
<td class="name" ><a href="#IsBoolean">IsBoolean(variable)</a></td>
<td class="summary">Check if the variable is a boolean.</td>
</tr>
<tr>
<td class="name" ><a href="#IsTable">IsTable(variable)</a></td>
<td class="summary">Check if the variable is a table.</td>
</tr>
<tr>
<td class="name" ><a href="#IsNull">IsNull(variable)</a></td>
<td class="summary">Check if the variable has a null value.</td>
</tr>
<tr>
<td class="name" ><a href="#IsFunction">IsFunction(variable)</a></td>
<td class="summary">Check if the variable is a function.</td>
</tr>
<tr>
<td class="name" ><a href="#IsColor">IsColor(variable)</a></td>
<td class="summary">Check if the variable is a <a href="../3 primitive classes/Color.html#">Color</a>.</td>
</tr>
<tr>
<td class="name" ><a href="#IsRotation">IsRotation(variable)</a></td>
<td class="summary">Check if the variable is a <a href="../3 primitive classes/Rotation.html#">Rotation</a>.</td>
</tr>
<tr>
<td class="name" ><a href="#IsVec2">IsVec2(variable)</a></td>
<td class="summary">Check if the variable is a <a href="../3 primitive classes/Vec2.html#">Vec2</a>.</td>
</tr>
<tr>
<td class="name" ><a href="#IsVec3">IsVec3(variable)</a></td>
<td class="summary">Check if the variable is a <a href="../3 primitive classes/Vec3.html#">Vec3</a>.</td>
</tr>
<tr>
<td class="name" ><a href="#IsTime">IsTime(variable)</a></td>
<td class="summary">Check if the variable is a <a href="../3 primitive classes/Time.html#">Time</a> object.</td>
</tr>
<tr>
<td class="name" ><a href="#IsLevelFunc">IsLevelFunc(variable)</a></td>
<td class="summary">Check if the variable is a LevelFunc.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "IsNumber"></a>
<strong>IsNumber(variable)</strong>
</dt>
<dd>
Check if the variable is a number.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a number, false if it isn't a number
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> <span class="keyword">local</span> num = <span class="number">255</span>
<span class="keyword">if</span> Type.IsNumber(num) <span class="keyword">then</span>
num = num + <span class="number">1</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsString"></a>
<strong>IsString(variable)</strong>
</dt>
<dd>
Check if the variable is a string.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a string, false if it isn't a string
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> <span class="keyword">local</span> str = <span class="string">"Hi"</span>
<span class="keyword">if</span> Type.IsString(str) <span class="keyword">then</span>
TEN.Util.PrintLog(str .. <span class="string">"everyone!"</span>, Util.LogLevel.INFO)
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsBoolean"></a>
<strong>IsBoolean(variable)</strong>
</dt>
<dd>
Check if the variable is a boolean.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a boolean, false if it isn't a boolean
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.test = <span class="keyword">function</span> (test)
<span class="keyword">if</span> Type.IsBoolean(test) <span class="keyword">then</span>
LevelVars.test = test
<span class="keyword">else</span>
TEN.Util.PrintLog(<span class="string">"Error!"</span>, Util.LogLevel.ERROR)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsTable"></a>
<strong>IsTable(variable)</strong>
</dt>
<dd>
Check if the variable is a table.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a table, false if it isn't a table
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.PairsTable = <span class="keyword">function</span> (<span class="global">table</span>)
<span class="keyword">if</span> Type.IsTable(<span class="global">table</span>) <span class="keyword">then</span>
<span class="keyword">for</span> k, v <span class="keyword">in</span> <span class="global">pairs</span>(<span class="global">table</span>) <span class="keyword">do</span>
TEN.Util.PrintLog(<span class="global">tostring</span>(k) .. <span class="string">" - "</span> .. <span class="global">tostring</span>(v), Util.LogLevel.INFO)
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsNull"></a>
<strong>IsNull(variable)</strong>
</dt>
<dd>
Check if the variable has a null value.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a null, false if it isn't a null
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.AddProp = <span class="keyword">function</span> (prop)
<span class="keyword">if</span> Type.IsNull(prop) <span class="keyword">then</span>
TEN.Util.PrintLog(<span class="string">"Error!"</span>, Util.LogLevel.ERROR)
<span class="keyword">else</span>
LevelVars.property = prop
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsFunction"></a>
<strong>IsFunction(variable)</strong>
</dt>
<dd>
Check if the variable is a function.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a function, false if it isn't a function
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.RunFunc = <span class="keyword">function</span> (func)
<span class="keyword">if</span> Type.IsFunction(func) <span class="keyword">then</span>
func()
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsColor"></a>
<strong>IsColor(variable)</strong>
</dt>
<dd>
Check if the variable is a <a href="../3 primitive classes/Color.html#">Color</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a color, false if it isn't a color
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.SetColor = <span class="keyword">function</span>(color)
<span class="keyword">if</span> Type.IsColor(color) <span class="keyword">then</span>
<span class="global">string</span>:SetColor(color)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsRotation"></a>
<strong>IsRotation(variable)</strong>
</dt>
<dd>
Check if the variable is a <a href="../3 primitive classes/Rotation.html#">Rotation</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a rotation, false if it isn't a rotation
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.SetRotation = <span class="keyword">function</span> (rot)
<span class="keyword">if</span> Type.IsRotation(rot) <span class="keyword">then</span>
Lara:SetRotation(rot)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsVec2"></a>
<strong>IsVec2(variable)</strong>
</dt>
<dd>
Check if the variable is a <a href="../3 primitive classes/Vec2.html#">Vec2</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a vec2, false if it isn't a vec2
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.SetSpritePos = <span class="keyword">function</span> (pos)
<span class="keyword">if</span> Type.IsVec2(pos) <span class="keyword">then</span>
sprite:SetPosition(pos)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsVec3"></a>
<strong>IsVec3(variable)</strong>
</dt>
<dd>
Check if the variable is a <a href="../3 primitive classes/Vec3.html#">Vec3</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a vec3, false if it isn't a vec3
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span>LevelFuncs.SetLaraPos = <span class="keyword">function</span> (pos)
<span class="keyword">if</span> Type.IsVec3(pos) <span class="keyword">then</span>
Lara:SetPosition(pos)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsTime"></a>
<strong>IsTime(variable)</strong>
</dt>
<dd>
Check if the variable is a <a href="../3 primitive classes/Time.html#">Time</a> object.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a Time object, false if it isn't a Time object
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span>LevelFuncs.IncreaseTime = <span class="keyword">function</span> (time)
<span class="keyword">if</span> Type.IsTime(time) <span class="keyword">then</span>
time + <span class="number">1</span>
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
<dt>
<a name = "IsLevelFunc"></a>
<strong>IsLevelFunc(variable)</strong>
</dt>
<dd>
Check if the variable is a LevelFunc.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">variable</span>
<span class="types"><span class="type">variable</span></span>
to be check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
true if the variable is a LevelFunc, false if it isn't a IsLevelFunc
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="comment">--example of use
</span> LevelFuncs.SetCallback = <span class="keyword">function</span> (func)
<span class="keyword">if</span> Type.IsFunction(func) <span class="keyword">then</span>
TEN.Logic.AddCallback(TEN.Logic.CallbackPoint.PRELOOP, func)
<span class="keyword">end</span>
<span class="keyword">end</span></pre>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -99,6 +99,7 @@
<ul class="nowrap"> <ul class="nowrap">
<li> <a href="5 lua utility modules/EventSequence.html">EventSequence</a></li> <li> <a href="5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="5 lua utility modules/Timer.html">Timer</a></li> <li> <a href="5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="5 lua utility modules/Type.html">Type</a></li>
</ul> </ul>
</div> </div>
@ -362,6 +363,10 @@ local door = GetMoveableByName("door_type4_14")
<td class="name" ><a href="5 lua utility modules/Timer.html">Timer</a></td> <td class="name" ><a href="5 lua utility modules/Timer.html">Timer</a></td>
<td class="summary">Basic timer - after a specified number of seconds, the specified thing happens.</td> <td class="summary">Basic timer - after a specified number of seconds, the specified thing happens.</td>
</tr> </tr>
<tr>
<td class="name" ><a href="5 lua utility modules/Type.html">Type</a></td>
<td class="summary">Type - This molule contains functions that allow to check the data type of a variable.</td>
</tr>
</table> </table>
</div> <!-- id="content" --> </div> <!-- id="content" -->

205
Scripts/Engine/Type.lua Normal file
View file

@ -0,0 +1,205 @@
-----
--- Type - This molule contains functions that allow to check the data type of a variable. It also contains functions that allow to check if the variable is a TEN primitive class or a LevelFuncs.
--
--
-- To use the functions within the scripts, the module must be called:
-- local Type = require("Engine.Type")
--
--
-- Example usage: check if a variable is of type Vec3()
-- local Type= require("Engine.Type")
--
-- LevelFuncs.SetLaraPos = function (pos)
-- if Type.IsVec3(pos) then
-- Lara:SetPosition(pos)
-- end
-- end
--
--
-- You can use the `not` keyword together with the functions of the Type module.
--
-- Example: checking if variable does not have a null value
-- LevelFuncs.AddProp = function (prop)
-- if not Type.IsNull(prop) then
-- LevelVars.property = prop
-- end
-- end
-- @luautil Type
local Type = {}
--- Check if the variable is a number.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a number, false if it isn't a number
-- @usage
-- --example of use
-- local num = 255
-- if Type.IsNumber(num) then
-- num = num + 1
-- end
Type.IsNumber = function (variable)
return type(variable) == "number"
end
--- Check if the variable is a string.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a string, false if it isn't a string
-- @usage
-- --example of use
-- local str = "Hi"
-- if Type.IsString(str) then
-- TEN.Util.PrintLog(str .. "everyone!", Util.LogLevel.INFO)
-- end
Type.IsString = function (variable)
return type(variable) == "string"
end
--- Check if the variable is a boolean.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a boolean, false if it isn't a boolean
-- @usage
-- --example of use
-- LevelFuncs.test = function (test)
-- if Type.IsBoolean(test) then
-- LevelVars.test = test
-- else
-- TEN.Util.PrintLog("Error!", Util.LogLevel.ERROR)
-- end
-- end
Type.IsBoolean = function (variable)
return type(variable) == "boolean"
end
--- Check if the variable is a table.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a table, false if it isn't a table
-- @usage
-- --example of use
-- LevelFuncs.PairsTable = function (table)
-- if Type.IsTable(table) then
-- for k, v in pairs(table) do
-- TEN.Util.PrintLog(tostring(k) .. " - " .. tostring(v), Util.LogLevel.INFO)
-- end
-- end
-- end
Type.IsTable = function (variable)
return type(variable) == "table"
end
--- Check if the variable has a null value.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a null, false if it isn't a null
-- @usage
-- --example of use
-- LevelFuncs.AddProp = function (prop)
-- if Type.IsNull(prop) then
-- TEN.Util.PrintLog("Error!", Util.LogLevel.ERROR)
-- else
-- LevelVars.property = prop
-- end
-- end
Type.IsNull = function (variable)
return type(variable) == "nil"
end
--- Check if the variable is a function.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a function, false if it isn't a function
-- @usage
-- --example of use
-- LevelFuncs.RunFunc = function (func)
-- if Type.IsFunction(func) then
-- func()
-- end
-- end
Type.IsFunction = function (variable)
return type(variable) == "function"
end
--- Check if the variable is a @{Color}.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a color, false if it isn't a color
-- @usage
-- --example of use
-- LevelFuncs.SetColor = function(color)
-- if Type.IsColor(color) then
-- string:SetColor(color)
-- end
-- end
Type.IsColor = function (variable)
return variable ~= nil and type(variable) == "userdata" and variable.__type.name == "ScriptColor"
end
--- Check if the variable is a @{Rotation}.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a rotation, false if it isn't a rotation
-- @usage
-- --example of use
-- LevelFuncs.SetRotation = function (rot)
-- if Type.IsRotation(rot) then
-- Lara:SetRotation(rot)
-- end
-- end
Type.IsRotation = function (variable)
return variable ~= nil and type(variable) == "userdata" and variable.__type.name == "Rotation"
end
--- Check if the variable is a @{Vec2}.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a vec2, false if it isn't a vec2
-- @usage
-- --example of use
-- LevelFuncs.SetSpritePos = function (pos)
-- if Type.IsVec2(pos) then
-- sprite:SetPosition(pos)
-- end
-- end
Type.IsVec2 = function (variable)
return variable ~= nil and type(variable) == "userdata" and variable.__type.name == "Vec2"
end
--- Check if the variable is a @{Vec3}.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a vec3, false if it isn't a vec3
-- @usage
-- --example of use
-- LevelFuncs.SetLaraPos = function (pos)
-- if Type.IsVec3(pos) then
-- Lara:SetPosition(pos)
-- end
-- end
Type.IsVec3 = function (variable)
return variable ~= nil and type(variable) == "userdata" and variable.__type.name == "Vec3"
end
--- Check if the variable is a @{Time} object.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a Time object, false if it isn't a Time object
-- @usage
-- --example of use
-- LevelFuncs.IncreaseTime = function (time)
-- if Type.IsTime(time) then
-- time + 1
-- end
-- end
Type.IsTime = function (variable)
return variable ~= nil and type(variable) == "userdata" and variable.__type.name == "TEN::Scripting::Time"
end
--- Check if the variable is a LevelFunc.
-- @tparam variable variable to be check
-- @treturn boolean true if the variable is a LevelFunc, false if it isn't a IsLevelFunc
-- @usage
-- --example of use
-- LevelFuncs.SetCallback = function (func)
-- if Type.IsFunction(func) then
-- TEN.Logic.AddCallback(TEN.Logic.CallbackPoint.PRELOOP, func)
-- end
-- end
Type.IsLevelFunc = function (variable)
return variable ~= nil and type(variable) == "userdata" and variable.__type.name == "LevelFunc"
end
return Type

View file

@ -68,8 +68,8 @@ namespace TEN::Entities::Player
PlayerBehaviorStateRoutines[LS_ONWATER_IDLE] = std::pair(lara_as_surface_idle, lara_col_surface_idle); PlayerBehaviorStateRoutines[LS_ONWATER_IDLE] = std::pair(lara_as_surface_idle, lara_col_surface_idle);
PlayerBehaviorStateRoutines[LS_ONWATER_FORWARD] = std::pair(lara_as_surface_swim_forward, lara_col_surface_swim_forward); PlayerBehaviorStateRoutines[LS_ONWATER_FORWARD] = std::pair(lara_as_surface_swim_forward, lara_col_surface_swim_forward);
PlayerBehaviorStateRoutines[LS_ONWATER_DIVE] = std::pair(lara_as_surface_dive, lara_col_surface_dive); PlayerBehaviorStateRoutines[LS_ONWATER_DIVE] = std::pair(lara_as_surface_dive, lara_col_surface_dive);
PlayerBehaviorStateRoutines[LS_PUSHABLE_PUSH] = std::pair(lara_as_pushable_push, lara_default_col); PlayerBehaviorStateRoutines[LS_PUSHABLE_PUSH] = std::pair(lara_as_pushable_push, lara_void_func);
PlayerBehaviorStateRoutines[LS_PUSHABLE_PULL] = std::pair(lara_as_pushable_pull, lara_default_col); PlayerBehaviorStateRoutines[LS_PUSHABLE_PULL] = std::pair(lara_as_pushable_pull, lara_void_func);
PlayerBehaviorStateRoutines[LS_PUSHABLE_GRAB] = std::pair(lara_as_pushable_grab, lara_default_col); PlayerBehaviorStateRoutines[LS_PUSHABLE_GRAB] = std::pair(lara_as_pushable_grab, lara_default_col);
PlayerBehaviorStateRoutines[LS_PICKUP] = std::pair(lara_as_pickup, lara_col_pickup); PlayerBehaviorStateRoutines[LS_PICKUP] = std::pair(lara_as_pickup, lara_col_pickup);
PlayerBehaviorStateRoutines[LS_SWITCH_DOWN] = std::pair(lara_as_switch_on, lara_default_col); PlayerBehaviorStateRoutines[LS_SWITCH_DOWN] = std::pair(lara_as_switch_on, lara_default_col);

View file

@ -543,8 +543,14 @@ namespace TEN::Collision::Floordata
auto* sector = &currentSector; auto* sector = &currentSector;
do do
{ {
// For bridges with zero thickness (which is incorrect setup, but still possible), break out of
// infinite loop caused by infinite traversal over the same height value.
int nextPos = sector->GetBridgeSurfaceHeight(pos, !isBottom);
if (nextPos = pos.y)
nextPos += (isBottom ? 1 : -1);
// Set vertical position to lowest bridge ceiling height or highest bridge floor height. // Set vertical position to lowest bridge ceiling height or highest bridge floor height.
pos.y = sector->GetBridgeSurfaceHeight(pos, !isBottom); pos.y = nextPos;
// Find sector at lowest bridge floor height or highest bridge ceiling height. // Find sector at lowest bridge floor height or highest bridge ceiling height.
while (isBottom ? while (isBottom ?

View file

@ -611,6 +611,7 @@ void InitializeOrLoadGame(bool loadGame)
{ {
// If not loading savegame, clear all info. // If not loading savegame, clear all info.
SaveGame::Statistics.Level = {}; SaveGame::Statistics.Level = {};
SaveGame::Statistics.SecretBits = 0;
if (InitializeGame) if (InitializeGame)
{ {

View file

@ -1474,7 +1474,7 @@ const std::vector<byte> SaveGame::Build()
sgb.add_header(headerOffset); sgb.add_header(headerOffset);
sgb.add_level(levelStatisticsOffset); sgb.add_level(levelStatisticsOffset);
sgb.add_game(gameStatisticsOffset); sgb.add_game(gameStatisticsOffset);
sgb.add_secret_map(SaveGame::Statistics.SecretBits); sgb.add_secret_bits(SaveGame::Statistics.SecretBits);
sgb.add_camera(cameraOffset); sgb.add_camera(cameraOffset);
sgb.add_lara(laraOffset); sgb.add_lara(laraOffset);
sgb.add_rooms(roomOffset); sgb.add_rooms(roomOffset);
@ -1700,7 +1700,7 @@ bool SaveGame::Load(int slot)
static void ParseStatistics(const Save::SaveGame* s, bool isHub) static void ParseStatistics(const Save::SaveGame* s, bool isHub)
{ {
SaveGame::Statistics.SecretBits = s->secret_map(); SaveGame::Statistics.SecretBits = s->secret_bits();
SaveGame::Statistics.Level.AmmoHits = s->level()->ammo_hits(); SaveGame::Statistics.Level.AmmoHits = s->level()->ammo_hits();
SaveGame::Statistics.Level.AmmoUsed = s->level()->ammo_used(); SaveGame::Statistics.Level.AmmoUsed = s->level()->ammo_used();

View file

@ -709,8 +709,7 @@ namespace TEN::Renderer
// Secrets found in Level // Secrets found in Level
if (g_GameFlow->GetLevel(CurrentLevel)->GetSecrets() > 0) if (g_GameFlow->GetLevel(CurrentLevel)->GetSecrets() > 0)
{ {
std::bitset<32> levelSecretBitSet(SaveGame::Statistics.Level.Secrets); sprintf(buffer, "%d / %d", SaveGame::Statistics.Level.Secrets, g_GameFlow->GetLevel(CurrentLevel)->GetSecrets());
sprintf(buffer, "%d / %d", (int)levelSecretBitSet.count(), g_GameFlow->GetLevel(CurrentLevel)->GetSecrets());
AddString(MenuRightSideEntry, y, buffer, PRINTSTRING_COLOR_WHITE, SF()); AddString(MenuRightSideEntry, y, buffer, PRINTSTRING_COLOR_WHITE, SF());
AddString(MenuLeftSideEntry, y, g_GameFlow->GetString(STRING_LEVEL_SECRETS_FOUND), PRINTSTRING_COLOR_WHITE, SF()); AddString(MenuLeftSideEntry, y, g_GameFlow->GetString(STRING_LEVEL_SECRETS_FOUND), PRINTSTRING_COLOR_WHITE, SF());
GetNextLinePosition(&y); GetNextLinePosition(&y);

View file

@ -248,22 +248,21 @@ namespace TEN::Scripting
Time::Hmsc Time::ParseFormattedString(const std::string& formattedTime) Time::Hmsc Time::ParseFormattedString(const std::string& formattedTime)
{ {
std::regex timeFormat(R"((\d{2}):(\d{2}):(\d{2})\.(\d{2}))"); std::regex timeFormat(R"((?:(\d+):)?(\d+):(\d+)(?:\.(\d+))?)");
std::smatch match; std::smatch match;
if (!std::regex_match(formattedTime, match, timeFormat)) if (!std::regex_match(formattedTime, match, timeFormat))
{ {
TENLog("Invalid time format. Expected HH:MM:SS or HH:MM:SS.CC", LogLevel::Warning); TENLog("Invalid time format. Supported formats: HH:MM:SS.CC, HH:MM:SS, MM:SS, or MM:SS.CC.", LogLevel::Warning);
return Time::Hmsc(); return Time::Hmsc();
} }
return int hours = match[1].matched ? std::stoi(match[1].str()) : 0;
{ int minutes = match[2].matched ? std::stoi(match[2].str()) : 0;
std::stoi(match[1].str()), int seconds = match[3].matched ? std::stoi(match[3].str()) : 0;
std::stoi(match[2].str()), int cents = match[4].matched ? std::stoi(match[4].str()) : 0;
std::stoi(match[3].str()),
match[4].matched ? std::stoi(match[4].str()) : 0 return { hours, minutes, seconds, cents };
};
} }
void Time::SetFromHMSC(int hours, int minutes, int seconds, int cents) void Time::SetFromHMSC(int hours, int minutes, int seconds, int cents)

View file

@ -7412,7 +7412,7 @@ struct SaveGameT : public flatbuffers::NativeTable {
std::unique_ptr<TEN::Save::SaveGameHeaderT> header{}; std::unique_ptr<TEN::Save::SaveGameHeaderT> header{};
std::unique_ptr<TEN::Save::SaveGameStatisticsT> game{}; std::unique_ptr<TEN::Save::SaveGameStatisticsT> game{};
std::unique_ptr<TEN::Save::SaveGameStatisticsT> level{}; std::unique_ptr<TEN::Save::SaveGameStatisticsT> level{};
int32_t secret_map = 0; int32_t secret_bits = 0;
std::unique_ptr<TEN::Save::CameraT> camera{}; std::unique_ptr<TEN::Save::CameraT> camera{};
std::unique_ptr<TEN::Save::LaraT> lara{}; std::unique_ptr<TEN::Save::LaraT> lara{};
std::vector<std::unique_ptr<TEN::Save::RoomT>> rooms{}; std::vector<std::unique_ptr<TEN::Save::RoomT>> rooms{};
@ -7477,7 +7477,7 @@ struct SaveGame FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
VT_HEADER = 4, VT_HEADER = 4,
VT_GAME = 6, VT_GAME = 6,
VT_LEVEL = 8, VT_LEVEL = 8,
VT_SECRET_MAP = 10, VT_SECRET_BITS = 10,
VT_CAMERA = 12, VT_CAMERA = 12,
VT_LARA = 14, VT_LARA = 14,
VT_ROOMS = 16, VT_ROOMS = 16,
@ -7542,8 +7542,8 @@ struct SaveGame FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
const TEN::Save::SaveGameStatistics *level() const { const TEN::Save::SaveGameStatistics *level() const {
return GetPointer<const TEN::Save::SaveGameStatistics *>(VT_LEVEL); return GetPointer<const TEN::Save::SaveGameStatistics *>(VT_LEVEL);
} }
int32_t secret_map() const { int32_t secret_bits() const {
return GetField<int32_t>(VT_SECRET_MAP, 0); return GetField<int32_t>(VT_SECRET_BITS, 0);
} }
const TEN::Save::Camera *camera() const { const TEN::Save::Camera *camera() const {
return GetPointer<const TEN::Save::Camera *>(VT_CAMERA); return GetPointer<const TEN::Save::Camera *>(VT_CAMERA);
@ -7715,7 +7715,7 @@ struct SaveGame FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
verifier.VerifyTable(game()) && verifier.VerifyTable(game()) &&
VerifyOffset(verifier, VT_LEVEL) && VerifyOffset(verifier, VT_LEVEL) &&
verifier.VerifyTable(level()) && verifier.VerifyTable(level()) &&
VerifyField<int32_t>(verifier, VT_SECRET_MAP) && VerifyField<int32_t>(verifier, VT_SECRET_BITS) &&
VerifyOffset(verifier, VT_CAMERA) && VerifyOffset(verifier, VT_CAMERA) &&
verifier.VerifyTable(camera()) && verifier.VerifyTable(camera()) &&
VerifyOffset(verifier, VT_LARA) && VerifyOffset(verifier, VT_LARA) &&
@ -7863,8 +7863,8 @@ struct SaveGameBuilder {
void add_level(flatbuffers::Offset<TEN::Save::SaveGameStatistics> level) { void add_level(flatbuffers::Offset<TEN::Save::SaveGameStatistics> level) {
fbb_.AddOffset(SaveGame::VT_LEVEL, level); fbb_.AddOffset(SaveGame::VT_LEVEL, level);
} }
void add_secret_map(int32_t secret_map) { void add_secret_bits(int32_t secret_bits) {
fbb_.AddElement<int32_t>(SaveGame::VT_SECRET_MAP, secret_map, 0); fbb_.AddElement<int32_t>(SaveGame::VT_SECRET_BITS, secret_bits, 0);
} }
void add_camera(flatbuffers::Offset<TEN::Save::Camera> camera) { void add_camera(flatbuffers::Offset<TEN::Save::Camera> camera) {
fbb_.AddOffset(SaveGame::VT_CAMERA, camera); fbb_.AddOffset(SaveGame::VT_CAMERA, camera);
@ -8044,7 +8044,7 @@ inline flatbuffers::Offset<SaveGame> CreateSaveGame(
flatbuffers::Offset<TEN::Save::SaveGameHeader> header = 0, flatbuffers::Offset<TEN::Save::SaveGameHeader> header = 0,
flatbuffers::Offset<TEN::Save::SaveGameStatistics> game = 0, flatbuffers::Offset<TEN::Save::SaveGameStatistics> game = 0,
flatbuffers::Offset<TEN::Save::SaveGameStatistics> level = 0, flatbuffers::Offset<TEN::Save::SaveGameStatistics> level = 0,
int32_t secret_map = 0, int32_t secret_bits = 0,
flatbuffers::Offset<TEN::Save::Camera> camera = 0, flatbuffers::Offset<TEN::Save::Camera> camera = 0,
flatbuffers::Offset<TEN::Save::Lara> lara = 0, flatbuffers::Offset<TEN::Save::Lara> lara = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<TEN::Save::Room>>> rooms = 0, flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<TEN::Save::Room>>> rooms = 0,
@ -8153,7 +8153,7 @@ inline flatbuffers::Offset<SaveGame> CreateSaveGame(
builder_.add_rooms(rooms); builder_.add_rooms(rooms);
builder_.add_lara(lara); builder_.add_lara(lara);
builder_.add_camera(camera); builder_.add_camera(camera);
builder_.add_secret_map(secret_map); builder_.add_secret_bits(secret_bits);
builder_.add_level(level); builder_.add_level(level);
builder_.add_game(game); builder_.add_game(game);
builder_.add_header(header); builder_.add_header(header);
@ -8171,7 +8171,7 @@ inline flatbuffers::Offset<SaveGame> CreateSaveGameDirect(
flatbuffers::Offset<TEN::Save::SaveGameHeader> header = 0, flatbuffers::Offset<TEN::Save::SaveGameHeader> header = 0,
flatbuffers::Offset<TEN::Save::SaveGameStatistics> game = 0, flatbuffers::Offset<TEN::Save::SaveGameStatistics> game = 0,
flatbuffers::Offset<TEN::Save::SaveGameStatistics> level = 0, flatbuffers::Offset<TEN::Save::SaveGameStatistics> level = 0,
int32_t secret_map = 0, int32_t secret_bits = 0,
flatbuffers::Offset<TEN::Save::Camera> camera = 0, flatbuffers::Offset<TEN::Save::Camera> camera = 0,
flatbuffers::Offset<TEN::Save::Lara> lara = 0, flatbuffers::Offset<TEN::Save::Lara> lara = 0,
const std::vector<flatbuffers::Offset<TEN::Save::Room>> *rooms = nullptr, const std::vector<flatbuffers::Offset<TEN::Save::Room>> *rooms = nullptr,
@ -8267,7 +8267,7 @@ inline flatbuffers::Offset<SaveGame> CreateSaveGameDirect(
header, header,
game, game,
level, level,
secret_map, secret_bits,
camera, camera,
lara, lara,
rooms__, rooms__,
@ -10557,7 +10557,7 @@ inline void SaveGame::UnPackTo(SaveGameT *_o, const flatbuffers::resolver_functi
{ auto _e = header(); if (_e) _o->header = std::unique_ptr<TEN::Save::SaveGameHeaderT>(_e->UnPack(_resolver)); } { auto _e = header(); if (_e) _o->header = std::unique_ptr<TEN::Save::SaveGameHeaderT>(_e->UnPack(_resolver)); }
{ auto _e = game(); if (_e) _o->game = std::unique_ptr<TEN::Save::SaveGameStatisticsT>(_e->UnPack(_resolver)); } { auto _e = game(); if (_e) _o->game = std::unique_ptr<TEN::Save::SaveGameStatisticsT>(_e->UnPack(_resolver)); }
{ auto _e = level(); if (_e) _o->level = std::unique_ptr<TEN::Save::SaveGameStatisticsT>(_e->UnPack(_resolver)); } { auto _e = level(); if (_e) _o->level = std::unique_ptr<TEN::Save::SaveGameStatisticsT>(_e->UnPack(_resolver)); }
{ auto _e = secret_map(); _o->secret_map = _e; } { auto _e = secret_bits(); _o->secret_bits = _e; }
{ auto _e = camera(); if (_e) _o->camera = std::unique_ptr<TEN::Save::CameraT>(_e->UnPack(_resolver)); } { auto _e = camera(); if (_e) _o->camera = std::unique_ptr<TEN::Save::CameraT>(_e->UnPack(_resolver)); }
{ auto _e = lara(); if (_e) _o->lara = std::unique_ptr<TEN::Save::LaraT>(_e->UnPack(_resolver)); } { auto _e = lara(); if (_e) _o->lara = std::unique_ptr<TEN::Save::LaraT>(_e->UnPack(_resolver)); }
{ auto _e = rooms(); if (_e) { _o->rooms.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->rooms[_i] = std::unique_ptr<TEN::Save::RoomT>(_e->Get(_i)->UnPack(_resolver)); } } } { auto _e = rooms(); if (_e) { _o->rooms.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->rooms[_i] = std::unique_ptr<TEN::Save::RoomT>(_e->Get(_i)->UnPack(_resolver)); } } }
@ -10625,7 +10625,7 @@ inline flatbuffers::Offset<SaveGame> CreateSaveGame(flatbuffers::FlatBufferBuild
auto _header = _o->header ? CreateSaveGameHeader(_fbb, _o->header.get(), _rehasher) : 0; auto _header = _o->header ? CreateSaveGameHeader(_fbb, _o->header.get(), _rehasher) : 0;
auto _game = _o->game ? CreateSaveGameStatistics(_fbb, _o->game.get(), _rehasher) : 0; auto _game = _o->game ? CreateSaveGameStatistics(_fbb, _o->game.get(), _rehasher) : 0;
auto _level = _o->level ? CreateSaveGameStatistics(_fbb, _o->level.get(), _rehasher) : 0; auto _level = _o->level ? CreateSaveGameStatistics(_fbb, _o->level.get(), _rehasher) : 0;
auto _secret_map = _o->secret_map; auto _secret_bits = _o->secret_bits;
auto _camera = _o->camera ? CreateCamera(_fbb, _o->camera.get(), _rehasher) : 0; auto _camera = _o->camera ? CreateCamera(_fbb, _o->camera.get(), _rehasher) : 0;
auto _lara = _o->lara ? CreateLara(_fbb, _o->lara.get(), _rehasher) : 0; auto _lara = _o->lara ? CreateLara(_fbb, _o->lara.get(), _rehasher) : 0;
auto _rooms = _fbb.CreateVector<flatbuffers::Offset<TEN::Save::Room>> (_o->rooms.size(), [](size_t i, _VectorArgs *__va) { return CreateRoom(*__va->__fbb, __va->__o->rooms[i].get(), __va->__rehasher); }, &_va ); auto _rooms = _fbb.CreateVector<flatbuffers::Offset<TEN::Save::Room>> (_o->rooms.size(), [](size_t i, _VectorArgs *__va) { return CreateRoom(*__va->__fbb, __va->__o->rooms[i].get(), __va->__rehasher); }, &_va );
@ -10685,7 +10685,7 @@ inline flatbuffers::Offset<SaveGame> CreateSaveGame(flatbuffers::FlatBufferBuild
_header, _header,
_game, _game,
_level, _level,
_secret_map, _secret_bits,
_camera, _camera,
_lara, _lara,
_rooms, _rooms,

View file

@ -534,7 +534,7 @@ table SaveGame {
header: SaveGameHeader; header: SaveGameHeader;
game: SaveGameStatistics; game: SaveGameStatistics;
level: SaveGameStatistics; level: SaveGameStatistics;
secret_map: int32; secret_bits: int32;
camera: Camera; camera: Camera;
lara: Lara; lara: Lara;
rooms: [Room]; rooms: [Room];