diff -Naur ./src_/game/client/components/chat.cpp ./src/game/client/components/chat.cpp --- ./src_/game/client/components/chat.cpp 2010-06-20 12:28:15.182564200 +0200 +++ ./src/game/client/components/chat.cpp 2010-06-20 09:06:46.706152900 +0200 @@ -199,7 +199,10 @@ // return; } - str_copy(lines[current_line].name, "*** ", sizeof(lines[current_line].name)); + if(config.cl_arrows && (strstr(line, " entered and joined the ") || strstr(line, " has left the game") || strstr(line, " joined the "))) // Dunedune arrows + str_copy(lines[current_line].name, " ", sizeof(lines[current_line].name)); + else + str_copy(lines[current_line].name, "*** ", sizeof(lines[current_line].name)); str_format(lines[current_line].text, sizeof(lines[current_line].text), "%s", line); } else @@ -345,8 +348,145 @@ #endif } - - gfx_text_ex(&cursor, lines[r].text, -1); + if(config.cl_arrows && strstr(lines[r].text, " entered and joined the ")) // Dunedune arrows for entering the game + { + if(strstr(lines[r].text, "blue team")) + { + if(!gameclient.snap.local_info) + gfx_text_color(0.7f,0.7f,1.0f,1); // blue + else + { + tcolor = TeecompUtils::getTeamColor(1, gameclient.snap.local_info->team, config.tc_colored_tees_team1, + config.tc_colored_tees_team2, config.tc_colored_tees_method); + gfx_text_color(tcolor.r, tcolor.g, tcolor.b, 1); + } + } + else if(strstr(lines[r].text, "red team")) + { + if(!gameclient.snap.local_info) + gfx_text_color(1.0f,0.5f,0.5f,1); // red + else + { + tcolor = TeecompUtils::getTeamColor(0, gameclient.snap.local_info->team, config.tc_colored_tees_team1, + config.tc_colored_tees_team2, config.tc_colored_tees_method); + gfx_text_color(tcolor.r, tcolor.g, tcolor.b, 1); + } + } + else if(strstr(lines[r].text, "spectators")) + { + gfx_text_color(0.80f,0.43f,0.80f, 1); + } + else if(strstr(lines[r].text, "the game")) + gfx_text_color(0.8f,0.8f,0.4f,1); + + gfx_texture_set(data->images[IMAGE_ARROWS].id); + + gfx_quads_begin(); + select_sprite(SPRITE_ARROW_GREEN); + + int txtsize = 12.0f*config.cl_text_size/100; + gfx_quads_draw(x+1, y-2+txtsize/2, 10, 10); + gfx_quads_end(); + + char str[256]; + strcpy(str, lines[r].text); + strcpy(strstr(str , " entered and joined the "), " "); + gfx_text_ex(&cursor, str, -1); + } + else if(config.cl_arrows && strstr(lines[r].text, " has left the game")) // Dunedune arrows for quitting the game + { + gfx_texture_set(data->images[IMAGE_ARROWS].id); + gfx_text_color(1.0f,0.57f,0.18f,1); + + gfx_quads_begin(); + select_sprite(SPRITE_ARROW_RED); + + int txtsize = 12.0f*config.cl_text_size/100; + gfx_quads_draw(x+1, y-2+txtsize/2, 10, 10); + gfx_quads_end(); + + char str[256]; + strcpy(str, lines[r].text); + strcpy(strstr(str , " has left the game"), " "); + gfx_text_ex(&cursor, str, -1); + } + //* + else if(config.cl_arrows && strstr(lines[r].text, " joined the ")) // Dunedune arrows for switching team + { + int team = -1; + if(strstr(lines[r].text, "blue team")) + { + if(!gameclient.snap.local_info) + tcolor = vec3(0.7f,0.7f,1.0f); // blue + else + { + tcolor = TeecompUtils::getTeamColor(1, gameclient.snap.local_info->team, config.tc_colored_tees_team1, + config.tc_colored_tees_team2, config.tc_colored_tees_method); + } + gfx_text_color(tcolor.r, tcolor.g, tcolor.b, 1); + team = 1; + } + else if(strstr(lines[r].text, "red team")) + { + if(!gameclient.snap.local_info) + tcolor = vec3(1.0f,0.5f,0.5f); // red + else + { + tcolor = TeecompUtils::getTeamColor(0, gameclient.snap.local_info->team, config.tc_colored_tees_team1, + config.tc_colored_tees_team2, config.tc_colored_tees_method); + } + gfx_text_color(tcolor.r, tcolor.g, tcolor.b, 1); + team = 0; + } + else if(strstr(lines[r].text, "spectators")) + { + gfx_text_color(0.80f,0.43f,0.80f, 1); + team = -1; + } + else if(strstr(lines[r].text, "the game")) + { + gfx_text_color(0.8f,0.8f,0.4f,1); + team = 2; + } + + gfx_texture_set(data->images[IMAGE_ARROWS].id); + + gfx_quads_begin(); + + if(team == -1) + select_sprite(SPRITE_ARROW_SPEC); + else + { + if(team == 1) + select_sprite(SPRITE_ARROW_RIGHT); + else if (team == 2) + select_sprite(SPRITE_ARROW_JOIN); + else if(!team) + select_sprite(SPRITE_ARROW_LEFT); + else + select_sprite(SPRITE_ARROW_SPEC); + /*if(team == 0 || team == 1) + gfx_setcolor(tcolor.r, tcolor.g, tcolor.b, 1);*/ + } + + int txtsize = 12.0f*config.cl_text_size/100; + if(team == 2) + gfx_quads_draw(x+1, y-1+txtsize/2, 10, 10); + else if(team == 0 || team == 1) + gfx_quads_draw(x+1, y-1+txtsize/2, 10, 10); + else + gfx_quads_draw(x+1, y-2+txtsize/2, 10, 10); + + gfx_quads_end(); + + char str[256]; + strcpy(str, lines[r].text); + strcpy(strstr(str , " joined the "), " "); + gfx_text_ex(&cursor, str, -1); + } + //*/ + else + gfx_text_ex(&cursor, lines[r].text, -1); } gfx_text_color(1,1,1,1); } diff -Naur ./src_/game/variables.hpp ./src/game/variables.hpp --- ./src_/game/variables.hpp 2010-06-20 12:26:04.784105800 +0200 +++ ./src/game/variables.hpp 2010-06-19 19:29:43.747522800 +0200 @@ -117,6 +117,7 @@ #endif MACRO_CONFIG_INT(cl_chat_sound, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Enable/Disable the chatting sounds") MACRO_CONFIG_INT(cl_ghud, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Enable/Disable the gamer hud") +MACRO_CONFIG_INT(cl_arrows, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show arrows in place of text about player streams") MACRO_CONFIG_INT(cl_nohud, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Delete all hud") MACRO_CONFIG_INT(cl_hide_rcon, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Hide rcon while authentificating") MACRO_CONFIG_INT(cl_show_autorec, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show auto record button") diff -Naur ./datasrc_/content.py ./datasrc/content.py --- ./datasrc_/content.py 2010-06-20 12:31:59.387388000 +0200 +++ ./datasrc/content.py 2010-06-20 12:30:52.562565800 +0200 @@ -243,6 +243,8 @@ image_browseicons = Image("browseicons", "browse_icons.png") image_emoticons = Image("emoticons", "emoticons.png") image_race = Image("race", "race.png") +image_arrows = Image("arrows", "arrows.png") container.images.Add(image_null) container.images.Add(image_game) @@ -265,6 +267,7 @@ set_particles = SpriteSet("particles", image_particles, 8, 8) set_game = SpriteSet("game", image_game, 32, 16) set_race = SpriteSet("race", image_race, 2, 2) +set_arrows = SpriteSet("arrows", image_arrows, 2, 12) set_tee = SpriteSet("tee", image_null, 8, 4) set_browseicons = SpriteSet("browseicons", image_browseicons, 4, 1) set_emoticons = SpriteSet("emoticons", image_emoticons, 4, 4) @@ -298,7 +301,13 @@ container.sprites.Add(Sprite("clock", set_race, 0,0,2,2)) - +#arrows +container.sprites.Add(Sprite("arrow_left", set_arrows, 0,0,2,2)) +container.sprites.Add(Sprite("arrow_right", set_arrows, 0,2,2,2)) +container.sprites.Add(Sprite("arrow_join", set_arrows, 0,4,2,2)) +container.sprites.Add(Sprite("arrow_spec", set_arrows, 0,6,2,2)) +container.sprites.Add(Sprite("arrow_red", set_arrows, 0,8,2,2)) +container.sprites.Add(Sprite("arrow_green", set_arrows, 0,10,2,2)) container.sprites.Add(Sprite("star1", set_game, 15,0,2,2)) container.sprites.Add(Sprite("star2", set_game, 17,0,2,2))