| Re: [AD] DirectDraw - create_sub_bitmap() or save_bitmap() faulty ? |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
see attachment:test.pcx
[code]
#include<allegro.h>
int main(){int i;PALETTE p;allegro_init();install_keyboard();
set_color_depth(8);set_gfx_mode(GFX_AUTODETECT_FULLSCREEN,320,240,0,0);
for(i=120;i>0;i-=12)circlefill(screen,160,120,i,i);
textout_ex(screen,font,allegro_id,0,0,13,-1);
textprintf_ex(screen,font,0,60,32,-1,"%s/%dx%d/%d.%d",
gfx_driver->desc,gfx_driver->w,gfx_driver->h,os_version,os_revision);
BITMAP*B=create_sub_bitmap(screen,0,0,SCREEN_W,SCREEN_H);
textprintf_ex(B,font,0,80,48,0,"%dx%d %d",B->w,B->h,B->vtable->color_depth);
readkey(); get_palette(p); save_bitmap("test.pcx",B,p); destroy_bitmap(B);
}END_OF_MAIN();
[/code]
(using DirectX9)
-------------------------------------------------
HKNETMAIL.COM Free WEB MAIL Service by HKNET
Attachment:
tstpcx.7z
Description: Binary data
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |