| 101 | } |
| 102 | |
| 103 | static std::shared_ptr<CEditorImage> ImageInfoToEditorImage(CEditorMap *pMap, const CImageInfo &Image, const char *pName) |
| 104 | { |
| 105 | std::shared_ptr<CEditorImage> pEditorImage = std::make_shared<CEditorImage>(pMap); |
| 106 | pEditorImage->m_Width = Image.m_Width; |
| 107 | pEditorImage->m_Height = Image.m_Height; |
| 108 | pEditorImage->m_Format = Image.m_Format; |
| 109 | pEditorImage->m_pData = Image.m_pData; |
| 110 | |
| 111 | int TextureLoadFlag = pMap->Editor()->Graphics()->Uses2DTextureArrays() ? IGraphics::TEXLOAD_TO_2D_ARRAY_TEXTURE : IGraphics::TEXLOAD_TO_3D_TEXTURE; |
| 112 | pEditorImage->m_Texture = pMap->Editor()->Graphics()->LoadTextureRaw(Image, TextureLoadFlag, pName); |
| 113 | pEditorImage->m_External = 0; |
| 114 | str_copy(pEditorImage->m_aName, pName); |
| 115 | |
| 116 | return pEditorImage; |
| 117 | } |
| 118 | |
| 119 | static std::shared_ptr<CLayerTiles> AddLayerWithImage(CEditorMap *pMap, const std::shared_ptr<CLayerGroup> &pGroup, int Width, int Height, const CImageInfo &Image, const char *pName) |
| 120 | { |
no test coverage detected