about summary refs log tree commit diff
path: root/src/game/editor
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-05-05 01:43:27 +0200
committeroy <Tom_Adams@web.de>2011-05-05 01:43:27 +0200
commit5fbf6d0bfd32ab520c6cf67a330c9a2240882750 (patch)
treef016fcc0fdb475049be27ac0bf96efccc03de47e /src/game/editor
parent41ebc9bc9d9bdda650799a6c9dc9a5ed15a55430 (diff)
downloadzcatch-5fbf6d0bfd32ab520c6cf67a330c9a2240882750.tar.gz
zcatch-5fbf6d0bfd32ab520c6cf67a330c9a2240882750.zip
fixed compiler warnings. Closes #679
Diffstat (limited to 'src/game/editor')
-rw-r--r--src/game/editor/editor.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp
index e12b20bf..eb6182be 100644
--- a/src/game/editor/editor.cpp
+++ b/src/game/editor/editor.cpp
@@ -482,15 +482,12 @@ int CEditor::UiDoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, in
 {
     // logic
     static float s_Value;
-    int Ret = 0;
     int Inside = UI()->MouseInside(pRect);
 
 	if(UI()->ActiveItem() == pID)
 	{
 		if(!UI()->MouseButton(0))
 		{
-			if(Inside)
-				Ret = 1;
 			m_LockMouse = false;
 			UI()->SetActiveItem(0);
 		}
@@ -1192,8 +1189,6 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar, bool ShowPicker)
 
 	static float s_StartWx = 0;
 	static float s_StartWy = 0;
-	static float s_StartMx = 0;
-	static float s_StartMy = 0;
 
 	enum
 	{
@@ -1281,8 +1276,6 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar, bool ShowPicker)
 		{
 			s_StartWx = wx;
 			s_StartWy = wy;
-			s_StartMx = mx;
-			s_StartMy = my;
 
 			if(Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL) || UI()->MouseButton(2))
 			{
@@ -1768,14 +1761,6 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect ToolBar, CUIRect View)
 	CUIRect Slot, Button;
 	char aBuf[64];
 
-	int ValidGroup = 0;
-	int ValidLayer = 0;
-	if(m_SelectedGroup >= 0 && m_SelectedGroup < m_Map.m_lGroups.size())
-		ValidGroup = 1;
-
-	if(ValidGroup && m_SelectedLayer >= 0 && m_SelectedLayer < m_Map.m_lGroups[m_SelectedGroup]->m_lLayers.size())
-		ValidLayer = 1;
-
 	float LayersHeight = 12.0f;	 // Height of AddGroup button
 	static int s_ScrollBar = 0;
 	static float s_ScrollValue = 0;
@@ -2213,7 +2198,8 @@ void CEditor::AddFileDialogEntry(int Index, CUIRect *pView)
 	Graphics()->QuadsDrawTL(&QuadItem, 1);
 	Graphics()->QuadsEnd();
 
-	if(DoButton_File((void*)(10+(int)Button.y), m_FileList[Index].m_aName, m_FilesSelectedIndex == Index, &Button, 0, 0))
+	static int s_FileButton = 0;
+	if(DoButton_File(&s_FileButton, m_FileList[Index].m_aName, m_FilesSelectedIndex == Index, &Button, 0, 0))
 	{
 		if(!m_FileList[Index].m_IsDir)
 			str_copy(m_aFileDialogFileName, m_FileList[Index].m_aFilename, sizeof(m_aFileDialogFileName));
@@ -2807,8 +2793,6 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
 
 		// render handles
 		{
-			static bool s_Move = false;
-
 			int CurrentValue = 0, CurrentTime = 0;
 
 			Graphics()->TextureSet(-1);
@@ -2842,7 +2826,6 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
 						if(!UI()->MouseButton(0))
 						{
 							UI()->SetActiveItem(0);
-							s_Move = false;
 						}
 						else
 						{