Making a place for color transformations
This commit is contained in:
parent
4c32019e4d
commit
00d4becbad
@ -70,7 +70,8 @@ struct trv_color_lum_s
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
bool trv_color_allocate(FAR struct trv_palette_s *pinfo);
|
||||
void trv_color_allocate(FAR struct trv_palette_s *pinfo);
|
||||
void trv_color_endmapping(void);
|
||||
void trv_color_free(FAR struct trv_palette_s *pinfo);
|
||||
trv_pixel_t trv_color_rgb2pixel(FAR struct trv_color_rgb_s *pixel);
|
||||
void trv_color_pixel2lum(trv_pixel_t pixel, FAR struct trv_color_lum_s *lum);
|
||||
|
@ -459,12 +459,7 @@ int trv_graphics_initialize(FAR struct trv_graphics_info_s *ginfo)
|
||||
|
||||
/* Allocate color mapping information */
|
||||
|
||||
ret = trv_color_allocate(&ginfo->palette);
|
||||
if (ret < 0)
|
||||
{
|
||||
trv_abort("ERROR trv_color_allocate failed: %d");
|
||||
}
|
||||
|
||||
trv_color_allocate(&ginfo->palette);
|
||||
trv_vdebug("%d colors allocated\n", ginfo->palette.ncolors);
|
||||
return OK;
|
||||
}
|
||||
|
@ -222,6 +222,10 @@ int traveler_main(int argc, char *argv[])
|
||||
world_filename, ret);
|
||||
}
|
||||
|
||||
/* Release color mapping tables */
|
||||
|
||||
trv_color_endmapping();
|
||||
|
||||
/* Set the player's POV in the new world */
|
||||
|
||||
trv_pov_reset();
|
||||
|
Loading…
Reference in New Issue
Block a user