diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-11-07 15:33:52 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-05 17:17:49 +0100 |
commit | 9aa21eaa8464317985c1d5ee1b8fa577cc2d2473 (patch) | |
tree | 8e511c8d7c55829323742858df69349969824ee5 /src/lib/projectM | |
parent | 3260749d369d3466c345d40a8b2189c32c8c1b60 (diff) | |
download | usdx-9aa21eaa8464317985c1d5ee1b8fa577cc2d2473.tar.gz usdx-9aa21eaa8464317985c1d5ee1b8fa577cc2d2473.tar.xz usdx-9aa21eaa8464317985c1d5ee1b8fa577cc2d2473.zip |
removed deprecated stuff
Diffstat (limited to 'src/lib/projectM')
-rw-r--r-- | src/lib/projectM/cwrapper/Makefile.in | 41 | ||||
-rw-r--r-- | src/lib/projectM/cwrapper/projectM-cwrapper.cpp | 104 | ||||
-rw-r--r-- | src/lib/projectM/cwrapper/projectM-cwrapper.h | 67 | ||||
-rw-r--r-- | src/lib/projectM/cwrapper/projectM-cwrapper.sln | 20 | ||||
-rw-r--r-- | src/lib/projectM/cwrapper/projectM-cwrapper.vcproj | 208 | ||||
-rw-r--r-- | src/lib/projectM/projectM-0_9.inc | 427 | ||||
-rw-r--r-- | src/lib/projectM/projectM-1_0.inc | 188 |
7 files changed, 0 insertions, 1055 deletions
diff --git a/src/lib/projectM/cwrapper/Makefile.in b/src/lib/projectM/cwrapper/Makefile.in deleted file mode 100644 index fef3b80b..00000000 --- a/src/lib/projectM/cwrapper/Makefile.in +++ /dev/null @@ -1,41 +0,0 @@ -################################################# -# projectM C-wrapper -# @configure_input@ -################################################# - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ - -OBJECTS = projectM-cwrapper.o -LIBRARY = libprojectM-cwrapper.a - -CXX = @CXX@ -CXXFLAGS += @CXXFLAGS@ -INCLUDES = -I@libprojectM_INCLUDEDIR@/libprojectM -DEFINES = -DPROJECTM_VERSION_INT=@libprojectM_VERSION_INT@ -RANLIB = @RANLIB@ - -.PHONY: all clean distclean strip - -all : $(LIBRARY) - -$(LIBRARY): $(OBJECTS) - ar ruv $(LIBRARY) $(OBJECTS) - $(RANLIB) $(LIBRARY) - -%.o : %.cpp - $(CXX) $(CXXFLAGS) $(DEFINES) $(INCLUDES) -c $(<) -o $@ - -clean : - rm -f $(LIBRARY) - rm -f $(OBJECTS) - -distclean: clean - rm -rf Makefile - -strip : - strip $(LIBRARY) - $(RANLIB) $(LIBRARY) - diff --git a/src/lib/projectM/cwrapper/projectM-cwrapper.cpp b/src/lib/projectM/cwrapper/projectM-cwrapper.cpp deleted file mode 100644 index ebf43554..00000000 --- a/src/lib/projectM/cwrapper/projectM-cwrapper.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "projectM-cwrapper.h" - -#define PM_CLASS(pm) ((projectM*)pm) - -#if (PROJECTM_VERSION_INT > 1000000) -#define PM_PCM(pm) (PM_CLASS(pm)->pcm()) -#else -#define PM_PCM(pm) (PM_CLASS(pm)->pcm) -#endif - -projectM_ptr projectM_create1(char* config_file) -{ - return projectM_ptr(new projectM(config_file)); -} - -#if (PROJECTM_VERSION_INT < 1000000) -projectM_ptr projectM_create2(int gx, int gy, int fps, int texsize, - int width, int height, char* preset_url, - char* title_fonturl, char* title_menuurl) -{ - return projectM_ptr(new projectM(gx, gy, fps, texsize, width, height, - preset_url, title_fonturl, title_menuurl));} -#endif - -void projectM_resetGL(projectM_ptr pm, int width, int height) -{ - PM_CLASS(pm)->projectM_resetGL(width, height); -} - -void projectM_setTitle(projectM_ptr pm, char* title) -{ - PM_CLASS(pm)->projectM_setTitle(title); -} - -void projectM_renderFrame(projectM_ptr pm) -{ - PM_CLASS(pm)->renderFrame(); -} - -unsigned projectM_initRenderToTexture(projectM_ptr pm) -{ - return PM_CLASS(pm)->initRenderToTexture(); -} - -void projectM_key_handler(projectM_ptr pm, projectMEvent event, - projectMKeycode keycode, projectMModifier modifier) -{ - PM_CLASS(pm)->key_handler(event, keycode, modifier); -} - -void projectM_free(projectM_ptr pm) -{ - delete PM_CLASS(pm); -} - -void PCM_addPCMfloat(projectM_ptr pm, float *PCMdata, int samples) -{ - PM_PCM(pm)->addPCMfloat(PCMdata, samples); -} - -void PCM_addPCM16(projectM_ptr pm, short pcm_data[2][512]) -{ - PM_PCM(pm)->addPCM16(pcm_data); -} - -void PCM_addPCM16Data(projectM_ptr pm, const short* pcm_data, short samples) -{ - PM_PCM(pm)->addPCM16Data(pcm_data, samples); -} - -void PCM_addPCM8(projectM_ptr pm, unsigned char pcm_data[2][1024]) -{ - PM_PCM(pm)->addPCM8(pcm_data); -} - -void PCM_addPCM8_512(projectM_ptr pm, const unsigned char pcm_data[2][512]) -{ - PM_PCM(pm)->addPCM8_512(pcm_data); -} - -#define COPY_FIELD(c_ptr, s, fld) (c_ptr->fld = s.fld) - -#if (PROJECTM_VERSION_INT > 1000000) -void projectM_settings(projectM_ptr pm, Settings* settings) -{ - const projectM::Settings& pmSettings = PM_CLASS(pm)->settings(); - - COPY_FIELD(settings, pmSettings, meshX); - COPY_FIELD(settings, pmSettings, meshY); - COPY_FIELD(settings, pmSettings, fps); - COPY_FIELD(settings, pmSettings, textureSize); - COPY_FIELD(settings, pmSettings, windowWidth); - COPY_FIELD(settings, pmSettings, windowHeight); - settings->presetURL = pmSettings.presetURL.c_str(); - settings->titleFontURL = pmSettings.titleFontURL.c_str(); - settings->menuFontURL = pmSettings.menuFontURL.c_str(); - COPY_FIELD(settings, pmSettings, smoothPresetDuration); - COPY_FIELD(settings, pmSettings, presetDuration); - COPY_FIELD(settings, pmSettings, beatSensitivity); - COPY_FIELD(settings, pmSettings, aspectCorrection); - COPY_FIELD(settings, pmSettings, easterEgg); - COPY_FIELD(settings, pmSettings, shuffleEnabled); -} -#endif diff --git a/src/lib/projectM/cwrapper/projectM-cwrapper.h b/src/lib/projectM/cwrapper/projectM-cwrapper.h deleted file mode 100644 index 43f36ef4..00000000 --- a/src/lib/projectM/cwrapper/projectM-cwrapper.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef __PROJECTM_CWRAPPER_H__ -#define __PROJECTM_CWRAPPER_H__ - -#include "projectM.hpp" - -// PROJECTM_VERSION define is not very helpful, lets create our own -#define PROJECTM_VERSION_1_00_00 1000000 // 1.00.00 = 1.0 or 1.01 (same version number for 1.0 and 1.01) -#define PROJECTM_VERSION_1_10_00 1010000 // 1.10.00 = 1.1 (bigger than 1.2 due to strange versioning) -#define PROJECTM_VERSION_1_02_00 1002000 // 1.02.00 = 1.2 - -// version of projectM to wrap (see PROJECTM_VERSION) -#ifndef PROJECTM_VERSION_INT -#define PROJECTM_VERSION_INT PROJECTM_VERSION_1_02_00 -#endif - -extern "C" { - - #if (PROJECTM_VERSION_INT > 1000000) - struct Settings { - int meshX; - int meshY; - int fps; - int textureSize; - int windowWidth; - int windowHeight; - const char* presetURL; - const char* titleFontURL; - const char* menuFontURL; - int smoothPresetDuration; - int presetDuration; - float beatSensitivity; - char aspectCorrection; - float easterEgg; - char shuffleEnabled; - }; - #endif - - typedef void* projectM_ptr; - - DLLEXPORT projectM_ptr projectM_create1(char* config_file); - #if (PROJECTM_VERSION_INT < 1000000) - DLLEXPORT projectM_ptr projectM_create2(int gx, int gy, int fps, int texsize, - int width, int height, char* preset_url, - char* title_fonturl, char* title_menuurl); - #endif - - DLLEXPORT void projectM_resetGL(projectM_ptr pm, int width, int height); - DLLEXPORT void projectM_setTitle(projectM_ptr pm, char* title); - DLLEXPORT void projectM_renderFrame(projectM_ptr pm); - DLLEXPORT unsigned projectM_initRenderToTexture(projectM_ptr pm); - DLLEXPORT void projectM_key_handler(projectM_ptr pm, projectMEvent event, - projectMKeycode keycode, projectMModifier modifier); - - DLLEXPORT void projectM_free(projectM_ptr pm); - - DLLEXPORT void PCM_addPCMfloat(projectM_ptr pm, float *PCMdata, int samples); - DLLEXPORT void PCM_addPCM16(projectM_ptr pm, short [2][512]); - DLLEXPORT void PCM_addPCM16Data(projectM_ptr pm, const short* pcm_data, short samples); - DLLEXPORT void PCM_addPCM8(projectM_ptr pm, unsigned char [2][1024]); - DLLEXPORT void PCM_addPCM8_512(projectM_ptr pm, const unsigned char [2][512]); - - #if (PROJECTM_VERSION_INT > 1000000) - DLLEXPORT void projectM_settings(projectM_ptr pm, Settings* settings); - #endif -} - -#endif diff --git a/src/lib/projectM/cwrapper/projectM-cwrapper.sln b/src/lib/projectM/cwrapper/projectM-cwrapper.sln deleted file mode 100644 index e05f79a3..00000000 --- a/src/lib/projectM/cwrapper/projectM-cwrapper.sln +++ /dev/null @@ -1,20 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "projectM-cwrapper", "projectM-cwrapper.vcproj", "{8E653284-12F3-4A90-9D0D-4195557051F7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8E653284-12F3-4A90-9D0D-4195557051F7}.Debug|Win32.ActiveCfg = Debug|Win32
- {8E653284-12F3-4A90-9D0D-4195557051F7}.Debug|Win32.Build.0 = Debug|Win32
- {8E653284-12F3-4A90-9D0D-4195557051F7}.Release|Win32.ActiveCfg = Release|Win32
- {8E653284-12F3-4A90-9D0D-4195557051F7}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/src/lib/projectM/cwrapper/projectM-cwrapper.vcproj b/src/lib/projectM/cwrapper/projectM-cwrapper.vcproj deleted file mode 100644 index 94e848d7..00000000 --- a/src/lib/projectM/cwrapper/projectM-cwrapper.vcproj +++ /dev/null @@ -1,208 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8,00"
- Name="projectM-cwrapper"
- ProjectGUID="{8E653284-12F3-4A90-9D0D-4195557051F7}"
- RootNamespace="projectMcwrapper"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""D:\daten\ultrastar\libprojectM\libprojectM-1.2.0\projectM";"D:\daten\ultrastar\libprojectM\libs\pthreads\Pre-built.2\include""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PROJECTMCWRAPPER_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libprojectM.lib"
- LinkIncremental="2"
- AdditionalLibraryDirectories=""D:\daten\ultrastar\libprojectM\libprojectM-1.2.0\projectM\Debug""
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""D:\daten\ultrastar\libprojectM\libprojectM-1.2.0\projectM";"D:\daten\ultrastar\libprojectM\libs\pthreads\Pre-built.2\include""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PROJECTMCWRAPPER_EXPORTS"
- ExceptionHandling="1"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libprojectM.lib"
- LinkIncremental="1"
- AdditionalLibraryDirectories=""D:\daten\ultrastar\libprojectM\libprojectM-1.2.0\projectM\Release""
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\projectM-cwrapper.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\projectM-cwrapper.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/lib/projectM/projectM-0_9.inc b/src/lib/projectM/projectM-0_9.inc deleted file mode 100644 index 6b525cf7..00000000 --- a/src/lib/projectM/projectM-0_9.inc +++ /dev/null @@ -1,427 +0,0 @@ -{$IFDEF Unix} -uses - baseunix; -{$ENDIF} - -const -{$IF Defined(MSWINDOWS)} - libprojectM = 'libprojectM.dll'; -{$ELSEIF Defined(UNIX)} - libprojectM = 'libprojectM.so'; -{$IFEND} - -{**************** INTERNAL SECTION ****************} - - -type - PPCfloat = ^PCfloat; - -type - _TContextType = cint; -const - AGL_CONTEXT = 0; - CGL_CONTEXT = 1; - NSGL_CONTEXT = 2; - GLX_CONTEXT = 3; - WGL_CONTEXT = 4; - -type - _PRenderTarget = ^_TRenderTarget; - _TRenderTarget = record - { Texture size } - texsize: cint; - - { Application context } - origContextType: _TContextType; - - usePbuffers: cint; - - {$ifdef LINUX} - lock_func: procedure(); cdecl; - unlock_func: procedure(); cdecl; - {$endif} - - { Opaque pbuffer context and pbuffer } - {$ifdef DARWIN} - origContext: Pointer; - pbufferContext: Pointer; - pbuffer: Pointer; - {$endif} - - { Render target texture ID for non-pbuffer systems } - textureID: array[0..2] of GLuint; - end; - - _PProjectM = ^_TProjectM; - _TProjectM = record - presetURL: PChar; - presetName: PChar; - fontURL: PChar; - - hasInit: cint; - - noSwitch: cint; - pcmframes: cint; - freqframes: cint; - totalframes: cint; - - showfps: cint; - showtitle: cint; - showpreset: cint; - showhelp: cint; - showstats: cint; - - studio: cint; - - fbuffer: PGLubyte; - - {$IFNDEF MSWINDOWS} - { The first ticks value of the application } - startTime: timeval; - {$ELSE} - startTime: clong; - {$ENDIF} - Time: cfloat; - - { Render target texture ID } - renderTarget: _PRenderTarget; - - disp: array[0..79] of Char; - - wave_o: cfloat; - - //int texsize=1024; //size of texture to do actual graphics - fvw: cint; //fullscreen dimensions - fvh: cint; - wvw: cint; //windowed dimensions - wvh: cint; - vw: cint; //runtime dimensions - vh: cint; - fullscreen: cint; - - maxsamples: cint; //size of PCM buffer - numsamples: cint; //size of new PCM info - pcmdataL: PCfloat; //holder for most recent pcm data - pcmdataR: PCfloat; //holder for most recent pcm data - - avgtime: cint; //# frames per preset - - title: PChar; - drawtitle: cint; - - correction: cint; - - vol: cfloat; - - //per pixel equation variables - gridx: PPCfloat; //grid containing interpolated mesh - gridy: PPCfloat; - origtheta: PPCfloat; //grid containing interpolated mesh reference values - origrad: PPCfloat; - origx: PPCfloat; //original mesh - origy: PPCfloat; - origx2: PPCfloat; //original mesh - origy2: PPCfloat; - - { Timing information } - mspf: cint; - timed: cint; - timestart: cint; - nohard: cint; - count: cint; - realfps, - fpsstart: cfloat; - - { PCM data } - vdataL: array[0..511] of cfloat; //holders for FFT data (spectrum) - vdataR: array[0..511] of cfloat; - - { Various toggles } - doPerPixelEffects: cint; - doIterative: cint; - - { ENGINE VARIABLES } - { From engine_vars.h } - preset_name: array[0..255] of Char; - - { PER FRAME CONSTANTS BEGIN } - zoom: cfloat; - zoomexp: cfloat; - rot: cfloat; - warp: cfloat; - - sx: cfloat; - sy: cfloat; - dx: cfloat; - dy: cfloat; - cx: cfloat; - cy: cfloat; - - gy: cint; - gx: cint; - - decay: cfloat; - - wave_r: cfloat; - wave_g: cfloat; - wave_b: cfloat; - wave_x: cfloat; - wave_y: cfloat; - wave_mystery: cfloat; - - ob_size: cfloat; - ob_r: cfloat; - ob_g: cfloat; - ob_b: cfloat; - ob_a: cfloat; - - ib_size: cfloat; - ib_r: cfloat; - ib_g: cfloat; - ib_b: cfloat; - ib_a: cfloat; - - meshx: cint; - meshy: cint; - - mv_a: cfloat; - mv_r: cfloat; - mv_g: cfloat; - mv_b: cfloat; - mv_l: cfloat; - mv_x: cfloat; - mv_y: cfloat; - mv_dy: cfloat; - mv_dx: cfloat; - - treb: cfloat; - mid: cfloat; - bass: cfloat; - bass_old: cfloat; - beat_sensitivity: cfloat; - treb_att: cfloat; - mid_att: cfloat; - bass_att: cfloat; - progress: cfloat; - frame: cint; - - { PER_FRAME CONSTANTS END } - - { PER_PIXEL CONSTANTS BEGIN } - - x_per_pixel: cfloat; - y_per_pixel: cfloat; - rad_per_pixel: cfloat; - ang_per_pixel: cfloat; - - { PER_PIXEL CONSTANT END } - - - fRating: cfloat; - fGammaAdj: cfloat; - fVideoEchoZoom: cfloat; - fVideoEchoAlpha: cfloat; - - nVideoEchoOrientation: cint; - nWaveMode: cint; - bAdditiveWaves: cint; - bWaveDots: cint; - bWaveThick: cint; - bModWaveAlphaByVolume: cint; - bMaximizeWaveColor: cint; - bTexWrap: cint; - bDarkenCenter: cint; - bRedBlueStereo: cint; - bBrighten: cint; - bDarken: cint; - bSolarize: cint; - bInvert: cint; - bMotionVectorsOn: cint; - fps: cint; - - fWaveAlpha: cfloat; - fWaveScale: cfloat; - fWaveSmoothing: cfloat; - fWaveParam: cfloat; - fModWaveAlphaStart: cfloat; - fModWaveAlphaEnd: cfloat; - fWarpAnimSpeed: cfloat; - fWarpScale: cfloat; - fShader: cfloat; - - - { Q VARIABLES START } - - q1: cfloat; - q2: cfloat; - q3: cfloat; - q4: cfloat; - q5: cfloat; - q6: cfloat; - q7: cfloat; - q8: cfloat; - - - { Q VARIABLES END } - - zoom_mesh: PPCfloat; - zoomexp_mesh: PPCfloat; - rot_mesh: PPCfloat; - - sx_mesh: PPCfloat; - sy_mesh: PPCfloat; - dx_mesh: PPCfloat; - dy_mesh: PPCfloat; - cx_mesh: PPCfloat; - cy_mesh: PPCfloat; - - x_mesh: PPCfloat; - y_mesh: PPCfloat; - rad_mesh: PPCfloat; - theta_mesh: PPCfloat; - end; - - PProjectMState = ^TProjectMState; - TProjectMState = record - fontURLStr: string; - presetURLStr: string; - titleStr: string; - pm: _TProjectM; - end; - -{ projectM.h declarations } -procedure _projectM_init(pm: _PProjectM); cdecl; external libprojectM name 'projectM_init'; -procedure _projectM_reset(pm: _PProjectM); cdecl; external libprojectM name 'projectM_reset'; -procedure _projectM_resetGL(pm: _PProjectM; width: cint; height: cint); cdecl; external libprojectM name 'projectM_resetGL'; -procedure _projectM_setTitle(pm: _PProjectM; title: PChar); cdecl; external libprojectM name 'projectM_setTitle'; -procedure _renderFrame(pm: _PProjectM); cdecl; external libprojectM name 'renderFrame'; - -{ PCM.h declarations } -procedure _addPCMfloat(pcm_data: PCfloat; samples: cint); cdecl; external libprojectM name 'addPCMfloat'; -procedure _addPCM16(pcm_data: PPCM16); cdecl; external libprojectM name 'addPCM16'; -procedure _addPCM16Data(pcm_data: PCshort; samples: cshort); cdecl; external libprojectM name 'addPCM16Data'; -procedure _addPCM8_512(pcm_data: PPCM8_512); cdecl; external libprojectM name 'addPCM8'; - -{ console_interface.h declarations } -procedure _key_handler(pm: _PProjectM; - event: TProjectMEvent; - keycode: TProjectMKeycode; - modifier: TProjectMModifier); cdecl; external libprojectM name 'key_handler'; - - - - -{**************** EXTERNAL SECTION ****************} - - -constructor TProjectM.Create(gx, gy: cint; fps: integer; - texsize: integer; width, height: integer; - const presetsDir, fontsDir: string; - const titleFont, menuFont: string); -var - state: PProjectMState; -begin - inherited Create(); - - New(state); - data := state; - - with state^ do - begin - // copy strings (Note: do not use e.g. PChar(presetsDir) directly, it might - // be a pointer to local stack data that is invalid after the calling function returns) - fontURLStr := fontsDir; - presetURLStr := presetsDir; - - _projectM_reset(@pm); - - pm.fullscreen := 0; - pm.renderTarget^.texsize := texsize; - pm.gx := gx; - pm.gy := gy; - pm.fps := fps; - pm.renderTarget^.usePbuffers := 0; - pm.fontURL := PChar(fontURLStr); - pm.presetURL := PChar(presetURLStr); - - _projectM_init(@pm); - end; -end; - -procedure TProjectM.ResetGL(width, height: integer); -begin - _projectM_resetGL(@PProjectMState(data).pm, width, height); -end; - -procedure TProjectM.SetTitle(const title: string); -var - state: PProjectMState; -begin - state := PProjectMState(data); - with state^ do - begin - titleStr := title; - pm.title := PChar(titleStr); - pm.showtitle := 1; - end; -end; - -procedure TProjectM.RenderFrame(); -begin - _renderFrame(@PProjectMState(data).pm); -end; - -procedure TProjectM.AddPCMfloat(pcmData: PSingle; samples: integer); -begin - _addPCMfloat(PCfloat(pcmData), samples); -end; - -procedure TProjectM.AddPCM16(pcmData: PPCM16); -begin - _addPCM16(pcmData); -end; - -procedure TProjectM.AddPCM16Data(pcmData: PSmallint; samples: Smallint); -begin - _addPCM16Data(PCshort(pcmData), samples); -end; - -procedure TProjectM.AddPCM8_512(pcmData: PPCM8_512); -begin - _addPCM8_512(pcmData); -end; - -procedure TProjectM.KeyHandler(event: TProjectMEvent; - keycode: TProjectMKeycode; - modifier: TProjectMModifier); -begin - _key_handler(@PProjectMState(data).pm, event, keycode, modifier); -end; - -procedure TProjectM.RandomPreset(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_r_LOWERCASE, PROJECTM_KMOD_LSHIFT); -end; - -procedure TProjectM.PreviousPreset(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_p_LOWERCASE, PROJECTM_KMOD_LSHIFT); -end; - -procedure TProjectM.NextPreset(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_n_LOWERCASE, PROJECTM_KMOD_LSHIFT); -end; - -procedure TProjectM.ToggleShowPresetNames(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_F3, PROJECTM_KMOD_LSHIFT); -end; - -destructor TProjectM.Destroy(); -begin - Dispose(PProjectMState(data)); - data := nil; - inherited; -end; - diff --git a/src/lib/projectM/projectM-1_0.inc b/src/lib/projectM/projectM-1_0.inc deleted file mode 100644 index 8e84894d..00000000 --- a/src/lib/projectM/projectM-1_0.inc +++ /dev/null @@ -1,188 +0,0 @@ -//uses - -(** - * Note: be careful with ProjectM's versioning scheme. - * - * Version | Version in pkg-config .pc file - * ---------+-------------------------------------------- - * 1.00 | 1.00 - * 1.01 | 1.00 - * 1.1 | 1.10 - * 1.2 | 1.2 (= 1.02) - * - * So the version number of 1.1 is bigger than that of 1.2. - *) - -const -{$IFDEF MSWINDOWS} - // Note: static linking is not possible with delphi because it does neither - // accept gcc nor MSVC object files (only Intel-style ones). - libprojectM_cwrapper = 'projectM-cwrapper.dll'; -{$ELSE} - // static libs are not supported in the "external"-clause - libprojectM_cwrapper = ''; - // statically link the cwrapper and dynamically link projectM - {$L 'cwrapper/libprojectM-cwrapper.a'} - {$LINKLIB projectM} -{$ENDIF} - -{**************** INTERNAL SECTION ****************} - - -type - _PProjectM = Pointer; - -{ projectM.hpp declarations } -function _projectM_create1(config_file: PChar): _PProjectM; cdecl; external libprojectM_cwrapper name 'projectM_create1'; -{$IF PROJECTM_VERSION < 1000000} // 0.9x -function _projectM_create2(gx: cint; gy: cint; fps: cint; - texsize: cint; width: cint; height: cint; - preset_url: PChar; title_fonturl: PChar; title_menuurl: PChar): _PProjectM; cdecl; external libprojectM_cwrapper name 'projectM_create2'; -{$IFEND} - -procedure _projectM_resetGL(pm: _PProjectM; width: cint; height: cint); cdecl; external libprojectM_cwrapper name 'projectM_resetGL'; -procedure _projectM_setTitle(pm: _PProjectM; title: PChar); cdecl; external libprojectM_cwrapper name 'projectM_setTitle'; -procedure _projectM_renderFrame(pm: _PProjectM); cdecl; external libprojectM_cwrapper name 'projectM_renderFrame'; -function _projectM_initRenderToTexture(pm: _PProjectM): cuint; cdecl; external libprojectM_cwrapper name 'projectM_initRenderToTexture'; - -procedure _projectM_free(pm: _PProjectM); cdecl; external libprojectM_cwrapper name 'projectM_free'; - -procedure _projectM_key_handler(pm: _PProjectM; event: TProjectMEvent; - keycode: TProjectMKeycode; modifier: TProjectMModifier); cdecl; external libprojectM_cwrapper name 'projectM_key_handler'; - -{$IF PROJECTM_VERSION > 1000000} // > 1.01 -procedure _projectM_settings(pm: _PProjectM; settings: PSettings); cdecl; external libprojectM_cwrapper name 'projectM_settings'; -{$IFEND} - -{ PCM.hpp declarations } -procedure _PCM_addPCMfloat(pm: _PProjectM; pcm_data: PSingle; samples: cint); cdecl; external libprojectM_cwrapper name 'PCM_addPCMfloat'; -procedure _PCM_addPCM16(pm: _PProjectM; pcm_data: PPCM16); cdecl; external libprojectM_cwrapper name 'PCM_addPCM16'; -procedure _PCM_addPCM16Data(pm: _PProjectM; pcm_data: PCshort; samples: cshort); cdecl; external libprojectM_cwrapper name 'PCM_addPCM16Data'; -procedure _PCM_addPCM8_512(pm: _PProjectM; pcm_data: PPCM8_512); cdecl; external libprojectM_cwrapper name 'PCM_addPCM8_512'; -procedure _PCM_addPCM8_1024(pm: _PProjectM; pcm_data: PPCM8_1024); cdecl; external libprojectM_cwrapper name 'PCM_addPCM8'; - - -{**************** EXTERNAL SECTION ****************} - -// This constructor is present in projectM 1.0(1) but does not work with -// linux because of a bug. -(* -constructor TProjectM.Create(gx, gy: integer; fps: integer; - texsize: integer; width, height: integer; - const presetsDir, fontsDir: string; - const titleFont, menuFont: string); -begin - data := _projectM_create2(gx, gy, fps, texsize, width, height, - PChar(presetsDir), - PChar(fontsDir + PathDelim + titleFont), - PChar(fontsDir + PathDelim + menuFont)); -end; -*) - -constructor TProjectM.Create(const configFile: string); -begin - inherited Create(); - - // we cannot catch C++ exceptions in delphi, so we have to check - // if configFile is valid first - if (not FileExists(configFile)) then - raise Exception.Create('Invalid file: ' + configFile); - - data := _projectM_create1(PChar(configFile)); - if (data = nil) then - raise Exception.Create('Creation of projectM object failed'); -end; - -procedure TProjectM.ResetGL(width, height: Integer); -begin - _projectM_resetGL(data, width, height); -end; - -procedure TProjectM.SetTitle(const title: string); -begin - _projectM_setTitle(data, PChar(title)); -end; - -procedure TProjectM.RenderFrame(); -begin - _projectM_renderFrame(data); -end; - -procedure TProjectM.AddPCMfloat(pcmData: PSingle; samples: integer); -begin - _PCM_addPCMfloat(data, pcmData, samples); -end; - -procedure TProjectM.AddPCM16(pcmData: PPCM16); -begin - _PCM_addPCM16(data, pcmData); -end; - -{** - * Passes interleaved stereo PCM-samples to projectM. - *} -procedure TProjectM.AddPCM16Data(pcmData: PSmallint; samples: Smallint); -begin - _PCM_addPCM16Data(data, PCshort(pcmData), samples); -end; - -procedure TProjectM.AddPCM8_512(pcmData: PPCM8_512); -begin - _PCM_addPCM8_512(data, pcmData); -end; - -procedure TProjectM.AddPCM8_1024(pcmData: PPCM8_1024); -begin - _PCM_addPCM8_1024(data, pcmData); -end; - -{** - * If the result is > -1 projectM will render to a texture. - * The texture-ID is the return-value. - *} -function TProjectM.InitRenderToTexture(): GLuint; -begin - result := _projectM_initRenderToTexture(data); -end; - -procedure TProjectM.KeyHandler(event: TProjectMEvent; - keycode: TProjectMKeycode; - modifier: TProjectMModifier); -begin - _projectM_key_handler(data, event, keycode, modifier); -end; - -procedure TProjectM.RandomPreset(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_r_LOWERCASE, PROJECTM_KMOD_LSHIFT); -end; - -procedure TProjectM.PreviousPreset(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_p_LOWERCASE, PROJECTM_KMOD_LSHIFT); -end; - -procedure TProjectM.NextPreset(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_n_LOWERCASE, PROJECTM_KMOD_LSHIFT); -end; - -procedure TProjectM.ToggleShowPresetNames(); -begin - KeyHandler(PROJECTM_KEYDOWN, PROJECTM_K_F3, PROJECTM_KMOD_LSHIFT); -end; - -{$IF PROJECTM_VERSION > 1000000} // > 1.01 -procedure TProjectM.Settings(var settings: TSettings); -begin - _projectM_settings(data, @settings); -end; -{$IFEND} - -destructor TProjectM.Destroy(); -begin - _projectM_free(data); - data := nil; - inherited; -end; - |