Beispiel #1
0
/* initPresetLoader: initializes the preset
   loading library. this should be done before
   any parsing */
int initPresetLoader() {

  /* Initializes the builtin parameter database */
  init_builtin_param_db();

  /* Initializes the builtin function database */
  init_builtin_func_db();
	
  /* Initializes all infix operators */
  init_infix_ops();

  /* Set the seed to the current time in seconds */
  srand(time(NULL));

  /* Initialize the 'idle' preset */
  init_idle_preset();

 

  reset_engine_vars();

  active_preset = idle_preset;
  load_init_conditions();

  /* Done */
  if (PRESET_DEBUG) printf("initPresetLoader: finished\n");
  return SUCCESS;
}
Beispiel #2
0
BuiltinParams::BuiltinParams(PresetInputs & presetInputs, PresetOutputs & presetOutputs)
{

  presetInputs.Initialize(presetOutputs.gx, presetOutputs.gy);

  int ret;
  if ((ret = init_builtin_param_db(presetInputs, presetOutputs)) != PROJECTM_SUCCESS)
  {
	std::cout << "failed to allocate builtin parameter database with error " << ret << std::endl;;
        throw ret;
  }

}