From: Holger Schemel Date: Sat, 20 Mar 2004 23:11:43 +0000 (+0100) Subject: rnd-20040321-1-src X-Git-Tag: 3.1.0^2~41 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=62aa94beca16e39169d440bbc211a9f1efbcd60f;p=rocksndiamonds.git rnd-20040321-1-src * added copy and paste functions for custom change pages * enhanced graphical display and functionality of tape recorder --- diff --git a/ChangeLog b/ChangeLog index 963d6af1..28dfe09c 100644 --- 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 diff --git a/src/conftime.h b/src/conftime.h index cf9e54d8..4c5a4421 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-03-20 23:14]" +#define COMPILE_DATE_STRING "[2004-03-21 00:07]" diff --git a/src/editor.c b/src/editor.c index 56447e6c..29ac31db 100644 --- a/src/editor.c +++ b/src/editor.c @@ -244,11 +244,10 @@ #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) diff --git a/src/main.c b/src/main.c index 7e197d45..9e6c6251 100644 --- a/src/main.c +++ b/src/main.c @@ -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", diff --git a/src/main.h b/src/main.h index e05dd9db..a6d70583 100644 --- a/src/main.h +++ b/src/main.h @@ -1015,13 +1015,14 @@ #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 */ diff --git a/src/tape.c b/src/tape.c index 7f4545b5..b521d38e 100644 --- a/src/tape.c +++ b/src/tape.c @@ -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