GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
create_light_table(3) Allegro manual create_light_table(3)

create_light_table - Fills a color mapping table for lighting effects. Allegro game programming library.

#include <allegro.h>

void create_light_table(COLOR_MAP *table, const PALETTE pal, int r, g, b, void (*callback)(int pos));

Fills the specified color mapping table with lookup data for doing lighting effects with the specified palette. When combining the colors c1 and c2 with this table, c1 is treated as a light level from 0-255. At light level 255 the table will output color c2 unchanged, at light level 0 it will output the r, g, b value you specify to this function, and at intermediate light levels it will output a color somewhere between the two extremes. The r, g, and b values are in the range 0-63.

This function will take advantage of the global rgb_ap variable to speed up color conversions. If the callback function is not NULL, it will be called 256 times during the calculation, allowing you to display a progress indicator. Example:

   COLOR_MAP light_table;
   ...
   /* Build a color lookup table for lighting effects. */
   create_light_table(&light_table, pal, 0, 0, 0, NULL);

color_map(3), create_trans_table(3), create_color_table(3), create_blender_table(3), draw_trans_sprite(3), draw_lit_sprite(3), draw_gouraud_sprite(3), rgb_map(3), ex3d(3), exshade(3), extrans(3)
version 4.4.3 Allegro

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.