# All of these are hardware only as compressed bitmaps are a video-bitmap only feature.

[loading]
hw_only = true
op0=b = al_load_bitmap(filename)
op1=al_draw_bitmap(b, 0, 0, 0)

[test loading dxt1]
extend=loading
filename = ../examples/data/mysha_dxt1.dds
sig=ftZD50000um0050000jLL050000222200000000000000000000000000000000000000000000000000

[test loading dxt3]
extend=loading
filename = ../examples/data/mysha_dxt3.dds
sig=ftZE50000um0050000jLL050000222200000000000000000000000000000000000000000000000000

[test loading dxt5]
extend=loading
filename = ../examples/data/mysha_dxt5.dds
sig=ftZE50000um0050000jLL050000222200000000000000000000000000000000000000000000000000

[dest rw]
hw_only = true
op0=b = al_load_bitmap(filename)
op1=al_set_target_bitmap(b)
# Need to lock, otherwise the triangles of the rectangle will lock separately and result in diagonal artifacts
op2=al_lock_bitmap_region(b, 7, 7, 166, 126, ALLEGRO_PIXEL_FORMAT_ANY, ALLEGRO_LOCK_READWRITE)
op3=al_draw_filled_rectangle(8, 8, 164, 124, #ff00ff)
op4=al_unlock_bitmap(b)
op5=al_set_target_bitmap(target)
op6=al_draw_bitmap(b, 0, 0, 0)

[test dest rw dxt1]
extend=dest rw
filename = ../examples/data/mysha_dxt1.dds
sig=ggZD50000gg0050000jLL050000222200000000000000000000000000000000000000000000000000

[test dest rw dxt3]
extend=dest rw
filename = ../examples/data/mysha_dxt3.dds
sig=ggZE50000gg0050000jLL050000222200000000000000000000000000000000000000000000000000

[test dest rw dxt5]
extend=dest rw
filename = ../examples/data/mysha_dxt5.dds
sig=ggZE50000gg0050000jLL050000222200000000000000000000000000000000000000000000000000

[dest wo]
hw_only = true
filename2 = ../examples/data/blue_box.png
op0=b = al_load_bitmap(filename)
op1=b2 = al_load_bitmap(filename2)
op2=al_set_target_bitmap(b)
op3=al_draw_bitmap(b2, 16, 16, 0)
op4=al_set_target_bitmap(target)
op5=al_draw_bitmap(b, 0, 0, 0)

[test dest wo dxt1]
extend=dest wo
filename = ../examples/data/mysha_dxt1.dds
sig=OOZD50000OO0050000aML050000222200000000000000000000000000000000000000000000000000

[test dest wo dxt3]
extend=dest wo
filename = ../examples/data/mysha_dxt3.dds
sig=OOZD50000OO0050000aML050000222200000000000000000000000000000000000000000000000000

[test dest wo dxt5]
extend=dest wo
filename = ../examples/data/mysha_dxt5.dds
sig=OOZD50000OO0050000aML050000222200000000000000000000000000000000000000000000000000

[src]
hw_only = true
filename2 = ../examples/data/fakeamp.bmp
op0=b = al_load_bitmap(filename)
op1=b2 = al_load_bitmap(filename2)
op2=al_set_target_bitmap(b2)
op3=al_draw_bitmap_region(b, 16, 16, 128, 128, 16, 16, 0)
op4=al_set_target_bitmap(target)
op5=al_draw_bitmap(b2, 0, 0, 0)

[test src dxt1]
extend=src
filename = ../examples/data/mysha_dxt1.dds
sig=ftwu00000um0w00000QB0r00000vrnv00000000000000000000000000000000000000000000000000


[test src dxt3]
extend=src
filename = ../examples/data/mysha_dxt3.dds
sig=ftwu00000um0w00000QB0r00000vrnv00000000000000000000000000000000000000000000000000


[test src dxt5]
extend=src
filename = ../examples/data/mysha_dxt5.dds
sig=ftwu00000um0w00000QB0r00000vrnv00000000000000000000000000000000000000000000000000

[dest sub]
hw_only = true
op0=b = al_load_bitmap(filename)
op1=b2 = al_create_sub_bitmap(b, 16, 16, 128, 128);
op2=al_set_target_bitmap(b2)
op3=al_clear_to_color(#00ff00)
op4=al_set_target_bitmap(target)
op5=al_draw_bitmap(b, 0, 0, 0)

[test dest sub dxt1]
extend=dest sub
filename = ../examples/data/mysha_dxt1.dds
sig=LLZD50000LL0050000ZLL050000222200000000000000000000000000000000000000000000000000

[test dest sub dxt3]
extend=dest sub
filename = ../examples/data/mysha_dxt3.dds
sig=LLZD50000LL0050000ZLL050000222200000000000000000000000000000000000000000000000000

[test dest sub dxt5]
extend=dest sub
filename = ../examples/data/mysha_dxt5.dds
sig=LLZD50000LL0050000ZLL050000222200000000000000000000000000000000000000000000000000

[convert from]
hw_only = true
op0=b = al_load_bitmap(filename)
op1=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_RGB_565)
op2=al_convert_bitmap(b)
op3=al_draw_bitmap(b, 0, 0, 0)

[test convert from dxt1]
extend=convert from
filename = ../examples/data/mysha_dxt1.dds
sig=ftZD50000um0050000jLL050000222200000000000000000000000000000000000000000000000000

[test convert from dxt3]
extend=convert from
filename = ../examples/data/mysha_dxt3.dds
sig=ftZD50000um0050000jLL050000222200000000000000000000000000000000000000000000000000

[test convert from dxt5]
extend=convert from
filename = ../examples/data/mysha_dxt5.dds
sig=ftZD50000um0050000jLL050000222200000000000000000000000000000000000000000000000000

[convert to]
hw_only = true
filename = ../examples/data/blue_box.png
op0=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_RGB_565)
op1=b = al_load_bitmap(filename)
op3=al_convert_bitmap(b)
op4=al_draw_bitmap(b, 0, 0, 0)

[test convert to dxt1]
extend=convert to
op2=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_COMPRESSED_RGBA_DXT1)
sig=OA0000000OA0000000000000000000000000000000000000000000000000000000000000000000000

[test convert to dxt3]
extend=convert to
op2=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_COMPRESSED_RGBA_DXT3)
sig=OA0000000OA0000000000000000000000000000000000000000000000000000000000000000000000

[test convert to dxt5]
extend=convert to
op2=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_COMPRESSED_RGBA_DXT5)
sig=OA0000000OA0000000000000000000000000000000000000000000000000000000000000000000000
