diff --git a/modizer/Classes/DetailViewControllerIphone.mm b/modizer/Classes/DetailViewControllerIphone.mm index b470e4f2f..05d3486fc 100755 --- a/modizer/Classes/DetailViewControllerIphone.mm +++ b/modizer/Classes/DetailViewControllerIphone.mm @@ -102,7 +102,7 @@ static MPMediaItemArtwork *artwork; static int txtMenuHandle[16]; -static int txtSubMenuHandle[35]; +static int txtSubMenuHandle[36]; //int texturePiano; @@ -3883,6 +3883,7 @@ - (void)viewDidLoad { txtSubMenuHandle[32]=0; txtSubMenuHandle[33]=txtMenuHandle[11]; txtSubMenuHandle[34]=TextureUtils::Create([UIImage imageNamed:@"txtMenu12b_2x.png"]); + txtSubMenuHandle[35]=TextureUtils::Create([UIImage imageNamed:@"txtMenu12c_2x.png"]); end_time=clock(); #ifdef LOAD_PROFILE @@ -4444,7 +4445,7 @@ - (void)doFrame { viewTapHelpShow=2; viewTapHelpShowMode=2; viewTapHelpShow_SubStart=32; - viewTapHelpShow_SubNb=3; + viewTapHelpShow_SubNb=4; } else if (touched_coord==0x03) { shouldhide=1; } else if (touched_coord==0x23) { @@ -4618,6 +4619,8 @@ - (void)doFrame { case 27: //Piano settings[GLOB_FXPiano].detail.mdz_switch.switch_value=3; break; + case 32: //Spectrum3D + settings[GLOB_FX3DSpectrum].detail.mdz_switch.switch_value=3; } } else if (touched_coord==0x01) { switch (viewTapHelpShow_SubStart) { @@ -5166,7 +5169,8 @@ - (void)doFrame { if (settings[GLOB_FX3].detail.mdz_switch.switch_value) mirror=0; if (settings[GLOB_FX5].detail.mdz_switch.switch_value) mirror=0; if (settings[GLOB_FXPiano].detail.mdz_switch.switch_value) mirror=0; - RenderUtils::DrawSpectrum3DBar(real_spectrumL,real_spectrumR,ww,hh,angle,settings[GLOB_FX3DSpectrum].detail.mdz_switch.switch_value,nb_spectrum_bands,mirror); + RenderUtils::DrawSpectrum3DBar(real_spectrumL,real_spectrumR,ww,hh,angle, + settings[GLOB_FX3DSpectrum].detail.mdz_switch.switch_value,nb_spectrum_bands,mirror); } if (settings[GLOB_FXPiano].detail.mdz_switch.switch_value) { diff --git a/modizer/MISC/RenderUtils.mm b/modizer/MISC/RenderUtils.mm index 32b8bf100..e67c919d6 100755 --- a/modizer/MISC/RenderUtils.mm +++ b/modizer/MISC/RenderUtils.mm @@ -1110,15 +1110,19 @@ float _hh;// = _hw/aspectRatio; //glFrustumf(-_hw, _hw, -_hh, _hh, 100.0f, 10000.0f); + switch (mode) { + case 1: + _hw = (float)nb_spectrum_bands*0.99/2; + _hh = _hw/aspectRatio; + break; case 2: _hw = 16*1.0/2; _hh = _hw/aspectRatio; break; - case 1: + case 3: _hw = (float)nb_spectrum_bands*0.99/2; _hh = _hw/aspectRatio; - break; } @@ -1149,6 +1153,27 @@ frameCpt++; switch (mode) { + case 1: + glTranslatef(0.0, 0.0, -150.0+ + 15*(0.8f*sin((float)frameCpt*3.14159f/991)+ + 1.7f*sin((float)frameCpt*3.14159f/3065)- + 0.3f*sin((float)frameCpt*3.14159f/5009))); + + glRotatef(-90+10.0f*(0.8f*sin((float)frameCpt*3.14159f/2691)+ + 0.7f*sin((float)frameCpt*3.14159f/3113)- + 0.3f*sin((float)frameCpt*3.14159f/7409)),0,0,1); + + + glRotatef(3*360.0f*(0.5f*sin((float)frameCpt*3.14159f/761)- + 0.7f*sin((float)frameCpt*3.14159f/1211)- + 0.9f*sin((float)frameCpt*3.14159f/2213)), 0, 1, 0); + + + glRotatef(10.0f*(0.8f*sin((float)frameCpt*3.14159f/891)- + 0.2f*sin((float)frameCpt*3.14159f/211)- + 0.4f*sin((float)frameCpt*3.14159f/5213)),0,0,1); + + break; case 2: glTranslatef(0.0, 0.0, -190.0+ 15*(0.8f*sin((float)frameCpt*3.14159f/991)+ @@ -1171,7 +1196,7 @@ 0.9f*sin((float)frameCpt*3.14159f/2213)), 0, 1, 0); break; - case 1: + case 3: glTranslatef(0.0, 0.0, -150.0+ 15*(0.8f*sin((float)frameCpt*3.14159f/991)+ 1.7f*sin((float)frameCpt*3.14159f/3065)- @@ -1588,6 +1613,188 @@ glRotatef(180-90, 0, 1, 0); } } + if (mode==3) { + float dsz; +#define absf(x) (x<0?x:-x) + for (int i=0; inb_spectrum_bands/3) { + cgt=(float)(i-nb_spectrum_bands/3)/(nb_spectrum_bands*2/3); + } else { + cgt=0; + } + crt=1-fabs(i-nb_spectrum_bands/2)/(nb_spectrum_bands/2); + crt*=0.5+(spL/1); + if (crt>1) crt=1; + cgt*=0.5+(spL/1); + if (cgt>1) cgt=1; + cbt*=0.5+(spL/1); + if (cbt>1) cbt=1; + + dsz=2+3*(0.2f*sin(frameCpt*0.05f+i*0.1f)+0.5f*sin(frameCpt*0.07f-i*0.3f+0.01f)*sin(frameCpt*0.07f-i*0.3f+0.01f)+0.5f*sin(frameCpt*0.01f+i*0.03f+0.2f)*sin(frameCpt*0.01f+i*0.03f+0.2f)*sin(frameCpt*0.01f+i*0.03f+0.2f)); + + sx=1; + sy=1; + sz=spL/2+0.1f; + x=-0.5f; + z=dsz+spL/4; + y=(i-nb_spectrum_bands/2)*sy*1.05f; + + //glTranslatef(0,0,-8); + glRotatef(i*2*360/nb_spectrum_bands,0,1,0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + + glRotatef(90, 0, 1, 0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + glRotatef(90, 0, -1, 0); + + glRotatef(i*2*360/nb_spectrum_bands,0,-1,0); + //glTranslatef(0,0,8); + + ///////////////// + //RIGHT + spR=barSpectrumDataR[i]; + + if (inb_spectrum_bands/3) { + cgt=(float)(i-nb_spectrum_bands/3)/(nb_spectrum_bands*2/3)+0.1; + } else { + cgt=0.1; + } + crt=1-fabs(i-nb_spectrum_bands/2)/(nb_spectrum_bands/2); + crt*=0.5+(spR/1); + if (crt>1) crt=1; + cgt*=0.5+(spR/1); + if (cgt>1) cgt=1; + cbt*=0.5+(spR/1); + if (cbt>1) cbt=1; + + + sx=1; + sy=1; + sz=spR/2+0.1f; + x=-0.5f; + z=dsz+spR/4; + y=(i-nb_spectrum_bands/2)*sy*1.05f; + + glRotatef(180+i*2*360/nb_spectrum_bands,0,1,0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + glRotatef(90, 0, 1, 0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + glRotatef(90, 0, -1, 0); + glRotatef(180+i*2*360/nb_spectrum_bands,0,-1,0); + + } + + glRotatef(-3*360.0f*(0.5f*sin((float)frameCpt*3.14159f/761)- + 0.7f*sin((float)frameCpt*3.14159f/1211)- + 0.9f*sin((float)frameCpt*3.14159f/2213)), 0, 1, 0); + + //glRotatef(180,0,0,1); + glTranslatef(12,0,0); + + glRotatef(-3*360.0f*(0.5f*sin((float)frameCpt*3.14159f/761)- + 0.7f*sin((float)frameCpt*3.14159f/1211)- + 0.9f*sin((float)frameCpt*3.14159f/2213)), 0, 1, 0); + + ang=0; + if (mirror) + for (int i=0; inb_spectrum_bands/3) { + cgt=(float)(i-nb_spectrum_bands/3)/(nb_spectrum_bands*2/3); + } else { + cgt=0; + } + crt=1-fabs(i-nb_spectrum_bands/2)/(nb_spectrum_bands/2); + crt*=0.5+(spL/1); + if (crt>1) crt=1; + cgt*=0.5+(spL/1); + if (cgt>1) cgt=1; + cbt*=0.5+(spL/1); + if (cbt>1) cbt=1; + + crt*=0.5;cgt*=0.5;cbt*=0.5; + + dsz=2+3*(0.2f*sin(frameCpt*0.05f+i*0.1f)+0.5f*sin(frameCpt*0.07f-i*0.3f+0.01f)*sin(frameCpt*0.07f-i*0.3f+0.01f)+0.5f*sin(frameCpt*0.01f+i*0.03f+0.2f)*sin(frameCpt*0.01f+i*0.03f+0.2f)*sin(frameCpt*0.01f+i*0.03f+0.2f)); + + sx=1; + sy=1; + sz=spL/2+0.1f; + x=-0.5f; + z=dsz+spL/4; + y=(i-nb_spectrum_bands/2)*sy*1.05f; + + glRotatef(i*2*360/nb_spectrum_bands,0,1,0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + glRotatef(90, 0, 1, 0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + glRotatef(90, 0, -1, 0); + glRotatef(i*2*360/nb_spectrum_bands,0,-1,0); + + + ///////////////// + //RIGHT + spR=barSpectrumDataR[i]; + + if (inb_spectrum_bands/3) { + cgt=(float)(i-nb_spectrum_bands/3)/(nb_spectrum_bands*2/3)+0.1; + } else { + cgt=0.1; + } + crt=1-fabs(i-nb_spectrum_bands/2)/(nb_spectrum_bands/2); + crt*=0.5+(spR/1); + if (crt>1) crt=1; + cgt*=0.5+(spR/1); + if (cgt>1) cgt=1; + cbt*=0.5+(spR/1); + if (cbt>1) cbt=1; + + crt*=0.5;cgt*=0.5;cbt*=0.5; + + sx=1; + sy=1; + sz=spR/2+0.1f; + x=-0.5f; + z=dsz+spR/4; + y=(i-nb_spectrum_bands/2)*sy*1.05f; + + glRotatef(180+i*2*360/nb_spectrum_bands,0,1,0); + + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + + glRotatef(90, 0, 1, 0); + drawbar(x,y,z,sx,sy,sz,crt,cgt,cbt); + glRotatef(90, 0, -1, 0); + + glRotatef(180+i*2*360/nb_spectrum_bands,0,-1,0); + } + } /* Disable Vertex Pointer */ diff --git a/modizer/Resources/Images/txtMenu12c.png b/modizer/Resources/Images/txtMenu12c.png new file mode 100644 index 000000000..a2793f1a1 Binary files /dev/null and b/modizer/Resources/Images/txtMenu12c.png differ diff --git a/modizer/Resources/Images/txtMenu12c_2x.png b/modizer/Resources/Images/txtMenu12c_2x.png new file mode 100644 index 000000000..783bcd3fa Binary files /dev/null and b/modizer/Resources/Images/txtMenu12c_2x.png differ diff --git a/modizer/modizer.xcodeproj/project.pbxproj b/modizer/modizer.xcodeproj/project.pbxproj index 6d643ded0..df6242f26 100755 --- a/modizer/modizer.xcodeproj/project.pbxproj +++ b/modizer/modizer.xcodeproj/project.pbxproj @@ -703,6 +703,8 @@ CC33B4271ABE1FC6009608E8 /* slider.png in Resources */ = {isa = PBXBuildFile; fileRef = CC33B4261ABE1FC6009608E8 /* slider.png */; }; CC33B42D1ABF05A3009608E8 /* slider@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC33B42C1ABF05A3009608E8 /* slider@2x.png */; }; CC4D69B312472B5C0074E94B /* info@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC4D69B212472B5C0074E94B /* info@2x.png */; }; + CC5B03F91ACC9CCA0015A136 /* txtMenu12c_2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5B03F71ACC9CCA0015A136 /* txtMenu12c_2x.png */; }; + CC5B03FA1ACC9CCA0015A136 /* txtMenu12c.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5B03F81ACC9CCA0015A136 /* txtMenu12c.png */; }; CC5C709717CC8EB000DC7197 /* txtMenu11c.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5C709517CC8EB000DC7197 /* txtMenu11c.png */; }; CC5C709817CC8EB000DC7197 /* txtMenu11d.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5C709617CC8EB000DC7197 /* txtMenu11d.png */; }; CC5C709B17CD1BAE00DC7197 /* FFTAccelerate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CC5C709917CD1BAE00DC7197 /* FFTAccelerate.cpp */; }; @@ -2467,6 +2469,8 @@ CC4D69B212472B5C0074E94B /* info@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info@2x.png"; sourceTree = ""; }; CC59B9061AC4B882004FEEBA /* libFileExtractor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libFileExtractor.xcodeproj; path = ../File_Extractor/libFileExtractor/libFileExtractor.xcodeproj; sourceTree = ""; }; CC59B90C1AC4B91E004FEEBA /* fex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fex.h; path = ../File_Extractor/fex/fex.h; sourceTree = ""; }; + CC5B03F71ACC9CCA0015A136 /* txtMenu12c_2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = txtMenu12c_2x.png; sourceTree = ""; }; + CC5B03F81ACC9CCA0015A136 /* txtMenu12c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = txtMenu12c.png; sourceTree = ""; }; CC5C709517CC8EB000DC7197 /* txtMenu11c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = txtMenu11c.png; sourceTree = ""; }; CC5C709617CC8EB000DC7197 /* txtMenu11d.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = txtMenu11d.png; sourceTree = ""; }; CC5C709917CD1BAE00DC7197 /* FFTAccelerate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FFTAccelerate.cpp; sourceTree = ""; }; @@ -4195,6 +4199,8 @@ 33ABE59317B0E87D00AE0EA1 /* bb_caret-right@2x.png */, 33ABE58617B0E65400AE0EA1 /* bb_list.png */, CC928DE717D0037B0098696C /* txtMenu12a.png */, + CC5B03F71ACC9CCA0015A136 /* txtMenu12c_2x.png */, + CC5B03F81ACC9CCA0015A136 /* txtMenu12c.png */, CC928DE817D0037B0098696C /* txtMenu12b.png */, 33ABE58717B0E65400AE0EA1 /* bb_list@2x.png */, 33ABE58817B0E65500AE0EA1 /* bb_music.png */, @@ -5861,6 +5867,7 @@ CC1E6371120423DF000A8A4E /* MusicMaker-8V in Resources */, CC1E6372120423DF000A8A4E /* NovoTradePacker in Resources */, CC1E6373120423DF000A8A4E /* NTSP-system in Resources */, + CC5B03FA1ACC9CCA0015A136 /* txtMenu12c.png in Resources */, CC1E6374120423DF000A8A4E /* Octa-MED in Resources */, CC1E6375120423DF000A8A4E /* Oktalyzer in Resources */, CC1E6376120423DF000A8A4E /* onEscapee in Resources */, @@ -5950,6 +5957,7 @@ CC03F2CE12160E9500F2AC65 /* button.png in Resources */, CC03F2DB12160FE000F2AC65 /* buttonB-highlight.png in Resources */, CC03F2DC12160FE000F2AC65 /* buttonB.png in Resources */, + CC5B03F91ACC9CCA0015A136 /* txtMenu12c_2x.png in Resources */, CC03F2DD12160FE000F2AC65 /* buttonR-highlight.png in Resources */, CC03F2DE12160FE000F2AC65 /* buttonR.png in Resources */, CC03F2DF12160FE000F2AC65 /* buttonY-highlight.png in Resources */,