rnd-19980930-1
[rocksndiamonds.git] / src / editor.c
index 17677e8dec42d4520c39a2d481f87a50c5f0f030..3434b4c2219731c842b9c7eadc82276f21d7b07e 100644 (file)
@@ -1,13 +1,12 @@
 /***********************************************************
 *  Rocks'n'Diamonds -- McDuffin Strikes Back!              *
 *----------------------------------------------------------*
-*  ©1995 Artsoft Development                               *
-*        Holger Schemel                                    *
-*        33659 Bielefeld-Senne                             *
-*        Telefon: (0521) 493245                            *
-*        eMail: aeglos@valinor.owl.de                      *
-*               aeglos@uni-paderborn.de                    *
-*               q99492@pbhrzx.uni-paderborn.de             *
+*  (c) 1995-98 Artsoft Entertainment                       *
+*              Holger Schemel                              *
+*              Oststrasse 11a                              *
+*              33604 Bielefeld                             *
+*              phone: ++49 +521 290471                     *
+*              email: aeglos@valinor.owl.de                *
 *----------------------------------------------------------*
 *  editor.c                                                *
 ***********************************************************/
@@ -19,6 +18,8 @@
 #include "buttons.h"
 #include "files.h"
 
+#define CHOICE_DELAY_VALUE     100
+
 static int level_xpos,level_ypos;
 static BOOL edit_mode;
 static BOOL name_typing;
@@ -84,6 +85,11 @@ int editor_element[] =
   EL_CHAR_A + ('N' - 'A'),
   EL_CHAR_A + ('E' - 'A'),
 
+  EL_SPIELER1,
+  EL_SPIELER2,
+  EL_SPIELER3,
+  EL_SPIELER4,
+
   EL_SPIELFIGUR,
   EL_LEERRAUM,
   EL_ERDREICH,
@@ -676,7 +682,7 @@ void LevelEd(int mx, int my, int button)
     if (((choice == ED_BUTTON_EUP && element_shift>0) ||
         (choice == ED_BUTTON_EDOWN &&
          element_shift<elements_in_list-MAX_ELEM_X*MAX_ELEM_Y)) &&
-       DelayReached(&choice_delay,10))
+       DelayReached(&choice_delay, CHOICE_DELAY_VALUE))
     {
       int i, step;
 
@@ -746,7 +752,7 @@ void LevelEd(int mx, int my, int button)
        case ED_BUTTON_LEFT:
          if (level_xpos>=0)
          {
-           if (!DelayReached(&choice_delay,10))
+           if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE))
              break;
            if (lev_fieldx<2*SCR_FIELDX-2)
              break;
@@ -763,7 +769,7 @@ void LevelEd(int mx, int my, int button)
        case ED_BUTTON_RIGHT:
          if (level_xpos<=lev_fieldx-2*SCR_FIELDX)
          {
-           if (!DelayReached(&choice_delay,10))
+           if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE))
              break;
            if (lev_fieldx<2*SCR_FIELDX-2)
              break;
@@ -780,7 +786,7 @@ void LevelEd(int mx, int my, int button)
        case ED_BUTTON_UP:
          if (level_ypos>=0)
          {
-           if (!DelayReached(&choice_delay,10))
+           if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE))
              break;
            if (lev_fieldy<2*SCR_FIELDY-2)
              break;
@@ -797,7 +803,7 @@ void LevelEd(int mx, int my, int button)
        case ED_BUTTON_DOWN:
          if (level_ypos<=lev_fieldy-2*SCR_FIELDY)
          {
-           if (!DelayReached(&choice_delay,10))
+           if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE))
              break;
            if (lev_fieldy<2*SCR_FIELDY-2)
              break;
@@ -864,7 +870,8 @@ void LevelEd(int mx, int my, int button)
       int choice = CheckCountButtons(mx,my,button);
       int step = (button==1 ? 1 : button==2 ? 5 : button==3 ? 10 : 0);
 
-      if (choice>=0 && choice<36 && DelayReached(&choice_delay,10))
+      if (choice >= 0 && choice < 36 &&
+         DelayReached(&choice_delay, CHOICE_DELAY_VALUE))
       {
        if (!(choice % 2))
          step = -step;