dungeon_crawler
diff prototype/src/cmdcon.cc @ 29:2fc004802739
lalala
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 26 Aug 2012 03:39:32 +0300 |
parents | 21999ef6636b |
children | 7f52d6310317 |
line diff
1.1 --- a/prototype/src/cmdcon.cc Sat Aug 25 20:20:56 2012 +0300 1.2 +++ b/prototype/src/cmdcon.cc Sun Aug 26 03:39:32 2012 +0300 1.3 @@ -26,11 +26,11 @@ 1.4 } 1.5 1.6 printf("loading font: %s\n", path); 1.7 - if(!(font = dtx_open_font(path, 12))) { 1.8 + if(!(font = dtx_open_font(path, 14))) { 1.9 fprintf(stderr, "failed to open font file: %s\n", path); 1.10 return false; 1.11 } 1.12 - dtx_use_font(font, 12); 1.13 + dtx_use_font(font, 14); 1.14 return true; 1.15 } 1.16 1.17 @@ -72,20 +72,16 @@ 1.18 1.19 void draw_cmdcon() 1.20 { 1.21 - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 1.22 - 1.23 glMatrixMode(GL_PROJECTION); 1.24 glPushMatrix(); 1.25 glLoadIdentity(); 1.26 - //glOrtho(0, cfg.width, cfg.height, 0, -1, 1); 1.27 - glOrtho(-cfg.width / 2.0, cfg.width / 2.0, -cfg.height / 2.0, cfg.height / 2.0, -1, 1); 1.28 + glOrtho(0, cfg.width, cfg.height, 0, -1, 1); 1.29 glMatrixMode(GL_MODELVIEW); 1.30 glPushMatrix(); 1.31 glLoadIdentity(); 1.32 1.33 - //glTranslatef(100, 100, 0); 1.34 - 1.35 - glPushAttrib(GL_ENABLE_BIT | GL_CURRENT_BIT); 1.36 + glPushAttrib(GL_ENABLE_BIT | GL_CURRENT_BIT | GL_POLYGON_BIT); 1.37 + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 1.38 glUseProgram(0); 1.39 glDisable(GL_DEPTH_TEST); 1.40 glDisable(GL_LIGHTING); 1.41 @@ -94,13 +90,16 @@ 1.42 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1.43 1.44 glBegin(GL_QUADS); 1.45 - glColor4f(0.4, 0.4, 0.4, 0.5); 1.46 - glVertex2f(-10, -10); 1.47 - glVertex2f(10, -10); 1.48 - glVertex2f(10, 10); 1.49 - glVertex2f(-10, 10); 1.50 + glColor4f(0.2, 0.2, 0.2, 0.6); 1.51 + glVertex2f(0, 0); 1.52 + glVertex2f(0, dtx_line_height() * 1.5); 1.53 + glVertex2f(cfg.width, dtx_line_height() * 1.5); 1.54 + glVertex2f(cfg.width, 0); 1.55 glEnd(); 1.56 1.57 + glTranslatef(0, dtx_line_height(), 0); 1.58 + glScalef(1, -1, 1); 1.59 + 1.60 glColor4f(0.2, 0.9, 0.3, 1.0); 1.61 dtx_string(cmdline.c_str()); 1.62 dtx_flush();