diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-01 16:18:43 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-01 16:18:43 -0600 |
commit | aed47304266b91562d4aa12a2f12e9a60db03faa (patch) | |
tree | 03549a05837c228482d2b5769d68abeb850b3add /apps/graphics/traveler | |
parent | 5679c41ad7f0cc42e181e732eb7ac0fb1fa9dd89 (diff) | |
download | nuttx-aed47304266b91562d4aa12a2f12e9a60db03faa.tar.gz nuttx-aed47304266b91562d4aa12a2f12e9a60db03faa.tar.bz2 nuttx-aed47304266b91562d4aa12a2f12e9a60db03faa.zip |
Making a place for color transformations
Diffstat (limited to 'apps/graphics/traveler')
-rw-r--r-- | apps/graphics/traveler/include/trv_color.h | 3 | ||||
-rwxr-xr-x | apps/graphics/traveler/src/trv_graphics.c | 7 | ||||
-rwxr-xr-x | apps/graphics/traveler/src/trv_main.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/apps/graphics/traveler/include/trv_color.h b/apps/graphics/traveler/include/trv_color.h index 0a2cf78bb..8252b6b9b 100644 --- a/apps/graphics/traveler/include/trv_color.h +++ b/apps/graphics/traveler/include/trv_color.h @@ -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); diff --git a/apps/graphics/traveler/src/trv_graphics.c b/apps/graphics/traveler/src/trv_graphics.c index 6742147aa..405c90422 100755 --- a/apps/graphics/traveler/src/trv_graphics.c +++ b/apps/graphics/traveler/src/trv_graphics.c @@ -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; } diff --git a/apps/graphics/traveler/src/trv_main.c b/apps/graphics/traveler/src/trv_main.c index fc9de19f6..7bd02458c 100755 --- a/apps/graphics/traveler/src/trv_main.c +++ b/apps/graphics/traveler/src/trv_main.c @@ -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(); |