2023-11-09 18:28:02 +00:00
< !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 >
2024-11-21 18:27:42 +01:00
< title > TombEngine 1.6 Lua API< / title >
2023-11-09 18:28:02 +00:00
< 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 / >
2024-12-15 19:24:49 +03:00
< h1 > TombEngine< / h1 >
2023-11-09 18:28:02 +00:00
< 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 > < here > View< / here > < / 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 >
2024-12-15 23:59:31 +01:00
< li > < a href = "../2 classes/Flow.Statistics.html" > Flow.Statistics< / a > < / li >
2023-11-09 18:28:02 +00:00
< 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 >
2024-12-15 19:24:49 +03:00
< li > < a href = "../2 classes/View.DisplaySprite.html" > View.DisplaySprite< / a > < / li >
2023-11-09 18:28:02 +00:00
< / ul >
< h2 > 3 Primitive Classes< / h2 >
< ul class = "nowrap" >
2024-12-15 19:24:49 +03:00
< 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 >
2023-11-09 18:28:02 +00:00
< li > < a href = "../3 primitive classes/Color.html" > Color< / a > < / li >
< li > < a href = "../3 primitive classes/Rotation.html" > Rotation< / a > < / li >
2024-12-15 19:24:49 +03:00
< li > < a href = "../3 primitive classes/Time.html" > Time< / a > < / li >
2023-11-09 18:28:02 +00:00
< 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 >
2024-12-15 19:24:49 +03:00
< li > < a href = "../4 enums/Flow.ErrorMode.html" > Flow.ErrorMode< / a > < / li >
2024-11-20 23:54:39 +03:00
< li > < a href = "../4 enums/Flow.FreezeMode.html" > Flow.FreezeMode< / a > < / li >
2023-12-26 20:47:08 +00:00
< li > < a href = "../4 enums/Flow.GameStatus.html" > Flow.GameStatus< / a > < / li >
2023-11-09 18:28:02 +00:00
< li > < a href = "../4 enums/Input.ActionID.html" > Input.ActionID< / a > < / li >
< li > < a href = "../4 enums/Objects.AmmoType.html" > Objects.AmmoType< / a > < / li >
2024-12-15 23:34:33 +01:00
< li > < a href = "../4 enums/Objects.WeaponType.html" > Objects.WeaponType< / a > < / li >
2023-12-26 20:47:08 +00:00
< li > < a href = "../4 enums/Objects.MoveableStatus.html" > Objects.MoveableStatus< / a > < / li >
2023-11-09 18:28:02 +00:00
< 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 >
2024-11-16 22:07:57 +11:00
< li > < a href = "../4 enums/Strings.DisplayStringOption.html" > Strings.DisplayStringOption< / a > < / li >
2023-11-09 18:28:02 +00:00
< li > < a href = "../4 enums/Util.LogLevel.html" > Util.LogLevel< / a > < / li >
2023-11-11 12:16:23 +00:00
< li > < a href = "../4 enums/View.AlignMode.html" > View.AlignMode< / a > < / li >
2023-11-09 18:28:02 +00:00
< li > < a href = "../4 enums/View.CameraType.html" > View.CameraType< / a > < / li >
2024-01-07 13:22:52 +00:00
< li > < a href = "../4 enums/View.PostProcessMode.html" > View.PostProcessMode< / a > < / li >
2023-11-11 12:16:23 +00:00
< li > < a href = "../4 enums/View.ScaleMode.html" > View.ScaleMode< / a > < / li >
2023-11-09 18:28:02 +00:00
< / 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 >
< / ul >
< / div >
< div id = "content" >
< h1 > Table < code > View< / code > < / h1 >
< p > Functions to manage camera and game view.< / p >
< p >
< / p >
< h2 > < a href = "#Functions" > Functions< / a > < / h2 >
< table class = "function_list" >
< tr >
< td class = "name" > < a href = "#FadeIn" > FadeIn(speed)< / a > < / td >
< td class = "summary" > Do a full-screen fade-in from black.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#FadeOut" > FadeOut(speed)< / a > < / td >
< td class = "summary" > Do a full-screen fade-to-black.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetCineBars" > SetCineBars(height, speed)< / a > < / td >
< td class = "summary" > Move black cinematic bars in from the top and bottom of the game window.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetFOV" > SetFOV(angle)< / a > < / td >
< td class = "summary" > Set field of view.< / td >
< / tr >
< tr >
2023-12-26 20:47:08 +00:00
< td class = "name" > < a href = "#GetFOV" > GetFOV()< / a > < / td >
< td class = "summary" > Get field of view.< / td >
< / tr >
< tr >
2023-11-09 18:28:02 +00:00
< td class = "name" > < a href = "#GetCameraType" > GetCameraType()< / a > < / td >
< td class = "summary" > Shows the mode of the game camera.< / td >
< / tr >
< tr >
2023-12-26 20:47:08 +00:00
< td class = "name" > < a href = "#GetCameraRoom" > GetCameraRoom()< / a > < / td >
< td class = "summary" > Gets current room where camera is positioned.< / td >
< / tr >
< tr >
2024-01-07 13:22:52 +00:00
< td class = "name" > < a href = "#SetPostProcessMode" > SetPostProcessMode(effect)< / a > < / td >
< td class = "summary" > Sets the post-process effect mode, like negative or monochrome.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetPostProcessStrength" > SetPostProcessStrength(strength)< / a > < / td >
< td class = "summary" > Sets the post-process effect strength.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetPostProcessTint" > SetPostProcessTint(tint)< / a > < / td >
< td class = "summary" > Sets the post-process tint.< / td >
< / tr >
< tr >
2023-12-26 20:47:08 +00:00
< td class = "name" > < a href = "#GetCameraPosition" > GetCameraPosition()< / a > < / td >
< td class = "summary" > Gets current camera position.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#GetCameraTarget" > GetCameraTarget()< / a > < / td >
< td class = "summary" > Gets current camera target.< / td >
< / tr >
< tr >
2023-11-09 18:28:02 +00:00
< td class = "name" > < a href = "#PlayFlyBy" > PlayFlyBy(flyby)< / a > < / td >
< td class = "summary" > Enable FlyBy with specific ID< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#ResetObjCamera" > ResetObjCamera()< / a > < / td >
< td class = "summary" > Reset object camera back to Lara and deactivate object camera.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#FlashScreen" > FlashScreen(color, speed)< / a > < / td >
< td class = "summary" > Flash screen.< / td >
< / tr >
2023-12-26 20:47:08 +00:00
< tr >
< td class = "name" > < a href = "#GetAspectRatio" > GetAspectRatio()< / a > < / td >
< td class = "summary" > Get the display resolution's aspect ratio.< / td >
< / tr >
2023-11-09 18:28:02 +00:00
< / table >
< br / >
< br / >
< h2 class = "section-header " > < a name = "Functions" > < / a > Functions< / h2 >
< dl class = "function" >
< dt >
< a name = "FadeIn" > < / a >
< strong > FadeIn(speed)< / strong >
< / dt >
< dd >
Do a full-screen fade-in from black.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > speed< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
(default 1.0). Speed in "amount" per second. A value of 1 will make the fade take one second.
< / li >
< / ul >
< / dd >
< dt >
< a name = "FadeOut" > < / a >
< strong > FadeOut(speed)< / strong >
< / dt >
< dd >
Do a full-screen fade-to-black. The screen will remain black until a call to FadeIn.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > speed< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
(default 1.0). Speed in "amount" per second. A value of 1 will make the fade take one second.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetCineBars" > < / a >
< strong > SetCineBars(height, speed)< / strong >
< / dt >
< dd >
Move black cinematic bars in from the top and bottom of the game window.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > height< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
2023-11-11 12:16:23 +00:00
< strong > (default 30)< / strong > Percentage of the screen to be covered
2023-11-09 18:28:02 +00:00
< / li >
< li > < span class = "parameter" > speed< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
< strong > (default 30)< / strong > Coverage percent per second
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetFOV" > < / a >
< strong > SetFOV(angle)< / strong >
< / dt >
< dd >
Set field of view.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > angle< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
in degrees (clamped to [10, 170])
< / li >
< / ul >
2023-12-26 20:47:08 +00:00
< / dd >
< dt >
< a name = "GetFOV" > < / a >
< strong > GetFOV()< / strong >
< / dt >
< dd >
Get field of view.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < span class = "type" > float< / span > < / span >
current FOV angle in degrees
< / ol >
2023-11-09 18:28:02 +00:00
< / dd >
< dt >
< a name = "GetCameraType" > < / a >
< strong > GetCameraType()< / strong >
< / dt >
< dd >
Shows the mode of the game camera.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../4 enums/View.CameraType.html#" > CameraType< / a > < / span >
value used by the Main Camera.
< / ol >
< h3 > Usage:< / h3 >
< ul >
2023-12-26 20:47:08 +00:00
< pre class = "example" > LevelFuncs.OnLoop = < span class = "keyword" > function< / span > ()
2024-12-15 23:34:33 +01:00
< span class = "keyword" > if< / span > (View.GetCameraType() == CameraType.COMBAT) < span class = "keyword" > then< / span >
2023-11-09 18:28:02 +00:00
< span class = "comment" > --Do your Actions here.
< / span > < span class = "keyword" > end< / span >
< span class = "keyword" > end< / span > < / pre >
< / ul >
2023-12-26 20:47:08 +00:00
< / dd >
< dt >
< a name = "GetCameraRoom" > < / a >
< strong > GetCameraRoom()< / strong >
< / dt >
< dd >
Gets current room where camera is positioned.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../2 classes/Objects.Room.html#" > Room< / a > < / span >
current room of the camera
< / ol >
2024-01-07 13:22:52 +00:00
< / dd >
< dt >
< a name = "SetPostProcessMode" > < / a >
< strong > SetPostProcessMode(effect)< / strong >
< / dt >
< dd >
Sets the post-process effect mode, like negative or monochrome.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > effect< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.PostProcessMode.html#" > PostProcessMode< / a > < / span >
type to set.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetPostProcessStrength" > < / a >
< strong > SetPostProcessStrength(strength)< / strong >
< / dt >
< dd >
Sets the post-process effect strength.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > strength< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
(default 1.0). How strong the effect is.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetPostProcessTint" > < / a >
< strong > SetPostProcessTint(tint)< / strong >
< / dt >
< dd >
Sets the post-process tint.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > tint< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
value to use.
< / li >
< / ul >
2023-12-26 20:47:08 +00:00
< / dd >
< dt >
< a name = "GetCameraPosition" > < / a >
< strong > GetCameraPosition()< / strong >
< / dt >
< dd >
Gets current camera position.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec3.html#" > Vec3< / a > < / span >
current camera position
< / ol >
< / dd >
< dt >
< a name = "GetCameraTarget" > < / a >
< strong > GetCameraTarget()< / strong >
< / dt >
< dd >
Gets current camera target.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec3.html#" > Vec3< / a > < / span >
current camera target
< / ol >
2023-11-09 18:28:02 +00:00
< / dd >
< dt >
< a name = "PlayFlyBy" > < / a >
< strong > PlayFlyBy(flyby)< / strong >
< / dt >
< dd >
Enable FlyBy with specific ID
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > flyby< / span >
< span class = "types" > < span class = "type" > short< / span > < / span >
(ID of flyby)
< / li >
< / ul >
< / dd >
< dt >
< a name = "ResetObjCamera" > < / a >
< strong > ResetObjCamera()< / strong >
< / dt >
< dd >
Reset object camera back to Lara and deactivate object camera.
< / dd >
< dt >
< a name = "FlashScreen" > < / a >
< strong > FlashScreen(color, speed)< / strong >
< / dt >
< dd >
Flash screen.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > color< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
(default Color(255, 255, 255))
< / li >
< li > < span class = "parameter" > speed< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
(default 1.0). Speed in "amount" per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].
< / li >
< / ul >
2023-12-26 20:47:08 +00:00
< / dd >
< dt >
< a name = "GetAspectRatio" > < / a >
< strong > GetAspectRatio()< / strong >
< / dt >
< dd >
Get the display resolution's aspect ratio.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < span class = "type" > float< / span > < / span >
Display resolution's aspect ratio.
< / ol >
2023-11-09 18:28:02 +00:00
< / 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 >