aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/UltraStar.dpr2
-rw-r--r--Game/Code/lib/bass/lazarustest.lpi192
-rw-r--r--Game/Code/lib/bass/lazarustest.lpr51
-rw-r--r--Game/Code/lib/ffmpeg/avcodec.pas6
-rw-r--r--Game/Code/lib/ffmpeg/avformat.pas13
-rw-r--r--Game/Code/lib/ffmpeg/avio.pas2
-rw-r--r--Game/Code/lib/ffmpeg/lazarustest.lpi194
-rw-r--r--Game/Code/lib/ffmpeg/lazarustest.lpr27
8 files changed, 481 insertions, 6 deletions
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index 96172a42..bef33632 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -4,8 +4,6 @@ program UltraStar;
{$R 'UltraStar.res' 'UltraStar.rc'}
-
-// C:\Components\PngImage
uses
//------------------------------
//Includes - 3rd Party Libraries
diff --git a/Game/Code/lib/bass/lazarustest.lpi b/Game/Code/lib/bass/lazarustest.lpi
new file mode 100644
index 00000000..fd0f1c9c
--- /dev/null
+++ b/Game/Code/lib/bass/lazarustest.lpi
@@ -0,0 +1,192 @@
+<?xml version="1.0"?>
+<CONFIG>
+ <ProjectOptions>
+ <PathDelim Value="\"/>
+ <Version Value="5"/>
+ <General>
+ <MainUnit Value="0"/>
+ <TargetFileExt Value=".exe"/>
+ <ActiveEditorIndexAtStart Value="0"/>
+ </General>
+ <VersionInfo>
+ <ProjectVersion Value=""/>
+ <Language Value=""/>
+ <CharSet Value=""/>
+ </VersionInfo>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IgnoreBinaries Value="False"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <Units Count="2">
+ <Unit0>
+ <Filename Value="lazarustest.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="lazarustest"/>
+ <CursorPos X="38" Y="33"/>
+ <TopLine Value="10"/>
+ <EditorIndex Value="0"/>
+ <UsageCount Value="20"/>
+ <Loaded Value="True"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="delphi\bass.pas"/>
+ <UnitName Value="Bass"/>
+ <CursorPos X="12" Y="539"/>
+ <TopLine Value="589"/>
+ <EditorIndex Value="1"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit1>
+ </Units>
+ <JumpHistory Count="30" HistoryIndex="29">
+ <Position1>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="778" Column="59" TopLine="758"/>
+ </Position1>
+ <Position2>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="779" Column="84" TopLine="759"/>
+ </Position2>
+ <Position3>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="780" Column="63" TopLine="760"/>
+ </Position3>
+ <Position4>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="781" Column="114" TopLine="761"/>
+ </Position4>
+ <Position5>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="782" Column="72" TopLine="762"/>
+ </Position5>
+ <Position6>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="783" Column="58" TopLine="763"/>
+ </Position6>
+ <Position7>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="784" Column="52" TopLine="764"/>
+ </Position7>
+ <Position8>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="785" Column="78" TopLine="765"/>
+ </Position8>
+ <Position9>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="786" Column="76" TopLine="766"/>
+ </Position9>
+ <Position10>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="787" Column="54" TopLine="767"/>
+ </Position10>
+ <Position11>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="788" Column="55" TopLine="768"/>
+ </Position11>
+ <Position12>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="789" Column="53" TopLine="769"/>
+ </Position12>
+ <Position13>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="790" Column="52" TopLine="770"/>
+ </Position13>
+ <Position14>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="791" Column="53" TopLine="771"/>
+ </Position14>
+ <Position15>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="792" Column="72" TopLine="772"/>
+ </Position15>
+ <Position16>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="793" Column="60" TopLine="773"/>
+ </Position16>
+ <Position17>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="795" Column="92" TopLine="775"/>
+ </Position17>
+ <Position18>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="796" Column="75" TopLine="776"/>
+ </Position18>
+ <Position19>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="11" Column="42" TopLine="1"/>
+ </Position19>
+ <Position20>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="786" Column="42" TopLine="762"/>
+ </Position20>
+ <Position21>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position21>
+ <Position22>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="74" Column="73" TopLine="54"/>
+ </Position22>
+ <Position23>
+ <Filename Value="delphi\bass.pas"/>
+ <Caret Line="82" Column="15" TopLine="62"/>
+ </Position23>
+ <Position24>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="43" Column="67" TopLine="6"/>
+ </Position24>
+ <Position25>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="7" Column="9" TopLine="1"/>
+ </Position25>
+ <Position26>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="16" Column="12" TopLine="1"/>
+ </Position26>
+ <Position27>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="7" Column="1" TopLine="1"/>
+ </Position27>
+ <Position28>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="15" Column="9" TopLine="1"/>
+ </Position28>
+ <Position29>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="17" Column="58" TopLine="1"/>
+ </Position29>
+ <Position30>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="22" Column="32" TopLine="2"/>
+ </Position30>
+ </JumpHistory>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="5"/>
+ <PathDelim Value="\"/>
+ <CodeGeneration>
+ <Generate Value="Faster"/>
+ </CodeGeneration>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="2">
+ <Item1>
+ <Name Value="ECodetoolError"/>
+ </Item1>
+ <Item2>
+ <Name Value="EFOpenError"/>
+ </Item2>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/Game/Code/lib/bass/lazarustest.lpr b/Game/Code/lib/bass/lazarustest.lpr
new file mode 100644
index 00000000..6faee86d
--- /dev/null
+++ b/Game/Code/lib/bass/lazarustest.lpr
@@ -0,0 +1,51 @@
+program lazarustest;
+
+{$mode objfpc}{$H+}
+
+uses
+ sysutils,
+ bass in 'delphi\bass.pas'
+ { add your units here };
+
+var
+ chan : HSTREAM;
+
+begin
+ // check the correct BASS was loaded
+ if (hi(BASS_GetVersion) <> BASSVERSION) then
+ begin
+ writeln('An incorrect version of BASS.DLL was loaded');
+ Halt;
+ end;
+
+ //init BASS
+ if not BASS_Init(0,44100,0,0,nil) then
+ writeln('Can''t initialize device');
+
+ //creating stream
+ if fileexists( 'music.mp3 ') then
+ begin
+ chan := BASS_StreamCreateFile(FALSE,pchar('music.mp3'),0,0,0);
+ if chan = 0 then
+ begin
+ chan := BASS_MusicLoad(False, pchar('music.mp3'), 0, 0, BASS_MUSIC_RAMPS or BASS_MUSIC_POSRESET or BASS_MUSIC_PRESCAN, 0);
+ if (chan = 0) then
+ begin
+ writeln('Can''t play file');
+ Exit;
+ end;
+ end;
+
+ BASS_ChannelPlay(chan,FALSE); // start playing
+ end
+ else
+ begin
+ writeln( 'music.mp3 not found.. could not test mp3 playback');
+ end;
+
+ BASS_Free();
+ writeln( 'Seems BASS is compatible with lazarus :) ');
+
+
+end.
+
diff --git a/Game/Code/lib/ffmpeg/avcodec.pas b/Game/Code/lib/ffmpeg/avcodec.pas
index 978b5fb6..ce08dcc9 100644
--- a/Game/Code/lib/ffmpeg/avcodec.pas
+++ b/Game/Code/lib/ffmpeg/avcodec.pas
@@ -576,7 +576,7 @@ type
of AVIn/OutputFormat *)
item_name: function (): pchar; cdecl;
option: PAVOption;
- end;
+ end;
TAVCodecContext = record {720}
(*** Info on struct for av_log
@@ -1792,11 +1792,13 @@ procedure av_resample_close (c: PAVResampleContext);
got_sub_ptr: pinteger;
const buf: pchar; buf_size: integer): integer;
cdecl; external av__codec;
+
+ {$IFNDEF FPC}
function avcodec_parse_frame (avctx: PAVCodecContext; pdata: PPointer;
data_size_ptr: pinteger;
buf: pchar; buf_size: integer): integer;
cdecl; external av__codec;
-
+ {$ENDIF}
function avcodec_encode_audio (avctx: PAVCodecContext; buf: PByte;
buf_size: integer; const samples: Pword): integer;
cdecl; external av__codec;
diff --git a/Game/Code/lib/ffmpeg/avformat.pas b/Game/Code/lib/ffmpeg/avformat.pas
index 0aa98905..6d13bcdf 100644
--- a/Game/Code/lib/ffmpeg/avformat.pas
+++ b/Game/Code/lib/ffmpeg/avformat.pas
@@ -19,6 +19,10 @@ unit avformat;
interface
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
uses
windows, avcodec, avio, rational, avutil;
@@ -554,6 +558,7 @@ const
const
FFM_PACKET_SIZE = 4096;
+ {$IFNDEF FPC}
function ffm_read_write_index (fd: integer): int64;
cdecl; external av__format;
@@ -562,20 +567,23 @@ const
procedure ffm_set_write_index (s: PAVFormatContext; pos: int64; file_size: int64);
cdecl; external av__format;
-
+ {$ENDIF}
+
function find_info_tag (arg: pchar; arg_size: integer; tag1: pchar; info: pchar): integer;
cdecl; external av__format;
+ {$IFNDEF FPC}
function get_frame_filename(buf: pchar; buf_size: integer;
path: pchar; number: integer): integer;
cdecl; external av__format;
+
function filename_number_test (filename: pchar): integer;
cdecl; external av__format;
-
(* grab specific *)
function video_grab_init (): integer;
cdecl; external av__format;
+
function audio_init (): integer;
cdecl; external av__format;
@@ -584,6 +592,7 @@ const
cdecl; external av__format;
function dc1394_init (): integer;
cdecl; external av__format;
+ {$ENDIF}
function strstart(str: pchar; val: pchar; ptr: PPointer): integer;
cdecl; external av__format;
diff --git a/Game/Code/lib/ffmpeg/avio.pas b/Game/Code/lib/ffmpeg/avio.pas
index 20275ab7..7d0e8c04 100644
--- a/Game/Code/lib/ffmpeg/avio.pas
+++ b/Game/Code/lib/ffmpeg/avio.pas
@@ -224,12 +224,14 @@ type
procedure init_checksum (s: PByteIOContext; update_checksum: pointer; checksum: cardinal);
cdecl; external av__format;
+ {$IFNDEF FPC}
function udp_set_remote_url(h: PURLContext; const uri: pchar): integer;
cdecl; external av__format;
function udp_get_local_port(h: PURLContext): integer;
cdecl; external av__format;
function udp_get_file_handle(h: PURLContext): integer;
cdecl; external av__format;
+ {$ENDIF}
implementation
diff --git a/Game/Code/lib/ffmpeg/lazarustest.lpi b/Game/Code/lib/ffmpeg/lazarustest.lpi
new file mode 100644
index 00000000..3cd1c3de
--- /dev/null
+++ b/Game/Code/lib/ffmpeg/lazarustest.lpi
@@ -0,0 +1,194 @@
+<?xml version="1.0"?>
+<CONFIG>
+ <ProjectOptions>
+ <PathDelim Value="\"/>
+ <Version Value="5"/>
+ <General>
+ <MainUnit Value="0"/>
+ <IconPath Value="./"/>
+ <TargetFileExt Value=".exe"/>
+ <ActiveEditorIndexAtStart Value="1"/>
+ </General>
+ <VersionInfo>
+ <ProjectVersion Value=""/>
+ <Language Value=""/>
+ <CharSet Value=""/>
+ </VersionInfo>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IgnoreBinaries Value="False"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <Units Count="5">
+ <Unit0>
+ <Filename Value="lazarustest.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="lazarustest"/>
+ <CursorPos X="26" Y="8"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="0"/>
+ <UsageCount Value="22"/>
+ <Loaded Value="True"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="delphi\bass.pas"/>
+ <UnitName Value="Bass"/>
+ <CursorPos X="12" Y="539"/>
+ <TopLine Value="589"/>
+ <UsageCount Value="10"/>
+ </Unit1>
+ <Unit2>
+ <Filename Value="avformat.pas"/>
+ <UnitName Value="avformat"/>
+ <CursorPos X="38" Y="594"/>
+ <TopLine Value="567"/>
+ <EditorIndex Value="1"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit2>
+ <Unit3>
+ <Filename Value="avcodec.pas"/>
+ <UnitName Value="avcodec"/>
+ <CursorPos X="3" Y="1796"/>
+ <TopLine Value="1775"/>
+ <EditorIndex Value="2"/>
+ <UsageCount Value="11"/>
+ <Loaded Value="True"/>
+ </Unit3>
+ <Unit4>
+ <Filename Value="avio.pas"/>
+ <UnitName Value="avio"/>
+ <CursorPos X="1" Y="1"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="3"/>
+ <UsageCount Value="11"/>
+ <Loaded Value="True"/>
+ </Unit4>
+ </Units>
+ <JumpHistory Count="24" HistoryIndex="23">
+ <Position1>
+ <Filename Value="lazarustest.lpr"/>
+ <Caret Line="16" Column="18" TopLine="1"/>
+ </Position1>
+ <Position2>
+ <Filename Value="avio.pas"/>
+ <Caret Line="28" Column="38" TopLine="36"/>
+ </Position2>
+ <Position3>
+ <Filename Value="avio.pas"/>
+ <Caret Line="29" Column="7" TopLine="9"/>
+ </Position3>
+ <Position4>
+ <Filename Value="avio.pas"/>
+ <Caret Line="30" Column="7" TopLine="10"/>
+ </Position4>
+ <Position5>
+ <Filename Value="avio.pas"/>
+ <Caret Line="31" Column="7" TopLine="11"/>
+ </Position5>
+ <Position6>
+ <Filename Value="avio.pas"/>
+ <Caret Line="44" Column="10" TopLine="40"/>
+ </Position6>
+ <Position7>
+ <Filename Value="avio.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position7>
+ <Position8>
+ <Filename Value="avio.pas"/>
+ <Caret Line="23" Column="5" TopLine="3"/>
+ </Position8>
+ <Position9>
+ <Filename Value="avio.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position9>
+ <Position10>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="567" Column="24" TopLine="560"/>
+ </Position10>
+ <Position11>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="1968" Column="5" TopLine="1928"/>
+ </Position11>
+ <Position12>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="22" Column="31" TopLine="6"/>
+ </Position12>
+ <Position13>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="247" Column="14" TopLine="227"/>
+ </Position13>
+ <Position14>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="546" Column="46" TopLine="526"/>
+ </Position14>
+ <Position15>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="20" Column="26" TopLine="1"/>
+ </Position15>
+ <Position16>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="250" Column="59" TopLine="230"/>
+ </Position16>
+ <Position17>
+ <Filename Value="avcodec.pas"/>
+ <Caret Line="841" Column="53" TopLine="821"/>
+ </Position17>
+ <Position18>
+ <Filename Value="avio.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position18>
+ <Position19>
+ <Filename Value="avio.pas"/>
+ <Caret Line="236" Column="8" TopLine="205"/>
+ </Position19>
+ <Position20>
+ <Filename Value="avformat.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position20>
+ <Position21>
+ <Filename Value="avformat.pas"/>
+ <Caret Line="568" Column="3" TopLine="541"/>
+ </Position21>
+ <Position22>
+ <Filename Value="avformat.pas"/>
+ <Caret Line="41" Column="17" TopLine="25"/>
+ </Position22>
+ <Position23>
+ <Filename Value="avformat.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position23>
+ <Position24>
+ <Filename Value="avformat.pas"/>
+ <Caret Line="588" Column="1" TopLine="557"/>
+ </Position24>
+ </JumpHistory>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="5"/>
+ <PathDelim Value="\"/>
+ <CodeGeneration>
+ <Generate Value="Faster"/>
+ </CodeGeneration>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="2">
+ <Item1>
+ <Name Value="ECodetoolError"/>
+ </Item1>
+ <Item2>
+ <Name Value="EFOpenError"/>
+ </Item2>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/Game/Code/lib/ffmpeg/lazarustest.lpr b/Game/Code/lib/ffmpeg/lazarustest.lpr
new file mode 100644
index 00000000..56efac75
--- /dev/null
+++ b/Game/Code/lib/ffmpeg/lazarustest.lpr
@@ -0,0 +1,27 @@
+program lazarustest;
+
+{$MODE Delphi}
+
+uses
+
+ avcodec in 'avcodec.pas',
+ avformat in 'avformat.pas',
+ avutil in 'avutil.pas',
+ rational in 'rational.pas',
+ opt in 'opt.pas',
+ avio in 'avio.pas',
+ sysutils;
+
+begin
+ // This compiles with all units in..
+ // but I cant run it, if its compiled with lazarus or delphi
+ // I get errors about not finding functions in dll's
+
+ try
+// av_register_all();
+ writeln( 'If you see this then ffmpeg is probably lazarus compatible' );
+ except
+ writeln( 'ffmpeg is NOT lazarus compatible' );
+ end;
+end.
+