Fission FSN
Loading...
Searching...
No Matches
fsNTileMap::fsCView Class Reference

#include <fsCView.h>

Inheritance diagram for fsNTileMap::fsCView:

Classes

struct  STrigger

Public Member Functions

fsPointscrollOffsetGet ()
std::vector< fsCView::STrigger * > const & triggersGet ()
fsS32 pixelWidtheGet () const
fsS32 pixelHeightGet () const
fsPoint screenToMap (fsPoint pPos) const
fsPoint mapToView (fsPoint pPos) const
fsPoint mapPixelToLocal (const fsPoint &pMapPixel) const
fsBool check (fsPoint const &pPos)
void scroll (fsS32 &pAttemptedX, fsS32 &pAttemptedY)
void jumpTo (const fsPoint &pPos)
fsBool tileHide (fsS32 pLayerId, fsS32 pCol, fsS32 pRow)
 ~fsCView ()
Public Member Functions inherited from fsCEntity
fsCEntitygrandparentGet () const
void listenersRegister ()
void listenersDeRegister ()
fsCComponentFactorycomponentFactoryGet ()
fsCEntityFactoryentityFactoryGet ()
fsITextSpriteComponenttextComponentGet () const
fsITextSpriteComponenttextComponentAdd ()
fsISpriteComponentspriteComponentGet () const
fsISpriteComponentspriteComponentAdd ()
fsBool tagExists (fsStr const &pTag) const
void tagAdd (fsStr const &pTag)
template<typename TComponent>
TComponent * componentAdd ()
fsIComponentcomponentAdd (const fsCUniqueId &pTypeId)
template<typename TComponent>
TComponent * componentGet () const
fsIComponentcomponentGet (const fsCUniqueId &pTypeId) const
void componentDestroy (const fsCUniqueId &pTypeId)
template<typename TInterface>
TInterface * firstComponentOfFamilyType () const
template<typename TLamda>
void forMyChildren (TLamda &&pLamda)
template<typename TLamda>
void forAllChildren (TLamda &&pLamda)
fsCEntitychildFind (const fsStr &pName, fsBool pCaseless=false)
template<typename TInterface>
std::vector< TInterface * > componentsOfFamilyTypeGet () const
template<typename TInterface>
std::vector< fsCEntity * > childEntitiesWithComponentsOfFamilyType ()
std::vector< fsCEntity * > childEntitiesWithComponentsOfTypeGet (const std::vector< const std::type_info * > &pPossibleComponentTypes)
std::vector< fsCEntity * > childEntitiesTaggedWithGet (std::vector< fsStr > pTags)
template<typename TInterface>
fsCEntityfirstChildEntityWithComponentsOfFamilyType ()
Public Member Functions inherited from fsINode
fsBool matrixDirtyGet () const
void destroy ()
void initialiseFromVariableTable (const fsCVariableTable &pVars)
void init ()
fsBool screenCoordConvertToLocal (const fsVec2d &pScreenPos, fsVec2d &pLocalPos)
void posSet (const fsVec2d &pPos)
fsVec2d posGet () const
fsVec2d posRelativeToAncestorGet (const fsINode *pAncestor) const
fsVec2d screenPositionGet () const
void scaleSet (fsVec2d const &pScale)
fsVec2d const & scaleGet () const
void angleSet (fsF32 pAngleRadians)
void targetAngleSet (fsF32 pRadians, fsF32 pRadiansPerSec)
fsF32 angleGet () const
void visibleSet (fsBool pVisible)
fsBool visibleGet () const
void skipMeSet (fsBool pVisible)
fsBool skipMeGet () const
const fsStrnameGet () const
void nameSet (const fsStr &pName)
const fsAffineMtx2dlocalMatrixGet () const
const fsAffineMtx2drenderMatrixGet () const
void childAdd (fsINode *pChild)
void childRemove (fsINode *pChild)
fsINodeparentGet () const
fsINodechildFind (const fsStr &pName, fsBool pCaseless=false) const
void bringToFrontOfSiblings ()
void pushToBackOfSiblings ()
void postLink ()
void matrixUpdateIfDirty ()
void update (fsS32 pDeltaMs)
void render ()
void reset ()
void hierarchyDumpToLog () const
void serialise (fsStr &pSaveStr)
void deserialise (fsStr &pLoadStr)
void s32Serialise (fsS32 pVal)
fsS32 s32Deserialise ()
void boolSerialise (fsBool pVal)
fsBool boolDeserialise ()
void strSerialise (const fsStr &pVal)
fsStr strDeserialise ()
void pointSerialise (const fsPoint &pVal)
fsPoint pointDeserialise ()
void matrixUpdate ()
 fsINode (const fsStr &pName)

Static Public Member Functions

static fsCView *const create (fsITileMap *const pMap, fsIScroller *const pScroller, fsS32 pViewWidth, fsS32 pViewHeight, fsF32 pScale=1.0f)
Static Public Member Functions inherited from fsCEntity
static void componentFactorySet (std::shared_ptr< fsCComponentFactory > pComponentFactory)
static void entityFactorySet (std::shared_ptr< fsCEntityFactory > pEntityFactory)
Static Public Member Functions inherited from fsINode
static void staticVectorsCreate ()
static void staticVectorsDestroy ()
static void flaggedNodesDestroy ()
static void newNodesParent ()

Public Attributes

fsITileMapmMap

Protected Member Functions

 fsCView (fsITileMap *const pMap, fsIScroller *const pScroller, fsS32 pViewWidth, fsS32 pViewHeight, fsF32 pScale)
Protected Member Functions inherited from fsCEntity
 fsCEntity (const fsStr &pName)
virtual ~fsCEntity ()
void initialiseFromVariableTableDo (const fsCVariableTable &pVars) override
void updateDo (fsS32 pDeltaMs) override
void renderDo () override
void updatedMatrixProcess () override
void initDo () override
void resetDo () override
void serialiseDo () override
void deserialiseDo () override
void postLoad () override
void postLinkDo () override
Protected Member Functions inherited from fsINode
virtual ~fsINode ()

Additional Inherited Members

Protected Attributes inherited from fsINode
std::vector< fsINode * > mChildren
fsINodemParent
fsStr mName
fsAffineMtx2d mLocalMtx
fsAffineMtx2d mRenderMtx
fsBool mInChildUpdate
fsBool mVisible
fsBool mRenderChildrenRegardless
fsBool mSkipMe
fsBool mMtxDirty
fsVec2d mPos
fsVec2d mScale
fsF32 mAngle
fsF32 mTargetAngle
fsF32 mRotationDir
fsF32 mRotationSpeed
fsISerialisablemSerialisableController

Constructor & Destructor Documentation

◆ ~fsCView()

fsCView::~fsCView ( )

◆ fsCView()

fsCView::fsCView ( fsITileMap *const pMap,
fsIScroller *const pScroller,
fsS32 pViewWidth,
fsS32 pViewHeight,
fsF32 pScale )
protected

Member Function Documentation

◆ check()

fsBool fsCView::check ( fsPoint const & pPos)

◆ create()

fsCView *const fsCView::create ( fsITileMap *const pMap,
fsIScroller *const pScroller,
fsS32 pViewWidth,
fsS32 pViewHeight,
fsF32 pScale = 1.0f )
static

◆ jumpTo()

void fsCView::jumpTo ( const fsPoint & pPos)

◆ mapPixelToLocal()

fsPoint fsCView::mapPixelToLocal ( const fsPoint & pMapPixel) const

Map-pixel coordinate (object/tile space, top-left origin) -> this view's local position, matching how image layers are placed (the map box is centred on the view and scaled by the render scale). Use it to position slot markers / placed buildings so they line up with the painted backdrop.

◆ mapToView()

fsPoint fsCView::mapToView ( fsPoint pPos) const

◆ pixelHeightGet()

fsS32 fsCView::pixelHeightGet ( ) const

◆ pixelWidtheGet()

fsS32 fsCView::pixelWidtheGet ( ) const

◆ screenToMap()

fsPoint fsCView::screenToMap ( fsPoint pPos) const

◆ scroll()

void fsCView::scroll ( fsS32 & pAttemptedX,
fsS32 & pAttemptedY )

◆ scrollOffsetGet()

fsPoint & fsCView::scrollOffsetGet ( )

◆ tileHide()

fsBool fsCView::tileHide ( fsS32 pLayerId,
fsS32 pCol,
fsS32 pRow )

Hide the rendered tile entity at (pCol,pRow) on the tile layer with the given map-layer id, revealing whatever layer draws beneath it. Used by the park's forest clearing: hiding a "forest" tile exposes the "ground" grass already painted under it. Returns false if that cell held no tile on that layer (nothing to hide). No-op for a non-tile / unknown layer.

◆ triggersGet()

std::vector< fsCView::STrigger * > const & fsCView::triggersGet ( )

Member Data Documentation

◆ mMap

fsITileMap* fsNTileMap::fsCView::mMap

The documentation for this class was generated from the following files: