티스토리 뷰
당신이 사용할 수있는:
draw_lit_sprite
이것이하는 일은 BITMAP를 가져 와서이 기능을 사용하여 이전에 설정해야하는 "빛"을 사용하여 그리는 것입니다.
set_trans_blender
그래서 기본적으로해야 할 일은 :
//Init allegro code here
init_allegro_stuff();
//It takes as arguments red, green, blue, alpha
//so in this case it's a white light
set_trans_blender(255, 255, 255, 255);
//Draws the sprite like draw_sprite but with intensity
draw_lit_sprite(buffer, yourSprite, x, y, intensity);
도움이 되길 바랍니다 :)
-------------------팔레트로 가능할 수 있습니다 : http://alleg.sourceforge.net/stabledocs/en/alleg011.html
저는 Allegro에 대해 잘 모르지만 이전의 8 비트 게임에서 페이딩은 일반적으로 렌더링 할 때 비디오 카드가 읽는 색상 표를 변경하여 수행되므로 여러 업데이트를 지속적으로 수행 할 수있는 방법을 제공합니다. 동시에 화면에 픽셀.
도움이되기를 바랍니다 :)
출처
https://stackoverflow.com/questions/1904993
댓글