2018-09-17 10:52:43 +00:00
|
|
|
#ifndef OPENMW_CONSTANTS_H
|
|
|
|
#define OPENMW_CONSTANTS_H
|
|
|
|
|
2019-01-27 12:55:36 +00:00
|
|
|
#include <string>
|
|
|
|
|
2018-09-17 10:52:43 +00:00
|
|
|
namespace Constants
|
|
|
|
{
|
|
|
|
|
|
|
|
// The game uses 64 units per yard
|
2023-01-18 03:31:52 +00:00
|
|
|
constexpr float UnitsPerMeter = 69.99125109f;
|
|
|
|
constexpr float UnitsPerFoot = 21.33333333f;
|
2018-09-17 10:52:43 +00:00
|
|
|
|
|
|
|
// Sound speed in meters per second
|
2023-01-18 03:31:52 +00:00
|
|
|
constexpr float SoundSpeedInAir = 343.3f;
|
|
|
|
constexpr float SoundSpeedUnderwater = 1484.0f;
|
2018-09-17 10:52:43 +00:00
|
|
|
|
2023-01-21 21:58:17 +00:00
|
|
|
// Gravity constant in m/sec^2
|
2018-09-17 10:52:43 +00:00
|
|
|
// Note: 8.96 m/sec^2 = 9.8 yards/sec^2
|
2023-05-10 00:07:08 +00:00
|
|
|
// Probably original engine's developers just forgot
|
2018-09-17 10:52:43 +00:00
|
|
|
// that their engine uses yards instead of meters
|
2023-05-10 00:07:08 +00:00
|
|
|
// and used standard gravity value as it is
|
2023-01-18 03:31:52 +00:00
|
|
|
constexpr float GravityConst = 8.96f;
|
2018-09-17 10:52:43 +00:00
|
|
|
|
|
|
|
// Size of one exterior cell in game units
|
2023-01-18 03:31:52 +00:00
|
|
|
constexpr int CellSizeInUnits = 8192;
|
2023-04-24 19:20:07 +00:00
|
|
|
constexpr int ESM4CellSizeInUnits = 4096;
|
2018-09-17 10:52:43 +00:00
|
|
|
|
2020-06-16 14:43:01 +00:00
|
|
|
// Size of active cell grid in cells (it is a square with the (2 * CellGridRadius + 1) cells side)
|
2023-01-18 03:31:52 +00:00
|
|
|
constexpr int CellGridRadius = 1;
|
2020-06-16 14:43:01 +00:00
|
|
|
|
2023-05-16 08:21:48 +00:00
|
|
|
// ESM4 cells are twice smaller, so the active grid should have more cells.
|
|
|
|
constexpr int ESM4CellGridRadius = CellGridRadius * 2;
|
|
|
|
|
2019-01-27 12:55:36 +00:00
|
|
|
// A label to mark night/day visual switches
|
|
|
|
const std::string NightDayLabel = "NightDaySwitch";
|
|
|
|
|
2018-12-03 16:21:40 +00:00
|
|
|
// A label to mark visual switches for herbalism feature
|
|
|
|
const std::string HerbalismLabel = "HerbalismSwitch";
|
|
|
|
|
2021-03-24 17:21:37 +00:00
|
|
|
// Percentage height at which projectiles are spawned from an actor
|
2023-01-18 03:31:52 +00:00
|
|
|
constexpr float TorsoHeight = 0.75f;
|
2021-03-24 17:21:37 +00:00
|
|
|
|
2021-07-03 02:09:55 +00:00
|
|
|
static constexpr float sStepSizeUp = 34.0f;
|
|
|
|
static constexpr float sMaxSlope = 46.0f;
|
|
|
|
|
2022-05-15 05:53:53 +00:00
|
|
|
// Identifier for main scene camera
|
|
|
|
const std::string SceneCamera = "SceneCam";
|
|
|
|
|
2018-09-17 10:52:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|