收口颜色格式,删除原来的 RGBA8888 的存储和调用
This commit is contained in:
@@ -53,6 +53,21 @@ namespace
|
||||
assert(pixels[1] == 0xF800u);
|
||||
}
|
||||
|
||||
void TestImageDefaultsToRgba5551AndReturnsRawPixels()
|
||||
{
|
||||
const uint16_t default_pixels[] = { 0xF801u, 0x0000u };
|
||||
RenderData::Image default_image(default_pixels, 1, 1);
|
||||
assert(default_image.format == RenderData::PixelFormat::RGBA5551);
|
||||
|
||||
const uint16_t explicit_pixels[] = { 0x07C1u };
|
||||
RenderData::Image explicit_image(
|
||||
explicit_pixels,
|
||||
1,
|
||||
1,
|
||||
RenderData::PixelFormat::RGBA5551);
|
||||
assert(explicit_image.get_pixel(0, 0) == 0x07C1u);
|
||||
}
|
||||
|
||||
void TestDrawSpriteUsesOneBitAlpha()
|
||||
{
|
||||
const uint16_t sprite_pixels[] = {
|
||||
@@ -199,6 +214,7 @@ int main()
|
||||
{
|
||||
TestFramePixelIsRgb565();
|
||||
TestFrameBufferStoresRgb565();
|
||||
TestImageDefaultsToRgba5551AndReturnsRawPixels();
|
||||
TestDrawSpriteUsesOneBitAlpha();
|
||||
TestSpriteAssetLoaderRoundTripsRgba5551();
|
||||
TestDrawTextUsesBitMaskAndColor();
|
||||
|
||||
Reference in New Issue
Block a user