rnd-20040321-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 20 Mar 2004 23:11:43 +0000 (00:11 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:46:30 +0000 (10:46 +0200)
* added copy and paste functions for custom change pages
* enhanced graphical display and functionality of tape recorder

ChangeLog
src/conftime.h
src/editor.c
src/main.c
src/main.h
src/tape.c

index 963d6af1ae3ecc119acdd97acc4c5cae3a4a2543..28dfe09cdca2e03b5da01e535c610f04ba478e5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-20
+       * added copy and paste functions for custom change pages
+       * enhanced graphical display and functionality of tape recorder
+
 2004-03-19
        * added move speed faster than "very fast" for custom elements
        * fixed bug with 3+3 style explosions and missing border content
@@ -10,7 +14,7 @@
 
 2004-03-15
        * added trigger element and trigger player to use as target elements
-       * added copy and paste editor functions for custom and group elements
+       * added copy and paste functions for custom and group elements
 
 2004-03-14
        * fixed graphical bug when displaying explosion animations
index cf9e54d8f8e313e42d6209c62e24f731d5260df2..4c5a44214acb726a55474e658f2c3529d6e53f39 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-03-20 23:14]"
+#define COMPILE_DATE_STRING "[2004-03-21 00:07]"
index 56447e6cd2cb474ffd20521ff9c523562afaf4a1..29ac31db4a56051efc4d555435434fac0952bc0e 100644 (file)
 #define ED_STICKYBUTTON_YPOS           (ED_BUTTON_MINUS_YPOS + 66)
 
 /* values for some special graphic buttons */
-#define ED_BUTTON_ELEM_XPOS            6
-#define ED_BUTTON_ELEM_YPOS            30
-#define ED_BUTTON_ELEM_XSIZE           22
-#define ED_BUTTON_ELEM_YSIZE           22
-
+#define ED_COPY_CHANGE_PAGE_XPOS       25
+#define ED_COPY_CHANGE_PAGE_YPOS       50
+#define ED_PASTE_CHANGE_PAGE_XPOS      25
+#define ED_PASTE_CHANGE_PAGE_YPOS      70
 
 /* some values for text input, selectbox and counter gadgets */
 #define ED_BUTTON_COUNT_YPOS           60
@@ -1752,9 +1751,9 @@ static struct
   },
   {
     -1,                                        ED_SETTINGS_YPOS(14),
-    GADGET_ID_ADD_CHANGE_PAGE,         GADGET_ID_NEXT_CHANGE_PAGE,
+    GADGET_ID_ADD_CHANGE_PAGE,         GADGET_ID_PASTE_CHANGE_PAGE,
     -1,                                        "New",
-    " ", NULL,                         "Add new change page"
+    NULL, NULL,                                "Add new change page"
   },
   {
     -1,                                        ED_SETTINGS_YPOS(14),
@@ -1789,17 +1788,17 @@ static struct
     NULL, "change page",               "select next change page"
   },
   {
-    ED_BUTTON_PLUS_XPOS,               ED_BUTTON_COUNT_YPOS,
+    ED_COPY_CHANGE_PAGE_XPOS,          ED_COPY_CHANGE_PAGE_YPOS,
     -1,                                        ED_SETTINGS_YPOS(14),
     ED_BUTTON_COUNT_XSIZE,             ED_BUTTON_COUNT_YSIZE,
-    GADGET_ID_NEXT_CHANGE_PAGE,                GADGET_ID_SELECT_CHANGE_PAGE,
-    NULL, NULL,                                "copy settings from this change page"
+    GADGET_ID_COPY_CHANGE_PAGE,                GADGET_ID_NEXT_CHANGE_PAGE,
+    " ", NULL,                         "copy settings from this change page"
   },
   {
-    ED_BUTTON_PLUS_XPOS,               ED_BUTTON_COUNT_YPOS,
+    ED_PASTE_CHANGE_PAGE_XPOS,         ED_PASTE_CHANGE_PAGE_YPOS,
     -1,                                        ED_SETTINGS_YPOS(14),
     ED_BUTTON_COUNT_XSIZE,             ED_BUTTON_COUNT_YSIZE,
-    GADGET_ID_NEXT_CHANGE_PAGE,                GADGET_ID_SELECT_CHANGE_PAGE,
+    GADGET_ID_PASTE_CHANGE_PAGE,       GADGET_ID_COPY_CHANGE_PAGE,
     NULL, NULL,                                "paste settings to this change page"
   },
 };
@@ -4785,10 +4784,20 @@ static void CreateGraphicbuttonGadgets()
 
     event_mask = GD_EVENT_PRESSED | GD_EVENT_REPEATED;
 
-    gd_x1 = DOOR_GFX_PAGEX4 + graphicbutton_info[i].gd_x;
-    gd_x2 = DOOR_GFX_PAGEX3 + graphicbutton_info[i].gd_x;
-    gd_y1 = DOOR_GFX_PAGEY1 + graphicbutton_info[i].gd_y;
-    gd_y2 = gd_y1;
+    if (i <= ED_GRAPHICBUTTON_ID_NEXT_CHANGE_PAGE)
+    {
+      gd_x1 = DOOR_GFX_PAGEX4 + graphicbutton_info[i].gd_x;
+      gd_y1 = DOOR_GFX_PAGEY1 + graphicbutton_info[i].gd_y;
+      gd_x2 = DOOR_GFX_PAGEX3 + graphicbutton_info[i].gd_x;
+      gd_y2 = gd_y1;
+    }
+    else       /* (i <= ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE) */
+    {
+      gd_x1 = DOOR_GFX_PAGEX6 + graphicbutton_info[i].gd_x;
+      gd_y1 = DOOR_GFX_PAGEY1 + graphicbutton_info[i].gd_y;
+      gd_x2 = gd_x1 - ED_BUTTON_COUNT_XSIZE;
+      gd_y2 = gd_y1;
+    }
 
     /* determine horizontal position to the right of specified gadget */
     if (graphicbutton_info[i].gadget_id_align != GADGET_ID_NONE)
@@ -8444,6 +8453,21 @@ static void HandleGraphicbuttonGadgets(struct GadgetInfo *gi)
 
     DrawPropertiesWindow();
   }
+  else if (type_id == ED_GRAPHICBUTTON_ID_COPY_CHANGE_PAGE ||
+          type_id == ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE)
+  {
+    struct ElementInfo *ei = &element_info[properties_element];
+    int current_change_page = ei->current_change_page;
+
+    if (type_id == ED_GRAPHICBUTTON_ID_COPY_CHANGE_PAGE)
+      element_info[EL_INTERNAL_CLIPBOARD_CHANGE].change_page[0] =
+       ei->change_page[current_change_page];
+    else if (type_id == ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE)
+      ei->change_page[current_change_page] =
+       element_info[EL_INTERNAL_CLIPBOARD_CHANGE].change_page[0];
+
+    DrawPropertiesWindow();
+  }
 }
 
 static void HandleRadiobuttons(struct GadgetInfo *gi)
index 7e197d453398aa64fb78683aee966b949f336f83..9e6c625113b303487b82ea919fb63e9e36bef371 100644 (file)
@@ -3870,6 +3870,11 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
     "internal",
     "empty custom element"
   },
+  {
+    "internal_clipboard_change",
+    "internal",
+    "empty change page"
+  },
   {
     "internal_clipboard_group",
     "internal",
index e05dd9db6d9c5aa46007727e1a2ebf714cc81f25..a6d70583521a53697cefde5f2c24977a386129af 100644 (file)
 #define EL_FIRST_INTERNAL                      (EL_FIRST_DUMMY + 25)
 
 #define EL_INTERNAL_CLIPBOARD_CUSTOM           (EL_FIRST_INTERNAL + 0)
-#define EL_INTERNAL_CLIPBOARD_GROUP            (EL_FIRST_INTERNAL + 1)
-#define EL_INTERNAL_DUMMY                      (EL_FIRST_INTERNAL + 2)
+#define EL_INTERNAL_CLIPBOARD_CHANGE           (EL_FIRST_INTERNAL + 1)
+#define EL_INTERNAL_CLIPBOARD_GROUP            (EL_FIRST_INTERNAL + 2)
+#define EL_INTERNAL_DUMMY                      (EL_FIRST_INTERNAL + 3)
 
 #define EL_INTERNAL_START                      (EL_FIRST_INTERNAL + 0)
-#define EL_INTERNAL_END                                (EL_FIRST_INTERNAL + 2)
+#define EL_INTERNAL_END                                (EL_FIRST_INTERNAL + 3)
 
-#define MAX_NUM_ELEMENTS                       (EL_FIRST_INTERNAL + 3)
+#define MAX_NUM_ELEMENTS                       (EL_FIRST_INTERNAL + 4)
 
 
 /* values for graphics/sounds action types */
index 7f4545b5c591e172f09735c12c2142b741d063d3..b521d38e37ff0e8e2cabbd84618059d8009b5b2f 100644 (file)
@@ -99,7 +99,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
 #define VIDEO_FFWD_LABEL_XSIZE         VIDEO_LABEL_XSIZE
 #define VIDEO_FFWD_LABEL_YSIZE         VIDEO_LABEL_YSIZE
 #define VIDEO_FFWD_SYMBOL_XPOS         VIDEO_SYMBOL_XPOS
-#define VIDEO_FFWD_SYMBOL_YPOS         126
+#define VIDEO_FFWD_SYMBOL_YPOS         193
 #define VIDEO_FFWD_SYMBOL_XSIZE                27
 #define VIDEO_FFWD_SYMBOL_YSIZE                VIDEO_SYMBOL_YSIZE
 
@@ -108,7 +108,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
 #define VIDEO_PBEND_LABEL_XSIZE                VIDEO_LABEL_XSIZE
 #define VIDEO_PBEND_LABEL_YSIZE                VIDEO_LABEL_YSIZE
 #define VIDEO_PBEND_SYMBOL_XPOS                VIDEO_SYMBOL_XPOS
-#define VIDEO_PBEND_SYMBOL_YPOS                126
+#define VIDEO_PBEND_SYMBOL_YPOS                221
 #define VIDEO_PBEND_SYMBOL_XSIZE       27
 #define VIDEO_PBEND_SYMBOL_YSIZE       VIDEO_SYMBOL_YSIZE
 
@@ -117,16 +117,16 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
 #define VIDEO_WARP_LABEL_XSIZE         VIDEO_LABEL_XSIZE
 #define VIDEO_WARP_LABEL_YSIZE         VIDEO_LABEL_YSIZE
 #define VIDEO_WARP_SYMBOL_XPOS         VIDEO_SYMBOL_XPOS
-#define VIDEO_WARP_SYMBOL_YPOS         152
+#define VIDEO_WARP_SYMBOL_YPOS         165
 #define VIDEO_WARP_SYMBOL_XSIZE                27
 #define VIDEO_WARP_SYMBOL_YSIZE                VIDEO_SYMBOL_YSIZE
 #define VIDEO_WARP2_SYMBOL_XPOS                VIDEO_SYMBOL_XPOS
-#define VIDEO_WARP2_SYMBOL_YPOS                139
+#define VIDEO_WARP2_SYMBOL_YPOS                152
 #define VIDEO_WARP2_SYMBOL_XSIZE       27
 #define VIDEO_WARP2_SYMBOL_YSIZE       VIDEO_SYMBOL_YSIZE
 
 #define VIDEO_1STEP_SYMBOL_XPOS                (VIDEO_SYMBOL_XPOS + 18)
-#define VIDEO_1STEP_SYMBOL_YPOS                113
+#define VIDEO_1STEP_SYMBOL_YPOS                139
 #define VIDEO_1STEP_SYMBOL_XSIZE       (VIDEO_SYMBOL_XSIZE - 18)
 #define VIDEO_1STEP_SYMBOL_YSIZE       VIDEO_SYMBOL_YSIZE