OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Functions | Variables
Indoor.h File Reference
#include <array>
#include <memory>
#include <string>
#include <vector>
#include "Engine/mm7_data.h"
#include "Engine/EngineIocContainer.h"
#include "Engine/SpawnPoint.h"
#include "BSPModel.h"
#include "LocationInfo.h"
#include "LocationTime.h"
#include "LocationFunctions.h"
#include "FaceEnums.h"

Classes

struct  BLVLight
 
struct  BLVDoor
 
struct  BLVMapOutline
 
struct  FlatFace
 
struct  BLVFace
 
struct  BLVFaceExtra
 
struct  BLVSector
 
struct  IndoorLocation
 
struct  BLVRenderParams
 

Functions

char DoInteractionWithTopmostZObject (Pid pid)
 
void BLV_UpdateUserInputAndOther ()
 
float BLV_GetFloorLevel (const Vec3f &pos, int uSectorID, int *pFaceID=nullptr)
 
void BLV_InitialiseDoors ()
 
void BLV_UpdateDoors ()
 
void BLV_UpdateDoorGeometry (BLVDoor *door, int distance)
 
void UpdateActors_BLV ()
 
void BLV_ProcessPartyActions ()
 
void switchDoorAnimation (unsigned int uDoorID, DoorAction a2)
 
int CalcDistPointToLine (int a1, int a2, int a3, int a4, int a5, int a6)
 
void PrepareDrawLists_BLV ()
 
void loadAndPrepareBLV (MapId mapid, bool bLoading)
 
int SpawnEncounterMonsters (MapInfo *a1, int a2)
 
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=nullptr)
 
float GetApproximateIndoorFloorZ (const Vec3f &pos, int *pSectorID, int *pFaceID=nullptr)
 
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)
 

Variables

IndoorLocationpIndoor
 
BLVRenderParamspBLVRenderParams
 

Function Documentation

◆ BLV_GetFloorLevel()

float BLV_GetFloorLevel ( const Vec3f pos,
int  uSectorID,
int *  pFaceID = nullptr 
)
Parameters
posActor's position.
uSectorIDActor's sector id.
[out]pFaceIDId 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.
Returns
Float Z coordinate of the floor/ceiling face for the given position. If wrong sector is supplied or actor is out of bounds, -30000 is returned.

◆ BLV_InitialiseDoors()

void BLV_InitialiseDoors ( )

Initialises all door geometry into starting position on load.

◆ BLV_ProcessPartyActions()

void BLV_ProcessPartyActions ( )

◆ BLV_UpdateDoorGeometry()

void BLV_UpdateDoorGeometry ( BLVDoor door,
int  distance 
)

Updates the geomtry position of the supplied door.

Parameters
doorPointer to door to update.
distanceDistance the door is displaced. 0 is open, door->uMoveLength when closed.

◆ BLV_UpdateDoors()

void BLV_UpdateDoors ( )

Updates all door geometry into current position and plays sounds if moving.

Original binary offset:
0x46F228

◆ BLV_UpdateUserInputAndOther()

void BLV_UpdateUserInputAndOther ( )

◆ CalcDistPointToLine()

int CalcDistPointToLine ( int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6 
)

◆ Check_LineOfSight()

bool Check_LineOfSight ( const Vec3f target,
const Vec3f from 
)
Parameters
targetVec3f of position to check line of sight to
fromVec3f of position to check line of sight from
Returns
True if line of sight clear to target

◆ Check_LOS_Obscurred_Indoors()

bool Check_LOS_Obscurred_Indoors ( const Vec3f target,
const Vec3f from 
)
Parameters
targetVec3f of position to check line of sight to
fromVec3f of position to check line of sight from
Returns
True if line of sight obscurred by level geometery

◆ Check_LOS_Obscurred_Outdoors_Bmodels()

bool Check_LOS_Obscurred_Outdoors_Bmodels ( const Vec3f target,
const Vec3f from 
)
Parameters
targetVec3f of position to check line of sight to
fromVec3f of position to check line of sight from
Returns
True if line of sight obscurred by outdoor models

◆ DoInteractionWithTopmostZObject()

char DoInteractionWithTopmostZObject ( Pid  pid)

◆ DropTreasureAt()

int DropTreasureAt ( ItemTreasureLevel  trs_level,
RandomItemType  trs_type,
Vec3f  pos,
uint16_t  facing 
)

◆ FindBillboardsLightLevels_BLV()

void FindBillboardsLightLevels_BLV ( )

◆ GetApproximateIndoorFloorZ()

float GetApproximateIndoorFloorZ ( const Vec3f pos,
int *  pSectorID,
int *  pFaceID = nullptr 
)
Original binary offset:
0x0047272C.

Same as GetIndoorFloorZ, but also tries jiggling the party around a bit if the collision point couldn't be found.

See also
GetIndoorFloorZ

◆ GetIndoorFloorZ()

float GetIndoorFloorZ ( const Vec3f pos,
int *  pSectorID,
int *  pFaceID = nullptr 
)
Todo:
looks like this also works for ceilings, reflect in docs?
Parameters
posActor's position.
[in,out]pSectorIDActor'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]pFaceIDId of the floor face on which the actor is standing, or -1 if actor is outside the level boundaries. Pass nullptr to ignore.
Returns
Z coordinate for the floor at (X, Y), or -30000 if actor is outside the level boundaries.

◆ loadAndPrepareBLV()

void loadAndPrepareBLV ( MapId  mapid,
bool  bLoading 
)
Original binary offset:
0x460A78

◆ PrepareDrawLists_BLV()

void PrepareDrawLists_BLV ( )

◆ SpawnEncounterMonsters()

int SpawnEncounterMonsters ( MapInfo a1,
int  a2 
)

◆ SpawnRandomTreasure()

void SpawnRandomTreasure ( MapInfo mapInfo,
SpawnPoint a2 
)

◆ switchDoorAnimation()

void switchDoorAnimation ( unsigned int  uDoorID,
DoorAction  a2 
)
Original binary offset:
0x449A49

◆ UpdateActors_BLV()

void UpdateActors_BLV ( )

Variable Documentation

◆ pBLVRenderParams

BLVRenderParams* pBLVRenderParams
extern

◆ pIndoor

IndoorLocation* pIndoor
extern