aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-06 23:53:46 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-12-06 23:53:46 +0000
commit73a9bf99b8993aa69f3ed77b36b0236fb1cde2ed (patch)
treed102105c2047353bd9ca3788c48ddbe0648c0241 /Game/Code/lib
parent98e79f186b312510e6bb3f13d82fa7f0f03b78d7 (diff)
downloadusdx-73a9bf99b8993aa69f3ed77b36b0236fb1cde2ed.tar.gz
usdx-73a9bf99b8993aa69f3ed77b36b0236fb1cde2ed.tar.xz
usdx-73a9bf99b8993aa69f3ed77b36b0236fb1cde2ed.zip
trying to get projectM to run in linux
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@692 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/lib')
-rw-r--r--Game/Code/lib/projectM/projectM.pas621
-rw-r--r--Game/Code/lib/requirements.txt7
2 files changed, 319 insertions, 309 deletions
diff --git a/Game/Code/lib/projectM/projectM.pas b/Game/Code/lib/projectM/projectM.pas
index be6f77b1..9adf5acf 100644
--- a/Game/Code/lib/projectM/projectM.pas
+++ b/Game/Code/lib/projectM/projectM.pas
@@ -1,27 +1,34 @@
-unit projectM;
-
-interface
-
-uses OpenGL12;
-
-type
- FLOAT = Single;
- PFLOAT = ^FLOAT;
- PPFLOAT = ^PFLOAT;
- INT = Integer;
- SHORT = Smallint;
- LONG = Longint;
-
-type
- TPCM16 = array[0..1, 0..511] of SHORT;
-
-type
- TTextureScale = INT;
-const
- SCALE_NEAREST = 0;
- SCALE_MAGNIFY = 1;
- SCALE_MINIFY = 2;
-
+unit projectM;
+
+interface
+
+uses OpenGL12;
+
+const
+ {$IFDEF win32}
+ libname = 'libprojectM.dll';
+ {$Else}
+ libname = 'libprojectM.so';
+ {$endif}
+
+type
+ FLOAT = Single;
+ PFLOAT = ^FLOAT;
+ PPFLOAT = ^PFLOAT;
+ INT = Integer;
+ SHORT = Smallint;
+ LONG = Longint;
+
+type
+ TPCM16 = array[0..1, 0..511] of SHORT;
+
+type
+ TTextureScale = INT;
+const
+ SCALE_NEAREST = 0;
+ SCALE_MAGNIFY = 1;
+ SCALE_MINIFY = 2;
+
type
TContextType = INT;
const
@@ -69,286 +76,286 @@ type
procedure lockPBuffer( target: PRenderTarget; pass: PBufferPass );
procedure unlockPBuffer( target: PRenderTarget );
function nearestPower2( value: INT; scaleRule: TTextureScale ): INT;
- }
-
- PProjectM = ^TProjectM;
- TProjectM = record
- presetURL: PChar;
- presetName: PChar;
- fontURL: PChar;
-
- hasInit: INT;
-
- noSwitch: INT;
- pcmframes: INT;
- freqframes: INT;
- totalframes: INT;
-
- showfps: INT;
- showtitle: INT;
- showpreset: INT;
- showhelp: INT;
- showstats: INT;
-
- studio: INT;
-
- fbuffer: PGLubyte;
-
- {$ifndef Win32}
- { The first ticks value of the application }
- startTime: LONG; //struct timeval
- {$else}
- startTime: LONG;
- {$endif Win32}
- Time: FLOAT;
-
- { Render target texture ID }
- renderTarget: PRenderTarget;
-
- disp: array[0..79] of Char;
-
- wave_o: FLOAT;
-
- //int texsize=1024; //size of texture to do actual graphics
- fvw: INT; //fullscreen dimensions
- fvh: INT;
- wvw: INT; //windowed dimensions
- wvh: INT;
- vw: INT; //runtime dimensions
- vh: INT;
- fullscreen: INT;
-
- maxsamples: INT; //size of PCM buffer
- numsamples: INT; //size of new PCM info
- pcmdataL: PFLOAT; //holder for most recent pcm data
- pcmdataR: PFLOAT; //holder for most recent pcm data
-
- avgtime: INT; //# frames per preset
-
- title: PChar;
- drawtitle: INT;
-
- correction: INT;
-
- vol: FLOAT;
-
- //per pixel equation variables
- gridx: PPFLOAT; //grid containing interpolated mesh
- gridy: PPFLOAT;
- origtheta: PPFLOAT; //grid containing interpolated mesh reference values
- origrad: PPFLOAT;
- origx: PPFLOAT; //original mesh
- origy: PPFLOAT;
- origx2: PPFLOAT; //original mesh
- origy2: PPFLOAT;
-
- { Timing information }
- mspf: INT;
- timed: INT;
- timestart: INT;
- nohard: INT;
- count: INT;
- realfps,
- fpsstart: FLOAT;
-
- { PCM data }
- vdataL: array[0..511] of FLOAT; //holders for FFT data (spectrum)
- vdataR: array[0..511] of FLOAT;
-
- { Various toggles }
- doPerPixelEffects: INT;
- doIterative: INT;
-
- { ENGINE VARIABLES }
- { From engine_vars.h }
- preset_name: array[0..255] of Char;
-
- { PER FRAME CONSTANTS BEGIN }
- zoom: FLOAT;
- zoomexp: FLOAT;
- rot: FLOAT;
- warp: FLOAT;
-
- sx: FLOAT;
- sy: FLOAT;
- dx: FLOAT;
- dy: FLOAT;
- cx: FLOAT;
- cy: FLOAT;
-
- gy: INT;
- gx: INT;
-
- decay: FLOAT;
-
- wave_r: FLOAT;
- wave_g: FLOAT;
- wave_b: FLOAT;
- wave_x: FLOAT;
- wave_y: FLOAT;
- wave_mystery: FLOAT;
-
- ob_size: FLOAT;
- ob_r: FLOAT;
- ob_g: FLOAT;
- ob_b: FLOAT;
- ob_a: FLOAT;
-
- ib_size: FLOAT;
- ib_r: FLOAT;
- ib_g: FLOAT;
- ib_b: FLOAT;
- ib_a: FLOAT;
-
- meshx: INT;
- meshy: INT;
-
- mv_a: FLOAT;
- mv_r: FLOAT;
- mv_g: FLOAT;
- mv_b: FLOAT;
- mv_l: FLOAT;
- mv_x: FLOAT;
- mv_y: FLOAT;
- mv_dy: FLOAT;
- mv_dx: FLOAT;
-
- treb: FLOAT;
- mid: FLOAT;
- bass: FLOAT;
- bass_old: FLOAT;
- beat_sensitivity: FLOAT;
- treb_att: FLOAT;
- mid_att: FLOAT;
- bass_att: FLOAT;
- progress: FLOAT;
- frame: INT;
-
- { PER_FRAME CONSTANTS END }
-
- { PER_PIXEL CONSTANTS BEGIN }
-
- x_per_pixel: FLOAT;
- y_per_pixel: FLOAT;
- rad_per_pixel: FLOAT;
- ang_per_pixel: FLOAT;
-
- { PER_PIXEL CONSTANT END }
-
-
- fRating: FLOAT;
- fGammaAdj: FLOAT;
- fVideoEchoZoom: FLOAT;
- fVideoEchoAlpha: FLOAT;
-
- nVideoEchoOrientation: INT;
- nWaveMode: INT;
- bAdditiveWaves: INT;
- bWaveDots: INT;
- bWaveThick: INT;
- bModWaveAlphaByVolume: INT;
- bMaximizeWaveColor: INT;
- bTexWrap: INT;
- bDarkenCenter: INT;
- bRedBlueStereo: INT;
- bBrighten: INT;
- bDarken: INT;
- bSolarize: INT;
- bInvert: INT;
- bMotionVectorsOn: INT;
- fps: INT;
-
- fWaveAlpha: FLOAT;
- fWaveScale: FLOAT;
- fWaveSmoothing: FLOAT;
- fWaveParam: FLOAT;
- fModWaveAlphaStart: FLOAT;
- fModWaveAlphaEnd: FLOAT;
- fWarpAnimSpeed: FLOAT;
- fWarpScale: FLOAT;
- fShader: FLOAT;
-
-
- { Q VARIABLES START }
-
- q1: FLOAT;
- q2: FLOAT;
- q3: FLOAT;
- q4: FLOAT;
- q5: FLOAT;
- q6: FLOAT;
- q7: FLOAT;
- q8: FLOAT;
-
-
- { Q VARIABLES END }
-
- zoom_mesh: PPFLOAT;
- zoomexp_mesh: PPFLOAT;
- rot_mesh: PPFLOAT;
-
- sx_mesh: PPFLOAT;
- sy_mesh: PPFLOAT;
- dx_mesh: PPFLOAT;
- dy_mesh: PPFLOAT;
- cx_mesh: PPFLOAT;
- cy_mesh: PPFLOAT;
-
- x_mesh: PPFLOAT;
- y_mesh: PPFLOAT;
- rad_mesh: PPFLOAT;
- theta_mesh: PPFLOAT;
- end;
-
- { Functions }
- procedure projectM_init(pm: PProjectM); cdecl; external 'libprojectM.dll';
- procedure projectM_reset(pm: PProjectM); cdecl; external 'libprojectM.dll';
- procedure projectM_resetGL(pm: PProjectM; width: INT; height: INT); cdecl; external 'libprojectM.dll';
- procedure projectM_setTitle(pm: PProjectM; title: PChar); cdecl; external 'libprojectM.dll';
- procedure renderFrame(pm: PProjectM); cdecl; external 'libprojectM.dll';
-
- {
- procedure draw_help(pm: PProjectM);
- procedure draw_fps(pm: PProjectM; fps: Single);
- procedure draw_preset(pm: PProjectM);
- procedure draw_title(pm: PProjectM);
- procedure draw_stats(pm: PProjectM);
-
- procedure modulate_opacity_by_volume(pm: PProjectM);
- procedure maximize_colors(pm: PProjectM);
- procedure do_per_pixel_math(pm: PProjectM);
- procedure do_per_frame(pm: PProjectM);
- procedure render_texture_to_studio(pm: PProjectM);
- procedure darken_center(pm: PProjectM);
-
- procedure render_interpolation(pm: PProjectM);
- procedure render_texture_to_screen(pm: PProjectM);
- procedure render_texture_to_studio(pm: PProjectM);
- procedure draw_motion_vectors(pm: PProjectM);
- procedure draw_borders(pm: PProjectM);
- procedure draw_shapes(pm: PProjectM);
- procedure draw_waveform(pm: PProjectM);
- procedure draw_custom_waves(pm: PProjectM);
-
- procedure draw_title_to_screen(pm: PProjectM);
- procedure draw_title_to_texture(pm: PProjectM);
- procedure get_title(pm: PProjectM);
-
- procedure reset_per_pixel_matrices(pm: PProjectM);
- procedure init_per_pixel_matrices(pm: PProjectM);
- procedure rescale_per_pixel_matrices(pm: PProjectM);
- }
-
- { PCM.h declarations }
- {
- procedure addPCMfloat(PCMdata: PFLOAT, samples: INT);
- }
- procedure addPCM16(pcm_data: TPCM16); cdecl; external 'libprojectM.dll';
- procedure addPCM16Data(pcm_data: PSmallint; samples: Smallint); cdecl; external 'libprojectM.dll';
- {
- procedure addPCM8( unsigned char [2][512]);
- }
-
-implementation
-
-end.
+ }
+
+ PProjectM = ^TProjectM;
+ TProjectM = record
+ presetURL: PChar;
+ presetName: PChar;
+ fontURL: PChar;
+
+ hasInit: INT;
+
+ noSwitch: INT;
+ pcmframes: INT;
+ freqframes: INT;
+ totalframes: INT;
+
+ showfps: INT;
+ showtitle: INT;
+ showpreset: INT;
+ showhelp: INT;
+ showstats: INT;
+
+ studio: INT;
+
+ fbuffer: PGLubyte;
+
+ {$ifndef Win32}
+ { The first ticks value of the application }
+ startTime: LONG; //struct timeval
+ {$else}
+ startTime: LONG;
+ {$endif Win32}
+ Time: FLOAT;
+
+ { Render target texture ID }
+ renderTarget: PRenderTarget;
+
+ disp: array[0..79] of Char;
+
+ wave_o: FLOAT;
+
+ //int texsize=1024; //size of texture to do actual graphics
+ fvw: INT; //fullscreen dimensions
+ fvh: INT;
+ wvw: INT; //windowed dimensions
+ wvh: INT;
+ vw: INT; //runtime dimensions
+ vh: INT;
+ fullscreen: INT;
+
+ maxsamples: INT; //size of PCM buffer
+ numsamples: INT; //size of new PCM info
+ pcmdataL: PFLOAT; //holder for most recent pcm data
+ pcmdataR: PFLOAT; //holder for most recent pcm data
+
+ avgtime: INT; //# frames per preset
+
+ title: PChar;
+ drawtitle: INT;
+
+ correction: INT;
+
+ vol: FLOAT;
+
+ //per pixel equation variables
+ gridx: PPFLOAT; //grid containing interpolated mesh
+ gridy: PPFLOAT;
+ origtheta: PPFLOAT; //grid containing interpolated mesh reference values
+ origrad: PPFLOAT;
+ origx: PPFLOAT; //original mesh
+ origy: PPFLOAT;
+ origx2: PPFLOAT; //original mesh
+ origy2: PPFLOAT;
+
+ { Timing information }
+ mspf: INT;
+ timed: INT;
+ timestart: INT;
+ nohard: INT;
+ count: INT;
+ realfps,
+ fpsstart: FLOAT;
+
+ { PCM data }
+ vdataL: array[0..511] of FLOAT; //holders for FFT data (spectrum)
+ vdataR: array[0..511] of FLOAT;
+
+ { Various toggles }
+ doPerPixelEffects: INT;
+ doIterative: INT;
+
+ { ENGINE VARIABLES }
+ { From engine_vars.h }
+ preset_name: array[0..255] of Char;
+
+ { PER FRAME CONSTANTS BEGIN }
+ zoom: FLOAT;
+ zoomexp: FLOAT;
+ rot: FLOAT;
+ warp: FLOAT;
+
+ sx: FLOAT;
+ sy: FLOAT;
+ dx: FLOAT;
+ dy: FLOAT;
+ cx: FLOAT;
+ cy: FLOAT;
+
+ gy: INT;
+ gx: INT;
+
+ decay: FLOAT;
+
+ wave_r: FLOAT;
+ wave_g: FLOAT;
+ wave_b: FLOAT;
+ wave_x: FLOAT;
+ wave_y: FLOAT;
+ wave_mystery: FLOAT;
+
+ ob_size: FLOAT;
+ ob_r: FLOAT;
+ ob_g: FLOAT;
+ ob_b: FLOAT;
+ ob_a: FLOAT;
+
+ ib_size: FLOAT;
+ ib_r: FLOAT;
+ ib_g: FLOAT;
+ ib_b: FLOAT;
+ ib_a: FLOAT;
+
+ meshx: INT;
+ meshy: INT;
+
+ mv_a: FLOAT;
+ mv_r: FLOAT;
+ mv_g: FLOAT;
+ mv_b: FLOAT;
+ mv_l: FLOAT;
+ mv_x: FLOAT;
+ mv_y: FLOAT;
+ mv_dy: FLOAT;
+ mv_dx: FLOAT;
+
+ treb: FLOAT;
+ mid: FLOAT;
+ bass: FLOAT;
+ bass_old: FLOAT;
+ beat_sensitivity: FLOAT;
+ treb_att: FLOAT;
+ mid_att: FLOAT;
+ bass_att: FLOAT;
+ progress: FLOAT;
+ frame: INT;
+
+ { PER_FRAME CONSTANTS END }
+
+ { PER_PIXEL CONSTANTS BEGIN }
+
+ x_per_pixel: FLOAT;
+ y_per_pixel: FLOAT;
+ rad_per_pixel: FLOAT;
+ ang_per_pixel: FLOAT;
+
+ { PER_PIXEL CONSTANT END }
+
+
+ fRating: FLOAT;
+ fGammaAdj: FLOAT;
+ fVideoEchoZoom: FLOAT;
+ fVideoEchoAlpha: FLOAT;
+
+ nVideoEchoOrientation: INT;
+ nWaveMode: INT;
+ bAdditiveWaves: INT;
+ bWaveDots: INT;
+ bWaveThick: INT;
+ bModWaveAlphaByVolume: INT;
+ bMaximizeWaveColor: INT;
+ bTexWrap: INT;
+ bDarkenCenter: INT;
+ bRedBlueStereo: INT;
+ bBrighten: INT;
+ bDarken: INT;
+ bSolarize: INT;
+ bInvert: INT;
+ bMotionVectorsOn: INT;
+ fps: INT;
+
+ fWaveAlpha: FLOAT;
+ fWaveScale: FLOAT;
+ fWaveSmoothing: FLOAT;
+ fWaveParam: FLOAT;
+ fModWaveAlphaStart: FLOAT;
+ fModWaveAlphaEnd: FLOAT;
+ fWarpAnimSpeed: FLOAT;
+ fWarpScale: FLOAT;
+ fShader: FLOAT;
+
+
+ { Q VARIABLES START }
+
+ q1: FLOAT;
+ q2: FLOAT;
+ q3: FLOAT;
+ q4: FLOAT;
+ q5: FLOAT;
+ q6: FLOAT;
+ q7: FLOAT;
+ q8: FLOAT;
+
+
+ { Q VARIABLES END }
+
+ zoom_mesh: PPFLOAT;
+ zoomexp_mesh: PPFLOAT;
+ rot_mesh: PPFLOAT;
+
+ sx_mesh: PPFLOAT;
+ sy_mesh: PPFLOAT;
+ dx_mesh: PPFLOAT;
+ dy_mesh: PPFLOAT;
+ cx_mesh: PPFLOAT;
+ cy_mesh: PPFLOAT;
+
+ x_mesh: PPFLOAT;
+ y_mesh: PPFLOAT;
+ rad_mesh: PPFLOAT;
+ theta_mesh: PPFLOAT;
+ end;
+
+ { Functions }
+ procedure projectM_init(pm: PProjectM); cdecl; external libname;
+ procedure projectM_reset(pm: PProjectM); cdecl; external libname;
+ procedure projectM_resetGL(pm: PProjectM; width: INT; height: INT); cdecl; external libname;
+ procedure projectM_setTitle(pm: PProjectM; title: PChar); cdecl; external libname;
+ procedure renderFrame(pm: PProjectM); cdecl; external libname;
+
+ {
+ procedure draw_help(pm: PProjectM);
+ procedure draw_fps(pm: PProjectM; fps: Single);
+ procedure draw_preset(pm: PProjectM);
+ procedure draw_title(pm: PProjectM);
+ procedure draw_stats(pm: PProjectM);
+
+ procedure modulate_opacity_by_volume(pm: PProjectM);
+ procedure maximize_colors(pm: PProjectM);
+ procedure do_per_pixel_math(pm: PProjectM);
+ procedure do_per_frame(pm: PProjectM);
+ procedure render_texture_to_studio(pm: PProjectM);
+ procedure darken_center(pm: PProjectM);
+
+ procedure render_interpolation(pm: PProjectM);
+ procedure render_texture_to_screen(pm: PProjectM);
+ procedure render_texture_to_studio(pm: PProjectM);
+ procedure draw_motion_vectors(pm: PProjectM);
+ procedure draw_borders(pm: PProjectM);
+ procedure draw_shapes(pm: PProjectM);
+ procedure draw_waveform(pm: PProjectM);
+ procedure draw_custom_waves(pm: PProjectM);
+
+ procedure draw_title_to_screen(pm: PProjectM);
+ procedure draw_title_to_texture(pm: PProjectM);
+ procedure get_title(pm: PProjectM);
+
+ procedure reset_per_pixel_matrices(pm: PProjectM);
+ procedure init_per_pixel_matrices(pm: PProjectM);
+ procedure rescale_per_pixel_matrices(pm: PProjectM);
+ }
+
+ { PCM.h declarations }
+ {
+ procedure addPCMfloat(PCMdata: PFLOAT, samples: INT);
+ }
+ procedure addPCM16(pcm_data: TPCM16); cdecl; external libname;
+ procedure addPCM16Data(pcm_data: PSmallint; samples: Smallint); cdecl; external libname;
+ {
+ procedure addPCM8( unsigned char [2][512]);
+ }
+
+implementation
+
+end.
diff --git a/Game/Code/lib/requirements.txt b/Game/Code/lib/requirements.txt
index ebaffea7..d1775390 100644
--- a/Game/Code/lib/requirements.txt
+++ b/Game/Code/lib/requirements.txt
@@ -34,6 +34,9 @@ here are the instructions needed to compile on ubunty ( 7.04 )
ffmpeg :
sudo apt-get install libavcodec-dev libavformat-dev
+
+portaudio :
+ sudo apt-get install portaudio19-dev
sqlite :
sudo apt-get install libsqlite3-dev
@@ -43,6 +46,6 @@ sdl development libraries :
THERE WILL be more of them... oops I forgot to list them :P
For the Lazy... who use Debian or Ubuntu.... here is a single line
- sudo apt-get install libavcodec-dev libavformat-dev libsqlite3-dev libsdl-ttf2.0-dev libsdl-image1.2-dev
+ sudo apt-get install libavcodec-dev libavformat-dev libsqlite3-dev libsdl-ttf2.0-dev libsdl-image1.2-dev portaudio19-dev
- \ No newline at end of file
+