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