@ -491,27 +491,26 @@ void BuildLightmap(Point tilePosition, Point targetBufferPosition, uint16_t view
Lightmap : : Lightmap ( const uint8_t * outBuffer , uint16_t outPitch ,
Lightmap : : Lightmap ( const uint8_t * outBuffer , uint16_t outPitch ,
std : : span < const uint8_t > lightmapBuffer , uint16_t lightmapPitch ,
std : : span < const uint8_t > lightmapBuffer , uint16_t lightmapPitch ,
const uint8_t * lightTables , size_t lightTableSize )
std : : span < const std : : array < uint8_t , LightTableSize > , NumLightingLevels > lightTables )
: outBuffer ( outBuffer )
: outBuffer ( outBuffer )
, outPitch ( outPitch )
, outPitch ( outPitch )
, lightmapBuffer ( lightmapBuffer )
, lightmapBuffer ( lightmapBuffer )
, lightmapPitch ( lightmapPitch )
, lightmapPitch ( lightmapPitch )
, lightTables ( lightTables )
, lightTables ( lightTables )
, lightTableSize ( lightTableSize )
{
{
}
}
Lightmap Lightmap : : build ( bool perPixelLighting , Point tilePosition , Point targetBufferPosition ,
Lightmap Lightmap : : build ( bool perPixelLighting , Point tilePosition , Point targetBufferPosition ,
int viewportWidth , int viewportHeight , int rows , int columns ,
int viewportWidth , int viewportHeight , int rows , int columns ,
const uint8_t * outBuffer , uint16_t outPitch ,
const uint8_t * outBuffer , uint16_t outPitch ,
const uint8_t * lightTables , size_t lightTableSize ,
std : : span < const std : : array < uint8_t , LightTableSize > , NumLightingLevels > lightTables ,
const uint8_t tileLights [ MAXDUNX ] [ MAXDUNY ] ,
const uint8_t tileLights [ MAXDUNX ] [ MAXDUNY ] ,
uint_fast8_t microTileLen )
uint_fast8_t microTileLen )
{
{
if ( perPixelLighting ) {
if ( perPixelLighting ) {
BuildLightmap ( tilePosition , targetBufferPosition , viewportWidth , viewportHeight , rows , columns , tileLights , microTileLen ) ;
BuildLightmap ( tilePosition , targetBufferPosition , viewportWidth , viewportHeight , rows , columns , tileLights , microTileLen ) ;
}
}
return Lightmap ( outBuffer , outPitch , LightmapBuffer , viewportWidth , lightTables , lightTableSize ) ;
return Lightmap ( outBuffer , outPitch , LightmapBuffer , viewportWidth , lightTables ) ;
}
}
Lightmap Lightmap : : bleedUp ( bool perPixelLighting , const Lightmap & source , Point targetBufferPosition , std : : span < uint8_t > lightmapBuffer )
Lightmap Lightmap : : bleedUp ( bool perPixelLighting , const Lightmap & source , Point targetBufferPosition , std : : span < uint8_t > lightmapBuffer )
@ -566,7 +565,7 @@ Lightmap Lightmap::bleedUp(bool perPixelLighting, const Lightmap &source, Point
return Lightmap ( outBuffer , source . outPitch ,
return Lightmap ( outBuffer , source . outPitch ,
lightmapBuffer , lightmapPitch ,
lightmapBuffer , lightmapPitch ,
source . lightTables , source . lightTableSize ) ;
source . lightTables ) ;
}
}
} // namespace devilution
} // namespace devilution