Remove unneeded parameter

This commit is contained in:
Chris Young 2013-06-01 15:27:29 +01:00
parent 3b971bb1a7
commit 40682a899e

View File

@ -406,8 +406,7 @@ static UWORD ami_system_colour_scrollbar_fgpen(struct DrawInfo *drinfo)
* set option from pen * set option from pen
*/ */
static nserror static nserror
colour_option_from_pen(struct nsoption_s *opts, colour_option_from_pen(UWORD pen,
UWORD pen,
enum nsoption_e option, enum nsoption_e option,
colour def_colour) colour def_colour)
{ {
@ -416,7 +415,7 @@ colour_option_from_pen(struct nsoption_s *opts,
if((option < NSOPTION_SYS_COLOUR_START) || if((option < NSOPTION_SYS_COLOUR_START) ||
(option > NSOPTION_SYS_COLOUR_END) || (option > NSOPTION_SYS_COLOUR_END) ||
(opts[option].type != OPTION_COLOUR)) { (nsoptions[option].type != OPTION_COLOUR)) {
return NSERROR_BAD_PARAMETER; return NSERROR_BAD_PARAMETER;
} }
@ -447,42 +446,40 @@ colour_option_from_pen(struct nsoption_s *opts,
static void ami_set_screen_defaults(struct Screen *scrn) static void ami_set_screen_defaults(struct Screen *scrn)
{ {
struct nsoption_s *defaults = nsoptions_default;
nsoption_default_set_int(window_x, 0); nsoption_default_set_int(window_x, 0);
nsoption_default_set_int(window_y, scrn->BarHeight + 1); nsoption_default_set_int(window_y, scrn->BarHeight + 1);
nsoption_default_set_int(window_width, scrn->Width); nsoption_default_set_int(window_width, scrn->Width);
nsoption_default_set_int(window_height, scrn->Height - scrn->BarHeight - 1); nsoption_default_set_int(window_height, scrn->Height - scrn->BarHeight - 1);
/* set system colours for amiga ui */ /* set system colours for amiga ui */
colour_option_from_pen(defaults, FILLPEN, NSOPTION_sys_colour_ActiveBorder, 0x00000000); colour_option_from_pen(FILLPEN, NSOPTION_sys_colour_ActiveBorder, 0x00000000);
colour_option_from_pen(defaults, FILLPEN, NSOPTION_sys_colour_ActiveCaption, 0x00dddddd); colour_option_from_pen(FILLPEN, NSOPTION_sys_colour_ActiveCaption, 0x00dddddd);
colour_option_from_pen(defaults, BACKGROUNDPEN, NSOPTION_sys_colour_AppWorkspace, 0x00eeeeee); colour_option_from_pen(BACKGROUNDPEN, NSOPTION_sys_colour_AppWorkspace, 0x00eeeeee);
colour_option_from_pen(defaults, BACKGROUNDPEN, NSOPTION_sys_colour_Background, 0x00aa0000); colour_option_from_pen(BACKGROUNDPEN, NSOPTION_sys_colour_Background, 0x00aa0000);
colour_option_from_pen(defaults, FOREGROUNDPEN, NSOPTION_sys_colour_ButtonFace, 0x00aaaaaa); colour_option_from_pen(FOREGROUNDPEN, NSOPTION_sys_colour_ButtonFace, 0x00aaaaaa);
colour_option_from_pen(defaults, FORESHINEPEN, NSOPTION_sys_colour_ButtonHighlight, 0x00cccccc); colour_option_from_pen(FORESHINEPEN, NSOPTION_sys_colour_ButtonHighlight, 0x00cccccc);
colour_option_from_pen(defaults, FORESHADOWPEN, NSOPTION_sys_colour_ButtonShadow, 0x00bbbbbb); colour_option_from_pen(FORESHADOWPEN, NSOPTION_sys_colour_ButtonShadow, 0x00bbbbbb);
colour_option_from_pen(defaults, TEXTPEN, NSOPTION_sys_colour_ButtonText, 0x00000000); colour_option_from_pen(TEXTPEN, NSOPTION_sys_colour_ButtonText, 0x00000000);
colour_option_from_pen(defaults, FILLTEXTPEN, NSOPTION_sys_colour_CaptionText, 0x00000000); colour_option_from_pen(FILLTEXTPEN, NSOPTION_sys_colour_CaptionText, 0x00000000);
colour_option_from_pen(defaults, DISABLEDTEXTPEN, NSOPTION_sys_colour_GrayText, 0x00777777); colour_option_from_pen(DISABLEDTEXTPEN, NSOPTION_sys_colour_GrayText, 0x00777777);
colour_option_from_pen(defaults, SELECTPEN, NSOPTION_sys_colour_Highlight, 0x00ee0000); colour_option_from_pen(SELECTPEN, NSOPTION_sys_colour_Highlight, 0x00ee0000);
colour_option_from_pen(defaults, SELECTTEXTPEN, NSOPTION_sys_colour_HighlightText, 0x00000000); colour_option_from_pen(SELECTTEXTPEN, NSOPTION_sys_colour_HighlightText, 0x00000000);
colour_option_from_pen(defaults, INACTIVEFILLPEN, NSOPTION_sys_colour_InactiveBorder, 0x00000000); colour_option_from_pen(INACTIVEFILLPEN, NSOPTION_sys_colour_InactiveBorder, 0x00000000);
colour_option_from_pen(defaults, INACTIVEFILLPEN, NSOPTION_sys_colour_InactiveCaption, 0x00ffffff); colour_option_from_pen(INACTIVEFILLPEN, NSOPTION_sys_colour_InactiveCaption, 0x00ffffff);
colour_option_from_pen(defaults, INACTIVEFILLTEXTPEN, NSOPTION_sys_colour_InactiveCaptionText, 0x00cccccc); colour_option_from_pen(INACTIVEFILLTEXTPEN, NSOPTION_sys_colour_InactiveCaptionText, 0x00cccccc);
colour_option_from_pen(defaults, BACKGROUNDPEN, NSOPTION_sys_colour_InfoBackground, 0x00aaaaaa);/* This is wrong, HelpHint backgrounds are pale yellow but doesn't seem to be a DrawInfo pen defined for it. */ colour_option_from_pen(BACKGROUNDPEN, NSOPTION_sys_colour_InfoBackground, 0x00aaaaaa);/* This is wrong, HelpHint backgrounds are pale yellow but doesn't seem to be a DrawInfo pen defined for it. */
colour_option_from_pen(defaults, TEXTPEN, NSOPTION_sys_colour_InfoText, 0x00000000); colour_option_from_pen(TEXTPEN, NSOPTION_sys_colour_InfoText, 0x00000000);
colour_option_from_pen(defaults, MENUBACKGROUNDPEN, NSOPTION_sys_colour_Menu, 0x00aaaaaa); colour_option_from_pen(MENUBACKGROUNDPEN, NSOPTION_sys_colour_Menu, 0x00aaaaaa);
colour_option_from_pen(defaults, MENUTEXTPEN, NSOPTION_sys_colour_MenuText, 0x00000000); colour_option_from_pen(MENUTEXTPEN, NSOPTION_sys_colour_MenuText, 0x00000000);
colour_option_from_pen(defaults, AMINS_SCROLLERPEN, NSOPTION_sys_colour_Scrollbar, 0x00aaaaaa); colour_option_from_pen(AMINS_SCROLLERPEN, NSOPTION_sys_colour_Scrollbar, 0x00aaaaaa);
colour_option_from_pen(defaults, FORESHADOWPEN, NSOPTION_sys_colour_ThreeDDarkShadow, 0x00555555); colour_option_from_pen(FORESHADOWPEN, NSOPTION_sys_colour_ThreeDDarkShadow, 0x00555555);
colour_option_from_pen(defaults, FOREGROUNDPEN, NSOPTION_sys_colour_ThreeDFace, 0x00dddddd); colour_option_from_pen(FOREGROUNDPEN, NSOPTION_sys_colour_ThreeDFace, 0x00dddddd);
colour_option_from_pen(defaults, FORESHINEPEN, NSOPTION_sys_colour_ThreeDHighlight, 0x00aaaaaa); colour_option_from_pen(FORESHINEPEN, NSOPTION_sys_colour_ThreeDHighlight, 0x00aaaaaa);
colour_option_from_pen(defaults, HALFSHINEPEN, NSOPTION_sys_colour_ThreeDLightShadow, 0x00999999); colour_option_from_pen(HALFSHINEPEN, NSOPTION_sys_colour_ThreeDLightShadow, 0x00999999);
colour_option_from_pen(defaults, HALFSHADOWPEN, NSOPTION_sys_colour_ThreeDShadow, 0x00777777); colour_option_from_pen(HALFSHADOWPEN, NSOPTION_sys_colour_ThreeDShadow, 0x00777777);
colour_option_from_pen(defaults, BACKGROUNDPEN, NSOPTION_sys_colour_Window, 0x00aaaaaa); colour_option_from_pen(BACKGROUNDPEN, NSOPTION_sys_colour_Window, 0x00aaaaaa);
colour_option_from_pen(defaults, INACTIVEFILLPEN, NSOPTION_sys_colour_WindowFrame, 0x00000000); colour_option_from_pen(INACTIVEFILLPEN, NSOPTION_sys_colour_WindowFrame, 0x00000000);
colour_option_from_pen(defaults, TEXTPEN, NSOPTION_sys_colour_WindowText, 0x00000000); colour_option_from_pen(TEXTPEN, NSOPTION_sys_colour_WindowText, 0x00000000);
} }