OpenEnroth 73e68f7
|
#include "Engine/Graphics/Indoor.h"
#include <algorithm>
#include <limits>
#include <ranges>
#include <string>
#include "Engine/Engine.h"
#include "Engine/EngineGlobals.h"
#include "Engine/AssetsManager.h"
#include "Engine/Events/Processor.h"
#include "Engine/Graphics/BspRenderer.h"
#include "Engine/Graphics/Collisions.h"
#include "Engine/Graphics/DecalBuilder.h"
#include "Engine/Objects/DecorationList.h"
#include "Engine/Objects/Decoration.h"
#include "Engine/Graphics/LightmapBuilder.h"
#include "Engine/Graphics/LightsStack.h"
#include "Engine/Graphics/Outdoor.h"
#include "Engine/Graphics/ParticleEngine.h"
#include "Engine/Graphics/TextureFrameTable.h"
#include "Engine/Graphics/Sprites.h"
#include "Engine/Graphics/PortalFunctions.h"
#include "Engine/Graphics/Viewport.h"
#include "Engine/Graphics/Image.h"
#include "Engine/Graphics/Renderer/Renderer.h"
#include "Engine/Random/Random.h"
#include "Engine/Objects/Actor.h"
#include "Engine/Objects/ObjectList.h"
#include "Engine/Objects/SpriteObject.h"
#include "Engine/Tables/ItemTable.h"
#include "Engine/OurMath.h"
#include "Engine/Party.h"
#include "Engine/Snapshots/CompositeSnapshots.h"
#include "Engine/SpellFxRenderer.h"
#include "Engine/Time/Timer.h"
#include "Engine/TurnEngine/TurnEngine.h"
#include "Engine/Localization.h"
#include "Engine/MapInfo.h"
#include "Engine/LOD.h"
#include "GUI/GUIProgressBar.h"
#include "GUI/GUIWindow.h"
#include "GUI/UI/UIStatusBar.h"
#include "Media/Audio/AudioPlayer.h"
#include "Library/Logger/Logger.h"
#include "Library/LodFormats/LodFormats.h"
#include "Utility/String/Ascii.h"
#include "Utility/Math/TrigLut.h"
#include "Utility/Exception.h"
Functions | |
void | PrepareDrawLists_BLV () |
void | BLV_InitialiseDoors () |
void | BLV_UpdateDoors () |
void | BLV_UpdateDoorGeometry (BLVDoor *door, int distance) |
void | switchDoorAnimation (unsigned int uDoorID, DoorAction action) |
void | UpdateActors_BLV () |
void | loadAndPrepareBLV (MapId mapid, bool bLoading) |
float | BLV_GetFloorLevel (const Vec3f &pos, int uSectorID, int *pFaceID) |
bool | Check_LineOfSight (const Vec3f &target, const Vec3f &from) |
bool | Check_LOS_Obscurred_Indoors (const Vec3f &target, const Vec3f &from) |
bool | Check_LOS_Obscurred_Outdoors_Bmodels (const Vec3f &target, const Vec3f &from) |
char | DoInteractionWithTopmostZObject (Pid pid) |
void | BLV_UpdateUserInputAndOther () |
void | BLV_ProcessPartyActions () |
int | CalcDistPointToLine (int x1, int y1, int x2, int y2, int x3, int y3) |
int | SpawnEncounterMonsters (MapInfo *map_info, int enc_index) |
int | DropTreasureAt (ItemTreasureLevel trs_level, RandomItemType trs_type, Vec3f pos, uint16_t facing) |
void | SpawnRandomTreasure (MapInfo *mapInfo, SpawnPoint *a2) |
void | FindBillboardsLightLevels_BLV () |
float | GetIndoorFloorZ (const Vec3f &pos, int *pSectorID, int *pFaceID) |
float | GetApproximateIndoorFloorZ (const Vec3f &pos, int *pSectorID, int *pFaceID) |
Variables | |
IndoorLocation * | pIndoor = nullptr |
BLVRenderParams * | pBLVRenderParams = new BLVRenderParams |
static constexpr IndexedArray< SoundId, MAP_FIRST, MAP_LAST > | pDoorSoundIDsByLocationID |
float BLV_GetFloorLevel | ( | const Vec3f & | pos, |
int | uSectorID, | ||
int * | pFaceID = nullptr |
||
) |
pos | Actor's position. | |
uSectorID | Actor's sector id. | |
[out] | pFaceID | Id of the closest floor/ceiling face for the provided position, or -1 if wrong sector is supplied or actor is out of bounds. Pass nullptr to ignore. |
-30000
is returned. void BLV_InitialiseDoors | ( | ) |
Initialises all door geometry into starting position on load.
void BLV_ProcessPartyActions | ( | ) |
void BLV_UpdateDoorGeometry | ( | BLVDoor * | door, |
int | distance | ||
) |
Updates the geomtry position of the supplied door.
door | Pointer to door to update. |
distance | Distance the door is displaced. 0 is open, door->uMoveLength when closed. |
void BLV_UpdateDoors | ( | ) |
Updates all door geometry into current position and plays sounds if moving.
void BLV_UpdateUserInputAndOther | ( | ) |
int CalcDistPointToLine | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3 | ||
) |
target | Vec3f of position to check line of sight to |
from | Vec3f of position to check line of sight from |
target | Vec3f of position to check line of sight to |
from | Vec3f of position to check line of sight from |
target | Vec3f of position to check line of sight to |
from | Vec3f of position to check line of sight from |
char DoInteractionWithTopmostZObject | ( | Pid | pid | ) |
int DropTreasureAt | ( | ItemTreasureLevel | trs_level, |
RandomItemType | trs_type, | ||
Vec3f | pos, | ||
uint16_t | facing | ||
) |
void FindBillboardsLightLevels_BLV | ( | ) |
float GetApproximateIndoorFloorZ | ( | const Vec3f & | pos, |
int * | pSectorID, | ||
int * | pFaceID = nullptr |
||
) |
Same as GetIndoorFloorZ
, but also tries jiggling the party around a bit if the collision point couldn't be found.
float GetIndoorFloorZ | ( | const Vec3f & | pos, |
int * | pSectorID, | ||
int * | pFaceID = nullptr |
||
) |
pos | Actor's position. | |
[in,out] | pSectorID | Actor's cached sector id. If the cached sector id is no longer valid (e.g. an actor has already moved to another sector), then the new sector id is returned in this output parameter. If the actor moves out of level bounds (this happens), then this parameter is set to 0. |
[out] | pFaceID | Id of the floor face on which the actor is standing, or -1 if actor is outside the level boundaries. Pass nullptr to ignore. |
-30000
if actor is outside the level boundaries. void loadAndPrepareBLV | ( | MapId | mapid, |
bool | bLoading | ||
) |
void PrepareDrawLists_BLV | ( | ) |
int SpawnEncounterMonsters | ( | MapInfo * | map_info, |
int | enc_index | ||
) |
void SpawnRandomTreasure | ( | MapInfo * | mapInfo, |
SpawnPoint * | a2 | ||
) |
void switchDoorAnimation | ( | unsigned int | uDoorID, |
DoorAction | a2 | ||
) |
void UpdateActors_BLV | ( | ) |
BLVRenderParams* pBLVRenderParams = new BLVRenderParams |
|
staticconstexpr |
IndoorLocation* pIndoor = nullptr |