tcledit/libwld: Fix a couple of bugs.
This commit is contained in:
parent
c185f8e5c8
commit
307bb794a8
@ -219,8 +219,13 @@ static uint8_t wld_manage_worldfile(INIHANDLE handle)
|
||||
|
||||
inifile_free_string(filename);
|
||||
|
||||
/* Create the RGB lookup table */
|
||||
|
||||
wld_rgblookup_allocate();
|
||||
|
||||
/* Get the name of the file containing the palette table which is used to
|
||||
* adjust the lighting with distance. */
|
||||
* adjust the lighting with distance.
|
||||
*/
|
||||
|
||||
result = wld_read_filename(handle, &filename, g_world_section_name,
|
||||
g_world_palette_name);
|
||||
@ -258,10 +263,6 @@ static uint8_t wld_manage_worldfile(INIHANDLE handle)
|
||||
return WORLD_BITMAP_FILE_NAME_ERROR;
|
||||
}
|
||||
|
||||
/* Create the RGB lookup table */
|
||||
|
||||
wld_rgblookup_allocate();
|
||||
|
||||
/* Then load the bitmaps */
|
||||
|
||||
result = wld_initialize_bitmaps();
|
||||
|
@ -191,7 +191,7 @@ static enum unit_vector_index_e wld_lum2colorform(color_lum_t * lum)
|
||||
* Description: Convert an RGB-Luminance value into a pixel
|
||||
****************************************************************************/
|
||||
|
||||
wld_pixel_t wld_color_lum2pixel(color_lum_t * lum)
|
||||
wld_pixel_t wld_lum2pixel(color_lum_t * lum)
|
||||
{
|
||||
#if RGB_CUBE_SIZE < MIN_LUM_LEVELS
|
||||
enum unit_vector_index_e uvndx;
|
||||
|
@ -58,7 +58,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#if RGB_CUBE_SIZE >= MIN_LUM_LEVELS
|
||||
static color_rgb_t *g_rgb_lut = NULL;
|
||||
static color_rgb_t *g_rgb_lut;
|
||||
static float g_wld_cube2pixel;
|
||||
#endif
|
||||
|
||||
@ -67,6 +67,9 @@ static float g_wld_cube2pixel;
|
||||
****************************************************************************/
|
||||
|
||||
#if RGB_CUBE_SIZE < MIN_LUM_LEVELS
|
||||
/* Lookup tables */
|
||||
|
||||
color_rgb_t *g_rgb_lut;
|
||||
color_lum_t *g_lum_lut;
|
||||
|
||||
/* The following defines the "form" of each color in the g_unit_vector array */
|
||||
|
Loading…
Reference in New Issue
Block a user