Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

time-critical-procs.cc File Reference

#include "fack.hpp"

Go to the source code of this file.

Functions

void write_pixel_with_src_alpha (cfsurf &dest, int x, int y, rgbaf pixel)
void blit_char (const anim_frame_and_pos &src, float scaling, float lighting, cfsurf &screen)
pt< cfsurfsum_each_pixel (const list< surf_and_weight > &surfs, float time, SDL_Rect visible_rect)


Function Documentation

void blit_char const anim_frame_and_pos src,
float  scaling,
float  lighting,
cfsurf screen
 

This is a blit procedure tuned for characters. It features: per-pixel alpha-blending, scaling with linear interpolation, uniform lighting, clipping.

Bug:
This procedure has some graphic artifact when the scaling factor is > 1.0f or = 1.0f. Fix this.
Parameters:
src  character animation frame. the source surface.
scaling  scaling factor. Pass 1.0f for no scaling, in which case the procedure is much faster.
lighting  uniform lighting multiplier.
screen  the blit destination surface

Definition at line 80 of file time-critical-procs.cc.

References mul_scalar_rgbaf_noalpha(), and write_pixel_with_src_alpha().

Referenced by anim_frame_and_pos::print_with_transparency().

pt<cfsurf> sum_each_pixel const list< surf_and_weight > &  surfs,
float  time,
SDL_Rect  visible_rect
[inline]
 

create a cfsurf whose rgba values are the sum of the corresponding values in the input cfsurf's.

Todo:
: recheck the logic.

Definition at line 181 of file time-critical-procs.cc.

References foreach, map_get(), max(), min(), mul_scalar_rgbaf(), mul_scalar_rgbaf_noalpha(), NEW, surf_and_weight::oscillation_amplitude, pow(), setof_, sum_rgbaf(), and surf_and_weight::surf.

Referenced by FACK::lit_layer_of_unlit_layer().

void write_pixel_with_src_alpha cfsurf dest,
int  x,
int  y,
rgbaf  pixel
 

Todo:
: make dest an opaque_cfsurf.

Definition at line 24 of file time-critical-procs.cc.

References rgbaf::a, rgbaf::b, rgbaf::g, and rgbaf::r.

Referenced by blit_char(), and cfsurf::blit_with_src_alpha().


Generated on Wed May 25 15:36:07 2005 for FACK by  doxygen 1.4.0