瀏覽代碼

* Removed the cucul_t * argument from cucul_create_bitmap(). It's not needed.

tags/v0.99.beta14
Sam Hocevar sam 18 年之前
父節點
當前提交
36886a339e
共有 11 個檔案被更改,包括 20 行新增21 行删除
  1. +4
    -5
      cucul/bitmap.c
  2. +4
    -4
      cucul/cucul.h
  3. +1
    -1
      src/aafire.c
  4. +1
    -1
      src/cacaball.c
  5. +1
    -1
      src/cacamoir.c
  6. +1
    -1
      src/cacaplas.c
  7. +3
    -3
      src/cacaview.c
  8. +1
    -1
      test/demo.c
  9. +1
    -1
      test/export.c
  10. +2
    -2
      test/gamma.c
  11. +1
    -1
      test/hsv.c

+ 4
- 5
cucul/bitmap.c 查看文件

@@ -258,11 +258,10 @@ static float gammapow(float x, float y)
* \param amask Bitmask for alpha values.
* \return Bitmap object, or NULL upon error.
*/
struct cucul_bitmap *cucul_create_bitmap(cucul_t *qq,
unsigned int bpp, unsigned int w,
unsigned int h, unsigned int pitch,
unsigned int rmask, unsigned int gmask,
unsigned int bmask, unsigned int amask)
struct cucul_bitmap *cucul_create_bitmap(unsigned int bpp, unsigned int w,
unsigned int h, unsigned int pitch,
unsigned int rmask, unsigned int gmask,
unsigned int bmask, unsigned int amask)
{
struct cucul_bitmap *bitmap;
int i;


+ 4
- 4
cucul/cucul.h 查看文件

@@ -202,10 +202,10 @@ void cucul_free_sprite(struct cucul_sprite *);
*
* @{ */
struct cucul_bitmap;
struct cucul_bitmap *cucul_create_bitmap(cucul_t *, unsigned int, unsigned int,
unsigned int, unsigned int,
unsigned int, unsigned int,
unsigned int, unsigned int);
struct cucul_bitmap *cucul_create_bitmap(unsigned int, unsigned int,
unsigned int, unsigned int,
unsigned int, unsigned int,
unsigned int, unsigned int);
void cucul_set_bitmap_palette(struct cucul_bitmap *,
unsigned int r[], unsigned int g[],
unsigned int b[], unsigned int a[]);


+ 1
- 1
src/aafire.c 查看文件

@@ -140,7 +140,7 @@ initialize (void)
#endif

#ifdef LIBCACA
cucul_bitmap = cucul_create_bitmap(qq, 8, XSIZ, YSIZ - 2, XSIZ, 0, 0, 0, 0);
cucul_bitmap = cucul_create_bitmap(8, XSIZ, YSIZ - 2, XSIZ, 0, 0, 0, 0);
cucul_set_bitmap_palette(cucul_bitmap, r, g, b, a);
bitmap = malloc(4 * cucul_get_width(qq) * cucul_get_height(qq) * sizeof(char));
memset(bitmap, 0, 4 * cucul_get_width(qq) * cucul_get_height(qq));


+ 1
- 1
src/cacaball.c 查看文件

@@ -69,7 +69,7 @@ int main(int argc, char **argv)

/* Create a libcucul bitmap smaller than our pixel buffer, so that we
* display only the interesting part of it */
cucul_bitmap = cucul_create_bitmap(qq, 8, XSIZ - METASIZE, YSIZ - METASIZE,
cucul_bitmap = cucul_create_bitmap(8, XSIZ - METASIZE, YSIZ - METASIZE,
XSIZ, 0, 0, 0, 0);

/* Generate ball sprite */


+ 1
- 1
src/cacamoir.c 查看文件

@@ -63,7 +63,7 @@ int main (int argc, char **argv)
draw_disc(i, (i / DISCTHICKNESS) % 2);

/* Create a libcucul bitmap */
bitmap = cucul_create_bitmap(qq, 8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);
bitmap = cucul_create_bitmap(8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);

/* Main loop */
for(;;)


+ 1
- 1
src/cacaplas.c 查看文件

@@ -75,7 +75,7 @@ int main (int argc, char **argv)
}

/* Create a libcucul bitmap */
bitmap = cucul_create_bitmap(qq, 8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);
bitmap = cucul_create_bitmap(8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);

/* Main loop */
for(;;)


+ 3
- 3
src/cacaview.c 查看文件

@@ -545,7 +545,7 @@ static void load_image(char const *name)
depth = 4;

/* Create the libcucul bitmap */
bitmap = cucul_create_bitmap(qq, bpp, w, h, depth * w,
bitmap = cucul_create_bitmap(bpp, w, h, depth * w,
rmask, gmask, bmask, amask);
if(!bitmap)
{
@@ -712,8 +712,8 @@ static void load_image(char const *name)

fclose(fp);

/* Create the libcaca bitmap */
bitmap = cucul_create_bitmap(qq, bpp, w, h, depth * w,
/* Create the libcucul bitmap */
bitmap = cucul_create_bitmap(bpp, w, h, depth * w,
rmask, gmask, bmask, amask);
if(!bitmap)
{


+ 1
- 1
test/demo.c 查看文件

@@ -536,7 +536,7 @@ static void demo_render(void)
for(z = 0; z < 240; z++)
draw_circle(buffer, xo, yo, z, 0x000000ff, 200);

bitmap = cucul_create_bitmap(qq, 32, 256, 256, 4 * 256, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
bitmap = cucul_create_bitmap(32, 256, 256, 4 * 256, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
cucul_draw_bitmap(qq, 0, 0, cucul_get_width(qq) - 1, cucul_get_height(qq) - 1, bitmap, (char *)buffer);
cucul_free_bitmap(bitmap);
}


+ 1
- 1
test/export.c 查看文件

@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
}
}

bitmap = cucul_create_bitmap(qq, 32, 256, 256, 4 * 256,
bitmap = cucul_create_bitmap(32, 256, 256, 4 * 256,
0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
cucul_draw_bitmap(qq, 0, 0,
cucul_get_width(qq) - 1, cucul_get_height(qq) - 1,


+ 2
- 2
test/gamma.c 查看文件

@@ -45,9 +45,9 @@ int main(void)
buffer[x + 768] = (x << 16) | (0x00 << 8) | (0xff << 0);
}

left = cucul_create_bitmap(qq, 32, 256, 4, 4 * 256,
left = cucul_create_bitmap(32, 256, 4, 4 * 256,
0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
right = cucul_create_bitmap(qq, 32, 256, 4, 4 * 256,
right = cucul_create_bitmap(32, 256, 4, 4 * 256,
0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
caca_set_delay(kk, 20000);



+ 1
- 1
test/hsv.c 查看文件

@@ -43,7 +43,7 @@ int main(void)
buffer[y * 256 + x] = ((y * x / 256) << 16) | ((y * x / 256) << 8) | (x<< 0);
}

bitmap = cucul_create_bitmap(qq, 32, 256, 256, 4 * 256,
bitmap = cucul_create_bitmap(32, 256, 256, 4 * 256,
0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
cucul_draw_bitmap(qq, 0, 0,
cucul_get_width(qq) - 1, cucul_get_height(qq) - 1,


Loading…
取消
儲存