blob: 4762ec3a8e5bd0d0fc36e7248b6ac8ed8f6708b1 [file] [log] [blame]
#include "IdlePreset.hpp"
#include <sstream>
#include <string>
#include "MilkdropPreset.hpp"
const std::string IdlePresets::IDLE_PRESET_NAME
("Rovastar & Fvese - Stranger Minds (idle-ized).milk");
std::string
IdlePresets::presetText()
{
std::ostringstream out;
out << "[preset00]\n"
<< "fRating=3.500000\n"
<< "fGammaAdj=1.000000\n"
<< "fDecay=0.999000\n"
<< "fVideoEchoZoom=0.999600\n"
<< "fVideoEchoAlpha=0.500000\n"
<< "nVideoEchoOrientation=1\n"
<< "nWaveMode=5\n"
<< "bAdditiveWaves=1\n"
<< "bWaveDots=0\n"
<< "bModWaveAlphaByVolume=1\n"
<< "bMaximizeWaveColor=1\n"
<< "bTexWrap=0\n"
<< "bDarkenCenter=0\n"
<< "bRedBlueStereo=0\n"
<< "bBrighten=0\n"
<< "bDarken=0\n"
<< "bSolarize=0\n"
<< "bInvert=0\n"
<< "fWaveAlpha=1.005730\n"
<< "fWaveScale=0.535239\n"
<< "fWaveSmoothing=0.000000\n"
<< "fWaveParam=0.000000\n"
<< "fModWaveAlphaStart=1.489999\n"
<< "fModWaveAlphaEnd=0.750000\n"
<< "fWarpAnimSpeed=1.000000\n"
<< "fWarpScale=1.331000\n"
<< "fZoomExponent=1.000000\n"
<< "fShader=0.000000\n"
<< "zoom=0.999500\n"
<< "rot=0.200000\n"
<< "cx=0.500000\n"
<< "cy=0.500000\n"
<< "dx=0.000000\n"
<< "dy=0.000000\n"
<< "warp=0.010000\n"
<< "sx=1.000000\n"
<< "sy=1.000000\n"
<< "wave_r=0.000000\n"
<< "wave_g=0.000000\n"
<< "wave_b=0.000000\n"
<< "wave_x=0.500000\n"
<< "wave_y=0.500000\n"
<< "ob_size=0.005000\n"
<< "ob_r=0.000000\n"
<< "ob_g=0.000000\n"
<< "ob_b=0.000000\n"
<< "ob_a=1.000000\n"
<< "ib_size=0.005000\n"
<< "ib_r=0.000000\n"
<< "ib_g=0.000000\n"
<< "ib_b=0.000000\n"
<< "ib_a=1.000000\n"
<< "nMotionVectorsX=3.200000\n"
<< "nMotionVectorsY=1.440000\n"
<< "mv_l=5.000000\n"
<< "mv_r=0.000000\n"
<< "mv_g=1.000000\n"
<< "mv_b=1.000000\n"
<< "mv_a=0.000000\n"
<< "per_frame_1=wave_r = wave_r + 0.350*( 0.60*sin(0.825*time) + 0.40*sin(0.915*time) );\n"
<< "per_frame_2=wave_g = wave_g + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(1.025*time) );\n"
<< "per_frame_3=wave_b = wave_b + 0.350*( 0.60*sin(0.810*time) + 0.40*sin(0.950*time) );\n"
<< "per_frame_4=mv_r= wave_r + 0.350*( 0.60*sin(0.900*time) + 0.40*sin(0.750*time) );\n"
<< "per_frame_5=mv_g= wave_g + 0.350*( 0.60*sin(0.825*time) + 0.40*sin(0.950*time) );\n"
<< "per_frame_6=mv_b= wave_b + 0.350*( 0.60*sin(0.775*time) + 0.40*sin(1.025*time) );\n"
<< "per_frame_7=ib_r=min(bass*0.5,1);\n"
<< "per_frame_8=ib_b=min(treb*0.5,1);\n"
<< "per_frame_9=ib_g=min(mid*0.5,1);\n"
<< "per_frame_10=ob_r=1-min(mid_att*0.5,1);\n"
<< "per_frame_11=ob_b=1-min(bass_att*0.5,1);\n"
<< "per_frame_12=ob_g=1-min(treb_att*0.5,1);\n"
<< "per_pixel_1=zoom =0.9- sin(time + ang*2)*0.02;\n"
<< "per_pixel_2=zoom=zoom+(bass_att-1.0)*0.115;\n";
return out.str();
}
std::auto_ptr<Preset>
IdlePresets::allocate(const std::string & name, PresetOutputs & presetOutputs)
{
if (name == IDLE_PRESET_NAME) {
std::istringstream in(presetText());
return std::auto_ptr<Preset>(new MilkdropPreset(in, IDLE_PRESET_NAME, presetOutputs));
}
else
return std::auto_ptr<Preset>(0);
}