mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Merge branch 'MontyTRC89:develop' into develop
This commit is contained in:
commit
37be06150e
253 changed files with 7586 additions and 3239 deletions
21
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
21
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
|
@ -1,5 +1,5 @@
|
|||
name: Bug report
|
||||
description: Create a report to help us improve
|
||||
description: Create a report to help us understand and diagnose your issue. Your contribution is welcomed and valued!
|
||||
title: "[ bug Report ]"
|
||||
labels: Awaiting Triage
|
||||
|
||||
|
@ -16,10 +16,8 @@ body:
|
|||
description: |
|
||||
Please select the TombEngine Version from the dropdown list.
|
||||
options:
|
||||
- v1.5 (development build)
|
||||
- v1.4
|
||||
- v1.3
|
||||
- v1.2
|
||||
- v1.1
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
@ -29,10 +27,9 @@ body:
|
|||
description: |
|
||||
Please select the Tomb Editor version used from the dropdown list.
|
||||
options:
|
||||
- v1.7.2 (development version)
|
||||
- v1.7.1
|
||||
- v1.7.0
|
||||
- v1.6.9
|
||||
- v1.6.8
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
@ -68,18 +65,6 @@ body:
|
|||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: |
|
||||
Please check this box if you have provided screenshots or any other media for this issue
|
||||
**note** If you do not provide screenshots or anything else, it may be hard for devs to investigate
|
||||
provide a link to your screenshot here or simply drag and drop your screenshot into this textbox
|
||||
placeholder: |
|
||||
A description of any additional content here.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Content
|
||||
|
|
113
CHANGELOG.md
113
CHANGELOG.md
|
@ -1,82 +1,107 @@
|
|||
# Changelog
|
||||
|
||||
Here you will find the full changelog of TEN's releases from Version 1.0 and up
|
||||
|
||||
The dates are in European standard format where date is presented as **YYYY-MM-DD**
|
||||
|
||||
The dates are in European standard format where date is presented as **YYYY-MM-DD**.
|
||||
TombEngine releases are located in this repository (alongside with Tomb Editor): https://github.com/TombEngine/TombEditorReleases
|
||||
|
||||
## Version 1.5 - xxxx-xx-xx
|
||||
## Version 1.6 - xxxx-xx-xx
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fixed engine performance around multiple stacked bridges.
|
||||
* Fixed engine performance if weather effects are active.
|
||||
* Fixed snow particles not always melting on the ground.
|
||||
* Fixed enemy pickups dropping on death sectors.
|
||||
|
||||
### Features/Amendments
|
||||
|
||||
### Lua API changes
|
||||
|
||||
## [Version 1.5](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.2) - 2024-11-03
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fixed original issue with classic switch off trigger incorrectly activating some trigger actions.
|
||||
* Fixed moveable status after antitriggering.
|
||||
* Fixed leveljump vehicle transfer.
|
||||
* Fixed weapons not properly hitting enemies.
|
||||
* Fixed laserhead teleporting Lara and making her invisible on death.
|
||||
* Fixed sarcophagus pick-ups.
|
||||
* Fixed falling through dynamic bridges that are moving upwards.
|
||||
* Fixed Laserhead teleporting Lara and making her invisible on death.
|
||||
* Fixed pick-ups from Sarcophagus objects.
|
||||
* Fixed issue with Lara not rotating together with bridges while picking up items.
|
||||
* Fixed ghost collision with moveables with zero bounds.
|
||||
* Fixed ghost collision with objects with zero bounds.
|
||||
* Fixed several binocular bugs.
|
||||
* Fixed incorrect climbing out of water on bridge objects.
|
||||
* Fixed faulty death sectors.
|
||||
* Fixed shimmy softlocks around static meshes with soft collision.
|
||||
* Fixed incorrect swing ledge grabs with steep grab angles.
|
||||
* Fixed incorrect climbing out of water on bridge objects and in front of static meshes.
|
||||
* Fixed incorrect diving animation when swandiving from a high place.
|
||||
* Fixed room clipping when flyby path goes out of room bounds.
|
||||
* Fixed camera rotating with the player's hips when climbing out of water.
|
||||
* Fixed AI for TR2 skidoo driver and worker with shotgun.
|
||||
* Fixed ember emitter crashing when ocb is between -1 and -10.
|
||||
* Fixed electric cleaner and squishy block not detecting collision with certain block heights.
|
||||
* Fixed squishy blocks crashing the level.
|
||||
* Fixed camera behaviour on sloped surfaces after player's death.
|
||||
* Fixed camera position after loading a savegame.
|
||||
* Fixed broken ropes after loading a savegame.
|
||||
* Fixed AI for TR2 Skidoo driver and Worker with shotgun.
|
||||
* Fixed Ember Emitter crashing when ocb is between -1 and -10.
|
||||
* Fixed Electric Cleaner and Squishy Block not detecting collision with certain block heights.
|
||||
* Fixed Squishy Blocks crashing the level.
|
||||
* Fixed Larson and Pierre pathfinding.
|
||||
* Fixed Dart Emitters failing with antitrigger.
|
||||
* Fixed Homing Dart Emitter spawning darts continously when player is on its trigger.
|
||||
* Fixed Four Blade Trap floor and ceiling collision.
|
||||
* Fixed Joby Spikes collision and deformation.
|
||||
* Fixed Sentry Gun joint rotation.
|
||||
* Fixed Teeth Spikes not triggering the player impale animation.
|
||||
* Fixed TR4 Mine crash with OCB 1 when triggered.
|
||||
* Fixed cases where Atlantean Mutant's bombs cause the game to crash.
|
||||
* Fixed torch flame delay when the player throws or drops a torch.
|
||||
* Fixed dart emitters failing with antitrigger.
|
||||
* Fixed homing dart emitter spawning darts continously when player is on its trigger.
|
||||
* Fixed four blade trap floor and ceiling collision.
|
||||
* Fixed Joby spikes collision and deformation.
|
||||
* Fixed sentry gun joint rotation.
|
||||
* Fixed teeth spikes not triggering the player impale animation.
|
||||
* Fixed TR4 mine crash with OCB 1 when triggered.
|
||||
* Fixed cases where Atlantean mutant's bombs cause the game to crash.
|
||||
* Fixed display sprites and display strings rendering in the inventory background.
|
||||
* Fixed young Lara hair drawing. https://tombengine.com/docs/level-settings/#young_lara
|
||||
|
||||
### Features/Amendments
|
||||
|
||||
* Added variable framerate , that allows the engine to run at an unlocked framerate for a much smoother experience. Setting can be toggled on or off in the graphical settings menu.
|
||||
* Added high framerate mode (also known as 60 FPS mode).
|
||||
* Added a customisable global lensflare effect. https://tombengine.com/docs/level-settings/#lensflare
|
||||
* Added a customisable starry sky and meteor effect (based on TR5). https://tombengine.com/docs/level-settings/#stars
|
||||
* Added a customisable starry sky and meteor effect. https://tombengine.com/docs/level-settings/#stars
|
||||
* Added the ability to display "Lara's Home" entry in the main menu.
|
||||
* Added the ability to change pickup item count by modifying item hit points.
|
||||
* Added F12 as alternative to PrtSc for screenshots.
|
||||
* Added option to enable or disable menu option looping.
|
||||
- Menu scrolling using held inputs will stop at the last option until a new input is made.
|
||||
* Added TR3 seal mutant. https://tombengine.com/docs/ocb-and-setup-instructions/#sealmutant
|
||||
- You must use this version: https://github.com/TombEngine/Resources/raw/main/Wad2%20Objects/Enemies/TEN_Seal_Mutant.wad2
|
||||
* Add new sound conditions: Quicksand and Underwater.
|
||||
* Added ability to invoke load game dialog after death by pressing any key.
|
||||
* Added visible mouse pointer in windowed mode.
|
||||
* Added portal debug mode.
|
||||
* Added new sound conditions: Quicksand and Underwater.
|
||||
- Quicksand - sound effect plays when a moveable is in quicksand.
|
||||
- Underwater - sound plays when the camera is submerged.
|
||||
* Added TR4 Enemy_Jeep https://tombengine.com/docs/ocb-and-setup-instructions/#enemy_jeep
|
||||
* Changed Rome Hammer to not hurt player whilst deactivated.
|
||||
* Changed Statue with blade damage, from 20 to 200.
|
||||
* Changed sound effect that is triggered when using the `level.rumble` feature in a level. Sound effect now part of the default soundmap (ID 359) and additional hardcoded pitch shift has been removed.
|
||||
* Changed hardcoded sound for RAISING_BLOCKS back to the soundID used in TRLE (ID 149)
|
||||
* Changed Water sound condition to ShallowWater.
|
||||
* Enhanced Rolling Spindle detection to avoid them going down through pits.
|
||||
* Enhanced Sentry Guns, with a new ItemFlags[3], to contain the ID of the inventory item that deactivates the sentry guns ( by default PUZZLE_ITEM5 )
|
||||
* Enhanced Dart Emitter, with a new ItemFlags[0], to contain the number of frames between shots ( by default 32 in dart emitter, and 24 in homing-dart emitter ).
|
||||
* Enhanced raptor behaviour and handling. https://tombengine.com/docs/ocb-and-setup-instructions/#raptor
|
||||
* Added TR3 Seal Mutant. https://tombengine.com/docs/ocb-and-setup-instructions/#sealmutant
|
||||
- You must use this version: https://github.com/TombEngine/Resources/raw/main/Wad2%20Objects/Enemies/TEN_Seal_Mutant.wad2
|
||||
* Added TR4 Enemy Jeep. https://tombengine.com/docs/ocb-and-setup-instructions/#enemy_jeep
|
||||
- You must use this version: https://github.com/TombEngine/Resources/raw/main/Wad2%20Objects/Enemies/TR4_Enemy_Jeep.wad2
|
||||
* Changed TR5 Rome Hammer to not hurt player whilst deactivated.
|
||||
* Changed TR2 Statue with blade damage from 20 to 200.
|
||||
* Changed sound effect that is triggered when using the `level.rumble` feature in a level (ID 359 in the soundmap).
|
||||
* Changed hardcoded sound for Raising Block 1/2 back to the ID used in TRLE (ID 149).
|
||||
* Enhanced TR2 Rolling Spindle detection to avoid them going down through pits.
|
||||
* Enhanced Sentry Guns, with a new ItemFlags[3], to contain the ID of the inventory item that deactivates the sentry guns (Puzzle Item 5 by default).
|
||||
* Enhanced Dart Emitter, with a new ItemFlags[0], to contain the number of frames between shots (by default 32 in Dart Emitter, and 24 in Homing-Dart Emitter).
|
||||
* Enhanced Raptor behaviour and handling. https://tombengine.com/docs/ocb-and-setup-instructions/#raptor
|
||||
- You must use this version: https://github.com/TombEngine/Resources/raw/main/Wad2%20Objects/Enemies/TEN_Raptor.wad2
|
||||
* Removed original limit of 32 active Flame Emitters.
|
||||
|
||||
### Lua API changes
|
||||
|
||||
* Added Flow.EnableHomeLevel() function.
|
||||
* Added Flow.IsStringPresent() function.
|
||||
* Added Inventory.GetUsedItem(), Inventory.SetUsedItem() and Inventory.ClearUsedItem() functions.
|
||||
* Added Flow.LensFlare() and Flow.Starfield() classes.
|
||||
* Added Inventory.GetUsedItem(), Inventory.SetUsedItem() and Inventory.ClearUsedItem() functions.
|
||||
* Added Input.KeyClearAll() function.
|
||||
* Added Moveable.GetJointRotation() and optional 'offset' parameter for Moveable.GetJointPosition().
|
||||
* Added Moveable.GetTargetState() function.
|
||||
* Added Room:GetRoomNumber() function.
|
||||
* Removed anims.monkeyAutoJump. It is now a player menu configuration.
|
||||
* Fixed Volume:GetActive() method.
|
||||
|
||||
## [Version 1.4](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.1) - 2024-04-21
|
||||
|
||||
### Bug Fixes
|
||||
### Bug fixes
|
||||
* Fixed drawing of display sprites in title level.
|
||||
* Fixed drawing of smoke sprites and various other sprites.
|
||||
* Fixed drawing of transparent surfaces when debris are present in scene.
|
||||
|
@ -119,7 +144,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
|
||||
## [Version 1.3](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7) - 2024-01-06
|
||||
|
||||
### Bug Fixes
|
||||
### Bug fixes
|
||||
* Fixed crash if title logo is removed from Textures folder.
|
||||
* Fixed crash if unknown player state ID is encountered.
|
||||
* Fixed bug with OCB 2 on pushables, and some other pushable bugs.
|
||||
|
@ -175,7 +200,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
|
||||
## [Version 1.2](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.6.9) - 2023-11-11
|
||||
|
||||
### Bug Fixes
|
||||
### Bug fixes
|
||||
* Fix burning torch not working properly if there are more than 256 objects in a level.
|
||||
* Fix grenade and rocket projectiles smoke offset in certain directions.
|
||||
* Fix projectiles flying through animating objects.
|
||||
|
@ -252,7 +277,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
|
||||
## [Version 1.1.0](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.6.8) - 2023-07-29
|
||||
|
||||
### Bug Fixes
|
||||
### Bug fixes
|
||||
* Fix enemies shooting Lara through static meshes and moveables.
|
||||
* Fix skeletons and mummies not being affected by explosive weapons.
|
||||
* Fix crash on loading if static meshes with IDs above maximum are present.
|
||||
|
@ -463,7 +488,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
|
||||
## [Version 1.0.6](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.6.4) - 2023-01-29
|
||||
|
||||
### Bug FIxes
|
||||
### Bug fixes
|
||||
* Fix major pathfinding bug which could have caused lots of issues with enemy behaviour.
|
||||
* Fix potential random crashes due to incorrect rendering behaviour.
|
||||
* Fix savegame crash for disabled enemies with partially set activation mask.
|
||||
|
|
|
@ -12,7 +12,7 @@ new_type("luautil", "5 Lua utility modules", true)
|
|||
|
||||
not_luadoc = true
|
||||
|
||||
local version = "1.4"
|
||||
local version = "1.5"
|
||||
project = "TombEngine"
|
||||
title = "TombEngine " .. version .. " Lua API"
|
||||
description = "TombEngine " .. version .. " scripting interface"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <here>Flow.Animations</here></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <here>Flow.Fog</here></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <here>Flow.InventoryItem</here></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
397
Documentation/doc/2 classes/Flow.LensFlare.html
Normal file
397
Documentation/doc/2 classes/Flow.LensFlare.html
Normal file
|
@ -0,0 +1,397 @@
|
|||
<!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.5 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>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/View.DisplaySprite.html">View.DisplaySprite</a></li>
|
||||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <here>Flow.LensFlare</here></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
</ul>
|
||||
<h2>3 Primitive Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<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/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.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.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/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>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Flow.LensFlare</code></h1>
|
||||
<p>Represents a lens flare.</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare">LensFlare(Pitch, Yaw, Color.)</a></td>
|
||||
<td class="summary">Create a LensFlare object.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:GetEnabled">LensFlare:GetEnabled()</a></td>
|
||||
<td class="summary">Get the lens flare's enabled status.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:GetSunSpriteID">LensFlare:GetSunSpriteID()</a></td>
|
||||
<td class="summary">Get the sun's sprite ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:GetPitch">LensFlare:GetPitch()</a></td>
|
||||
<td class="summary">Get the lens flare's pitch angle in degrees.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:GetYaw">LensFlare:GetYaw()</a></td>
|
||||
<td class="summary">Get the lens flare's yaw angle in degrees.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:SetColor">LensFlare:SetColor()</a></td>
|
||||
<td class="summary">Get the lens flare's color.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:SetSunSpriteID">LensFlare:SetSunSpriteID(New)</a></td>
|
||||
<td class="summary">Set the lens flare's sun sprite ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:SetPitch">LensFlare:SetPitch(New)</a></td>
|
||||
<td class="summary">Set the lens flare's pitch angle.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:SetYaw">LensFlare:SetYaw(New)</a></td>
|
||||
<td class="summary">Set the lens flare's yaw angle.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#LensFlare:SetColor">LensFlare:SetColor(New)</a></td>
|
||||
<td class="summary">Set the lens flare's color.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "LensFlare"></a>
|
||||
<strong>LensFlare(Pitch, Yaw, Color.)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create a LensFlare object. ()
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">Pitch</span>
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
angle in degrees.
|
||||
</li>
|
||||
<li><span class="parameter">Yaw</span>
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
angle in degrees.
|
||||
</li>
|
||||
<li><span class="parameter">Color.</span>
|
||||
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../2 classes/Flow.LensFlare.html#LensFlare">LensFlare</a></span>
|
||||
A new LensFlare object.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:GetEnabled"></a>
|
||||
<strong>LensFlare:GetEnabled()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the lens flare's enabled status. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
Lens flare's enabled status.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:GetSunSpriteID"></a>
|
||||
<strong>LensFlare:GetSunSpriteID()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the sun's sprite ID. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Sprite ID.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:GetPitch"></a>
|
||||
<strong>LensFlare:GetPitch()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the lens flare's pitch angle in degrees. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
Pitch angle in degrees.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:GetYaw"></a>
|
||||
<strong>LensFlare:GetYaw()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the lens flare's yaw angle in degrees. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
Yaw angle in degrees.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:SetColor"></a>
|
||||
<strong>LensFlare:SetColor()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the lens flare's color. ()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:SetSunSpriteID"></a>
|
||||
<strong>LensFlare:SetSunSpriteID(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the lens flare's sun sprite ID. ()
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
sprite ID.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:SetPitch"></a>
|
||||
<strong>LensFlare:SetPitch(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the lens flare's pitch angle. (float)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
pitch angle in degrees.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:SetYaw"></a>
|
||||
<strong>LensFlare:SetYaw(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the lens flare's yaw angle. (float)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
yaw angle in degrees.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "LensFlare:SetColor"></a>
|
||||
<strong>LensFlare:SetColor(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the lens flare's color. (Color)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
||||
color.
|
||||
</li>
|
||||
</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>
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <here>Flow.Level</here></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -106,10 +108,6 @@
|
|||
|
||||
<h2><a href="#Members">Members</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" ><a href="#nameKey">nameKey</a></td>
|
||||
<td class="summary">(string) string key for the level's (localised) name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#scriptFile">scriptFile</a></td>
|
||||
<td class="summary">(string) Level-specific Lua script file.</td>
|
||||
|
@ -135,6 +133,14 @@
|
|||
<td class="summary">(<a href="../2 classes/Flow.SkyLayer.html#">Flow.SkyLayer</a>) Secondary sky layer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#starfield">starfield</a></td>
|
||||
<td class="summary">(<a href="../2 classes/Flow.Starfield.html#">Flow.Starfield</a>) Starfield.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#lensFlare">lensFlare</a></td>
|
||||
<td class="summary">(<a href="../2 classes/Flow.LensFlare.html#">Flow.LensFlare</a>) Global lens flare .</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#fog">fog</a></td>
|
||||
<td class="summary">(<a href="../2 classes/Flow.Fog.html#">Flow.Fog</a>) omni fog RGB color and distance.</td>
|
||||
</tr>
|
||||
|
@ -198,22 +204,6 @@
|
|||
<h2 class="section-header "><a name="Members"></a>Members</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "nameKey"></a>
|
||||
<strong>nameKey</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
(string) string key for the level's (localised) name.
|
||||
Corresponds to an entry in strings.lua.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "scriptFile"></a>
|
||||
<strong>scriptFile</strong>
|
||||
|
@ -307,6 +297,36 @@
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "starfield"></a>
|
||||
<strong>starfield</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
(<a href="../2 classes/Flow.Starfield.html#">Flow.Starfield</a>) Starfield.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "lensFlare"></a>
|
||||
<strong>lensFlare</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
(<a href="../2 classes/Flow.LensFlare.html#">Flow.LensFlare</a>) Global lens flare .
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "fog"></a>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <here>Flow.Mirror</here></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <here>Flow.Settings</here></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <here>Flow.SkyLayer</here></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -154,13 +156,14 @@
|
|||
<dd>
|
||||
(int) cloud speed. </p>
|
||||
|
||||
<p>Values can be between [-32768, 32767], with positive numbers resulting in a sky that scrolls from
|
||||
west to east, and negative numbers resulting in one that travels east to west.</p>
|
||||
|
||||
<p>Please note that speeds outside of the range of about [-1000, 1000] will cause the
|
||||
sky to scroll so fast that it will no longer appear as a coherent stream of clouds.
|
||||
Less is more. City of The Dead, for example, uses a speed value of 16.
|
||||
<pre><code> Values can be between [-32768, 32767], with positive numbers resulting in a sky that scrolls from
|
||||
west to east, and negative numbers resulting in one that travels east to west.
|
||||
|
||||
Please note that speeds outside of the range of about [-1000, 1000] will cause the
|
||||
sky to scroll so fast that it will no longer appear as a coherent stream of clouds.
|
||||
Less is more. City of The Dead, for example, uses a speed value of 16.
|
||||
</code></pre>
|
||||
<p>
|
||||
|
||||
|
||||
|
||||
|
|
454
Documentation/doc/2 classes/Flow.Starfield.html
Normal file
454
Documentation/doc/2 classes/Flow.Starfield.html
Normal file
|
@ -0,0 +1,454 @@
|
|||
<!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.5 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>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/View.DisplaySprite.html">View.DisplaySprite</a></li>
|
||||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <here>Flow.Starfield</here></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>
|
||||
</ul>
|
||||
<h2>3 Primitive Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<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/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.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.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/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>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Flow.Starfield</code></h1>
|
||||
<p>Represents a starfield.</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield">Starfield(starCount)</a></td>
|
||||
<td class="summary">Create a starfield object with only stars.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield">Starfield(starCount, meteorCount)</a></td>
|
||||
<td class="summary">Create a starfield object with stars and meteors.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:GetStarsEnabled">Starfield:GetStarsEnabled()</a></td>
|
||||
<td class="summary">Get the starfield's enabled status of stars.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:GetMeteorsEnabled">Starfield:GetMeteorsEnabled()</a></td>
|
||||
<td class="summary">Get the starfield's enabled status of meteors.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:GetStarCount">Starfield:GetStarCount()</a></td>
|
||||
<td class="summary">Get the starfield's number of stars.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:GetMeteorCount">Starfield:GetMeteorCount()</a></td>
|
||||
<td class="summary">Get the starfield's number of meteors.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:GetMeteorSpawnDensity">Starfield:GetMeteorSpawnDensity()</a></td>
|
||||
<td class="summary">Get the starfield's meteor spawn density.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:GetMeteorVelocity">Starfield:GetMeteorVelocity()</a></td>
|
||||
<td class="summary">Get the starfield's meteor velocity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:SetStarCount">Starfield:SetStarCount(New)</a></td>
|
||||
<td class="summary">Set the starfield's number of stars (6000 max).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:SetMeteorCount">Starfield:SetMeteorCount(New)</a></td>
|
||||
<td class="summary">Set the starfield's number of meteors (100 max).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:SetMeteorSpawnDensity">Starfield:SetMeteorSpawnDensity(New)</a></td>
|
||||
<td class="summary">Set the starfield's meteor spawn density.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Starfield:SetMeteorVelocity">Starfield:SetMeteorVelocity(New)</a></td>
|
||||
<td class="summary">Set the starfield's meteor velocity.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Starfield"></a>
|
||||
<strong>Starfield(starCount)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create a starfield object with only stars. ()
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">starCount</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Star count.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../2 classes/Flow.Starfield.html#Starfield">Starfield</a></span>
|
||||
A new Starfield object.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield"></a>
|
||||
<strong>Starfield(starCount, meteorCount)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create a starfield object with stars and meteors. ()
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">starCount</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Star count (6000 max).
|
||||
</li>
|
||||
<li><span class="parameter">meteorCount</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Meteor count (100 max).
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../2 classes/Flow.Starfield.html#Starfield">Starfield</a></span>
|
||||
A new Starfield object.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:GetStarsEnabled"></a>
|
||||
<strong>Starfield:GetStarsEnabled()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the starfield's enabled status of stars. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
Stars enabled status.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:GetMeteorsEnabled"></a>
|
||||
<strong>Starfield:GetMeteorsEnabled()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the starfield's enabled status of meteors. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
Meteors enabled status.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:GetStarCount"></a>
|
||||
<strong>Starfield:GetStarCount()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the starfield's number of stars. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Count.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:GetMeteorCount"></a>
|
||||
<strong>Starfield:GetMeteorCount()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the starfield's number of meteors. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Count.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:GetMeteorSpawnDensity"></a>
|
||||
<strong>Starfield:GetMeteorSpawnDensity()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the starfield's meteor spawn density. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
Spawn density.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:GetMeteorVelocity"></a>
|
||||
<strong>Starfield:GetMeteorVelocity()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the starfield's meteor velocity. ()
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
Velocity.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:SetStarCount"></a>
|
||||
<strong>Starfield:SetStarCount(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the starfield's number of stars (6000 max). (int)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
count.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:SetMeteorCount"></a>
|
||||
<strong>Starfield:SetMeteorCount(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the starfield's number of meteors (100 max). (int)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
count.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:SetMeteorSpawnDensity"></a>
|
||||
<strong>Starfield:SetMeteorSpawnDensity(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the starfield's meteor spawn density. (int)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
spawn density.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Starfield:SetMeteorVelocity"></a>
|
||||
<strong>Starfield:SetMeteorVelocity(New)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set the starfield's meteor velocity. (float)
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">New</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
velocity.
|
||||
</li>
|
||||
</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>
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</a></li>
|
||||
<li> <here>Objects.AIObject</here></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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</a></li>
|
||||
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
|
||||
<li> <here>Objects.Camera</here></li>
|
||||
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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> <here>Objects.LaraObject</here></li>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -120,11 +122,11 @@ pickups, and Lara herself (see also <a href="../2 classes/Objects.LaraObject.htm
|
|||
<td class="summary">Shatter item.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:SetEffect">Moveable:SetEffect(effect, timeout)</a></td>
|
||||
<td class="name" ><a href="#Moveable:SetEffect">Moveable:SetEffect(effect[, timeout])</a></td>
|
||||
<td class="summary">Set effect to moveable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(Color1, Color2, timeout)</a></td>
|
||||
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(Color1, Color2[, timeout])</a></td>
|
||||
<td class="summary">Set custom colored burn effect to moveable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -152,6 +154,10 @@ pickups, and Lara herself (see also <a href="../2 classes/Objects.LaraObject.htm
|
|||
<td class="summary">Retrieve the index of the current state.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetTargetState">Moveable:GetTargetState()</a></td>
|
||||
<td class="summary">Retrieve the index of the target state.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:SetState">Moveable:SetState(index)</a></td>
|
||||
<td class="summary">Set the object's state to the one specified by the given index.</td>
|
||||
</tr>
|
||||
|
@ -225,10 +231,14 @@ pickups, and Lara herself (see also <a href="../2 classes/Objects.LaraObject.htm
|
|||
<td class="summary">Determine whether the moveable is active or not</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetJointPosition">Moveable:GetJointPosition(index)</a></td>
|
||||
<td class="name" ><a href="#Moveable:GetJointPosition">Moveable:GetJointPosition(index[, offset])</a></td>
|
||||
<td class="summary">Get the object's joint position</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetJointRotation">Moveable:GetJointRotation(index)</a></td>
|
||||
<td class="summary">Get the object's joint rotation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="#Moveable:GetRotation">Moveable:GetRotation()</a></td>
|
||||
<td class="summary">Get the moveable's rotation</td>
|
||||
</tr>
|
||||
|
@ -494,7 +504,7 @@ most can just be ignored (see usage).
|
|||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetEffect"></a>
|
||||
<strong>Moveable:SetEffect(effect, timeout)</strong>
|
||||
<strong>Moveable:SetEffect(effect[, timeout])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set effect to moveable
|
||||
|
@ -509,7 +519,8 @@ most can just be ignored (see usage).
|
|||
</li>
|
||||
<li><span class="parameter">timeout</span>
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
time (in seconds) after which effect turns off (optional).
|
||||
time (in seconds) after which effect turns off.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -520,7 +531,7 @@ most can just be ignored (see usage).
|
|||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetCustomEffect"></a>
|
||||
<strong>Moveable:SetCustomEffect(Color1, Color2, timeout)</strong>
|
||||
<strong>Moveable:SetCustomEffect(Color1, Color2[, timeout])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Set custom colored burn effect to moveable
|
||||
|
@ -539,7 +550,8 @@ most can just be ignored (see usage).
|
|||
</li>
|
||||
<li><span class="parameter">timeout</span>
|
||||
<span class="types"><span class="type">float</span></span>
|
||||
time (in seconds) after which effect turns off (optional).
|
||||
time (in seconds) after which effect turns off.
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -681,6 +693,28 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetTargetState"></a>
|
||||
<strong>Moveable:GetTargetState()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Retrieve the index of the target state.
|
||||
This corresponds to the state the object is trying to get into, which is sometimes different from the active state.
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
the index of the target state
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:SetState"></a>
|
||||
|
@ -1096,7 +1130,7 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetJointPosition"></a>
|
||||
<strong>Moveable:GetJointPosition(index)</strong>
|
||||
<strong>Moveable:GetJointPosition(index[, offset])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the object's joint position
|
||||
|
@ -1109,13 +1143,46 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
<span class="types"><span class="type">int</span></span>
|
||||
of a joint to get position
|
||||
</li>
|
||||
<li><span class="parameter">offset</span>
|
||||
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
||||
a pre-rotation offset to the joint
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
||||
a copy of the moveable's position
|
||||
a copy of the moveable's joint position
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Moveable:GetJointRotation"></a>
|
||||
<strong>Moveable:GetJointRotation(index)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the object's joint rotation
|
||||
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">index</span>
|
||||
<span class="types"><span class="type">int</span></span>
|
||||
of a joint to get rotation
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
|
||||
a calculated copy of the moveable's joint rotation
|
||||
</ol>
|
||||
|
||||
|
||||
|
@ -1359,7 +1426,10 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">LevelFuncs.objCollided = <span class="keyword">function</span>(obj1, obj2)
|
||||
<pre class="example"><span class="comment">-- obj1 is the collision moveable
|
||||
</span><span class="comment">-- obj2 is the collider moveable
|
||||
</span>
|
||||
LevelFuncs.objCollided = <span class="keyword">function</span>(obj1, obj2)
|
||||
<span class="global">print</span>(obj1:GetName() .. <span class="string">" collided with "</span> .. obj2:GetName())
|
||||
<span class="keyword">end</span>
|
||||
baddy:SetOnCollidedWithObject(LevelFuncs.objCollided)</pre>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -178,7 +180,7 @@
|
|||
<strong>DisplaySprite(ID, int, pos, rot, scale[, color])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Create a DisplaySprite object.
|
||||
Create a DisplaySprite object. ()
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -101,7 +103,7 @@
|
|||
|
||||
<h1>Primitive Class <code>Rotation</code></h1>
|
||||
<p>Represents a degree-based 3D rotation.</p>
|
||||
<p>All values are clamped to the range [0.0, 360.0].</p>
|
||||
<p> All values are clamped to the range [0.0, 360.0].</p>
|
||||
|
||||
|
||||
<h2><a href="#Members">Members</a></h2>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -1106,6 +1108,10 @@ HEALTH_BAR_TEXTURE
|
|||
AIR_BAR_TEXTURE
|
||||
DASH_BAR_TEXTURE
|
||||
SFX_BAR_TEXTURE
|
||||
SPEEDOMETER
|
||||
CUSTOM_BAR_GRAPHIC
|
||||
CUSTOM_AMMO_GRAPHIC
|
||||
|
||||
PANEL_BORDER
|
||||
PANEL_MIDDLE
|
||||
PANEL_CORNER
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="../2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="../2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<head>
|
||||
<title>TombEngine 1.4 Lua API</title>
|
||||
<title>TombEngine 1.5 Lua API</title>
|
||||
<link rel="stylesheet" href="ldoc.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -49,10 +49,12 @@
|
|||
<li> <a href="2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
||||
<li> <a href="2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
||||
<li> <a href="2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
||||
<li> <a href="2 classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
||||
<li> <a href="2 classes/Flow.Level.html">Flow.Level</a></li>
|
||||
<li> <a href="2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
||||
<li> <a href="2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
||||
<li> <a href="2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
||||
<li> <a href="2 classes/Flow.Starfield.html">Flow.Starfield</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>
|
||||
|
@ -100,7 +102,7 @@
|
|||
<div id="content">
|
||||
|
||||
|
||||
<h2>TombEngine 1.4 scripting interface</h2>
|
||||
<h2>TombEngine 1.5 scripting interface</h2>
|
||||
<p>Welcome to the TombEngine scripting API. This is a work in progress and some information might be wrong or outdated. Please also note that this is primarily a reference document, not a tutorial, so expect descriptions to be fairly sparse.</p>
|
||||
|
||||
<p>At the time of writing, there is a tutorial describing the basics of Lua, as well as a number of example scripts, on <a href="https://www.tombengine.com">the TombEngine website</a>.</p>
|
||||
|
@ -183,6 +185,10 @@ local door = GetMoveableByName("door_type4_14")
|
|||
<td class="name" ><a href="2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></td>
|
||||
<td class="summary">Represents the properties of an object as it appears in the inventory.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="2 classes/Flow.LensFlare.html">Flow.LensFlare</a></td>
|
||||
<td class="summary">Represents a lens flare.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="2 classes/Flow.Level.html">Flow.Level</a></td>
|
||||
<td class="summary">Stores level metadata.</td>
|
||||
|
@ -199,6 +205,10 @@ local door = GetMoveableByName("door_type4_14")
|
|||
<td class="name" ><a href="2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></td>
|
||||
<td class="summary">Describes a layer of moving clouds.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="2 classes/Flow.Starfield.html">Flow.Starfield</a></td>
|
||||
<td class="summary">Represents a starfield.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" ><a href="2 classes/Objects.AIObject.html">Objects.AIObject</a></td>
|
||||
<td class="summary">AI object</td>
|
||||
|
|
31
README.md
31
README.md
|
@ -1,14 +1,13 @@
|
|||
# TombEngine
|
||||
|
||||

|
||||

|
||||
|
||||
In the year 2000, Core Design granted us a great gift: their TR4-based Level Editor, which allowed people to create custom levels. It was, unfortunately, quite limited, hence why over the decades it was upgraded massively with fan patcher projects such as Tomb Raider Engine Patcher (TREP) and Tomb Raider Next Generation (TRNG).
|
||||
|
||||
TombEngine (TEN) is a new, open-source engine which aims to abolish all limits, fix bugs from the original games, introduce new features while refining old ones, and provide for a refined, user-friendly level creation process. Current support includes:
|
||||
TombEngine (TEN) is an open-source, custom level engine which aims to abolish limits and fix bugs of the classic Tomb Raider games, introduce new features while refining old ones, and provide user-friendly level creation process. Current support includes:
|
||||
- Lua (as the native scripting language)
|
||||
- All objects from the classic series (1-5)
|
||||
- Many more exciting gameplay functionalities such as diagonal shimmying and expanded crawlspace flexibility
|
||||
- An enlarged 2D map, allowing for the creation of massive levels (imagine one big level may previously have been split into five!)
|
||||
- Many objects from the original series (1-5)
|
||||
- Support for high framerate, antialiasing, mipmapping and SSAO
|
||||
- Full diagonal geometry support
|
||||
- Uncapped map size
|
||||
- A streamlined player control scheme.
|
||||
|
||||
If you would like to participate in TEN discussion with other TEN devs whether it is contributing, bugs or general discussion, then join this discord server: https://discord.gg/h5tUYFmres
|
||||
|
@ -22,19 +21,21 @@ To compile TEN, ensure you have installed:
|
|||
|
||||
Steps:
|
||||
1) Clone the repository to your GitHub Desktop
|
||||
2) Launch TombEngine.sln and compile
|
||||
3) Once compiled, create a separate folder to serve as your main TEN directory
|
||||
4) Copy everything inside the Build folder to the main TEN directory
|
||||
5) Copy the Scripts folder to your main TEN directory
|
||||
6) Ensure you have the necessary level data and texture files as well
|
||||
7) In the case Windows warns about missing DLLs, (bass.dll, etc.) copy the missing DLL files found inside the Libs folder to your main TEN directory.
|
||||
2) Open TombEngine.sln
|
||||
4) Compile the solution
|
||||
5) Once compiled, create a separate folder to serve as your main TEN directory (or create test TEN project using TombIDE)
|
||||
6) Copy everything inside the Build folder to the main TEN directory
|
||||
7) Ensure you have the necessary level data and texture files as well
|
||||
8) In the case Windows warns about missing DLLs, (bass.dll, etc.) copy the missing DLL files found inside the Libs folder to your main TEN directory.
|
||||
|
||||
Visual Studio may also warn about NuGet packages. To fix:
|
||||
1) Delete the Packages folder
|
||||
2) Go back to Microsoft Visual Studio
|
||||
3) Right-click on the TombEngine solution in the Solution Explorer tab and select "Restore NuGet Packages"
|
||||
4) Compile again and once done, you should be able to compile a level with TombEditor and run it in TEN.
|
||||
4) If it doesn't help, manually install `directxtk_desktop_2019` and `Microsoft.XAudio2.Redist` packages via NuGet Package Manager
|
||||
|
||||
Once done, you should be able to build a level with TombEditor and run it in TEN.
|
||||
|
||||
# Disclaimer
|
||||
We do not and have never worked for Core Design, Eidos Interactive, or Square Enix. This is a hobby project. Tomb Raider is a registered trademark of Square Enix; TombEngine is not be sold. The code is open-source to encourage contributions and to be used for study purposes. We are not responsible for illegal uses of this source code. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.
|
||||
This is a community project which is not affiliated with Core Design, Eidos Interactive, or Square Enix. Tomb Raider is a registered trademark of Square Enix; TombEngine is not be sold. The code is open-source to encourage contributions and to be used for study purposes. We are not responsible for illegal uses of this source code. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ local strings =
|
|||
exit_to_title = { "Exit to Title" },
|
||||
general_actions = { "General Actions" },
|
||||
high = { "High" },
|
||||
high_framerate = { "High Framerate" },
|
||||
level_secrets_found = { "Secrets Found in Level" },
|
||||
load_game = { "Load Game" },
|
||||
low = { "Low" },
|
||||
|
|
BIN
TEN logo.png
BIN
TEN logo.png
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 47 KiB |
BIN
Title Image.psd
BIN
Title Image.psd
Binary file not shown.
|
@ -2,6 +2,8 @@
|
|||
#include "Game/Hud/PickupSummary.h"
|
||||
|
||||
#include "Game/pickup/pickup.h"
|
||||
#include "Game/pickup/pickup_ammo.h"
|
||||
#include "Game/pickup/pickup_consumable.h"
|
||||
#include "Math/Math.h"
|
||||
#include "Renderer/Renderer.h"
|
||||
#include "Specific/clock.h"
|
||||
|
@ -39,6 +41,8 @@ namespace TEN::Hud
|
|||
constexpr auto ROT_RATE = ANGLE(360.0f / (LIFE_MAX * FPS));
|
||||
constexpr auto ROT = EulerAngles(0, ROT_RATE, 0);
|
||||
|
||||
StoreInterpolationData();
|
||||
|
||||
// Move offscreen.
|
||||
if (Life <= 0.0f && isHead)
|
||||
{
|
||||
|
@ -122,6 +126,21 @@ namespace TEN::Hud
|
|||
pickup.StringScalar = 0.0f;
|
||||
}
|
||||
|
||||
void PickupSummaryController::AddDisplayPickup(const ItemInfo& item)
|
||||
{
|
||||
// NOTE: Ammo and consumables are a special case, as internal amount differs from pickup amount.
|
||||
int ammoCount = GetDefaultAmmoCount(item.ObjectNumber);
|
||||
int consumableCount = GetDefaultConsumableCount(item.ObjectNumber);
|
||||
|
||||
int count = DISPLAY_PICKUP_COUNT_ARG_DEFAULT;
|
||||
if (ammoCount != NO_VALUE)
|
||||
count = ammoCount;
|
||||
if (consumableCount != NO_VALUE)
|
||||
count = consumableCount;
|
||||
|
||||
AddDisplayPickup(item.ObjectNumber, item.Pose.Position.ToVector3(), (item.HitPoints > 0) ? item.HitPoints : count);
|
||||
}
|
||||
|
||||
void PickupSummaryController::AddDisplayPickup(GAME_OBJECT_ID objectID, const Vector3& pos, unsigned int count)
|
||||
{
|
||||
// Project 3D position to 2D origin.
|
||||
|
|
|
@ -25,8 +25,21 @@ namespace TEN::Hud
|
|||
float StringScale = 0.0f;
|
||||
float StringScalar = 0.0f;
|
||||
|
||||
Vector2 PrevPosition = Vector2::Zero;
|
||||
EulerAngles PrevOrientation = EulerAngles::Identity;
|
||||
float PrevScale = 0.0f;
|
||||
float PrevOpacity = 0.0f;
|
||||
|
||||
bool IsOffscreen() const;
|
||||
void Update(bool isHead);
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevPosition = Position;
|
||||
PrevOrientation = Orientation;
|
||||
PrevScale = Scale;
|
||||
PrevOpacity = Opacity;
|
||||
}
|
||||
};
|
||||
|
||||
class PickupSummaryController
|
||||
|
@ -46,6 +59,7 @@ namespace TEN::Hud
|
|||
|
||||
void AddDisplayPickup(GAME_OBJECT_ID objectID, const Vector2& origin, unsigned int count = DISPLAY_PICKUP_COUNT_ARG_DEFAULT);
|
||||
void AddDisplayPickup(GAME_OBJECT_ID objectID, const Vector3& pos, unsigned int count = DISPLAY_PICKUP_COUNT_ARG_DEFAULT);
|
||||
void AddDisplayPickup(const ItemInfo& item);
|
||||
|
||||
void Update();
|
||||
void Draw() const;
|
||||
|
|
|
@ -4,10 +4,13 @@
|
|||
#include "Game/effects/DisplaySprite.h"
|
||||
#include "Math/Math.h"
|
||||
#include "Specific/clock.h"
|
||||
#include "Renderer/Renderer.h"
|
||||
|
||||
using namespace TEN::Effects::DisplaySprite;
|
||||
using namespace TEN::Math;
|
||||
|
||||
using TEN::Renderer::g_Renderer;
|
||||
|
||||
namespace TEN::Hud
|
||||
{
|
||||
void SpeedometerController::UpdateValue(float value)
|
||||
|
@ -28,6 +31,8 @@ namespace TEN::Hud
|
|||
return;
|
||||
}
|
||||
|
||||
StoreInterpolationData();
|
||||
|
||||
// Update life and updated value status.
|
||||
_life = std::clamp(_life + (_hasValueUpdated ? 1.0f : -1.0f), 0.0f, LIFE_MAX * FPS);
|
||||
_hasValueUpdated = false;
|
||||
|
@ -44,7 +49,7 @@ namespace TEN::Hud
|
|||
void SpeedometerController::Draw() const
|
||||
{
|
||||
constexpr auto POS = Vector2(DISPLAY_SPACE_RES.x - (DISPLAY_SPACE_RES.x / 6), DISPLAY_SPACE_RES.y - (DISPLAY_SPACE_RES.y / 10));
|
||||
constexpr auto ORIENT_OFFSET = ANGLE(90.0f);
|
||||
constexpr auto POINTER_ANGLE_OFFSET = ANGLE(90.0f);
|
||||
constexpr auto SCALE = Vector2(0.35f);
|
||||
constexpr auto DIAL_ELEMENT_SPRITE_ID = 0;
|
||||
constexpr auto POINTER_ELEMENT_SPRITE_ID = 1;
|
||||
|
@ -56,19 +61,22 @@ namespace TEN::Hud
|
|||
if (_life <= 0.0f)
|
||||
return;
|
||||
|
||||
auto color = Color(1.0f, 1.0f, 1.0f, _opacity);
|
||||
short pointerAngle = (short)Lerp(_prevPointerAngle, _pointerAngle, g_Renderer.GetInterpolationFactor());
|
||||
auto color = Color(1.0f, 1.0f, 1.0f, Lerp(_prevOpacity, _opacity, g_Renderer.GetInterpolationFactor()));
|
||||
|
||||
// Draw dial.
|
||||
AddDisplaySprite(
|
||||
ID_SPEEDOMETER, DIAL_ELEMENT_SPRITE_ID,
|
||||
POS, 0, SCALE, color,
|
||||
DIAL_PRIORITY, DisplaySpriteAlignMode::Center, DisplaySpriteScaleMode::Fit, BlendMode::AlphaBlend);
|
||||
DIAL_PRIORITY, DisplaySpriteAlignMode::Center, DisplaySpriteScaleMode::Fit, BlendMode::AlphaBlend,
|
||||
DisplaySpritePhase::Draw);
|
||||
|
||||
// Draw pointer.
|
||||
AddDisplaySprite(
|
||||
ID_SPEEDOMETER, POINTER_ELEMENT_SPRITE_ID,
|
||||
POS, _pointerAngle + ORIENT_OFFSET, SCALE, color,
|
||||
POINTER_PRIORITY, DisplaySpriteAlignMode::Center, DisplaySpriteScaleMode::Fit, BlendMode::AlphaBlend);
|
||||
POS, pointerAngle + POINTER_ANGLE_OFFSET, SCALE, color,
|
||||
POINTER_PRIORITY, DisplaySpriteAlignMode::Center, DisplaySpriteScaleMode::Fit, BlendMode::AlphaBlend,
|
||||
DisplaySpritePhase::Draw);
|
||||
}
|
||||
|
||||
void SpeedometerController::Clear()
|
||||
|
|
|
@ -18,6 +18,15 @@ namespace TEN::Hud
|
|||
float _opacity = 0.0f;
|
||||
float _life = 0.0f;
|
||||
|
||||
short _prevPointerAngle = 0;
|
||||
float _prevOpacity = 0.0f;
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
_prevPointerAngle = _pointerAngle;
|
||||
_prevOpacity = _opacity;
|
||||
}
|
||||
|
||||
public:
|
||||
// Utilities
|
||||
|
||||
|
|
|
@ -74,6 +74,9 @@ namespace TEN::Hud
|
|||
constexpr auto ORIENT_LERP_ALPHA = 0.1f;
|
||||
constexpr auto RADIUS_LERP_ALPHA = 0.2f;
|
||||
|
||||
if (Position.has_value())
|
||||
StoreInterpolationData();
|
||||
|
||||
// Update active status.
|
||||
IsActive = isActive;
|
||||
|
||||
|
@ -133,30 +136,36 @@ namespace TEN::Hud
|
|||
constexpr auto STATIC_ELEMENT_SPRITE_ID = 0;
|
||||
constexpr auto SEGMENT_ELEMENT_SPRITE_ID = 1;
|
||||
constexpr auto PRIORITY = 0; // TODO: Check later. May interfere with Lua display sprites. -- Sezz 2023.10.06
|
||||
constexpr auto ALIGN_MODE = DisplaySpriteAlignMode::Center;
|
||||
constexpr auto SCALE_MODE = DisplaySpriteScaleMode::Fill;
|
||||
constexpr auto BLEND_MODE = BlendMode::Additive;
|
||||
|
||||
if (!Position.has_value())
|
||||
return;
|
||||
|
||||
auto pos0 = Vector2::Lerp(PrevPosition, *Position, g_Renderer.GetInterpolationFactor());
|
||||
short orient0 = PrevOrientation + Geometry::GetShortestAngle(PrevOrientation, Orientation) * g_Renderer.GetInterpolationFactor();
|
||||
float scale = Lerp(PrevScale, Scale, g_Renderer.GetInterpolationFactor());
|
||||
auto color = Color::Lerp(PrevColor, Color, g_Renderer.GetInterpolationFactor());
|
||||
|
||||
// Draw main static element.
|
||||
AddDisplaySprite(
|
||||
SPRITE_SEQUENCE_OBJECT_ID, STATIC_ELEMENT_SPRITE_ID,
|
||||
*Position, Orientation, Vector2(Scale), Color,
|
||||
PRIORITY, ALIGN_MODE, SCALE_MODE, BLEND_MODE);
|
||||
pos0, orient0, Vector2(scale), color,
|
||||
PRIORITY, DisplaySpriteAlignMode::Center, DisplaySpriteScaleMode::Fill,
|
||||
BlendMode::Additive, DisplaySpritePhase::Draw);
|
||||
|
||||
// Draw animated outer segment elements.
|
||||
for (const auto& segment : Segments)
|
||||
for (int i = 0; i < Segments.size(); i++)
|
||||
{
|
||||
auto pos = *Position + segment.PosOffset;
|
||||
short orient = Orientation + segment.OrientOffset;
|
||||
auto scale = Vector2(Scale / 2);
|
||||
const auto& segment = Segments[i];
|
||||
const auto& prevSegment = PrevSegments[i];
|
||||
|
||||
auto pos1 = pos0 + Vector2::Lerp(prevSegment.PosOffset, segment.PosOffset, g_Renderer.GetInterpolationFactor());
|
||||
short orient1 = orient0 + (prevSegment.OrientOffset + (Geometry::GetShortestAngle(prevSegment.OrientOffset, segment.OrientOffset) * g_Renderer.GetInterpolationFactor()));
|
||||
|
||||
AddDisplaySprite(
|
||||
SPRITE_SEQUENCE_OBJECT_ID, SEGMENT_ELEMENT_SPRITE_ID,
|
||||
pos, orient, scale, Color,
|
||||
PRIORITY, ALIGN_MODE, SCALE_MODE, BLEND_MODE);
|
||||
pos1, orient1, Vector2(scale / 2), color,
|
||||
PRIORITY, DisplaySpriteAlignMode::Center, DisplaySpriteScaleMode::Fill,
|
||||
BlendMode::Additive, DisplaySpritePhase::Draw);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,23 +184,23 @@ namespace TEN::Hud
|
|||
|
||||
// Loop over player targets.
|
||||
auto itemNumbers = std::vector<int>{};
|
||||
for (const auto* itemPtr : player.TargetList)
|
||||
for (const auto* item : player.TargetList)
|
||||
{
|
||||
if (itemPtr == nullptr)
|
||||
if (item == nullptr)
|
||||
continue;
|
||||
|
||||
// Collect item number.
|
||||
if (itemPtr->HitPoints != NOT_TARGETABLE)
|
||||
itemNumbers.push_back(itemPtr->Index);
|
||||
if (item->HitPoints != NOT_TARGETABLE)
|
||||
itemNumbers.push_back(item->Index);
|
||||
|
||||
// Find crosshair at item number key.
|
||||
auto it = _crosshairs.find(itemPtr->Index);
|
||||
auto it = _crosshairs.find(item->Index);
|
||||
if (it == _crosshairs.end())
|
||||
continue;
|
||||
|
||||
// Set crosshair as primary or peripheral.
|
||||
auto& crosshair = it->second;
|
||||
if (player.TargetEntity != nullptr && itemPtr->Index == player.TargetEntity->Index)
|
||||
if (player.TargetEntity != nullptr && item->Index == player.TargetEntity->Index)
|
||||
{
|
||||
crosshair.SetPrimary();
|
||||
}
|
||||
|
|
|
@ -36,6 +36,12 @@ namespace TEN::Hud
|
|||
|
||||
std::array<SegmentData, SEGMENT_COUNT> Segments = {};
|
||||
|
||||
Vector2 PrevPosition = Vector2::Zero;
|
||||
short PrevOrientation = 0;
|
||||
float PrevScale = 0.0f;
|
||||
Vector4 PrevColor = Vector4::Zero;
|
||||
std::array<SegmentData, SEGMENT_COUNT> PrevSegments = {};
|
||||
|
||||
// Getters
|
||||
|
||||
float GetScale(float cameraDist) const;
|
||||
|
@ -51,6 +57,15 @@ namespace TEN::Hud
|
|||
|
||||
void Update(const Vector3& targetPos, bool isActive, bool doPulse);
|
||||
void Draw() const;
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevPosition = *Position;
|
||||
PrevOrientation = Orientation;
|
||||
PrevScale = Scale;
|
||||
PrevColor = Color;
|
||||
PrevSegments = Segments;
|
||||
}
|
||||
};
|
||||
|
||||
class TargetHighlighterController
|
||||
|
|
|
@ -59,8 +59,8 @@ using namespace TEN::Gui;
|
|||
|
||||
using TEN::Renderer::g_Renderer;
|
||||
|
||||
LaraInfo Lara = {};
|
||||
ItemInfo* LaraItem;
|
||||
LaraInfo Lara = {};
|
||||
ItemInfo* LaraItem = nullptr;
|
||||
CollisionInfo LaraCollision = {};
|
||||
|
||||
void LaraControl(ItemInfo* item, CollisionInfo* coll)
|
||||
|
@ -356,6 +356,7 @@ void LaraAboveWater(ItemInfo* item, CollisionInfo* coll)
|
|||
coll->Setup.BlockMonkeySwingEdge = false;
|
||||
coll->Setup.EnableObjectPush = true;
|
||||
coll->Setup.EnableSpasm = true;
|
||||
coll->Setup.ForceSolidStatics = false;
|
||||
coll->Setup.PrevPosition = item->Pose.Position;
|
||||
coll->Setup.PrevAnimObjectID = item->Animation.AnimObjectID;
|
||||
coll->Setup.PrevAnimNumber = item->Animation.AnimNumber;
|
||||
|
@ -426,6 +427,7 @@ void LaraWaterSurface(ItemInfo* item, CollisionInfo* coll)
|
|||
coll->Setup.BlockMonkeySwingEdge = false;
|
||||
coll->Setup.EnableObjectPush = true;
|
||||
coll->Setup.EnableSpasm = false;
|
||||
coll->Setup.ForceSolidStatics = false;
|
||||
coll->Setup.PrevPosition = item->Pose.Position;
|
||||
|
||||
// Handle look-around.
|
||||
|
@ -498,6 +500,7 @@ void LaraUnderwater(ItemInfo* item, CollisionInfo* coll)
|
|||
coll->Setup.BlockMonkeySwingEdge = false;
|
||||
coll->Setup.EnableObjectPush = true;
|
||||
coll->Setup.EnableSpasm = false;
|
||||
coll->Setup.ForceSolidStatics = false;
|
||||
coll->Setup.PrevPosition = item->Pose.Position;
|
||||
|
||||
// Handle look-around.
|
||||
|
@ -628,6 +631,7 @@ void UpdateLara(ItemInfo* item, bool isTitle)
|
|||
|
||||
// Control player.
|
||||
InItemControlLoop = true;
|
||||
|
||||
LaraControl(item, &LaraCollision);
|
||||
HandlePlayerFlyCheat(*item);
|
||||
InItemControlLoop = false;
|
||||
|
|
|
@ -93,8 +93,8 @@ constexpr auto WADE_WATER_DEPTH = STEPUP_HEIGHT;
|
|||
constexpr auto SWIM_WATER_DEPTH = CLICK(2.75f);
|
||||
constexpr auto SLOPE_DIFFERENCE = 60;
|
||||
|
||||
extern LaraInfo Lara;
|
||||
extern ItemInfo* LaraItem;
|
||||
extern LaraInfo Lara;
|
||||
extern ItemInfo* LaraItem;
|
||||
extern CollisionInfo LaraCollision;
|
||||
|
||||
void LaraControl(ItemInfo* item, CollisionInfo* coll);
|
||||
|
|
|
@ -507,7 +507,6 @@ void LaraSurfaceCollision(ItemInfo* item, CollisionInfo* coll)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void LaraDefaultCollision(ItemInfo* item, CollisionInfo* coll)
|
||||
{
|
||||
auto& player = GetLaraInfo(*item);
|
||||
|
|
|
@ -146,10 +146,10 @@ void lara_col_hang(ItemInfo* item, CollisionInfo* coll)
|
|||
if (item->Animation.AnimNumber == LA_REACH_TO_HANG ||
|
||||
item->Animation.AnimNumber == LA_HANG_IDLE)
|
||||
{
|
||||
TestForObjectOnLedge(item, coll);
|
||||
|
||||
if (IsHeld(In::Forward))
|
||||
{
|
||||
TestForObjectOnLedge(item, coll);
|
||||
|
||||
if (coll->Front.Floor > -(CLICK(3.5f) - 46) &&
|
||||
TestValidLedge(item, coll) && !coll->HitStatic)
|
||||
{
|
||||
|
|
|
@ -1044,6 +1044,8 @@ void HandlePlayerElevationChange(ItemInfo* item, CollisionInfo* coll)
|
|||
if (CanStepUp(*item, *coll))
|
||||
{
|
||||
item->Animation.TargetState = LS_STEP_UP;
|
||||
item->DisableInterpolation = true;
|
||||
|
||||
if (GetStateDispatch(item, GetAnimData(*item)))
|
||||
{
|
||||
item->Pose.Position.y += coll->Middle.Floor;
|
||||
|
|
|
@ -141,6 +141,7 @@ bool TestLaraHang(ItemInfo* item, CollisionInfo* coll)
|
|||
coll->Setup.UpperFloorBound = -STEPUP_HEIGHT;
|
||||
coll->Setup.LowerCeilingBound = 0;
|
||||
coll->Setup.ForwardAngle = lara->Control.MoveAngle;
|
||||
coll->Setup.ForceSolidStatics = true;
|
||||
|
||||
// When Lara is about to move, use larger embed offset for stabilizing diagonal shimmying)
|
||||
int embedOffset = 4;
|
||||
|
@ -743,14 +744,16 @@ CornerTestResult TestItemAtNextCornerPosition(ItemInfo* item, CollisionInfo* col
|
|||
|
||||
bool TestHangSwingIn(ItemInfo* item, CollisionInfo* coll)
|
||||
{
|
||||
auto* lara = GetLaraInfo(item);
|
||||
int vPos = item->Pose.Position.y;
|
||||
auto pointColl = GetPointCollision(*item, item->Pose.Orientation.y, OFFSET_RADIUS(coll->Setup.Radius) + item->Animation.Velocity.z);
|
||||
|
||||
int y = item->Pose.Position.y;
|
||||
auto probe = GetPointCollision(*item, item->Pose.Orientation.y, OFFSET_RADIUS(coll->Setup.Radius));
|
||||
// 1) Test for wall.
|
||||
if (pointColl.GetFloorHeight() == NO_HEIGHT)
|
||||
return false;
|
||||
|
||||
if ((probe.GetFloorHeight() - y) > 0 &&
|
||||
(probe.GetCeilingHeight() - y) < -CLICK(1.6f) &&
|
||||
probe.GetFloorHeight() != NO_HEIGHT)
|
||||
// 2) Test leg space.
|
||||
if ((pointColl.GetFloorHeight() - vPos) > 0 &&
|
||||
(pointColl.GetCeilingHeight() - vPos) < -CLICK(1.6f))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -924,26 +927,28 @@ bool TestLaraWaterClimbOut(ItemInfo* item, CollisionInfo* coll)
|
|||
if (coll->Middle.Ceiling > -STEPUP_HEIGHT)
|
||||
return false;
|
||||
|
||||
int frontFloor = coll->Front.Floor + LARA_HEIGHT_TREAD;
|
||||
if (coll->Front.Bridge == NO_VALUE &&
|
||||
(frontFloor <= -CLICK(2) ||
|
||||
frontFloor > CLICK(1.25f) - 4))
|
||||
// HACK: Probe at incremetal height steps to account for room stacks. -- Sezz 2024.10.28
|
||||
int frontFloor = NO_HEIGHT;
|
||||
|
||||
bool hasLedge = false;
|
||||
int yOffset = CLICK(1.25f);
|
||||
while (yOffset > -CLICK(2))
|
||||
{
|
||||
return false;
|
||||
auto pointColl = GetPointCollision(*item, item->Pose.Orientation.y, BLOCK(0.2f), yOffset);
|
||||
|
||||
frontFloor = pointColl.GetFloorHeight() - item->Pose.Position.y;
|
||||
if (frontFloor > -CLICK(2) &&
|
||||
frontFloor <= (CLICK(1.25f) - 4))
|
||||
{
|
||||
hasLedge = true;
|
||||
break;
|
||||
}
|
||||
|
||||
yOffset -= CLICK(0.5f);
|
||||
}
|
||||
|
||||
// Extra bridge check.
|
||||
if (coll->Front.Bridge != NO_VALUE)
|
||||
{
|
||||
frontFloor = GetBridgeBorder(g_Level.Items[coll->Front.Bridge], false) - item->Pose.Position.y;
|
||||
|
||||
int bridgeBorder = frontFloor - CLICK(0.5f);
|
||||
if (bridgeBorder <= -CLICK(2) ||
|
||||
bridgeBorder > CLICK(1.25f) - 4)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!hasLedge)
|
||||
return false;
|
||||
|
||||
if (!TestValidLedge(item, coll))
|
||||
return false;
|
||||
|
|
|
@ -79,7 +79,14 @@ ObjectInfo& ObjectHandler::GetFirstAvailableObject()
|
|||
// NOTE: JointRotationFlags allows bones to be rotated with CreatureJoint().
|
||||
void ObjectInfo::SetBoneRotationFlags(int boneID, int flags)
|
||||
{
|
||||
g_Level.Bones[boneIndex + (boneID * 4)] |= flags;
|
||||
int index = boneIndex + (boneID * 4);
|
||||
if (index < 0 || index >= g_Level.Bones.size())
|
||||
{
|
||||
TENLog("Failed to set rotation flag for bone ID " + std::to_string(boneID), LogLevel::Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
g_Level.Bones[index] |= flags;
|
||||
}
|
||||
|
||||
void ObjectInfo::SetHitEffect(HitEffect hitEffect)
|
||||
|
|
|
@ -16,16 +16,16 @@ constexpr auto MAX_STATICS = 1000;
|
|||
|
||||
enum JointRotationFlags
|
||||
{
|
||||
ROT_X = (1 << 2),
|
||||
ROT_Y = (1 << 3),
|
||||
ROT_Z = (1 << 4)
|
||||
ROT_X = 1 << 2,
|
||||
ROT_Y = 1 << 3,
|
||||
ROT_Z = 1 << 4
|
||||
};
|
||||
|
||||
// Unused.
|
||||
enum ShatterFlags
|
||||
{
|
||||
NoCollision = (1 << 0),
|
||||
Shatterable = (1 << 1)
|
||||
NoCollision = 1 << 0,
|
||||
Shatterable = 1 << 1
|
||||
};
|
||||
|
||||
// Custom LOT definition for Creature. Used in InitializeSlot() in lot.cpp.
|
||||
|
@ -39,10 +39,11 @@ enum class LotType
|
|||
HumanPlusJump,
|
||||
HumanPlusJumpAndMonkey,
|
||||
Flyer,
|
||||
Blockable, // For large creatures such as trex and shiva.
|
||||
Spider, // Only 2 block vault allowed.
|
||||
Ape, // Only 2 block vault allowed.
|
||||
SnowmobileGun // Only 1 block vault allowed and 4 block drop max.
|
||||
Blockable, // For large creatures such as trex and shiva.
|
||||
Spider, // Only 2 block vault allowed.
|
||||
Ape, // Only 2 block vault allowed.
|
||||
SnowmobileGun, // Only 1 block vault allowed and 4 block drop max.
|
||||
EnemyJeep
|
||||
};
|
||||
|
||||
enum class HitEffect
|
||||
|
|
|
@ -62,6 +62,8 @@ static void PerformAnimCommands(ItemInfo& item, bool isFrameBased)
|
|||
{
|
||||
UpdateItemRoom(item.Index);
|
||||
}
|
||||
|
||||
item.DisableInterpolation = true;
|
||||
}
|
||||
|
||||
commandDataPtr += 3;
|
||||
|
@ -210,6 +212,13 @@ static void PerformAnimCommands(ItemInfo& item, bool isFrameBased)
|
|||
commandDataPtr += 2;
|
||||
break;
|
||||
|
||||
case AnimCommandType::DisableInterpolation:
|
||||
if (isFrameBased && item.Animation.FrameNumber == commandDataPtr[0])
|
||||
item.DisableInterpolation = true;
|
||||
|
||||
commandDataPtr += 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ enum class AnimCommandType
|
|||
AttackReady,
|
||||
Deactivate,
|
||||
SoundEffect,
|
||||
Flipeffect
|
||||
Flipeffect,
|
||||
DisableInterpolation
|
||||
};
|
||||
|
||||
struct AnimFrame
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "Sound/sound.h"
|
||||
#include "Specific/Input/Input.h"
|
||||
#include "Specific/level.h"
|
||||
|
||||
#include "Specific/winmain.h"
|
||||
|
||||
using namespace TEN::Collision::Point;
|
||||
using namespace TEN::Effects::Environment;
|
||||
|
@ -194,15 +194,8 @@ void LookCamera(ItemInfo& item, const CollisionInfo& coll)
|
|||
|
||||
void LookAt(CAMERA_INFO* cam, short roll)
|
||||
{
|
||||
auto pos = cam->pos.ToVector3();
|
||||
auto target = cam->target.ToVector3();
|
||||
auto up = Vector3::Down;
|
||||
float fov = TO_RAD(CurrentFOV / 1.333333f);
|
||||
float r = TO_RAD(roll);
|
||||
|
||||
float levelFarView = g_GameFlow->GetLevel(CurrentLevel)->GetFarView() * float(BLOCK(1));
|
||||
|
||||
g_Renderer.UpdateCameraMatrices(cam, r, fov, levelFarView);
|
||||
cam->Fov = TO_RAD(CurrentFOV / 1.333333f);
|
||||
cam->Roll = TO_RAD(roll);
|
||||
}
|
||||
|
||||
void AlterFOV(short value, bool store)
|
||||
|
@ -248,13 +241,13 @@ void InitializeCamera()
|
|||
|
||||
Camera.targetDistance = BLOCK(1.5f);
|
||||
Camera.item = nullptr;
|
||||
Camera.numberFrames = 1;
|
||||
Camera.type = CameraType::Chase;
|
||||
Camera.speed = 1;
|
||||
Camera.flags = CF_NONE;
|
||||
Camera.bounce = 0;
|
||||
Camera.number = -1;
|
||||
Camera.fixedCamera = false;
|
||||
Camera.DisableInterpolation = true;
|
||||
|
||||
AlterFOV(ANGLE(DEFAULT_FOV));
|
||||
|
||||
|
@ -1068,6 +1061,28 @@ void ConfirmCameraTargetPos()
|
|||
}
|
||||
}
|
||||
|
||||
// HACK: Temporary fix for camera bouncing on slopes during player death.
|
||||
static bool CalculateDeathCamera(const ItemInfo& item)
|
||||
{
|
||||
// If player is alive, it's not a death camera.
|
||||
if (item.HitPoints > 0)
|
||||
return false;
|
||||
|
||||
// If player is in a special death animation (from EXTRA_ANIMS slot) triggered by enemies.
|
||||
if (item.Animation.AnimObjectID == ID_LARA_EXTRA_ANIMS)
|
||||
return true;
|
||||
|
||||
// Special death animations.
|
||||
if (item.Animation.AnimNumber == LA_SPIKE_DEATH ||
|
||||
item.Animation.AnimNumber == LA_BOULDER_DEATH ||
|
||||
item.Animation.AnimNumber == LA_TRAIN_OVERBOARD_DEATH)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CalculateCamera(const CollisionInfo& coll)
|
||||
{
|
||||
CamOldPos.x = Camera.pos.x;
|
||||
|
@ -1171,7 +1186,6 @@ void CalculateCamera(const CollisionInfo& coll)
|
|||
Lara.ExtraTorsoRot.x = Lara.ExtraHeadRot.x;
|
||||
|
||||
Lara.Control.Look.Orientation = lookOrient;
|
||||
|
||||
Camera.type = CameraType::Look;
|
||||
Camera.item->LookedAt = true;
|
||||
}
|
||||
|
@ -1294,9 +1308,13 @@ void CalculateCamera(const CollisionInfo& coll)
|
|||
|
||||
Camera.fixedCamera = isFixedCamera;
|
||||
Camera.last = Camera.number;
|
||||
Camera.DisableInterpolation = (Camera.DisableInterpolation || Camera.lastType != Camera.type);
|
||||
Camera.lastType = Camera.type;
|
||||
|
||||
if ((Camera.type != CameraType::Heavy || Camera.timer == -1) &&
|
||||
LaraItem->HitPoints > 0)
|
||||
if (CalculateDeathCamera(*LaraItem))
|
||||
return;
|
||||
|
||||
if (Camera.type != CameraType::Heavy || Camera.timer == -1)
|
||||
{
|
||||
Camera.type = CameraType::Chase;
|
||||
Camera.speed = 10;
|
||||
|
@ -1521,8 +1539,57 @@ void ItemsCollideCamera()
|
|||
staticList.clear();
|
||||
}
|
||||
|
||||
void PrepareCamera()
|
||||
{
|
||||
if (TrackCameraInit)
|
||||
{
|
||||
UseSpotCam = false;
|
||||
AlterFOV(LastFOV);
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawPortals()
|
||||
{
|
||||
constexpr auto EXT_COLOR = Color(1.0f, 1.0f, 0.0f, 0.15f);
|
||||
constexpr auto INT_COLOR = Color(1.0f, 0.0f, 0.0f, 0.15f);
|
||||
|
||||
if (!DebugMode)
|
||||
return;
|
||||
|
||||
auto neighborRoomNumbers = GetNeighborRoomNumbers(Camera.pos.RoomNumber, 1);
|
||||
for (auto& roomNumber : neighborRoomNumbers)
|
||||
{
|
||||
const auto& room = g_Level.Rooms[roomNumber];
|
||||
|
||||
auto pos = room.Position.ToVector3();
|
||||
auto color = (roomNumber == Camera.pos.RoomNumber) ? INT_COLOR : EXT_COLOR;
|
||||
|
||||
for (const auto& door : room.doors)
|
||||
{
|
||||
DrawDebugTriangle(door.vertices[0] + pos, door.vertices[1] + pos, door.vertices[2] + pos, color, RendererDebugPage::PortalDebug);
|
||||
DrawDebugTriangle(door.vertices[2] + pos, door.vertices[3] + pos, door.vertices[0] + pos, color, RendererDebugPage::PortalDebug);
|
||||
|
||||
DrawDebugLine(door.vertices[0] + pos, door.vertices[2] + pos, color, RendererDebugPage::PortalDebug);
|
||||
DrawDebugLine(door.vertices[1] + pos, door.vertices[3] + pos, color, RendererDebugPage::PortalDebug);
|
||||
|
||||
auto center = pos + ((door.vertices[0] + door.vertices[1] + door.vertices[2] + door.vertices[3]) / 4);
|
||||
auto target = Geometry::TranslatePoint(center, door.normal, CLICK(1));
|
||||
|
||||
DrawDebugLine(center, target, color, RendererDebugPage::PortalDebug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateCamera()
|
||||
{
|
||||
// HACK: Disable interpolation when switching to/from flyby camera.
|
||||
// When camera structs are converted to a class, this should go to getter/setter. -- Lwmte, 29.10.2024
|
||||
if (UseSpotCam != SpotcamSwitched)
|
||||
{
|
||||
Camera.DisableInterpolation = true;
|
||||
SpotcamSwitched = UseSpotCam;
|
||||
}
|
||||
|
||||
if (UseSpotCam)
|
||||
{
|
||||
// Draw flyby cameras.
|
||||
|
@ -1534,6 +1601,11 @@ void UpdateCamera()
|
|||
TrackCameraInit = false;
|
||||
CalculateCamera(LaraCollision);
|
||||
}
|
||||
|
||||
// Update cameras matrices there, after having done all the possible camera logic.
|
||||
g_Renderer.UpdateCameraMatrices(&Camera, BLOCK(g_GameFlow->GetLevel(CurrentLevel)->GetFarView()));
|
||||
|
||||
DrawPortals();
|
||||
}
|
||||
|
||||
void UpdateMikePos(const ItemInfo& item)
|
||||
|
|
|
@ -24,11 +24,11 @@ struct CAMERA_INFO
|
|||
GameVector target;
|
||||
CameraType type;
|
||||
CameraType oldType;
|
||||
CameraType lastType;
|
||||
int shift;
|
||||
int flags;
|
||||
bool fixedCamera;
|
||||
bool underwater;
|
||||
int numberFrames;
|
||||
int bounce;
|
||||
int targetDistance;
|
||||
short targetAngle;
|
||||
|
@ -46,6 +46,11 @@ struct CAMERA_INFO
|
|||
ItemInfo* lastItem;
|
||||
int mikeAtLara;
|
||||
Vector3i mikePos;
|
||||
|
||||
float Roll = 0.0f;
|
||||
float Fov = 0.0f;
|
||||
|
||||
bool DisableInterpolation = false;
|
||||
};
|
||||
|
||||
struct ObjectCameraInfo
|
||||
|
@ -113,7 +118,9 @@ void SetScreenFadeOut(float speed, bool force = false);
|
|||
void SetScreenFadeIn(float speed, bool force = false);
|
||||
void SetCinematicBars(float height, float speed);
|
||||
void ClearCinematicBars();
|
||||
void PrepareCamera();
|
||||
void UpdateCamera();
|
||||
void DrawPortals();
|
||||
void UpdateFadeScreenAndCinematicBars();
|
||||
void UpdateMikePos(const ItemInfo& item);
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ namespace TEN::Collision::Point
|
|||
public:
|
||||
// Constructors
|
||||
|
||||
PointCollisionData() = default;
|
||||
PointCollisionData(const Vector3i& pos, int roomNumber);
|
||||
|
||||
// Getters
|
||||
|
|
|
@ -109,6 +109,13 @@ CollidedObjectData GetCollidedObjects(ItemInfo& collidingItem, bool onlyVisible,
|
|||
auto collidingSphere = BoundingSphere(collidingBounds.GetCenter() + collidingItem.Pose.Position.ToVector3(), collidingExtents.Length());
|
||||
auto collidingCircle = Vector3(collidingSphere.Center.x, collidingSphere.Center.z, (customRadius > 0.0f) ? customRadius : std::hypot(collidingExtents.x, collidingExtents.z));
|
||||
|
||||
// Convert bounding box to DX bounds.
|
||||
auto convertedBounds = collidingBounds.ToBoundingOrientedBox(collidingItem.Pose);
|
||||
|
||||
// Override extents if specified.
|
||||
if (customRadius > 0.0f)
|
||||
convertedBounds.Extents = Vector3(customRadius);
|
||||
|
||||
// Quickly discard collision if colliding item bounds are below tolerance threshold.
|
||||
if (collidingSphere.Radius <= EXTENTS_LENGTH_MIN)
|
||||
return collObjects;
|
||||
|
@ -185,15 +192,10 @@ CollidedObjectData GetCollidedObjects(ItemInfo& collidingItem, bool onlyVisible,
|
|||
if (!Geometry::CircleIntersects(circle, collidingCircle))
|
||||
continue;
|
||||
|
||||
auto box0 = bounds.ToBoundingOrientedBox(item.Pose);
|
||||
auto box1 = collidingBounds.ToBoundingOrientedBox(collidingItem.Pose);
|
||||
|
||||
// Override extents if specified.
|
||||
if (customRadius > 0.0f)
|
||||
box1.Extents = Vector3(customRadius);
|
||||
auto box = bounds.ToBoundingOrientedBox(item.Pose);
|
||||
|
||||
// Test accurate box intersection.
|
||||
if (box0.Intersects(box1))
|
||||
if (box.Intersects(convertedBounds))
|
||||
collObjects.Items.push_back(&item);
|
||||
}
|
||||
while (itemNumber != NO_VALUE);
|
||||
|
@ -234,15 +236,17 @@ CollidedObjectData GetCollidedObjects(ItemInfo& collidingItem, bool onlyVisible,
|
|||
if (!Geometry::CircleIntersects(circle, collidingCircle))
|
||||
continue;
|
||||
|
||||
auto box0 = bounds.ToBoundingOrientedBox(staticObj.pos.Position);
|
||||
auto box1 = collidingBounds.ToBoundingOrientedBox(collidingItem.Pose);
|
||||
// Skip if either bounding box has any zero extent (not a collidable volume).
|
||||
if (bounds.GetExtents().Length() <= EXTENTS_LENGTH_MIN)
|
||||
continue;
|
||||
|
||||
// Override extents if specified.
|
||||
if (customRadius > 0.0f)
|
||||
box1.Extents = Vector3(customRadius);
|
||||
if (collidingBounds.GetExtents().Length() <= EXTENTS_LENGTH_MIN)
|
||||
continue;
|
||||
|
||||
auto box = bounds.ToBoundingOrientedBox(staticObj.pos.Position);
|
||||
|
||||
// Test accurate box intersection.
|
||||
if (box0.Intersects(box1))
|
||||
if (box.Intersects(convertedBounds))
|
||||
collObjects.Statics.push_back(&staticObj);
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +287,8 @@ bool TestWithGlobalCollisionBounds(ItemInfo* item, ItemInfo* laraItem, Collision
|
|||
|
||||
void TestForObjectOnLedge(ItemInfo* item, CollisionInfo* coll)
|
||||
{
|
||||
int height = GameBoundingBox(item).GetHeight();
|
||||
auto bbox = GameBoundingBox(item).ToBoundingOrientedBox(item->Pose);
|
||||
auto height = (bbox.Center - bbox.Extents).y - CLICK(1);
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
|
@ -292,8 +297,9 @@ void TestForObjectOnLedge(ItemInfo* item, CollisionInfo* coll)
|
|||
|
||||
auto origin = Vector3(
|
||||
item->Pose.Position.x + (sinHeading * (coll->Setup.Radius)),
|
||||
item->Pose.Position.y - (height + CLICK(1)),
|
||||
height,
|
||||
item->Pose.Position.z + (cosHeading * (coll->Setup.Radius)));
|
||||
|
||||
auto mxR = Matrix::CreateFromYawPitchRoll(TO_RAD(coll->Setup.ForwardAngle), 0.0f, 0.0f);
|
||||
auto direction = (Matrix::CreateTranslation(Vector3::UnitZ) * mxR).Translation();
|
||||
|
||||
|
@ -933,6 +939,7 @@ void CollideBridgeItems(ItemInfo& item, CollisionInfo& coll, PointCollisionData&
|
|||
|
||||
void CollideSolidStatics(ItemInfo* item, CollisionInfo* coll)
|
||||
{
|
||||
coll->HitStatic = false;
|
||||
coll->HitTallObject = false;
|
||||
|
||||
for (auto i : g_Level.Rooms[item->RoomNumber].NeighborRoomNumbers)
|
||||
|
@ -942,8 +949,12 @@ void CollideSolidStatics(ItemInfo* item, CollisionInfo* coll)
|
|||
|
||||
for (auto& mesh : g_Level.Rooms[i].mesh)
|
||||
{
|
||||
// Only process meshes which are visible and solid.
|
||||
if (!(mesh.flags & StaticMeshFlags::SM_VISIBLE) || !(mesh.flags & StaticMeshFlags::SM_SOLID))
|
||||
// Only process meshes which are visible.
|
||||
if (!(mesh.flags & StaticMeshFlags::SM_VISIBLE))
|
||||
continue;
|
||||
|
||||
// Only process meshes which are solid, or if solid mode is set by the setup.
|
||||
if (!coll->Setup.ForceSolidStatics && !(mesh.flags & StaticMeshFlags::SM_SOLID))
|
||||
continue;
|
||||
|
||||
float distance = Vector3i::Distance(item->Pose.Position, mesh.pos.Position);
|
||||
|
@ -1863,9 +1874,10 @@ void DoObjectCollision(ItemInfo* item, CollisionInfo* coll)
|
|||
if (linkItem.HitPoints <= 0 || linkItem.HitPoints == NOT_TARGETABLE)
|
||||
continue;
|
||||
|
||||
if (isHarmless || abs(item->Animation.Velocity.z) < VEHICLE_COLLISION_TERMINAL_VELOCITY)
|
||||
if (isHarmless || abs(item->Animation.Velocity.z) < VEHICLE_COLLISION_TERMINAL_VELOCITY ||
|
||||
object.damageType == DamageMode::None)
|
||||
{
|
||||
// If vehicle is harmless or speed is too low, just push enemy.
|
||||
// If vehicle is harmless, enemy is non-damageable, or speed is too low, push enemy.
|
||||
ItemPushItem(&linkItem, item, coll, false, 0);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -80,8 +80,9 @@ struct CollisionSetupData
|
|||
bool BlockMonkeySwingEdge = false;
|
||||
|
||||
// Inquirers
|
||||
bool EnableObjectPush = false;
|
||||
bool EnableSpasm = false;
|
||||
bool EnableObjectPush = false;
|
||||
bool EnableSpasm = false;
|
||||
bool ForceSolidStatics = false;
|
||||
|
||||
// Previous parameters
|
||||
Vector3i PrevPosition = Vector3i::Zero;
|
||||
|
|
|
@ -19,6 +19,23 @@ using namespace TEN::Math;
|
|||
using namespace TEN::Utils;
|
||||
using namespace TEN::Renderer;
|
||||
|
||||
constexpr auto BRIDGE_CACHE_SIZE = 20;
|
||||
|
||||
struct BridgeCacheEntry
|
||||
{
|
||||
int BridgeItemNumber = 0;
|
||||
Pose BridgePose = Pose::Zero;
|
||||
|
||||
bool UseBottomHeight = false;
|
||||
Vector3i Position = Vector3i::Zero;
|
||||
std::optional<int> Height = std::nullopt;
|
||||
};
|
||||
|
||||
// NOTE: Caching most recent bridge data saves up to 30% CPU time spent in GetBridgeItemIntersect(),
|
||||
// as player collision checks tend to repeat probing in same places multiple times.
|
||||
auto BridgeCache = std::array<BridgeCacheEntry, BRIDGE_CACHE_SIZE>{};
|
||||
int BridgeCacheSlotID = 0;
|
||||
|
||||
int FloorInfo::GetSurfaceTriangleID(int x, int z, bool isFloor) const
|
||||
{
|
||||
constexpr auto TRI_ID_0 = 0;
|
||||
|
@ -202,18 +219,27 @@ int FloorInfo::GetSurfaceHeight(const Vector3i& pos, bool isFloor) const
|
|||
const auto& bridgeItem = g_Level.Items[itemNumber];
|
||||
const auto& bridge = GetBridgeObject(bridgeItem);
|
||||
|
||||
auto bridgeFloorHeight = bridge.GetFloorHeight(bridgeItem, pos);
|
||||
auto bridgeCeilingHeight = bridge.GetCeilingHeight(bridgeItem, pos);
|
||||
|
||||
// 2.1) Get bridge surface height.
|
||||
auto bridgeSurfaceHeight = isFloor ? bridge.GetFloorHeight(bridgeItem, pos) : bridge.GetCeilingHeight(bridgeItem, pos);
|
||||
|
||||
if (!bridgeSurfaceHeight.has_value())
|
||||
continue;
|
||||
|
||||
// Use bridge midpoint to decide whether to return bridge height or room height, in case probe point
|
||||
// is located within the bridge. Without it, dynamic bridges may fail while Lara is standing on them.
|
||||
int thickness = bridge.GetCeilingBorder(bridgeItem) - bridge.GetFloorBorder(bridgeItem);
|
||||
int midpoint = bridgeItem.Pose.Position.y + thickness / 2;
|
||||
|
||||
// 2.2) Track closest floor or ceiling height.
|
||||
if (isFloor)
|
||||
{
|
||||
// Test if bridge floor height is closer.
|
||||
if (*bridgeSurfaceHeight >= pos.y && // Bridge floor height is below position.
|
||||
*bridgeSurfaceHeight < floorHeight && // Bridge floor height is above current closest floor height.
|
||||
*bridgeSurfaceHeight >= ceilingHeight) // Bridge ceiling height is below sector ceiling height.
|
||||
if (midpoint >= pos.y && // Bridge midpoint is below position.
|
||||
*bridgeSurfaceHeight < floorHeight && // Bridge floor height is above current closest floor height.
|
||||
*bridgeSurfaceHeight >= ceilingHeight) // Bridge ceiling height is below sector ceiling height.
|
||||
{
|
||||
floorHeight = *bridgeSurfaceHeight;
|
||||
}
|
||||
|
@ -221,7 +247,7 @@ int FloorInfo::GetSurfaceHeight(const Vector3i& pos, bool isFloor) const
|
|||
else
|
||||
{
|
||||
// Test if bridge ceiling height is closer.
|
||||
if (*bridgeSurfaceHeight <= pos.y && // Bridge ceiling height is above position.
|
||||
if (midpoint <= pos.y && // Bridge midpoint is above position.
|
||||
*bridgeSurfaceHeight > ceilingHeight && // Bridge ceiling height is below current closest ceiling height.
|
||||
*bridgeSurfaceHeight <= floorHeight) // Bridge floor height is above sector floor height.
|
||||
{
|
||||
|
@ -782,6 +808,7 @@ namespace TEN::Collision::Floordata
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Load anim frame AABBs as DX BoundingBox objects and do regular ray test for gain of 3-5 frames. -- Sezz 2024.11.07
|
||||
// Get precise floor/ceiling height from object's bounding box.
|
||||
// Animated objects are also supported, although horizontal collision shifting is unstable.
|
||||
// Method: get accurate bounds in world transform by converting to OBB, then do a ray test
|
||||
|
@ -790,17 +817,58 @@ namespace TEN::Collision::Floordata
|
|||
{
|
||||
constexpr auto VERTICAL_MARGIN = 4;
|
||||
|
||||
auto box = GameBoundingBox(&item).ToBoundingOrientedBox(item.Pose);
|
||||
|
||||
auto origin = Vector3(pos.x, pos.y + (useBottomHeight ? VERTICAL_MARGIN : -VERTICAL_MARGIN), pos.z);
|
||||
auto dir = useBottomHeight ? -Vector3::UnitY : Vector3::UnitY;
|
||||
// Check bridge cache for existing entry.
|
||||
for (const auto& entry : BridgeCache)
|
||||
{
|
||||
if (entry.BridgeItemNumber == item.Index && entry.BridgePose == item.Pose &&
|
||||
entry.UseBottomHeight == useBottomHeight && entry.Position == pos)
|
||||
{
|
||||
return entry.Height;
|
||||
}
|
||||
}
|
||||
|
||||
// Ray intersects box; return bridge box height.
|
||||
float dist = 0.0f;
|
||||
if (box.Intersects(origin, dir, dist))
|
||||
return Geometry::TranslatePoint(origin, dir, dist).y;
|
||||
auto box = GameBoundingBox(&item);
|
||||
auto extents = box.GetExtents();
|
||||
|
||||
return std::nullopt;
|
||||
// Test rough circle intersection to discard bridges not intersecting on XZ plane.
|
||||
auto circle1 = Vector3(pos.x, pos.z, BLOCK(1));
|
||||
auto circle2 = Vector3(item.Pose.Position.x, item.Pose.Position.z, std::hypot(extents.x, extents.z));
|
||||
|
||||
auto height = std::optional<int>();
|
||||
if (Geometry::CircleIntersects(circle1, circle2))
|
||||
{
|
||||
auto origin = Vector3i(pos.x, pos.y + (useBottomHeight ? VERTICAL_MARGIN : -VERTICAL_MARGIN), pos.z) - item.Pose.Position;
|
||||
|
||||
float sinAngle = phd_sin(-item.Pose.Orientation.y);
|
||||
float cosAngle = phd_cos(-item.Pose.Orientation.y);
|
||||
|
||||
auto localOrigin = Vector3i(
|
||||
(origin.x * cosAngle) - (origin.z * sinAngle),
|
||||
origin.y,
|
||||
(origin.x * sinAngle) + (origin.z * cosAngle));
|
||||
|
||||
// Calculate intersection distance.
|
||||
auto direction = useBottomHeight ? -Vector3::UnitY : Vector3::UnitY;
|
||||
float targetY = useBottomHeight ? box.Y2 : box.Y1;
|
||||
float dist = (targetY - localOrigin.y) / direction.y;
|
||||
|
||||
// Compute intersection point.
|
||||
auto intersectionPoint = Geometry::TranslatePoint(localOrigin, direction, dist);
|
||||
|
||||
// Check if intersection point is within bounding box's X and Z extents.
|
||||
if (intersectionPoint.x >= box.X1 && intersectionPoint.x <= box.X2 &&
|
||||
intersectionPoint.z >= box.Z1 && intersectionPoint.z <= box.Z2)
|
||||
{
|
||||
// Transform intersection point back to world coordinates.
|
||||
height = item.Pose.Position.y + intersectionPoint.y;
|
||||
}
|
||||
}
|
||||
|
||||
// Cache bridge data.
|
||||
BridgeCache[BridgeCacheSlotID] = BridgeCacheEntry{ item.Index, item.Pose, useBottomHeight, pos, height };
|
||||
BridgeCacheSlotID = (BridgeCacheSlotID + 1) % BRIDGE_CACHE_SIZE; // Wrap to next slot ID.
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
// Gets bridge min or max height regardless of actual X/Z world position.
|
||||
|
@ -909,6 +977,9 @@ namespace TEN::Collision::Floordata
|
|||
constexpr auto ACTIVATOR_MINECART_LEFT_COLOR = Vector4(1.0f, 0.4f, 1.0f, 1.0f);
|
||||
constexpr auto MINECART_STOP_COLOR = Vector4(0.4f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
if (g_Renderer.GetCurrentDebugPage() != RendererDebugPage::CollisionStats)
|
||||
return;
|
||||
|
||||
// Get point collision.
|
||||
auto pointColl = GetPointCollision(item);
|
||||
auto pos = item.Pose.Position.ToVector3();
|
||||
|
|
|
@ -1297,11 +1297,15 @@ void GetAITarget(CreatureInfo* creature)
|
|||
{
|
||||
auto* enemy = creature->Enemy;
|
||||
|
||||
short enemyObjectNumber;
|
||||
int enemyObjectID = 0;
|
||||
if (enemy)
|
||||
enemyObjectNumber = enemy->ObjectNumber;
|
||||
{
|
||||
enemyObjectID = enemy->ObjectNumber;
|
||||
}
|
||||
else
|
||||
enemyObjectNumber = NO_VALUE;
|
||||
{
|
||||
enemyObjectID = NO_VALUE;
|
||||
}
|
||||
|
||||
auto* item = &g_Level.Items[creature->ItemNumber];
|
||||
|
||||
|
@ -1329,12 +1333,12 @@ void GetAITarget(CreatureInfo* creature)
|
|||
}
|
||||
else if (!creature->Patrol)
|
||||
{
|
||||
if (enemyObjectNumber != ID_AI_PATROL1)
|
||||
FindAITargetObject(creature, ID_AI_PATROL1);
|
||||
if (enemyObjectID != ID_AI_PATROL1)
|
||||
FindAITargetObject(*item, ID_AI_PATROL1);
|
||||
}
|
||||
else if (enemyObjectNumber != ID_AI_PATROL2)
|
||||
else if (enemyObjectID != ID_AI_PATROL2)
|
||||
{
|
||||
FindAITargetObject(creature, ID_AI_PATROL2);
|
||||
FindAITargetObject(*item, ID_AI_PATROL2);
|
||||
}
|
||||
else if (abs(enemy->Pose.Position.x - item->Pose.Position.x) < REACHED_GOAL_RADIUS &&
|
||||
abs(enemy->Pose.Position.y - item->Pose.Position.y) < REACHED_GOAL_RADIUS &&
|
||||
|
@ -1350,8 +1354,8 @@ void GetAITarget(CreatureInfo* creature)
|
|||
// First if was removed probably after TR3 and was it used by monkeys?
|
||||
/*if (!(item->aiBits & MODIFY) && !creature->hurtByLara)
|
||||
creature->enemy = LaraItem;
|
||||
else*/ if (enemyObjectNumber != ID_AI_AMBUSH)
|
||||
FindAITargetObject(creature, ID_AI_AMBUSH);
|
||||
else*/ if (enemyObjectID != ID_AI_AMBUSH)
|
||||
FindAITargetObject(*item, ID_AI_AMBUSH);
|
||||
/*else if (item->objectNumber == ID_MONKEY)
|
||||
return;*/
|
||||
else if (abs(enemy->Pose.Position.x - item->Pose.Position.x) < REACHED_GOAL_RADIUS &&
|
||||
|
@ -1362,6 +1366,7 @@ void GetAITarget(CreatureInfo* creature)
|
|||
creature->ReachedGoal = true;
|
||||
creature->Enemy = LaraItem;
|
||||
item->AIBits &= ~(AMBUSH /* | MODIFY*/);
|
||||
|
||||
if (item->AIBits != MODIFY)
|
||||
{
|
||||
item->AIBits |= GUARD;
|
||||
|
@ -1381,9 +1386,9 @@ void GetAITarget(CreatureInfo* creature)
|
|||
{
|
||||
item->AIBits &= ~FOLLOW;
|
||||
}
|
||||
else if (enemyObjectNumber != ID_AI_FOLLOW)
|
||||
else if (enemyObjectID != ID_AI_FOLLOW)
|
||||
{
|
||||
FindAITargetObject(creature, ID_AI_FOLLOW);
|
||||
FindAITargetObject(*item, ID_AI_FOLLOW);
|
||||
}
|
||||
else if (abs(enemy->Pose.Position.x - item->Pose.Position.x) < REACHED_GOAL_RADIUS &&
|
||||
abs(enemy->Pose.Position.y - item->Pose.Position.y) < REACHED_GOAL_RADIUS &&
|
||||
|
@ -1393,17 +1398,18 @@ void GetAITarget(CreatureInfo* creature)
|
|||
item->AIBits &= ~FOLLOW;
|
||||
}
|
||||
}
|
||||
/*else if (item->objectNumber == ID_MONKEY && item->carriedItem == NO_VALUE)
|
||||
|
||||
/*else if (item->ObjectNumber == ID_MONKEY && item->CarriedItem == NO_VALUE)
|
||||
{
|
||||
if (item->aiBits != MODIFY)
|
||||
if (item->AIBits != MODIFY)
|
||||
{
|
||||
if (enemyObjectNumber != ID_SMALLMEDI_ITEM)
|
||||
FindAITargetObject(creature, ID_SMALLMEDI_ITEM);
|
||||
if (enemyObjectID != ID_SMALLMEDI_ITEM)
|
||||
FindAITargetObject(*item, ID_SMALLMEDI_ITEM);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (enemyObjectNumber != ID_KEY_ITEM4)
|
||||
FindAITargetObject(creature, ID_KEY_ITEM4);
|
||||
if (enemyObjectID != ID_KEY_ITEM4)
|
||||
FindAITargetObject(*item, ID_KEY_ITEM4);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -1432,69 +1438,101 @@ void FindAITarget(CreatureInfo* creature, short objectNumber)
|
|||
}
|
||||
}
|
||||
|
||||
void FindAITargetObject(CreatureInfo* creature, int objectNumber)
|
||||
void FindAITargetObject(ItemInfo& item, GAME_OBJECT_ID objectID, std::optional<int> ocb, std::optional<bool> checkSameZone)
|
||||
{
|
||||
const auto& item = g_Level.Items[creature->ItemNumber];
|
||||
auto& creature = *GetCreatureInfo(&item);
|
||||
|
||||
FindAITargetObject(creature, objectNumber, item.ItemFlags[3], true);
|
||||
auto data = AITargetData{};
|
||||
data.CheckDistance = false;
|
||||
data.CheckOcb = ocb.has_value();
|
||||
data.ObjectID = objectID;
|
||||
data.Ocb = ocb.value_or(item.ItemFlags[3]);
|
||||
data.CheckSameZone = checkSameZone.value_or(true);
|
||||
|
||||
if (FindAITargetObject(item, data))
|
||||
{
|
||||
*creature.AITarget = data.FoundItem;
|
||||
creature.Enemy = creature.AITarget;
|
||||
}
|
||||
}
|
||||
|
||||
void FindAITargetObject(CreatureInfo* creature, int objectNumber, int ocb, bool checkSameZone)
|
||||
bool FindAITargetObject(ItemInfo& item, AITargetData& data)
|
||||
{
|
||||
auto& item = g_Level.Items[creature->ItemNumber];
|
||||
|
||||
if (g_Level.AIObjects.empty())
|
||||
return;
|
||||
return false;
|
||||
|
||||
AI_OBJECT* foundObject = nullptr;
|
||||
auto& creature = *GetCreatureInfo(&item);
|
||||
|
||||
for (auto& aiObject : g_Level.AIObjects)
|
||||
const AI_OBJECT* foundAIObject = nullptr;
|
||||
|
||||
for (const auto& aiObject : g_Level.AIObjects)
|
||||
{
|
||||
if (aiObject.objectNumber == objectNumber &&
|
||||
aiObject.triggerFlags == ocb &&
|
||||
aiObject.roomNumber != NO_VALUE)
|
||||
// Check if object IDs match.
|
||||
if (aiObject.objectNumber != data.ObjectID)
|
||||
continue;
|
||||
|
||||
// Check if room is valid.
|
||||
if (aiObject.roomNumber == NO_VALUE)
|
||||
continue;
|
||||
|
||||
// Check if distance is valid.
|
||||
if (data.CheckDistance)
|
||||
{
|
||||
int* zone = g_Level.Zones[(int)creature->LOT.Zone][(int)FlipStatus].data();
|
||||
if (Vector3i::Distance(item.Pose.Position, aiObject.pos.Position) > data.DistanceMax)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if OCBs match (useful for pathfinding).
|
||||
if (data.CheckOcb)
|
||||
{
|
||||
if (aiObject.triggerFlags != data.Ocb)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if zone IDs match.
|
||||
if (data.CheckSameZone)
|
||||
{
|
||||
int* zone = g_Level.Zones[(int)creature.LOT.Zone][(int)FlipStatus].data();
|
||||
auto* room = &g_Level.Rooms[item.RoomNumber];
|
||||
|
||||
item.BoxNumber = GetSector(room, item.Pose.Position.x - room->Position.x, item.Pose.Position.z - room->Position.z)->PathfindingBoxID;
|
||||
// NOTE: Avoid changing box ID of item or AI item so a local variable isn't required when searching for AI object near it.
|
||||
int boxID = GetSector(room, item.Pose.Position.x - room->Position.x, item.Pose.Position.z - room->Position.z)->PathfindingBoxID;
|
||||
room = &g_Level.Rooms[aiObject.roomNumber];
|
||||
aiObject.boxNumber = GetSector(room, aiObject.pos.Position.x - room->Position.x, aiObject.pos.Position.z - room->Position.z)->PathfindingBoxID;
|
||||
int aiBoxID = GetSector(room, aiObject.pos.Position.x - room->Position.x, aiObject.pos.Position.z - room->Position.z)->PathfindingBoxID;
|
||||
|
||||
if (item.BoxNumber == NO_VALUE || aiObject.boxNumber == NO_VALUE)
|
||||
return;
|
||||
// Box is invalid or zones don't match; continue.
|
||||
if (boxID == NO_VALUE || aiBoxID == NO_VALUE)
|
||||
continue;
|
||||
|
||||
if (checkSameZone && (zone[item.BoxNumber] != zone[aiObject.boxNumber]))
|
||||
return;
|
||||
|
||||
// Don't check for same zone. Needed for Sophia Leigh.
|
||||
foundObject = &aiObject;
|
||||
// Zone is invalid; continue.
|
||||
if (zone[boxID] != zone[aiBoxID])
|
||||
continue;
|
||||
}
|
||||
|
||||
// HACK: Don't check for matching zone. Needed for Sophia Leigh.
|
||||
foundAIObject = &aiObject;
|
||||
}
|
||||
|
||||
if (foundObject == nullptr)
|
||||
return;
|
||||
if (foundAIObject == nullptr)
|
||||
return false;
|
||||
|
||||
auto& aiItem = *creature->AITarget;
|
||||
auto aiItem = ItemInfo{};
|
||||
aiItem.ObjectNumber = foundAIObject->objectNumber;
|
||||
aiItem.RoomNumber = foundAIObject->roomNumber;
|
||||
aiItem.Pose.Position = foundAIObject->pos.Position;
|
||||
aiItem.Pose.Orientation.y = foundAIObject->pos.Orientation.y;
|
||||
aiItem.Flags = foundAIObject->flags;
|
||||
aiItem.TriggerFlags = foundAIObject->triggerFlags;
|
||||
aiItem.BoxNumber = foundAIObject->boxNumber;
|
||||
|
||||
creature->Enemy = &aiItem;
|
||||
|
||||
aiItem.ObjectNumber = foundObject->objectNumber;
|
||||
aiItem.RoomNumber = foundObject->roomNumber;
|
||||
aiItem.Pose.Position = foundObject->pos.Position;
|
||||
aiItem.Pose.Orientation.y = foundObject->pos.Orientation.y;
|
||||
aiItem.Flags = foundObject->flags;
|
||||
aiItem.TriggerFlags = foundObject->triggerFlags;
|
||||
aiItem.BoxNumber = foundObject->boxNumber;
|
||||
|
||||
if (!(creature->AITarget->Flags & ItemFlags::IFLAG_TRIGGERED))
|
||||
if (!(aiItem.Flags & IFLAG_TRIGGERED))
|
||||
{
|
||||
float sinY = phd_sin(creature->AITarget->Pose.Orientation.y);
|
||||
float cosY = phd_cos(creature->AITarget->Pose.Orientation.y);
|
||||
|
||||
creature->AITarget->Pose.Position.x += CLICK(1) * sinY;
|
||||
creature->AITarget->Pose.Position.z += CLICK(1) * cosY;
|
||||
aiItem.Pose.Position.x += CLICK(1) * phd_sin(aiItem.Pose.Orientation.y);
|
||||
aiItem.Pose.Position.z += CLICK(1) * phd_cos(aiItem.Pose.Orientation.y);
|
||||
}
|
||||
|
||||
data.FoundItem = aiItem;
|
||||
return true;
|
||||
}
|
||||
|
||||
int TargetReachable(ItemInfo* item, ItemInfo* enemy)
|
||||
|
|
|
@ -83,10 +83,23 @@ constexpr auto CLIP_ALL = (CLIP_LEFT | CLIP_RIGHT | CLIP_TOP | CLIP_BOTTOM);
|
|||
|
||||
constexpr auto CLIP_SECONDARY = 0x10;
|
||||
|
||||
struct AITargetData
|
||||
{
|
||||
ItemInfo FoundItem = {};
|
||||
GAME_OBJECT_ID ObjectID = GAME_OBJECT_ID::ID_NO_OBJECT;
|
||||
float DistanceMax = 0.0f;
|
||||
int Ocb = NO_VALUE;
|
||||
|
||||
bool CheckDistance = false;
|
||||
bool CheckSameZone = true;
|
||||
bool CheckOcb = false;
|
||||
};
|
||||
|
||||
void GetCreatureMood(ItemInfo* item, AI_INFO* AI, bool isViolent);
|
||||
void CreatureMood(ItemInfo* item, AI_INFO* AI, bool isViolent);
|
||||
void FindAITargetObject(CreatureInfo* creature, int objectNumber);
|
||||
void FindAITargetObject(CreatureInfo* creature, int objectNumber, int ocb, bool checkSameZone = true);
|
||||
void FindAITargetObject(ItemInfo& item, GAME_OBJECT_ID objectID, std::optional<int> ocb = std::nullopt, std::optional<bool> checkSameZone = std::nullopt);
|
||||
bool FindAITargetObject(ItemInfo& item, AITargetData& data);
|
||||
|
||||
void GetAITarget(CreatureInfo* creature);
|
||||
int CreatureVault(short itemNumber, short angle, int vault, int shift);
|
||||
bool MoveCreature3DPos(Pose* fromPose, Pose* toPose, int velocity, short angleDif, int angleAdd);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "framework.h"
|
||||
#include "Game/control/control.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <process.h>
|
||||
#include <filesystem>
|
||||
|
||||
#include "Game/camera.h"
|
||||
#include "Game/collision/collide_room.h"
|
||||
|
@ -39,6 +39,7 @@
|
|||
#include "Game/Setup.h"
|
||||
#include "Game/spotcam.h"
|
||||
#include "Math/Math.h"
|
||||
#include "Objects/Effects/LensFlare.h"
|
||||
#include "Objects/Effects/tr4_locusts.h"
|
||||
#include "Objects/Generic/Object/objects.h"
|
||||
#include "Objects/Generic/Object/rope.h"
|
||||
|
@ -59,7 +60,6 @@
|
|||
#include "Specific/Input/Input.h"
|
||||
#include "Specific/level.h"
|
||||
#include "Specific/winmain.h"
|
||||
#include "Game/Lara/lara_initialise.h"
|
||||
|
||||
using namespace std::chrono;
|
||||
using namespace TEN::Effects;
|
||||
|
@ -87,6 +87,11 @@ using namespace TEN::Hud;
|
|||
using namespace TEN::Input;
|
||||
using namespace TEN::Math;
|
||||
using namespace TEN::Renderer;
|
||||
using namespace TEN::Entities::Creatures::TR3;
|
||||
using namespace TEN::Entities::Effects;
|
||||
|
||||
constexpr auto DEATH_NO_INPUT_TIMEOUT = 10 * FPS;
|
||||
constexpr auto DEATH_INPUT_TIMEOUT = 3 * FPS;
|
||||
|
||||
int GameTimer = 0;
|
||||
int GlobalCounter = 0;
|
||||
|
@ -112,64 +117,116 @@ short NextFxFree;
|
|||
|
||||
int ControlPhaseTime;
|
||||
|
||||
int DrawPhase(bool isTitle)
|
||||
void DrawPhase(bool isTitle, float interpolationFactor)
|
||||
{
|
||||
if (isTitle)
|
||||
{
|
||||
g_Renderer.RenderTitle();
|
||||
g_Renderer.RenderTitle(interpolationFactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Renderer.Render();
|
||||
g_Renderer.Render(interpolationFactor);
|
||||
}
|
||||
|
||||
// Clear display sprites.
|
||||
ClearDisplaySprites();
|
||||
|
||||
Camera.numberFrames = g_Renderer.Synchronize();
|
||||
return Camera.numberFrames;
|
||||
g_Renderer.Lock();
|
||||
}
|
||||
|
||||
GameStatus ControlPhase(int numFrames)
|
||||
GameStatus ControlPhase(bool insideMenu)
|
||||
{
|
||||
auto time1 = std::chrono::high_resolution_clock::now();
|
||||
|
||||
bool isTitle = (CurrentLevel == 0);
|
||||
|
||||
g_Renderer.PrepareScene();
|
||||
g_Renderer.SaveOldState();
|
||||
|
||||
ClearFires();
|
||||
ClearLensFlares();
|
||||
ClearAllDisplaySprites();
|
||||
|
||||
SetupInterpolation();
|
||||
PrepareCamera();
|
||||
|
||||
RegeneratePickups();
|
||||
|
||||
numFrames = std::clamp(numFrames, 0, 10);
|
||||
|
||||
if (TrackCameraInit)
|
||||
{
|
||||
UseSpotCam = false;
|
||||
AlterFOV(LastFOV);
|
||||
}
|
||||
|
||||
g_GameStringsHandler->ProcessDisplayStrings(DELTA_TIME);
|
||||
|
||||
bool isFirstTime = true;
|
||||
static int framesCount = 0;
|
||||
|
||||
for (framesCount += numFrames; framesCount > 0; framesCount -= LOOP_FRAME_COUNT)
|
||||
// Controls are polled before OnLoop to allow input data to be overwritten by script API methods.
|
||||
HandleControls(isTitle);
|
||||
|
||||
// Pre-loop script and event handling.
|
||||
g_GameScript->OnLoop(DELTA_TIME, false); // TODO: Don't use DELTA_TIME constant with high framerate.
|
||||
HandleAllGlobalEvents(EventType::Loop, (Activator)LaraItem->Index);
|
||||
|
||||
// Control lock is processed after handling scripts because builder may want to process input externally while locking player from input.
|
||||
if (!isTitle && Lara.Control.IsLocked)
|
||||
ClearAllActions();
|
||||
|
||||
// Item update should happen before camera update, so potential flyby/track camera triggers are processed correctly.
|
||||
UpdateAllItems();
|
||||
UpdateAllEffects();
|
||||
UpdateLara(LaraItem, isTitle);
|
||||
g_GameScriptEntities->TestCollidingObjects();
|
||||
|
||||
// Smash shatters and clear stopper flags under them.
|
||||
UpdateShatters();
|
||||
|
||||
// Clear last selected item in inventory (must be after on loop event handling, so they can detect that).
|
||||
g_Gui.CancelInventorySelection();
|
||||
|
||||
// Control lock is processed after handling scripts because builder may want to
|
||||
// process input externally while locking player from input.
|
||||
if (!isTitle && Lara.Control.IsLocked)
|
||||
ClearAllActions();
|
||||
|
||||
// Update weather.
|
||||
Weather.Update();
|
||||
|
||||
// Update effects.
|
||||
StreamerEffect.Update();
|
||||
UpdateWibble();
|
||||
UpdateSparks();
|
||||
UpdateFireSparks();
|
||||
UpdateSmoke();
|
||||
UpdateBlood();
|
||||
UpdateBubbles();
|
||||
UpdateDebris();
|
||||
UpdateGunShells();
|
||||
UpdateFootprints();
|
||||
UpdateSplashes();
|
||||
UpdateElectricityArcs();
|
||||
UpdateHelicalLasers();
|
||||
UpdateDrips();
|
||||
UpdateRats();
|
||||
UpdateRipples();
|
||||
UpdateBats();
|
||||
UpdateSpiders();
|
||||
UpdateSparkParticles();
|
||||
UpdateSmokeParticles();
|
||||
UpdateSimpleParticles();
|
||||
UpdateExplosionParticles();
|
||||
UpdateShockwaves();
|
||||
UpdateBeetleSwarm();
|
||||
UpdateLocusts();
|
||||
UpdateUnderwaterBloodParticles();
|
||||
UpdateFishSwarm();
|
||||
UpdateGlobalLensFlare();
|
||||
|
||||
// Update HUD.
|
||||
g_Hud.Update(*LaraItem);
|
||||
UpdateFadeScreenAndCinematicBars();
|
||||
|
||||
// Rumble screen (like in submarine level of TRC).
|
||||
if (g_GameFlow->GetLevel(CurrentLevel)->Rumble)
|
||||
RumbleScreen();
|
||||
|
||||
DoFlipEffect(FlipEffect, LaraItem);
|
||||
|
||||
PlaySoundSources();
|
||||
Sound_UpdateScene();
|
||||
|
||||
// Handle inventory, pause, load, save screens.
|
||||
if (!insideMenu)
|
||||
{
|
||||
// Controls are polled before OnLoop, so input data could be
|
||||
// overwritten by script API methods.
|
||||
HandleControls(isTitle);
|
||||
|
||||
// Pre-loop script and event handling.
|
||||
g_GameScript->OnLoop(DELTA_TIME, false); // TODO: Don't use DELTA_TIME constant with variable framerate
|
||||
HandleAllGlobalEvents(EventType::Loop, (Activator)LaraItem->Index);
|
||||
|
||||
// Clear last selected item in inventory (need to be after on loop event handling, so they can detect that).
|
||||
g_Gui.CancelInventorySelection();
|
||||
|
||||
// Control lock is processed after handling scripts, because builder may want to
|
||||
// process input externally, while still locking Lara from input.
|
||||
if (!isTitle && Lara.Control.IsLocked)
|
||||
ClearAllActions();
|
||||
|
||||
// Handle inventory / pause / load / save screens.
|
||||
auto result = HandleMenuCalls(isTitle);
|
||||
if (result != GameStatus::Normal)
|
||||
return result;
|
||||
|
@ -178,111 +235,48 @@ GameStatus ControlPhase(int numFrames)
|
|||
result = HandleGlobalInputEvents(isTitle);
|
||||
if (result != GameStatus::Normal)
|
||||
return result;
|
||||
|
||||
// Queued input actions are read again and cleared after UI
|
||||
// interrupts are processed, so first frame after exiting UI
|
||||
// will still register it.
|
||||
ApplyActionQueue();
|
||||
ClearActionQueue();
|
||||
|
||||
UpdateCamera();
|
||||
UpdateAllItems();
|
||||
UpdateAllEffects();
|
||||
UpdateLara(LaraItem, isTitle);
|
||||
|
||||
g_GameScriptEntities->TestCollidingObjects();
|
||||
|
||||
// Smash shatters and clear stopper flags under them.
|
||||
UpdateShatters();
|
||||
|
||||
// Update weather.
|
||||
Weather.Update();
|
||||
|
||||
// Update effects.
|
||||
UpdateWibble();
|
||||
StreamerEffect.Update();
|
||||
UpdateSparks();
|
||||
UpdateFireSparks();
|
||||
UpdateSmoke();
|
||||
UpdateBlood();
|
||||
UpdateBubbles();
|
||||
UpdateDebris();
|
||||
UpdateGunShells();
|
||||
UpdateFootprints();
|
||||
UpdateSplashes();
|
||||
UpdateElectricityArcs();
|
||||
UpdateHelicalLasers();
|
||||
UpdateDrips();
|
||||
UpdateRats();
|
||||
UpdateRipples();
|
||||
UpdateBats();
|
||||
UpdateSpiders();
|
||||
UpdateSparkParticles();
|
||||
UpdateSmokeParticles();
|
||||
UpdateSimpleParticles();
|
||||
UpdateExplosionParticles();
|
||||
UpdateShockwaves();
|
||||
UpdateBeetleSwarm();
|
||||
UpdateFishSwarm();
|
||||
UpdateLocusts();
|
||||
UpdateUnderwaterBloodParticles();
|
||||
|
||||
// Update HUD.
|
||||
g_Hud.Update(*LaraItem);
|
||||
UpdateFadeScreenAndCinematicBars();
|
||||
|
||||
// Rumble screen (like in submarine level of TRC).
|
||||
if (g_GameFlow->GetLevel(CurrentLevel)->Rumble)
|
||||
RumbleScreen();
|
||||
|
||||
PlaySoundSources();
|
||||
DoFlipEffect(FlipEffect, LaraItem);
|
||||
|
||||
// Post-loop script and event handling.
|
||||
g_GameScript->OnLoop(DELTA_TIME, true);
|
||||
|
||||
// Clear savegame loaded flag.
|
||||
JustLoaded = false;
|
||||
|
||||
// Update timers.
|
||||
GameTimer++;
|
||||
GlobalCounter++;
|
||||
|
||||
// Add renderer objects on the first processed frame.
|
||||
if (isFirstTime)
|
||||
{
|
||||
g_Renderer.Lock();
|
||||
isFirstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
using ns = std::chrono::nanoseconds;
|
||||
using get_time = std::chrono::steady_clock;
|
||||
UpdateCamera();
|
||||
|
||||
// Post-loop script and event handling.
|
||||
g_GameScript->OnLoop(DELTA_TIME, true);
|
||||
|
||||
// Clear savegame loaded flag.
|
||||
JustLoaded = false;
|
||||
|
||||
// Update timers.
|
||||
GameTimer++;
|
||||
GlobalCounter++;
|
||||
|
||||
auto time2 = std::chrono::high_resolution_clock::now();
|
||||
ControlPhaseTime = (std::chrono::duration_cast<ns>(time2 - time1)).count() / 1000000;
|
||||
ControlPhaseTime = (std::chrono::duration_cast<std::chrono::nanoseconds>(time2 - time1)).count() / 1000000;
|
||||
|
||||
return GameStatus::Normal;
|
||||
}
|
||||
|
||||
unsigned CALLBACK GameMain(void *)
|
||||
{
|
||||
TENLog("Starting GameMain...", LogLevel::Info);
|
||||
TENLog("Starting GameMain()...", LogLevel::Info);
|
||||
|
||||
TimeInit();
|
||||
|
||||
// Do a fixed time title image.
|
||||
// Do fixed-time title image.
|
||||
if (g_GameFlow->IntroImagePath.empty())
|
||||
TENLog("Intro image path is not set.", LogLevel::Warning);
|
||||
{
|
||||
TENLog("Intro image path not set.", LogLevel::Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Renderer.RenderTitleImage();
|
||||
}
|
||||
|
||||
// Execute the Lua gameflow and play the game.
|
||||
// Execute Lua gameflow and play game.
|
||||
g_GameFlow->DoFlow();
|
||||
|
||||
DoTheGame = false;
|
||||
|
||||
// Finish the thread.
|
||||
// Finish thread.
|
||||
PostMessage(WindowsHandle, WM_CLOSE, NULL, NULL);
|
||||
EndThread();
|
||||
|
||||
|
@ -298,7 +292,7 @@ GameStatus DoLevel(int levelIndex, bool loadGame)
|
|||
|
||||
// Load level. Fall back to title if unsuccessful.
|
||||
if (!LoadLevelFile(levelIndex))
|
||||
return isTitle ? GameStatus::ExitGame : GameStatus::ExitToTitle;
|
||||
return (isTitle ? GameStatus::ExitGame : GameStatus::ExitToTitle);
|
||||
|
||||
// Initialize items, effects, lots, and cameras.
|
||||
HairEffect.Initialize();
|
||||
|
@ -355,11 +349,15 @@ void KillMoveItems()
|
|||
{
|
||||
for (int i = 0; i < ItemNewRoomNo; i++)
|
||||
{
|
||||
short itemNumber = ItemNewRooms[2 * i];
|
||||
int itemNumber = ItemNewRooms[i * 2];
|
||||
if (itemNumber >= 0)
|
||||
ItemNewRoom(itemNumber, ItemNewRooms[2 * i + 1]);
|
||||
{
|
||||
ItemNewRoom(itemNumber, ItemNewRooms[(i * 2) + 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
KillItem(itemNumber & 0x7FFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -372,11 +370,15 @@ void KillMoveEffects()
|
|||
{
|
||||
for (int i = 0; i < ItemNewRoomNo; i++)
|
||||
{
|
||||
short itemNumber = ItemNewRooms[2 * i];
|
||||
int itemNumber = ItemNewRooms[i * 2];
|
||||
if (itemNumber >= 0)
|
||||
EffectNewRoom(itemNumber, ItemNewRooms[2 * i + 1]);
|
||||
{
|
||||
EffectNewRoom(itemNumber, ItemNewRooms[(i * 2) + 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
KillEffect(itemNumber & 0x7FFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -399,13 +401,13 @@ void CleanUp()
|
|||
// Reset oscillator seed.
|
||||
Wibble = 0;
|
||||
|
||||
// Needs to be cleared, otherwise controls will lock if user exits to title while playing flyby with locked controls.
|
||||
// Clear player lock, otherwise controls will lock if user exits to title while playing flyby with locked controls.
|
||||
Lara.Control.IsLocked = false;
|
||||
|
||||
// Resets lightning and wind parameters to avoid holding over previous weather to new level.
|
||||
Weather.Clear();
|
||||
|
||||
// Needs to be cleared, otherwise a list of active creatures from previous level will spill into new level.
|
||||
// Clear creatures, otherwise list of active creatures from previous level will spill into new level.
|
||||
ActiveCreatures.clear();
|
||||
|
||||
// Clear ropes.
|
||||
|
@ -419,7 +421,7 @@ void CleanUp()
|
|||
StreamerEffect.Clear();
|
||||
ClearUnderwaterBloodParticles();
|
||||
ClearBubbles();
|
||||
ClearDisplaySprites();
|
||||
ClearAllDisplaySprites();
|
||||
ClearFootprints();
|
||||
ClearDrips();
|
||||
ClearRipples();
|
||||
|
@ -455,26 +457,36 @@ void InitializeScripting(int levelIndex, LevelLoadType type)
|
|||
g_GameStringsHandler->ClearDisplayStrings();
|
||||
g_GameScript->ResetScripts(!levelIndex || type != LevelLoadType::New);
|
||||
|
||||
auto* level = g_GameFlow->GetLevel(levelIndex);
|
||||
const auto& level = *g_GameFlow->GetLevel(levelIndex);
|
||||
|
||||
// Run level script if it exists.
|
||||
if (!level->ScriptFileName.empty())
|
||||
if (!level.ScriptFileName.empty())
|
||||
{
|
||||
g_GameScript->ExecuteScriptFile(g_GameFlow->GetGameDir() + level->ScriptFileName);
|
||||
auto levelScriptName = g_GameFlow->GetGameDir() + level.ScriptFileName;
|
||||
if (std::filesystem::is_regular_file(levelScriptName))
|
||||
{
|
||||
g_GameScript->ExecuteScriptFile(levelScriptName);
|
||||
}
|
||||
else
|
||||
{
|
||||
TENLog("Level script not found: " + levelScriptName, LogLevel::Warning);
|
||||
}
|
||||
|
||||
g_GameScript->InitCallbacks();
|
||||
g_GameStringsHandler->SetCallbackDrawString([](const std::string& key, D3DCOLOR color, const Vec2& pos, float scale, int flags)
|
||||
{
|
||||
g_Renderer.AddString(
|
||||
key,
|
||||
Vector2(((float)pos.x / (float)g_Configuration.ScreenWidth * DISPLAY_SPACE_RES.x),
|
||||
((float)pos.y / (float)g_Configuration.ScreenHeight * DISPLAY_SPACE_RES.y)),
|
||||
Vector2(
|
||||
(pos.x / g_Configuration.ScreenWidth) * DISPLAY_SPACE_RES.x,
|
||||
(pos.y / g_Configuration.ScreenHeight) * DISPLAY_SPACE_RES.y),
|
||||
Color(color), scale, flags);
|
||||
});
|
||||
}
|
||||
|
||||
// Play default background music.
|
||||
if (type != LevelLoadType::Load)
|
||||
PlaySoundTrack(level->GetAmbientTrack(), SoundTrackType::BGM);
|
||||
PlaySoundTrack(level.GetAmbientTrack(), SoundTrackType::BGM);
|
||||
}
|
||||
|
||||
void DeInitializeScripting(int levelIndex, GameStatus reason)
|
||||
|
@ -485,7 +497,7 @@ void DeInitializeScripting(int levelIndex, GameStatus reason)
|
|||
g_GameScript->FreeLevelScripts();
|
||||
g_GameScriptEntities->FreeEntities();
|
||||
|
||||
if (!levelIndex)
|
||||
if (levelIndex == 0)
|
||||
g_GameScript->ResetScripts(true);
|
||||
}
|
||||
|
||||
|
@ -494,19 +506,11 @@ void InitializeOrLoadGame(bool loadGame)
|
|||
g_Gui.SetInventoryItemChosen(NO_VALUE);
|
||||
g_Gui.SetEnterInventory(NO_VALUE);
|
||||
|
||||
// Restore the game?
|
||||
// Restore game?
|
||||
if (loadGame)
|
||||
{
|
||||
SaveGame::Load(g_GameFlow->SelectedSaveGame);
|
||||
|
||||
Camera.pos.x = LaraItem->Pose.Position.x + 256;
|
||||
Camera.pos.y = LaraItem->Pose.Position.y + 256;
|
||||
Camera.pos.z = LaraItem->Pose.Position.z + 256;
|
||||
|
||||
Camera.target.x = LaraItem->Pose.Position.x;
|
||||
Camera.target.y = LaraItem->Pose.Position.y;
|
||||
Camera.target.z = LaraItem->Pose.Position.z;
|
||||
|
||||
InitializeGame = false;
|
||||
|
||||
g_GameFlow->SelectedSaveGame = 0;
|
||||
|
@ -515,7 +519,7 @@ void InitializeOrLoadGame(bool loadGame)
|
|||
}
|
||||
else
|
||||
{
|
||||
// If not loading a savegame, clear all info.
|
||||
// If not loading savegame, clear all info.
|
||||
SaveGame::Statistics.Level = {};
|
||||
|
||||
if (InitializeGame)
|
||||
|
@ -532,10 +536,6 @@ void InitializeOrLoadGame(bool loadGame)
|
|||
{
|
||||
SaveGame::LoadHub(CurrentLevel);
|
||||
TENLog("Starting new level.", LogLevel::Info);
|
||||
|
||||
// Restore vehicle.
|
||||
auto* item = FindItem(ID_LARA);
|
||||
InitializePlayerVehicle(*item);
|
||||
}
|
||||
|
||||
g_GameScript->OnStart();
|
||||
|
@ -545,62 +545,47 @@ void InitializeOrLoadGame(bool loadGame)
|
|||
|
||||
GameStatus DoGameLoop(int levelIndex)
|
||||
{
|
||||
int numFrames = LOOP_FRAME_COUNT;
|
||||
int frameCount = LOOP_FRAME_COUNT;
|
||||
auto& status = g_GameFlow->LastGameStatus;
|
||||
|
||||
// Before entering actual game loop, ControlPhase must be
|
||||
// Before entering actual game loop, ControlPhase() must be
|
||||
// called once to sort out various runtime shenanigangs (e.g. hair).
|
||||
status = ControlPhase(numFrames);
|
||||
status = ControlPhase(false);
|
||||
|
||||
g_Synchronizer.Init();
|
||||
bool legacy30FpsDoneDraw = false;
|
||||
|
||||
while (DoTheGame)
|
||||
{
|
||||
status = ControlPhase(numFrames);
|
||||
g_Synchronizer.Sync();
|
||||
|
||||
if (!levelIndex)
|
||||
while (g_Synchronizer.Synced())
|
||||
{
|
||||
UpdateInputActions(LaraItem);
|
||||
status = ControlPhase(false);
|
||||
g_Synchronizer.Step();
|
||||
|
||||
auto invStatus = g_Gui.TitleOptions(LaraItem);
|
||||
legacy30FpsDoneDraw = false;
|
||||
}
|
||||
|
||||
switch (invStatus)
|
||||
if (status != GameStatus::Normal)
|
||||
break;
|
||||
|
||||
if (!g_Configuration.EnableHighFramerate)
|
||||
{
|
||||
if (!legacy30FpsDoneDraw)
|
||||
{
|
||||
case InventoryResult::NewGame:
|
||||
case InventoryResult::NewGameSelectedLevel:
|
||||
status = GameStatus::NewGame;
|
||||
break;
|
||||
|
||||
case InventoryResult::HomeLevel:
|
||||
status = GameStatus::HomeLevel;
|
||||
break;
|
||||
|
||||
case InventoryResult::LoadGame:
|
||||
status = GameStatus::LoadGame;
|
||||
break;
|
||||
|
||||
case InventoryResult::ExitGame:
|
||||
status = GameStatus::ExitGame;
|
||||
break;
|
||||
DrawPhase(!levelIndex, 0.0f);
|
||||
legacy30FpsDoneDraw = true;
|
||||
}
|
||||
|
||||
if (invStatus != InventoryResult::None)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (status == GameStatus::ExitToTitle ||
|
||||
status == GameStatus::LaraDead ||
|
||||
status == GameStatus::LoadGame ||
|
||||
status == GameStatus::LevelComplete)
|
||||
{
|
||||
break;
|
||||
}
|
||||
DrawPhase(!levelIndex, g_Synchronizer.GetInterpolationFactor());
|
||||
}
|
||||
|
||||
numFrames = DrawPhase(!levelIndex);
|
||||
Sound_UpdateScene();
|
||||
}
|
||||
|
||||
EndGameLoop(levelIndex, status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -614,73 +599,95 @@ void EndGameLoop(int levelIndex, GameStatus reason)
|
|||
StopRumble();
|
||||
}
|
||||
|
||||
void SetupInterpolation()
|
||||
{
|
||||
for (auto& item : g_Level.Items)
|
||||
item.DisableInterpolation = false;
|
||||
}
|
||||
|
||||
void HandleControls(bool isTitle)
|
||||
{
|
||||
// Poll input devices and update input variables.
|
||||
if (!isTitle)
|
||||
{
|
||||
// TODO: To allow cutscene skipping later, don't clear Deselect action.
|
||||
UpdateInputActions(LaraItem, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: To allow cutscene skipping later, don't clear Deselect action.
|
||||
UpdateInputActions(LaraItem, true);
|
||||
|
||||
if (isTitle)
|
||||
ClearAction(In::Look);
|
||||
}
|
||||
}
|
||||
|
||||
GameStatus HandleMenuCalls(bool isTitle)
|
||||
{
|
||||
auto result = GameStatus::Normal;
|
||||
auto gameStatus = GameStatus::Normal;
|
||||
|
||||
if (isTitle || ScreenFading)
|
||||
return result;
|
||||
if (ScreenFading)
|
||||
return gameStatus;
|
||||
|
||||
// Does the player want to enter inventory?
|
||||
if (IsClicked(In::Save) && LaraItem->HitPoints > 0 &&
|
||||
g_Gui.GetInventoryMode() != InventoryMode::Save &&
|
||||
g_GameFlow->IsLoadSaveEnabled())
|
||||
if (isTitle)
|
||||
{
|
||||
auto invStatus = g_Gui.TitleOptions(LaraItem);
|
||||
|
||||
switch (invStatus)
|
||||
{
|
||||
case InventoryResult::NewGame:
|
||||
case InventoryResult::NewGameSelectedLevel:
|
||||
return GameStatus::NewGame;
|
||||
|
||||
case InventoryResult::LoadGame:
|
||||
return GameStatus::LoadGame;
|
||||
|
||||
case InventoryResult::ExitGame:
|
||||
return GameStatus::ExitGame;
|
||||
}
|
||||
|
||||
return gameStatus;
|
||||
}
|
||||
|
||||
bool playerAlive = LaraItem->HitPoints > 0;
|
||||
|
||||
bool doLoad = IsClicked(In::Load) ||
|
||||
(!IsClicked(In::Inventory) && !NoAction() && SaveGame::IsLoadGamePossible() && Lara.Control.Count.Death > DEATH_INPUT_TIMEOUT);
|
||||
bool doSave = IsClicked(In::Save) && playerAlive;
|
||||
bool doPause = IsClicked(In::Pause) && playerAlive;
|
||||
bool doInventory = (IsClicked(In::Inventory) || g_Gui.GetEnterInventory() != NO_VALUE) && playerAlive;
|
||||
|
||||
// Handle inventory.
|
||||
if (doSave && g_GameFlow->IsLoadSaveEnabled() && g_Gui.GetInventoryMode() != InventoryMode::Save)
|
||||
{
|
||||
SaveGame::LoadHeaders();
|
||||
g_Gui.SetInventoryMode(InventoryMode::Save);
|
||||
g_Gui.CallInventory(LaraItem, false);
|
||||
}
|
||||
else if (IsClicked(In::Load) &&
|
||||
g_Gui.GetInventoryMode() != InventoryMode::Load &&
|
||||
g_GameFlow->IsLoadSaveEnabled())
|
||||
else if (doLoad && g_GameFlow->IsLoadSaveEnabled() && g_Gui.GetInventoryMode() != InventoryMode::Load)
|
||||
{
|
||||
SaveGame::LoadHeaders();
|
||||
|
||||
g_Gui.SetInventoryMode(InventoryMode::Load);
|
||||
|
||||
if (g_Gui.CallInventory(LaraItem, false))
|
||||
result = GameStatus::LoadGame;
|
||||
gameStatus = GameStatus::LoadGame;
|
||||
}
|
||||
else if (IsClicked(In::Pause) && LaraItem->HitPoints > 0 &&
|
||||
g_Gui.GetInventoryMode() != InventoryMode::Pause)
|
||||
else if (doPause && g_Gui.GetInventoryMode() != InventoryMode::Pause)
|
||||
{
|
||||
if (g_Gui.CallPause())
|
||||
result = GameStatus::ExitToTitle;
|
||||
gameStatus = GameStatus::ExitToTitle;
|
||||
}
|
||||
else if ((IsClicked(In::Inventory) || g_Gui.GetEnterInventory() != NO_VALUE) &&
|
||||
LaraItem->HitPoints > 0 && !Lara.Control.Look.IsUsingBinoculars)
|
||||
else if (doInventory && LaraItem->HitPoints > 0 && !Lara.Control.Look.IsUsingBinoculars)
|
||||
{
|
||||
if (g_Gui.CallInventory(LaraItem, true))
|
||||
result = GameStatus::LoadGame;
|
||||
gameStatus = GameStatus::LoadGame;
|
||||
}
|
||||
|
||||
if (result != GameStatus::Normal)
|
||||
if (gameStatus != GameStatus::Normal)
|
||||
{
|
||||
StopAllSounds();
|
||||
StopRumble();
|
||||
}
|
||||
|
||||
return result;
|
||||
return gameStatus;
|
||||
}
|
||||
|
||||
GameStatus HandleGlobalInputEvents(bool isTitle)
|
||||
{
|
||||
constexpr auto DEATH_NO_INPUT_TIMEOUT = 10 * FPS;
|
||||
constexpr auto DEATH_INPUT_TIMEOUT = 3 * FPS;
|
||||
|
||||
if (isTitle)
|
||||
return GameStatus::Normal;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ enum FadeStatus
|
|||
|
||||
constexpr int MAX_ROOMS = 1024;
|
||||
|
||||
constexpr int LOOP_FRAME_COUNT = 2;
|
||||
constexpr auto LOOP_FRAME_COUNT = 2;
|
||||
|
||||
extern int GameTimer;
|
||||
extern int RumbleTimer;
|
||||
|
@ -78,9 +78,9 @@ extern int ControlPhaseTime;
|
|||
|
||||
extern std::vector<short> OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE];
|
||||
|
||||
int DrawPhase(bool isTitle);
|
||||
void DrawPhase(bool isTitle, float interpolationFactor);
|
||||
|
||||
GameStatus ControlPhase(int numFrames);
|
||||
GameStatus ControlPhase(bool insideMenu);
|
||||
GameStatus DoLevel(int levelIndex, bool loadGame = false);
|
||||
GameStatus DoGameLoop(int levelIndex);
|
||||
void EndGameLoop(int levelIndex, GameStatus reason);
|
||||
|
@ -102,4 +102,6 @@ void InitializeOrLoadGame(bool loadGame);
|
|||
void InitializeScripting(int levelIndex, LevelLoadType type);
|
||||
void DeInitializeScripting(int levelIndex);
|
||||
|
||||
void SetupInterpolation();
|
||||
|
||||
unsigned CALLBACK GameMain(void*);
|
||||
|
|
|
@ -329,6 +329,8 @@ void Turn180(ItemInfo* item)
|
|||
item->Pose.Orientation.x = -item->Pose.Orientation.x;
|
||||
item->Pose.Orientation.y += ANGLE(180.0f);
|
||||
item->Pose.Orientation.z = -item->Pose.Orientation.z;
|
||||
|
||||
item->DisableInterpolation = true;
|
||||
}
|
||||
|
||||
void FinishLevel(ItemInfo* item)
|
||||
|
|
|
@ -518,7 +518,6 @@ static bool DoRayBox(const GameVector& origin, const GameVector& target, const G
|
|||
if (sphere.Intersects(rayOrigin, rayDir, distance))
|
||||
{
|
||||
// Test for minimum distance.
|
||||
|
||||
if (distance < minDist)
|
||||
{
|
||||
minDist = distance;
|
||||
|
|
|
@ -197,6 +197,13 @@ void InitializeSlot(short itemNumber, bool makeTarget)
|
|||
creature->LOT.Drop = -BLOCK(1);
|
||||
creature->LOT.Zone = ZoneType::Human;
|
||||
break;
|
||||
|
||||
case LotType::EnemyJeep:
|
||||
creature->LOT.Step = BLOCK(4);
|
||||
creature->LOT.Drop = -BLOCK(4);
|
||||
creature->LOT.CanJump = true;
|
||||
creature->LOT.Zone = ZoneType::Human;
|
||||
break;
|
||||
}
|
||||
|
||||
ClearLOT(&creature->LOT);
|
||||
|
|
|
@ -333,7 +333,11 @@ short* GetTriggerIndex(ItemInfo* item)
|
|||
void Antitrigger(short const value, short const flags)
|
||||
{
|
||||
ItemInfo* item = &g_Level.Items[value];
|
||||
if (item->ObjectNumber == ID_EARTHQUAKE)
|
||||
|
||||
if (item->Flags & IFLAG_KILLED)
|
||||
return;
|
||||
|
||||
if (item->ObjectNumber == ID_EARTHQUAKE) // HACK: move to earthquake control function!
|
||||
{
|
||||
item->ItemFlags[0] = 0;
|
||||
item->ItemFlags[1] = 100;
|
||||
|
@ -344,24 +348,35 @@ void Antitrigger(short const value, short const flags)
|
|||
if (flags & ONESHOT)
|
||||
item->Flags |= ATONESHOT;
|
||||
|
||||
if (item->Active && Objects[item->ObjectNumber].intelligent)
|
||||
if (Objects[item->ObjectNumber].intelligent)
|
||||
{
|
||||
DisableEntityAI(value);
|
||||
RemoveActiveItem(value, false);
|
||||
item->Active = false;
|
||||
item->Status = ITEM_INVISIBLE;
|
||||
if (item->Active)
|
||||
{
|
||||
DisableEntityAI(value);
|
||||
RemoveActiveItem(value, false);
|
||||
item->Status = ITEM_INVISIBLE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item->Status = ITEM_DEACTIVATED;
|
||||
}
|
||||
}
|
||||
|
||||
void Trigger(short const value, short const flags)
|
||||
{
|
||||
ItemInfo* item = &g_Level.Items[value];
|
||||
|
||||
if (item->Flags & IFLAG_KILLED)
|
||||
return;
|
||||
|
||||
item->TouchBits = NO_JOINT_BITS;
|
||||
item->Flags |= TRIGGERED;
|
||||
|
||||
if (flags & ONESHOT)
|
||||
item->Flags |= ONESHOT;
|
||||
|
||||
if (!(item->Active) && !(item->Flags & IFLAG_KILLED))
|
||||
if (!item->Active)
|
||||
{
|
||||
if (Objects[item->ObjectNumber].intelligent)
|
||||
{
|
||||
|
@ -369,33 +384,31 @@ void Trigger(short const value, short const flags)
|
|||
{
|
||||
if (item->Status == ITEM_INVISIBLE)
|
||||
{
|
||||
item->TouchBits = NO_JOINT_BITS;
|
||||
if (EnableEntityAI(value, false))
|
||||
{
|
||||
item->Status = ITEM_ACTIVE;
|
||||
AddActiveItem(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
item->Status = ITEM_INVISIBLE;
|
||||
AddActiveItem(value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item->TouchBits = NO_JOINT_BITS;
|
||||
item->Status = ITEM_ACTIVE;
|
||||
AddActiveItem(value);
|
||||
EnableEntityAI(value, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item->TouchBits = NO_JOINT_BITS;
|
||||
AddActiveItem(value);
|
||||
item->Status = ITEM_ACTIVE;
|
||||
}
|
||||
|
||||
item->Status = ITEM_ACTIVE;
|
||||
item->DisableInterpolation = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -854,11 +867,12 @@ void TestTriggers(int x, int y, int z, short roomNumber, bool heavy, int heavyFl
|
|||
|
||||
void ProcessSectorFlags(ItemInfo* item)
|
||||
{
|
||||
auto pointColl = GetPointCollision(*item);
|
||||
auto& sector = GetPointCollision(*item).GetBottomSector();
|
||||
|
||||
bool isPlayer = item->IsLara();
|
||||
|
||||
// HACK: because of L-shaped portal configurations, we need to fetch room number from Location struct for player.
|
||||
auto pointColl = isPlayer ? GetPointCollision(item->Pose.Position, item->Location.RoomNumber) : GetPointCollision(*item);
|
||||
auto& sector = pointColl.GetBottomSector();
|
||||
|
||||
// Set monkeyswing and wall climb statuses for player.
|
||||
if (isPlayer)
|
||||
{
|
||||
|
|
|
@ -58,6 +58,8 @@ namespace TEN::Effects::Blood
|
|||
if (uwBlood.Life <= 0.0f)
|
||||
continue;
|
||||
|
||||
uwBlood.StoreInterpolationData();
|
||||
|
||||
// Update size.
|
||||
if (uwBlood.Size < UW_BLOOD_SIZE_MAX)
|
||||
uwBlood.Size += 4.0f;
|
||||
|
|
|
@ -14,6 +14,21 @@ namespace TEN::Effects::Blood
|
|||
float Init = 0.0f;
|
||||
float Size = 0.0f;
|
||||
float Opacity = 0.0f;
|
||||
|
||||
Vector3 PrevPosition = Vector3::Zero;
|
||||
Vector4 PrevColor = Vector4::Zero;
|
||||
float PrevLife = 0.0f;
|
||||
float PrevSize = 0.0f;
|
||||
float PrevOpacity = 0.0f;
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevPosition = Position;
|
||||
PrevColor = Color;
|
||||
PrevLife = Life;
|
||||
PrevSize = Size;
|
||||
PrevOpacity = Opacity;
|
||||
}
|
||||
};
|
||||
|
||||
extern std::vector<UnderwaterBlood> UnderwaterBloodParticles;
|
||||
|
|
|
@ -14,7 +14,8 @@ namespace TEN::Effects::DisplaySprite
|
|||
std::vector<DisplaySprite> DisplaySprites = {};
|
||||
|
||||
void AddDisplaySprite(GAME_OBJECT_ID objectID, int spriteID, const Vector2& pos, short orient, const Vector2& scale, const Vector4& color,
|
||||
int priority, DisplaySpriteAlignMode alignMode, DisplaySpriteScaleMode scaleMode, BlendMode blendMode)
|
||||
int priority, DisplaySpriteAlignMode alignMode, DisplaySpriteScaleMode scaleMode,
|
||||
BlendMode blendMode, DisplaySpritePhase source)
|
||||
{
|
||||
auto displaySprite = DisplaySprite{};
|
||||
displaySprite.ObjectID = objectID;
|
||||
|
@ -27,12 +28,25 @@ namespace TEN::Effects::DisplaySprite
|
|||
displaySprite.AlignMode = alignMode;
|
||||
displaySprite.ScaleMode = scaleMode;
|
||||
displaySprite.BlendMode = blendMode;
|
||||
displaySprite.Source = source;
|
||||
|
||||
DisplaySprites.push_back(displaySprite);
|
||||
}
|
||||
|
||||
void ClearDisplaySprites()
|
||||
void ClearAllDisplaySprites()
|
||||
{
|
||||
DisplaySprites.clear();
|
||||
}
|
||||
|
||||
void ClearDrawPhaseDisplaySprites()
|
||||
{
|
||||
DisplaySprites.erase(
|
||||
std::remove_if(
|
||||
DisplaySprites.begin(), DisplaySprites.end(),
|
||||
[](const DisplaySprite& displaySprite)
|
||||
{
|
||||
return (displaySprite.Source == DisplaySpritePhase::Draw);
|
||||
}),
|
||||
DisplaySprites.end());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,12 @@ namespace TEN::Effects::DisplaySprite
|
|||
Fill,
|
||||
Stretch
|
||||
};
|
||||
|
||||
enum class DisplaySpritePhase
|
||||
{
|
||||
Control,
|
||||
Draw
|
||||
};
|
||||
|
||||
struct DisplaySprite
|
||||
{
|
||||
|
@ -38,11 +44,15 @@ namespace TEN::Effects::DisplaySprite
|
|||
DisplaySpriteAlignMode AlignMode = DisplaySpriteAlignMode::Center;
|
||||
DisplaySpriteScaleMode ScaleMode = DisplaySpriteScaleMode::Fit;
|
||||
BlendMode BlendMode = BlendMode::AlphaBlend;
|
||||
|
||||
DisplaySpritePhase Source = DisplaySpritePhase::Control;
|
||||
};
|
||||
|
||||
extern std::vector<DisplaySprite> DisplaySprites;
|
||||
|
||||
void AddDisplaySprite(GAME_OBJECT_ID objectID, int spriteID, const Vector2& pos, short orient, const Vector2& scale, const Vector4& color,
|
||||
int priority, DisplaySpriteAlignMode alignMode, DisplaySpriteScaleMode scaleMode, BlendMode blendMode);
|
||||
void ClearDisplaySprites();
|
||||
int priority, DisplaySpriteAlignMode alignMode, DisplaySpriteScaleMode scaleMode,
|
||||
BlendMode blendMode, DisplaySpritePhase source);
|
||||
void ClearAllDisplaySprites();
|
||||
void ClearDrawPhaseDisplaySprites();
|
||||
}
|
||||
|
|
|
@ -175,6 +175,8 @@ namespace TEN::Effects::Electricity
|
|||
|
||||
for (auto& laser : HelicalLasers)
|
||||
{
|
||||
laser.StoreInterpolationData();
|
||||
|
||||
// Set to despawn.
|
||||
laser.Life -= 1.0f;
|
||||
if (laser.Life <= 0.0f)
|
||||
|
@ -213,6 +215,8 @@ namespace TEN::Effects::Electricity
|
|||
if (arc.life <= 0.0f)
|
||||
continue;
|
||||
|
||||
arc.StoreInterpolationData();
|
||||
|
||||
// If/when this behaviour is changed, modify AddLightningArc accordingly.
|
||||
arc.life -= 2.0f;
|
||||
if (arc.life > 0.0f)
|
||||
|
|
|
@ -39,6 +39,27 @@ namespace TEN::Effects::Electricity
|
|||
int rotation;
|
||||
int type;
|
||||
int flags;
|
||||
|
||||
Vector3 PrevPos1 = Vector3::Zero;
|
||||
Vector3 PrevPos2 = Vector3::Zero;
|
||||
Vector3 PrevPos3 = Vector3::Zero;
|
||||
Vector3 PrevPos4 = Vector3::Zero;
|
||||
byte PrevR = 0;
|
||||
byte PrevG = 0;
|
||||
byte PrevB = 0;
|
||||
float PrevLife = 0.0f;
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevPos1 = pos1;
|
||||
PrevPos2 = pos2;
|
||||
PrevPos3 = pos3;
|
||||
PrevPos4 = pos4;
|
||||
PrevR = r;
|
||||
PrevG = g;
|
||||
PrevB = b;
|
||||
PrevLife = life;
|
||||
}
|
||||
};
|
||||
|
||||
struct HelicalLaser
|
||||
|
@ -57,6 +78,27 @@ namespace TEN::Effects::Electricity
|
|||
float LengthEnd = 0.0f;
|
||||
float Opacity = 0.0f;
|
||||
short Rotation = 0;
|
||||
|
||||
Vector3 PrevOrigin = Vector3::Zero;
|
||||
Vector3 PrevTarget = Vector3::Zero;
|
||||
short PrevOrientation2D = 0;
|
||||
Vector4 PrevColor = Vector4::Zero;
|
||||
float PrevLife = 0.0f;
|
||||
float PrevRadius = 0.0f;
|
||||
float PrevLength = 0.0f;
|
||||
float PrevOpacity = 0.0f;
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevOrigin = Origin;
|
||||
PrevTarget = Target;
|
||||
PrevOrientation2D = Orientation2D;
|
||||
PrevColor = Color;
|
||||
PrevLife = Life;
|
||||
PrevRadius = Radius;
|
||||
PrevLength = Length;
|
||||
PrevOpacity = Opacity;
|
||||
}
|
||||
};
|
||||
|
||||
extern std::vector<Electricity> ElectricityArcs;
|
||||
|
|
|
@ -59,6 +59,8 @@ namespace TEN::Effects::Ripple
|
|||
if (ripple.Life <= 0.0f)
|
||||
continue;
|
||||
|
||||
ripple.StoreInterpolationData();
|
||||
|
||||
// Update size.
|
||||
if (ripple.Size < RIPPLE_SIZE_MAX)
|
||||
ripple.Size += (ripple.Flags & ((int)RippleFlags::SlowFade | (int)RippleFlags::OnGround)) ? SIZE_STEP_SMALL : SIZE_STEP_LARGE;
|
||||
|
|
|
@ -23,6 +23,17 @@ namespace TEN::Effects::Ripple
|
|||
float Size = 0.0f;
|
||||
float FadeDuration = 0.0f;
|
||||
int Flags = 0;
|
||||
|
||||
Vector3 PrevPosition = Vector3::Zero;
|
||||
Vector4 PrevColor = Vector4::Zero;
|
||||
float PrevSize = 0.0f;
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevPosition = Position;
|
||||
PrevColor = Color;
|
||||
PrevSize = Size;
|
||||
}
|
||||
};
|
||||
|
||||
extern std::vector<Ripple> Ripples;
|
||||
|
|
|
@ -21,6 +21,8 @@ namespace TEN::Effects::Streamer
|
|||
|
||||
void Streamer::StreamerSegment::Update()
|
||||
{
|
||||
StoreInterpolationData();
|
||||
|
||||
// Update opacity.
|
||||
if (Color.w > 0.0f)
|
||||
Color.w = EaseInOutSine(0.0f, OpacityMax, Life / LifeMax);
|
||||
|
@ -190,7 +192,10 @@ namespace TEN::Effects::Streamer
|
|||
pool.erase(
|
||||
std::remove_if(
|
||||
pool.begin(), pool.end(),
|
||||
[](const auto& streamer) { return streamer.Segments.empty(); }),
|
||||
[](const auto& streamer)
|
||||
{
|
||||
return streamer.Segments.empty();
|
||||
}),
|
||||
pool.end());
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,9 @@ namespace TEN::Effects::Streamer
|
|||
{
|
||||
enum class StreamerFlags
|
||||
{
|
||||
FadeLeft = (1 << 0),
|
||||
FadeRight = (1 << 1),
|
||||
|
||||
BlendModeAdditive = (1 << 2)
|
||||
FadeLeft = 1 << 0,
|
||||
FadeRight = 1 << 1,
|
||||
BlendModeAdditive = 1 << 2
|
||||
};
|
||||
|
||||
class Streamer
|
||||
|
@ -39,11 +38,21 @@ namespace TEN::Effects::Streamer
|
|||
|
||||
std::array<Vector3, VERTEX_COUNT> Vertices = {};
|
||||
|
||||
Vector4 PrevColor = Vector4::Zero;
|
||||
std::array<Vector3, VERTEX_COUNT> PrevVertices = {};
|
||||
|
||||
void InitializeVertices(const Vector3& pos, float width);
|
||||
void Update();
|
||||
|
||||
private:
|
||||
void TransformVertices(float vel, float scaleRate);
|
||||
|
||||
void StoreInterpolationData()
|
||||
{
|
||||
PrevColor = Color;
|
||||
PrevVertices[0] = Vertices[0];
|
||||
PrevVertices[1] = Vertices[1];
|
||||
}
|
||||
};
|
||||
|
||||
// Members
|
||||
|
|
|
@ -147,6 +147,8 @@ namespace TEN::Effects::Bubble
|
|||
if (bubble.Life <= 0.0f)
|
||||
continue;
|
||||
|
||||
bubble.StoreInterpolationData();
|
||||
|
||||
// Update room number. TODO: Should use GetPointCollision(), but calling it for each bubble is very inefficient.
|
||||
auto roomVector = RoomVector(bubble.RoomNumber, int(bubble.Position.y - bubble.Gravity));
|
||||
int roomNumber = GetRoomVector(roomVector, Vector3i(bubble.Position.x, bubble.Position.y - bubble.Gravity, bubble.Position.z)).RoomNumber;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue