about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-02-16 11:45:19 +0100
committeroy <Tom_Adams@web.de>2011-02-16 11:45:19 +0100
commit927954a53bd4d1322e5474fd054d3241212394c4 (patch)
treef99bbd6ff481c62ca29c4f3f6b85ffc8c36747be
parentb59c710ebac43c5d1aa126aa7f1eb49e9c942ac0 (diff)
downloadzcatch-927954a53bd4d1322e5474fd054d3241212394c4.tar.gz
zcatch-927954a53bd4d1322e5474fd054d3241212394c4.zip
added new emoticons. Closes #362
-rw-r--r--data/emoticons.pngbin70901 -> 48352 bytes
-rw-r--r--datasrc/content.py10
-rw-r--r--datasrc/network.py2
-rw-r--r--src/game/client/components/emoticon.cpp15
4 files changed, 10 insertions, 17 deletions
diff --git a/data/emoticons.png b/data/emoticons.png
index 5d41edce..4f4c3156 100644
--- a/data/emoticons.png
+++ b/data/emoticons.png
Binary files differdiff --git a/datasrc/content.py b/datasrc/content.py
index 8a971d8c..b4b95c9b 100644
--- a/datasrc/content.py
+++ b/datasrc/content.py
@@ -354,17 +354,17 @@ container.sprites.Add(Sprite("exclamation", set_emoticons, 1, 0, 1, 1))
 container.sprites.Add(Sprite("hearts", set_emoticons, 2, 0, 1, 1))
 container.sprites.Add(Sprite("drop", set_emoticons, 3, 0, 1, 1))
 container.sprites.Add(Sprite("dotdot", set_emoticons, 0, 1, 1, 1))
-container.sprites.Add(Sprite("music1", set_emoticons, 1, 1, 1, 1))
-container.sprites.Add(Sprite("music2", set_emoticons, 2, 1, 1, 1))
+container.sprites.Add(Sprite("music", set_emoticons, 1, 1, 1, 1))
+container.sprites.Add(Sprite("sorry", set_emoticons, 2, 1, 1, 1))
 container.sprites.Add(Sprite("ghost", set_emoticons, 3, 1, 1, 1))
 container.sprites.Add(Sprite("sushi", set_emoticons, 0, 2, 1, 1))
 container.sprites.Add(Sprite("splattee", set_emoticons, 1, 2, 1, 1))
 container.sprites.Add(Sprite("deviltee", set_emoticons, 2, 2, 1, 1))
 container.sprites.Add(Sprite("zomg", set_emoticons, 3, 2, 1, 1))
 container.sprites.Add(Sprite("zzz", set_emoticons, 0, 3, 1, 1))
-container.sprites.Add(Sprite("blank1", set_emoticons, 1, 3, 1, 1))
-container.sprites.Add(Sprite("deadtee", set_emoticons, 2, 3, 1, 1))
-container.sprites.Add(Sprite("blank2", set_emoticons, 3, 3, 1, 1))
+container.sprites.Add(Sprite("wtf", set_emoticons, 1, 3, 1, 1))
+container.sprites.Add(Sprite("eyes", set_emoticons, 2, 3, 1, 1))
+container.sprites.Add(Sprite("question", set_emoticons, 3, 3, 1, 1))
 
 container.sprites.Add(Sprite("browse_lock", set_browseicons, 0,0,1,1))
 container.sprites.Add(Sprite("browse_heart", set_browseicons, 1,0,1,1))
diff --git a/datasrc/network.py b/datasrc/network.py
index 656a1d84..c80adc57 100644
--- a/datasrc/network.py
+++ b/datasrc/network.py
@@ -4,7 +4,7 @@ Emotes = ["NORMAL", "PAIN", "HAPPY", "SURPRISE", "ANGRY", "BLINK"]
 PlayerStates = ["UNKNOWN", "PLAYING", "IN_MENU", "CHATTING"]
 GameFlags = ["TEAMS", "FLAGS"]
 
-Emoticons = [str(x) for x in range(1,16)]
+Emoticons = [str(x) for x in range(0,16)]
 
 Powerups = ["HEALTH", "ARMOR", "WEAPON", "NINJA"]
 
diff --git a/src/game/client/components/emoticon.cpp b/src/game/client/components/emoticon.cpp
index 4500f418..1fa72a7f 100644
--- a/src/game/client/components/emoticon.cpp
+++ b/src/game/client/components/emoticon.cpp
@@ -6,7 +6,6 @@
 #include <game/generated/client_data.h>
 
 #include <game/gamecore.h> // get_angle
-#include <game/client/gameclient.h>
 #include <game/client/ui.h>
 #include <game/client/render.h>
 #include "emoticon.h"
@@ -104,12 +103,6 @@ void CEmoticon::OnRender()
 	
 	m_WasActive = true;
 	
-	float x, y;
-	Input()->MouseRelative(&x, &y);
-
-	m_SelectorMouse.x += x;
-	m_SelectorMouse.y += y;
-
 	if (length(m_SelectorMouse) > 140)
 		m_SelectorMouse = normalize(m_SelectorMouse) * 140;
 
@@ -118,7 +111,7 @@ void CEmoticon::OnRender()
 		SelectedAngle += 2*pi;
 
 	if (length(m_SelectorMouse) > 100)
-		m_SelectedEmote = (int)(SelectedAngle / (2*pi) * 12.0f);
+		m_SelectedEmote = (int)(SelectedAngle / (2*pi) * NUM_EMOTICONS);
 
     CUIRect Screen = *UI()->Screen();
 
@@ -135,15 +128,15 @@ void CEmoticon::OnRender()
 	Graphics()->TextureSet(g_pData->m_aImages[IMAGE_EMOTICONS].m_Id);
 	Graphics()->QuadsBegin();
 
-	for (int i = 0; i < 12; i++)
+	for (int i = 0; i < NUM_EMOTICONS; i++)
 	{
-		float Angle = 2*pi*i/12.0;
+		float Angle = 2*pi*i/NUM_EMOTICONS;
 		if (Angle > pi)
 			Angle -= 2*pi;
 
 		bool Selected = m_SelectedEmote == i;
 
-		float Size = Selected ? 96 : 64;
+		float Size = Selected ? 80 : 32;
 
 		float NudgeX = 120 * cosf(Angle);
 		float NudgeY = 120 * sinf(Angle);