Ignore:
Timestamp:
Dec 11, 2003, 5:31:49 PM (19 years ago)
Author:
Sam Hocevar
Message:
  • src/graphics.c: + Internally cache screen width and height.
  • src/bitmap.c: + Added alpha support to caca_draw_bitmap(). For now, we only treat 0%

alpha as fully transparent, and any other value as fully opaque.

+ Slightly tuned colour weights in the renderer.
+ caca_set_bitmap_palette() takes unsigned ints.

  • examples/demo.c: + Added a crap render demo.
  • examples/aafire.c: + Set a 20ms delay. + Added alpha values to the palette.
  • examples/view.c: + Draw a gray checkered grid below the image so that transparent images

look a lot nicer.

+ 'f' toggles "fullscreen" mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/caca.h

    r238 r246  
    201201struct caca_sprite;
    202202struct caca_sprite * caca_load_sprite(const char *);
    203 int caca_get_sprite_frames(struct caca_sprite *);
    204 int caca_get_sprite_width(struct caca_sprite *, int);
    205 int caca_get_sprite_height(struct caca_sprite *, int);
    206 int caca_get_sprite_dx(struct caca_sprite *, int);
    207 int caca_get_sprite_dy(struct caca_sprite *, int);
    208 void caca_draw_sprite(int, int, struct caca_sprite *, int);
     203int caca_get_sprite_frames(const struct caca_sprite *);
     204int caca_get_sprite_width(const struct caca_sprite *, int);
     205int caca_get_sprite_height(const struct caca_sprite *, int);
     206int caca_get_sprite_dx(const struct caca_sprite *, int);
     207int caca_get_sprite_dy(const struct caca_sprite *, int);
     208void caca_draw_sprite(int, int, const struct caca_sprite *, int);
    209209void caca_free_sprite(struct caca_sprite *);
    210210
     
    213213 */
    214214struct caca_bitmap;
    215 struct caca_bitmap *caca_create_bitmap(int, int, int, int, int, int, int);
    216 void caca_set_bitmap_palette(struct caca_bitmap *, int[], int[], int[]);
    217 void caca_draw_bitmap(int, int, int, int, struct caca_bitmap *, char *);
     215struct caca_bitmap *caca_create_bitmap(int, int, int, int, int, int, int, int);
     216void caca_set_bitmap_palette(struct caca_bitmap *, unsigned int[],
     217                             unsigned int[], unsigned int[], unsigned int[]);
     218void caca_draw_bitmap(int, int, int, int, const struct caca_bitmap *, char *);
    218219void caca_free_bitmap(struct caca_bitmap *);
    219220
Note: See TracChangeset for help on using the changeset viewer.