Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@ int TerrainTextureClass::update(WorldHeightMap *htMap)
ICoord2D position = pTile->m_tileLocationInTexture;
if (position.x<=0) continue; // all real tile offsets start at 2. jba.

UnsignedByte *pTileRGB = pTile->getRGBDataForWidth(tilePixelExtent);
if (!pTileRGB) continue;
Int i,j;
for (j=0; j<tilePixelExtent; j++) {
UnsignedByte *pBGR = pTile->getRGBDataForWidth(tilePixelExtent);
UnsignedByte *pBGR = pTileRGB;
pBGR += (tilePixelExtent-1-j)*TILE_BYTES_PER_PIXEL*tilePixelExtent; // invert to match.
Int row = position.y+j;
UnsignedByte *pBGRX = ((UnsignedByte*)locked_rect.pBits) +
Expand Down Expand Up @@ -805,11 +807,13 @@ int AlphaEdgeTextureClass::update(WorldHeightMap *htMap)
if (!pTile) continue;
ICoord2D position = pTile->m_tileLocationInTexture;
if (position.x<=0) continue; // all real edge offsets start at 4. jba.
UnsignedByte *pEdgeRGB = pTile->getRGBDataForWidth(tilePixelExtent);
if (!pEdgeRGB) continue;
Int i,j;
Int column = position.x;
for (j=0; j<tilePixelExtent; j++) {
Int row = position.y+j;
UnsignedByte *pBGR = htMap->getEdgeTile(tileNdx)->getRGBDataForWidth(tilePixelExtent);
UnsignedByte *pBGR = pEdgeRGB;
pBGR += (tilePixelExtent-1-j)*TILE_BYTES_PER_PIXEL*tilePixelExtent; // invert to match.
UnsignedByte *pBGRX = ((UnsignedByte*)locked_rect.pBits) +
(row)*surface_desc.Width*pixelBytes;
Expand Down
Loading