From: some_x <some_x@inbox.ru> To: community@altlinux.ru Subject: [Comm] Allegro. Date: Sun, 09 Nov 2003 20:06:13 +0000 Message-ID: <3FAE9E35.1040108@inbox.ru> (raw) [-- Attachment #1: Type: text/plain, Size: 335 bytes --] Мне необходимо создать программу типа morhuh(попроще немного), я создал указатель(прлагается) с прозрачным фоном(ну чтоб статичные не зарисовывал(хотел ещё картинки уток анологично сделать)), а он его в виде чёрного или белого квадрата выводит(и никакой прозрачности), я что-то не так сделал(программа прилагается). Помогите плиз. [-- Attachment #2: mouse.tga --] [-- Type: application/octet-stream, Size: 10044 bytes --] [-- Attachment #3: f_graph.c --] [-- Type: text/plain, Size: 1236 bytes --] #include <allegro.h> #include<stdio.h> #include<stdlib.h> /*FILE *f;*/ int main(void) { BITMAP *the_image; BITMAP *cursor; PALETTE the_palette; PALETTE the_palette2; set_uformat(U_ASCII); allegro_init(); install_mouse(); install_keyboard(); allegro_message("n a ok\n"); if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,800,600,1600,600)!=0) allegro_message("Have trabls!\n"); the_image = load_bitmap("/home/some_x/x.bmp", the_palette); if (!the_image) { set_gfx_mode(GFX_TEXT, 0, 0, 0, 0); allegro_message("Error reading bitmap file \n"); return 1; } cursor=load_tga("/home/some_x/mouse.tga",the_palette2); if (!cursor) { set_gfx_mode(GFX_TEXT, 0, 0, 0, 0); allegro_message("Error reading bitmap file \n"); return 1; } /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ set_palette(the_palette); blit(the_image, screen, 0, 0, /*(SCREEN_W-the_image->w)/2*/0,/* (SCREEN_H-the_image->h)/2*/0, /*the_image->w*/256,/*the_image->h*/256); show_mouse(screen); set_mouse_sprite(cursor); for(;;) if(keypressed()) break;; destroy_bitmap(the_image); return EXIT_SUCCESS; } END_OF_MAIN()
reply other threads:[~2003-11-09 20:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3FAE9E35.1040108@inbox.ru \ --to=some_x@inbox.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git