[Super-tux-commit] supertux/src leveleditor.cpp,1.115,1.116
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-05-14 14:04:58
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4454/src Modified Files: leveleditor.cpp Log Message: Just changed hard coded values by definitions. Please do this, or else the code turns ugly and gets hard to change that value everywhere. Also tuned the values. Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- leveleditor.cpp 13 May 2004 17:50:51 -0000 1.115 +++ leveleditor.cpp 14 May 2004 14:04:48 -0000 1.116 @@ -54,9 +54,10 @@ #define MOUSE_LEFT_MARGIN 80 #define MOUSE_RIGHT_MARGIN (560-32) -/* right_margin should noticed that the cursor is 32 pixels, - so it should subtract that value */ -#define MOUSE_POS_SPEED 20 + +/* scolling speed */ +#define KEYBOARD_SPEED 140 +#define MOUSE_SPEED 40 /* look */ #define SELECT_W 2 // size of the selections lines @@ -1512,11 +1513,11 @@ switch(le_move_left_bt->get_state()) { case BUTTON_PRESSED: - pos_x -= 192; + pos_x -= KEYBOARD_SPEED; show_minimap = true; break; case BUTTON_HOVER: - pos_x -= 32; + pos_x -= MOUSE_SPEED; show_minimap = true; break; case BUTTON_CLICKED: @@ -1529,11 +1530,11 @@ switch(le_move_right_bt->get_state()) { case BUTTON_PRESSED: - pos_x += 192; + pos_x += KEYBOARD_SPEED; show_minimap = true; break; case BUTTON_HOVER: - pos_x += 32; + pos_x += MOUSE_SPEED; show_minimap = true; break; case BUTTON_CLICKED: @@ -1546,11 +1547,11 @@ switch(le_move_up_bt->get_state()) { case BUTTON_PRESSED: - pos_y -= 192; + pos_y -= KEYBOARD_SPEED; show_minimap = true; break; case BUTTON_HOVER: - pos_y -= 32; + pos_y -= MOUSE_SPEED; show_minimap = true; break; case BUTTON_CLICKED: @@ -1563,11 +1564,11 @@ switch(le_move_down_bt->get_state()) { case BUTTON_PRESSED: - pos_y += 192; + pos_y += KEYBOARD_SPEED; show_minimap = true; break; case BUTTON_HOVER: - pos_y += 32; + pos_y += MOUSE_SPEED; show_minimap = true; break; case BUTTON_CLICKED: |