📄 rle.inl
字号:
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* RLE sprite inline functions (generic C).
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#ifndef ALLEGRO_RLE_INL
#define ALLEGRO_RLE_INL
#ifdef __cplusplus
extern "C" {
#endif
#include "allegro/debug.h"
AL_INLINE(void, draw_rle_sprite, (struct BITMAP *bmp, AL_CONST struct RLE_SPRITE *sprite, int x, int y),
{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->color_depth);
bmp->vtable->draw_rle_sprite(bmp, sprite, x, y);
})
AL_INLINE(void, draw_trans_rle_sprite, (struct BITMAP *bmp, AL_CONST struct RLE_SPRITE *sprite, int x, int y),
{
ASSERT(bmp);
ASSERT(sprite);
if (sprite->color_depth == 32) {
ASSERT(bmp->vtable->draw_trans_rgba_rle_sprite);
bmp->vtable->draw_trans_rgba_rle_sprite(bmp, sprite, x, y);
}
else {
ASSERT(bmp->vtable->color_depth == sprite->color_depth);
bmp->vtable->draw_trans_rle_sprite(bmp, sprite, x, y);
}
})
AL_INLINE(void, draw_lit_rle_sprite, (struct BITMAP *bmp, AL_CONST struct RLE_SPRITE *sprite, int x, int y, int color),
{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->color_depth);
bmp->vtable->draw_lit_rle_sprite(bmp, sprite, x, y, color);
})
#ifdef __cplusplus
}
#endif
#endif /* ifndef ALLEGRO_RLE_INL */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -