MCPcopy Create free account
hub / github.com/SpartanJ/eepp / create

Method create

src/modules/maps/src/eepp/maps/tilemap.cpp:90–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void TileMap::create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags, Sizef viewSize,
91 EE::Window::Window* Window ) {
92 reset();
93
94 mWindow = Window;
95
96 if ( NULL == mWindow )
97 mWindow = Engine::instance()->getCurrentWindow();
98
99 mFlags = Flags;
100 mMaxLayers = MaxLayers;
101 mSize = Size;
102 mTileSize = TileSize;
103 mPixelSize = Size * TileSize;
104 mLayers = eeNewArray( MapLayer*, mMaxLayers );
105
106 if ( getLightsEnabled() )
107 createLightManager();
108
109 for ( Uint32 i = 0; i < mMaxLayers; i++ )
110 mLayers[i] = NULL;
111
112 setViewSize( viewSize );
113
114 createEmptyTile();
115}
116
117void TileMap::createLightManager() {
118 eeSAFE_DELETE( mLightManager );

Callers 2

onOKClickMethod · 0.45
createNewEmptyMapMethod · 0.45

Calls 2

resetFunction · 0.85
getCurrentWindowMethod · 0.80

Tested by

no test coverage detected