From 2dc47c514f6a3c043d63082f43de68ab03e60a00 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 18 Apr 2021 17:50:12 -0700 Subject: [PATCH] remove commented out code --- cmd/smyrna/hotkeymap.c | 104 ----------------------------------------- 1 file changed, 104 deletions(-) diff --git a/cmd/smyrna/hotkeymap.c b/cmd/smyrna/hotkeymap.c index 670f74275..20b2ebe33 100644 --- a/cmd/smyrna/hotkeymap.c +++ b/cmd/smyrna/hotkeymap.c @@ -112,15 +112,6 @@ static int get_drag(const char *s) void load_mouse_actions(char *modefile, ViewInfo * v) { -/*#define MM_PAN 0 -#define MM_ZOOM 1 -#define MM_ROTATE 2 -#define MM_SINGLE_SELECT 3 -#define MM_RECTANGULAR_SELECT 4 -#define MM_RECTANGULAR_X_SELECT 5 -#define MM_MOVE 10 -#define MM_MAGNIFIER 20 -#define MM_FISHEYE_MAGNIFIER 21*/ /*file parsing is temporarrily not available */ int i = 0; FILE *file; @@ -169,72 +160,6 @@ void load_mouse_actions(char *modefile, ViewInfo * v) fclose(file); } free(action_file); - - -/* - v->mouse_action_count=7; - v->mouse_actions=realloc(v->mouse_actions,v->mouse_action_count * sizeof(mouse_action_t)); - v->mouse_actions[ind].action=MM_PAN; - v->mouse_actions[ind].drag=1; - v->mouse_actions[ind].hotkey=0; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_all; - v->mouse_actions[ind].type=glMouseLeftButton; - - ind++; - - v->mouse_actions[ind].action=MM_ROTATE; - v->mouse_actions[ind].drag=1; - v->mouse_actions[ind].hotkey=B_LSHIFT; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_3D; - v->mouse_actions[ind].type=glMouseLeftButton; - - ind++; - - v->mouse_actions[ind].action=MM_SINGLE_SELECT; - v->mouse_actions[ind].drag=0; - v->mouse_actions[ind].hotkey=0; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_all_but_fisheye; - v->mouse_actions[ind].type=glMouseLeftButton; - - ind++; - - v->mouse_actions[ind].action=MM_RECTANGULAR_SELECT; - v->mouse_actions[ind].drag=1; - v->mouse_actions[ind].hotkey=0; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_all; - v->mouse_actions[ind].type=glMouseRightButton; - - ind++; - - v->mouse_actions[ind].action=MM_MOVE; - v->mouse_actions[ind].drag=1; - v->mouse_actions[ind].hotkey=B_LCTRL; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_2D; - v->mouse_actions[ind].type=glMouseLeftButton; - - ind++; - - v->mouse_actions[ind].action=MM_FISHEYE_MAGNIFIER; - v->mouse_actions[ind].drag=1; - v->mouse_actions[ind].hotkey=B_LSHIFT; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_2D; - v->mouse_actions[ind].type=glMouseLeftButton; - - ind++; - - v->mouse_actions[ind].action=MM_FISHEYE_PICK; - v->mouse_actions[ind].drag=0; - v->mouse_actions[ind].hotkey=0; - v->mouse_actions[ind].index=ind; - v->mouse_actions[ind].mode=smyrna_fisheye; - v->mouse_actions[ind].type=glMouseRightButton; -*/ } int get_key_action(ViewInfo * v, int key) @@ -251,17 +176,6 @@ int get_key_action(ViewInfo * v, int key) int get_mode(ViewInfo * v) { - - -/*#define F_BUTTON1 B_LSHIFT -#define F_BUTTON2 B_RSHIFT -#define F_BUTTON3 B_LCTRL -#define F_BUTTON4 B_LCTRL - -#define MOUSE_BUTTON_1 LEFT_MOUSE_BUTTON -#define MOUSE_BUTTON_2 RIGHT_MOUSE_BUTTON -#define MOUSE_BUTTON_3 MIDDLE_MOUSE_BUTTON*/ -//typedef enum {smyrna_2D,smyrna_3D,smyrna_fisheye} smyrna_view_mode; int ind = 0; glMouseButtonType curMouseType = v->mouse.t; int curDragging = ((v->mouse.dragX != 0) || (v->mouse.dragY != 0)); @@ -289,22 +203,4 @@ int get_mode(ViewInfo * v) } } return -1; - - - - - -/* if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->keymap.down) && (view->keymap.keyVal ==F_BUTTON1) && (view->active_camera==-1)) - return MM_FISHEYE_MAGNIFIER; - if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->keymap.down) && (view->keymap.keyVal == F_BUTTON1) && (view->active_camera>-1)) - return MM_ROTATE; - if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->keymap.down) && (view->keymap.keyVal == F_BUTTON3)) - return MM_MOVE; - if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->mouse.down) ) - return MM_PAN; - if ((view->mouse.t==MOUSE_BUTTON_2)&&(view->mouse.down) ) - return MM_RECTANGULAR_SELECT;*/ - - - } -- 2.40.0