/*****************************************************************************/

/*
 *      analogstruct.c -- Analog overlay settings
 *
 *      Copyright (C) 2000 Sigma Designs
 *                    written by Nicolas Vignal <nicolas_vignal@sdesigns.com>
 *                    modified by Emmanuel Michon <emmanuel_michon@sdesigns.com>
 *                                Pascal Cannenterre <pascal_cannenterre@sdesigns.com>
 *
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*****************************************************************************/
#include "analogstruct.h"
#include <stdlib.h>
#include <string.h>

DWORD InitParamTable(analogstruct *analogparam)
{

// to add a new parameter, just add a new line before the NULL line, like this :
// {TEXT, ATTRIBUTE, defaultvalue}
	online table[]={
		{"XOFFSET",FMP_ANALOG_OVERLAY_ATTRIBUTE_XOFFSET,0},
		{"YOFFSET",FMP_ANALOG_OVERLAY_ATTRIBUTE_YOFFSET,0},
		{"VGACORRECTION",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGACORRECTION,1000},
		{"VGARUPPER",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGARUPPER,14},
		{"VGARLOWER",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGARLOWER,0},
		{"VGAGUPPER",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAGUPPER,56},
		{"VGAGLOWER",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAGLOWER,29},
		{"VGABUPPER",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGABUPPER,0},
		{"VGABLOWER",FMP_ANALOG_OVERLAY_ATTRIBUTE_VGABLOWER,14},
		{"STABILITY",FMP_ANALOG_OVERLAY_ATTRIBUTE_JITTERADJUSTMENT,0},
	  {NULL,0,0}
	};

	
  analogparam->paramtable=(online*)malloc(sizeof(table));

  // dirty, copy the pointers and not the text
  memcpy(analogparam->paramtable,&table,sizeof(table));

  return 0;
}


void CloseParamTable(analogstruct *analogparam){
	free(analogparam->paramtable);
}

