dungeon_crawler
diff prototype/src/main.cc @ 74:5981917093ff
color grading palette output done, all is left is the input
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 21 Oct 2012 15:56:47 +0300 |
parents | a27528035e20 |
children | b05ab29cd17d |
line diff
1.1 --- a/prototype/src/main.cc Sun Oct 21 02:11:23 2012 +0300 1.2 +++ b/prototype/src/main.cc Sun Oct 21 15:56:47 2012 +0300 1.3 @@ -43,6 +43,7 @@ 1.4 static float stereo_eye_sep = stereo_focus_dist / 30.0; 1.5 1.6 static bool show_con; 1.7 +static bool save_grade_shot; 1.8 1.9 static AudioSource *move_sound; 1.10 static OggVorbisStream *music; 1.11 @@ -245,6 +246,14 @@ 1.12 if(show_con) { 1.13 draw_cmdcon(); 1.14 } 1.15 + 1.16 + if(save_grade_shot) { 1.17 + GradePalette *pal = rend->get_grade_palette(); 1.18 + if(!pal->save_shot("gradeshot.ppm")) { 1.19 + fprintf(stderr, "failed to save color grading shot\n"); 1.20 + } 1.21 + save_grade_shot = false; 1.22 + } 1.23 } 1.24 1.25 void view_matrix(int eye) 1.26 @@ -396,6 +405,10 @@ 1.27 } 1.28 break; 1.29 1.30 + case 'g': 1.31 + save_grade_shot = true; 1.32 + break; 1.33 + 1.34 default: 1.35 break; 1.36 }