Skip to content

Commit

Permalink
flashified the console
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Auvinen committed Feb 10, 2008
1 parent e1acdb8 commit acffe66
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
Binary file added data/console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/console_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions datasrc/teewars.ds
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ images {
browseicons {
filename "data/browse_icons.png"
}

console_bg {
filename "data/console.png"
}
console_bar {
filename "data/console_bar.png"
}
}

powerups {
Expand Down
6 changes: 5 additions & 1 deletion src/engine/external/pa.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@
#include "portaudio/pa_ringbuffer.c"
#else
#define HAVE_SYS_SOUNDCARD_H

#define PA_USE_ALSA
#include "portaudio/pa_linux_alsa.c"
//#include "portaudio/pa_unix_oss.c"

/*#define PA_USE_OSS
#include "portaudio/pa_unix_oss.c" */

#include "portaudio/pa_unix_hostapis.c"
#endif
#elif defined(CONF_FAMILY_WINDOWS)
Expand Down
15 changes: 13 additions & 2 deletions src/game/client/gc_console.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "gc_console.h"
#include "../generated/gc_data.h"

extern "C" {
#include <engine/e_system.h>
Expand Down Expand Up @@ -262,12 +263,22 @@ void console_render()
gfx_mapscreen(screen.x, screen.y, screen.w, screen.h);


gfx_texture_set(-1);
gfx_texture_set(data->images[IMAGE_CONSOLE_BG].id);
gfx_quads_begin();
gfx_setcolor(0.4,0.2,0.2,0.8);
gfx_setcolor(0.2f, 0.2f, 0.2f,0.8f);
gfx_quads_setsubset(0,-console_height*0.075f,screen.w*0.075f*0.5f,0);
gfx_quads_drawTL(0,0,screen.w,console_height);
gfx_quads_end();

gfx_texture_set(data->images[IMAGE_CONSOLE_BAR].id);
gfx_quads_begin();
gfx_setcolor(1.0f, 1.0f, 1.0f, 0.8f);
gfx_quads_setsubset(0,0.1f,screen.w*0.015f,1-0.1f);
gfx_quads_drawTL(0,console_height-10.0f,screen.w,10.0f);
gfx_quads_end();

console_height -= 10.0f;

{
float font_size = 12.0f;
float row_height = font_size*1.4f;
Expand Down

0 comments on commit acffe66

Please sign in to comment.