aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/plugins
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-23 09:07:15 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-23 09:07:15 +0000
commit678cc132f942ff4d84a803550eedf96acc543bca (patch)
treeeb195abafaf69d55fa0f4b77323e517fcd2263cd /cmake/plugins
parent7e677fd5ebe60c3dd9df8954e1ed28c4afdf8660 (diff)
downloadusdx-678cc132f942ff4d84a803550eedf96acc543bca.tar.gz
usdx-678cc132f942ff4d84a803550eedf96acc543bca.tar.xz
usdx-678cc132f942ff4d84a803550eedf96acc543bca.zip
update to trunk rev. 2391
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2401 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'cmake/plugins')
-rw-r--r--cmake/plugins/5000Points/CMakeLists.txt4
-rw-r--r--cmake/plugins/5000Points/Until5000.dpr104
-rw-r--r--cmake/plugins/Blind/Blind.dpr112
-rw-r--r--cmake/plugins/Blind/CMakeLists.txt4
-rw-r--r--cmake/plugins/CMakeLists.txt18
-rw-r--r--cmake/plugins/Dont_Get_Worse/CMakeLists.txt8
-rw-r--r--cmake/plugins/Dont_Get_Worse/Hold_The_Line.bdsproj175
-rw-r--r--cmake/plugins/Dont_Get_Worse/Hold_The_Line.dpr227
-rw-r--r--cmake/plugins/Dont_Get_Worse/Hold_The_Line.lpi108
-rw-r--r--cmake/plugins/Dont_Get_Worse/dismissed.mp3bin5433 -> 0 bytes
-rw-r--r--cmake/plugins/Duell/CMakeLists.txt4
-rw-r--r--cmake/plugins/Duell/Duell.dpr106
-rw-r--r--cmake/plugins/README(Plugins Status).txt12
-rw-r--r--cmake/plugins/SDK/ModiSDK.pas164
-rw-r--r--cmake/plugins/SDK/USDXStrUtils.pas79
-rw-r--r--cmake/plugins/Team_Duell/CMakeLists.txt8
-rw-r--r--cmake/plugins/Team_Duell/TeamDuell.dpr274
17 files changed, 0 insertions, 1407 deletions
diff --git a/cmake/plugins/5000Points/CMakeLists.txt b/cmake/plugins/5000Points/CMakeLists.txt
deleted file mode 100644
index ecc89b00..00000000
--- a/cmake/plugins/5000Points/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# $URL$
-# $Id$
-pascal_add_module(until5000 Until5000.dpr OUTPUT_DIR ${USDX_PLUGIN_DIR} EXCLUDE_FROM_ALL)
-add_dependencies(plugins until5000)
diff --git a/cmake/plugins/5000Points/Until5000.dpr b/cmake/plugins/5000Points/Until5000.dpr
deleted file mode 100644
index 83bc1007..00000000
--- a/cmake/plugins/5000Points/Until5000.dpr
+++ /dev/null
@@ -1,104 +0,0 @@
-library Until5000;
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses
- ModiSDK in '..\SDK\ModiSDK.pas';
-
-// give the plugin's info
-procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Info.Name := 'PLUGIN_UNTIL5000_NAME';
-
- Info.Creator := 'Whiteshark';
- Info.PluginDesc := 'PLUGIN_UNTIL5000_DESC';
-
- // set to party modus plugin
- Info.Typ := 8;
-
- Info.NumPlayers := 31;
- // options
- Info.LoadSong := true; // whether or not a song should be loaded
- // only when song is loaded:
- Info.ShowScore := true; // whether or not the score should be shown
- Info.ShowNotes := true; // whether the note lines should be displayed
- Info.LoadVideo := true; // should the video be loaded?
- Info.LoadBack := true; // should the background be loaded?
-
- Info.BGShowFull := false; // whether the background or the video should be shown full size
- Info.BGShowFull_O := true; // whether the background or the video should be shown full size
-
- Info.ShowRateBar := true; // whether the bar that shows how good the player was should be displayed
- Info.ShowRateBar_O := true; // load from ini whether the bar should be displayed
-
- Info.EnLineBonus := false; // whether line bonus should be enabled
- Info.EnLineBonus_O := true; // load from ini whether line bonus should be enabled
-
- // options even when song is not loaded
- Info.ShowBars := false; // whether the white bars on top and bottom should be drawn
- Info.TeamModeOnly := false; // if true the plugin can only be played in team mode
- Info.GetSoundData := false; // if true the rdata procedure is called when new sound data is available
- Info.Dummy := false; // should be set to false... for updateing plugin interface
-end;
-
-// executed on game start; if true game begins, else failure
-function Init (const TeamInfo: TTeamInfo;
- var Playerinfo: TPlayerinfo;
- const Sentences: TSentences;
- const Methods: TMethodRec)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Result := true;
-end;
-
-// executed everytime the screen is drawn; if false the game finishes
-function Draw (var Playerinfo: TPlayerinfo;
- const CurSentence: cardinal)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index: integer;
-begin
- Result := false;
- for Index := 0 to PlayerInfo.NumPlayers-1 do
- begin
- PlayerInfo.Playerinfo[Index].Bar := PlayerInfo.Playerinfo[Index].Score div 50;
- PlayerInfo.Playerinfo[Index].Percentage := PlayerInfo.Playerinfo[Index].Bar;
- if (PlayerInfo.Playerinfo[Index].Score >= 5000) then
- Exit;
- end;
- Result := true;
-end;
-
-// is executed on finish, returns the player number of the winner
-function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index: integer;
-begin
- Result := 0;
- for Index := 0 to PlayerInfo.NumPlayers-1 do
- begin
- if (PlayerInfo.Playerinfo[Index].Score >= 5000) then
- begin
- case Index of
- 0: Result := Result or 1;
- 1: Result := Result or 2;
- 2: Result := Result or 4;
- 3: Result := Result or 8;
- 4: Result := Result or 16;
- 5: Result := Result or 32;
- end;
- end;
- end;
-end;
-
-exports
- PluginInfo,
- Init,
- Draw,
- Finish;
-
-begin
-
-end. \ No newline at end of file
diff --git a/cmake/plugins/Blind/Blind.dpr b/cmake/plugins/Blind/Blind.dpr
deleted file mode 100644
index 3c68374c..00000000
--- a/cmake/plugins/Blind/Blind.dpr
+++ /dev/null
@@ -1,112 +0,0 @@
-library Blind;
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses
- ModiSDK in '..\SDK\ModiSDK.pas';
-
-// give the plugin's info
-procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Info.Name := 'PLUGIN_BLIND_NAME';
- Info.Creator := 'Whiteshark';
- Info.PluginDesc := 'PLUGIN_BLIND_DESC';
-
- // set to party modus plugin
- Info.Typ := 8;
-
- Info.NumPlayers := 31;
-
- // options
- Info.LoadSong := true; // whether or not a song should be loaded
- // only when song is loaded:
- Info.ShowScore := true; // whether or not the score should be shown
- Info.ShowNotes := false; // whether the note lines should be displayed
- Info.LoadVideo := true; // should the video be loaded?
- Info.LoadBack := true; // should the background be loaded?
-
- Info.BGShowFull := false; // whether the background or the video should be shown in full size
- Info.BGShowFull_O := true; // whether the background or the video should be shown in full size
-
- Info.ShowRateBar := false; // whether the bar that shows how good the player was should be displayed
- Info.ShowRateBar_O := true; // load from ini whether the bar should be displayed
-
- Info.EnLineBonus := false; // whether line bonus should be enabled
- Info.EnLineBonus_O := true; // load from ini whether line bonus should be enabled
-
- // options even when song is not loaded
- Info.ShowBars := false; // whether the white bars on top and bottom should be drawn
- Info.TeamModeOnly := false; // if true the plugin can only be played in team mode
- Info.GetSoundData := false; // if true the rdata procedure is called when new sound data is available
- Info.Dummy := false; // should be set to false... for updating plugin interface
-end;
-
-// executed on game start. if true game begins, else failure
-function Init (const TeamInfo: TTeamInfo;
- var Playerinfo: TPlayerinfo;
- const Sentences: TSentences;
- const Methods: TMethodRec)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Result := true;
-end;
-
-// executed every time the screen is drawn. if false the game finishes
-function Draw (var Playerinfo: TPlayerinfo;
- const CurSentence: cardinal)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Result := true;
-end;
-
-// is executed on finish, returns the player number of the winner
-function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index: integer;
- MaxScore: word;
-begin
- Result := 0;
- MaxScore := 0;
- for Index := 0 to PlayerInfo.NumPlayers - 1 do
- begin
- PlayerInfo.Playerinfo[Index].Percentage := PlayerInfo.Playerinfo[Index].Score div 9999;
- if (PlayerInfo.Playerinfo[Index].Score > MaxScore) then
- begin
- MaxScore := PlayerInfo.Playerinfo[Index].Score;
- case Index of
- 0: Result := 1;
- 1: Result := 2;
- 2: Result := 4;
- 3: Result := 8;
- 4: Result := 16;
- 5: Result := 32;
- end;
- end
- else if (PlayerInfo.Playerinfo[Index].Score = MaxScore) and (PlayerInfo.Playerinfo[Index].Score <> 0) then
- begin
- case Index of
- 0: Result := Result or 1;
- 1: Result := Result or 2;
- 2: Result := Result or 4;
- 3: Result := Result or 8;
- 4: Result := Result or 16;
- 5: Result := Result or 32;
- end;
- end;
- end;
- // if everybody has 0 points nobody wins
- if (MaxScore = 0) then
- Result := 0;
-end;
-
-exports
- PluginInfo,
- Init,
- Draw,
- Finish;
-
-begin
-
-end. \ No newline at end of file
diff --git a/cmake/plugins/Blind/CMakeLists.txt b/cmake/plugins/Blind/CMakeLists.txt
deleted file mode 100644
index 350ba13e..00000000
--- a/cmake/plugins/Blind/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# $URL$
-# $Id$
-pascal_add_module(blind Blind.dpr OUTPUT_DIR ${USDX_PLUGIN_DIR} EXCLUDE_FROM_ALL)
-add_dependencies(plugins blind)
diff --git a/cmake/plugins/CMakeLists.txt b/cmake/plugins/CMakeLists.txt
deleted file mode 100644
index d7cd8ae6..00000000
--- a/cmake/plugins/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# $URL$
-# $Id$
-
-# create an option to exclude plugins target from ALL target
-option(BUILD_PLUGINS "Build UltraStar Deluxe party-mode plugins." ON)
-set(plugins_tgt_all)
-if(BUILD_PLUGINS)
- set(plugins_tgt_all ALL)
-endif(BUILD_PLUGINS)
-# create a plugins target
-add_custom_target(plugins ${plugins_tgt_all})
-
-# add plugins to target
-add_subdirectory(5000Points)
-add_subdirectory(Blind)
-add_subdirectory(Duell)
-add_subdirectory(Dont_Get_Worse)
-add_subdirectory(Team_Duell)
diff --git a/cmake/plugins/Dont_Get_Worse/CMakeLists.txt b/cmake/plugins/Dont_Get_Worse/CMakeLists.txt
deleted file mode 100644
index 5a3f6c24..00000000
--- a/cmake/plugins/Dont_Get_Worse/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# $URL$
-# $Id$
-pascal_add_module(hold_the_line Hold_The_Line.dpr
- OUTPUT_DIR ${USDX_PLUGIN_DIR}
- PACKAGES sdl opengl
- EXCLUDE_FROM_ALL
-)
-add_dependencies(plugins hold_the_line)
diff --git a/cmake/plugins/Dont_Get_Worse/Hold_The_Line.bdsproj b/cmake/plugins/Dont_Get_Worse/Hold_The_Line.bdsproj
deleted file mode 100644
index 8694fb50..00000000
--- a/cmake/plugins/Dont_Get_Worse/Hold_The_Line.bdsproj
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<BorlandProject>
- <PersonalityInfo>
- <Option>
- <Option Name="Personality">Delphi.Personality</Option>
- <Option Name="ProjectType">VCLApplication</Option>
- <Option Name="Version">1.0</Option>
- <Option Name="GUID">{06A9B812-7EBB-46A7-A56A-6DE18E64E79D}</Option>
- </Option>
- </PersonalityInfo>
- <Delphi.Personality>
- <Source>
- <Source Name="MainSource">Hold_The_Line.dpr</Source>
- </Source>
- <FileVersion>
- <FileVersion Name="Version">7.0</FileVersion>
- </FileVersion>
- <Compiler>
- <Compiler Name="A">8</Compiler>
- <Compiler Name="B">0</Compiler>
- <Compiler Name="C">1</Compiler>
- <Compiler Name="D">1</Compiler>
- <Compiler Name="E">0</Compiler>
- <Compiler Name="F">0</Compiler>
- <Compiler Name="G">1</Compiler>
- <Compiler Name="H">1</Compiler>
- <Compiler Name="I">1</Compiler>
- <Compiler Name="J">0</Compiler>
- <Compiler Name="K">0</Compiler>
- <Compiler Name="L">1</Compiler>
- <Compiler Name="M">0</Compiler>
- <Compiler Name="N">1</Compiler>
- <Compiler Name="O">1</Compiler>
- <Compiler Name="P">1</Compiler>
- <Compiler Name="Q">0</Compiler>
- <Compiler Name="R">0</Compiler>
- <Compiler Name="S">0</Compiler>
- <Compiler Name="T">0</Compiler>
- <Compiler Name="U">0</Compiler>
- <Compiler Name="V">1</Compiler>
- <Compiler Name="W">0</Compiler>
- <Compiler Name="X">1</Compiler>
- <Compiler Name="Y">1</Compiler>
- <Compiler Name="Z">1</Compiler>
- <Compiler Name="ShowHints">True</Compiler>
- <Compiler Name="ShowWarnings">True</Compiler>
- <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
- <Compiler Name="NamespacePrefix"></Compiler>
- <Compiler Name="GenerateDocumentation">False</Compiler>
- <Compiler Name="DefaultNamespace"></Compiler>
- <Compiler Name="SymbolDeprecated">True</Compiler>
- <Compiler Name="SymbolLibrary">True</Compiler>
- <Compiler Name="SymbolPlatform">True</Compiler>
- <Compiler Name="SymbolExperimental">True</Compiler>
- <Compiler Name="UnitLibrary">True</Compiler>
- <Compiler Name="UnitPlatform">True</Compiler>
- <Compiler Name="UnitDeprecated">True</Compiler>
- <Compiler Name="UnitExperimental">True</Compiler>
- <Compiler Name="HResultCompat">True</Compiler>
- <Compiler Name="HidingMember">True</Compiler>
- <Compiler Name="HiddenVirtual">True</Compiler>
- <Compiler Name="Garbage">True</Compiler>
- <Compiler Name="BoundsError">True</Compiler>
- <Compiler Name="ZeroNilCompat">True</Compiler>
- <Compiler Name="StringConstTruncated">True</Compiler>
- <Compiler Name="ForLoopVarVarPar">True</Compiler>
- <Compiler Name="TypedConstVarPar">True</Compiler>
- <Compiler Name="AsgToTypedConst">True</Compiler>
- <Compiler Name="CaseLabelRange">True</Compiler>
- <Compiler Name="ForVariable">True</Compiler>
- <Compiler Name="ConstructingAbstract">True</Compiler>
- <Compiler Name="ComparisonFalse">True</Compiler>
- <Compiler Name="ComparisonTrue">True</Compiler>
- <Compiler Name="ComparingSignedUnsigned">True</Compiler>
- <Compiler Name="CombiningSignedUnsigned">True</Compiler>
- <Compiler Name="UnsupportedConstruct">True</Compiler>
- <Compiler Name="FileOpen">True</Compiler>
- <Compiler Name="FileOpenUnitSrc">True</Compiler>
- <Compiler Name="BadGlobalSymbol">True</Compiler>
- <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
- <Compiler Name="InvalidDirective">True</Compiler>
- <Compiler Name="PackageNoLink">True</Compiler>
- <Compiler Name="PackageThreadVar">True</Compiler>
- <Compiler Name="ImplicitImport">True</Compiler>
- <Compiler Name="HPPEMITIgnored">True</Compiler>
- <Compiler Name="NoRetVal">True</Compiler>
- <Compiler Name="UseBeforeDef">True</Compiler>
- <Compiler Name="ForLoopVarUndef">True</Compiler>
- <Compiler Name="UnitNameMismatch">True</Compiler>
- <Compiler Name="NoCFGFileFound">True</Compiler>
- <Compiler Name="ImplicitVariants">True</Compiler>
- <Compiler Name="UnicodeToLocale">True</Compiler>
- <Compiler Name="LocaleToUnicode">True</Compiler>
- <Compiler Name="ImagebaseMultiple">True</Compiler>
- <Compiler Name="SuspiciousTypecast">True</Compiler>
- <Compiler Name="PrivatePropAccessor">True</Compiler>
- <Compiler Name="UnsafeType">False</Compiler>
- <Compiler Name="UnsafeCode">False</Compiler>
- <Compiler Name="UnsafeCast">False</Compiler>
- <Compiler Name="OptionTruncated">True</Compiler>
- <Compiler Name="WideCharReduced">True</Compiler>
- <Compiler Name="DuplicatesIgnored">True</Compiler>
- <Compiler Name="UnitInitSeq">True</Compiler>
- <Compiler Name="LocalPInvoke">True</Compiler>
- <Compiler Name="MessageDirective">True</Compiler>
- <Compiler Name="CodePage"></Compiler>
- </Compiler>
- <Linker>
- <Linker Name="MapFile">0</Linker>
- <Linker Name="OutputObjs">0</Linker>
- <Linker Name="GenerateHpps">False</Linker>
- <Linker Name="ConsoleApp">1</Linker>
- <Linker Name="DebugInfo">False</Linker>
- <Linker Name="RemoteSymbols">False</Linker>
- <Linker Name="GenerateDRC">False</Linker>
- <Linker Name="MinStackSize">16384</Linker>
- <Linker Name="MaxStackSize">1048576</Linker>
- <Linker Name="ImageBase">4194304</Linker>
- <Linker Name="ExeDescription"></Linker>
- </Linker>
- <Directories>
- <Directories Name="OutputDir"></Directories>
- <Directories Name="UnitOutputDir"></Directories>
- <Directories Name="PackageDLLOutputDir"></Directories>
- <Directories Name="PackageDCPOutputDir"></Directories>
- <Directories Name="SearchPath">..\..\src\lib\JEDI-SDL\SDL\Pas</Directories>
- <Directories Name="Packages"></Directories>
- <Directories Name="Conditionals"></Directories>
- <Directories Name="DebugSourceDirs"></Directories>
- <Directories Name="UsePackages">False</Directories>
- </Directories>
- <Parameters>
- <Parameters Name="RunParams"></Parameters>
- <Parameters Name="HostApplication"></Parameters>
- <Parameters Name="Launcher"></Parameters>
- <Parameters Name="UseLauncher">False</Parameters>
- <Parameters Name="DebugCWD"></Parameters>
- <Parameters Name="Debug Symbols Search Path"></Parameters>
- <Parameters Name="LoadAllSymbols">True</Parameters>
- <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
- </Parameters>
- <Language>
- <Language Name="ActiveLang"></Language>
- <Language Name="ProjectLang">$00000000</Language>
- <Language Name="RootDir"></Language>
- </Language>
- <VersionInfo>
- <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
- <VersionInfo Name="AutoIncBuild">False</VersionInfo>
- <VersionInfo Name="MajorVer">1</VersionInfo>
- <VersionInfo Name="MinorVer">0</VersionInfo>
- <VersionInfo Name="Release">0</VersionInfo>
- <VersionInfo Name="Build">0</VersionInfo>
- <VersionInfo Name="Debug">False</VersionInfo>
- <VersionInfo Name="PreRelease">False</VersionInfo>
- <VersionInfo Name="Special">False</VersionInfo>
- <VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">False</VersionInfo>
- <VersionInfo Name="Locale">1031</VersionInfo>
- <VersionInfo Name="CodePage">1252</VersionInfo>
- </VersionInfo>
- <VersionInfoKeys>
- <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
- <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
- <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
- <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="Comments"></VersionInfoKeys>
- </VersionInfoKeys>
- </Delphi.Personality>
-</BorlandProject>
diff --git a/cmake/plugins/Dont_Get_Worse/Hold_The_Line.dpr b/cmake/plugins/Dont_Get_Worse/Hold_The_Line.dpr
deleted file mode 100644
index a7828f8e..00000000
--- a/cmake/plugins/Dont_Get_Worse/Hold_The_Line.dpr
+++ /dev/null
@@ -1,227 +0,0 @@
-library Hold_The_Line;
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses
- SysUtils,
- ModiSDK in '..\SDK\ModiSDK.pas',
- gl in '..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas';
-
-var
- PointerTex: TSmallTexture;
- CountSentences: cardinal;
- Limit: byte;
- MethodRec: TMethodRec;
-// Frame: integer;
- PlayerTimes: array[0..5] of integer;
- LastTick: cardinal;
- PointerVisible: boolean;
-
- DismissedSound: cardinal;
-
-// Give the plugin's info
-procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Info.Name := 'PLUGIN_HDL_NAME';
-
- Info.Creator := 'Whiteshark';
- Info.PluginDesc := 'PLUGIN_HDL_DESC';
-
- // Set to Party Modi Plugin
- Info.Typ := 8;
-
- Info.NumPlayers := 31;
- // Options
- Info.LoadSong := true; // Whether or not a song should be loaded
- // Only when song is loaded:
- Info.ShowScore := true; // Whether or not the score should be shown
- Info.ShowNotes := true; // Whether the note lines should be displayed
- Info.LoadVideo := true; // Should the video be loaded?
- Info.LoadBack := true; // Should the background be loaded?
-
- Info.BGShowFull := false; // Whether the background or the video should be shown full size
- Info.BGShowFull_O := true; // Whether the Background or the Video should be shown full size
-
- Info.ShowRateBar := true; // Whether the bar that shows how good the player was should be displayed
- Info.ShowRateBar_O := false; // Load from ini whether the bar should be displayed
-
- Info.EnLineBonus := false; // Whether line bonus should be enabled
- Info.EnLineBonus_O := true; // Load from ini whether line bonus should be enabled
-
- // Options even when song is not loaded
- Info.ShowBars := false; // Whether the white bars on top and bottom should be drawn
- Info.TeamModeOnly := false; // if true the plugin can only be played in team mode
- Info.GetSoundData := false; // if true the rdata procedure is called when new sound data is available
- Info.Dummy := false; // Should be set to false... for updating plugin interface
-end;
-
-// executed on game start. if true game begins, else failure
-function Init (const TeamInfo: TTeamInfo;
- var Playerinfo: TPlayerinfo;
- const Sentences: TSentences;
- const Methods: TMethodRec)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-
-const
- TextureName : PChar = 'HDL_Pointer';
- SoundName : PChar = 'dismissed.mp3';
-var
- Index: integer;
-// Texname: PChar;
- TexType: TTextureType;
-begin
-{
- TexName := CreateStr(PChar('HDL_Pointer'));
- TexType := TEXTURE_TYPE_TRANSPARENT;
- PointerTex := Methods.LoadTex(TexName, TexType);
-
- FreeStr(TexName);
-
- TexName := CreateStr(PChar('dismissed.mp3'));
- DismissedSound := Methods.LoadSound (TexName);
- FreeStr(TexName);
-}
- TexType := TEXTURE_TYPE_TRANSPARENT;
- PointerTex := Methods.LoadTex(TextureName, TexType);
-
- DismissedSound := Methods.LoadSound (SoundName);
-
- CountSentences := Sentences.High;
- Limit := 0;
-// Frame := 0;
-
- MethodRec := Methods;
-
- for Index := 0 to PlayerInfo.NumPlayers-1 do
- begin
- PlayerInfo.Playerinfo[Index].Enabled := true;
- PlayerInfo.Playerinfo[Index].Percentage := 100;
- PlayerTimes[Index] := 0;
- end;
-
- Result := true;
-end;
-
-function Draw (var Playerinfo: TPlayerinfo;
- const CurSentence: cardinal)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-const
- SoundName : PChar = 'PARTY_DISMISSED';
-var
- Index: integer;
- L: byte;
- C: byte;
- Tick: cardinal;
-begin
- // activate blink
- if (CurSentence = CountSentences div 5 * 2 - 1) or (CurSentence = CountSentences div 3 * 2 - 1) then
- begin
- Tick := round(TimeStampToMSecs(DateTimeToTimeStamp(Now))) div 400;
- if (Tick <> LastTick) then
- begin
- LastTick := Tick;
- PointerVisible := not PointerVisible;
- end;
- end
- else
- PointerVisible := true;
-
- // inc limit
- if (Limit = 0) and (CurSentence >= CountSentences div 5 * 2) then
- Inc(Limit)
- else if (Limit = 1) and (CurSentence >= CountSentences div 3 * 2) then
- Inc(Limit);
-
- case Limit of
- 0: L := 20;
- 1: L := 50;
- 2: L := 75;
- end;
-
- C:= 0;
-
- Result := true;
-
- for Index := 0 to PlayerInfo.NumPlayers-1 do
- begin
- if PlayerInfo.Playerinfo[Index].Enabled then
- begin
- if PlayerInfo.Playerinfo[Index].Bar < L then
- begin
- PlayerInfo.Playerinfo[Index].Enabled := false;
- Inc(C);
- PlayerTimes[Index] := CurSentence; // Save Time of Dismission
- // PlaySound
- MethodRec.PlaySound (DismissedSound);
- end;
-
- // Draw pointer
- if (PointerVisible) then
- begin
- glColor4f (0.2, 0.8, 0.1, 1);
-
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
- glBindTexture(GL_TEXTURE_2D, PointerTex.TexNum);
-
- glBegin(GL_QUADS);
- glTexCoord2f(1/32, 0); glVertex2f(PlayerInfo.Playerinfo[Index].PosX + L - 3, PlayerInfo.Playerinfo[Index].PosY - 4);
- glTexCoord2f(1/32, 1); glVertex2f(PlayerInfo.Playerinfo[Index].PosX + L - 3, PlayerInfo.Playerinfo[Index].PosY + 12);
- glTexCoord2f(31/32, 1); glVertex2f(PlayerInfo.Playerinfo[Index].PosX+ L + 3, PlayerInfo.Playerinfo[Index].PosY + 12);
- glTexCoord2f(31/32, 0); glVertex2f(PlayerInfo.Playerinfo[Index].PosX+ L + 3, PlayerInfo.Playerinfo[Index].PosY - 4);
- glEnd;
-
- glDisable(GL_TEXTURE_2D);
- glDisable(GL_BLEND);
- end;
-
- end
- else
- begin
- Inc(C);
- // Draw dismissed
- glColor4f (0.8, 0.8, 0.8, 1);
- MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY-8, SoundName);
- end;
- end;
- if (C >= PlayerInfo.NumPlayers-1) then
- Result := false;
-end;
-
-// is executed on finish, returns the player number of the winner
-function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index: integer;
-begin
- Result := 0;
- for Index := 0 to PlayerInfo.NumPlayers-1 do
- begin
- PlayerInfo.Playerinfo[Index].Percentage := (PlayerTimes[Index] * 100) div CountSentences;
- if (PlayerInfo.Playerinfo[Index].Enabled) then
- begin
- PlayerInfo.Playerinfo[Index].Percentage := 100;
- case Index of
- 0: Result := Result or 1;
- 1: Result := Result or 2;
- 2: Result := Result or 4;
- 3: Result := Result or 8;
- 4: Result := Result or 16;
- 5: Result := Result or 32;
- end;
- end;
- end;
-end;
-
-exports
- PluginInfo,
- Init,
- Draw,
- Finish;
-
-begin
-
-end.
diff --git a/cmake/plugins/Dont_Get_Worse/Hold_The_Line.lpi b/cmake/plugins/Dont_Get_Worse/Hold_The_Line.lpi
deleted file mode 100644
index bb21d5d9..00000000
--- a/cmake/plugins/Dont_Get_Worse/Hold_The_Line.lpi
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="\"/>
- <Version Value="6"/>
- <General>
- <Flags>
- <MainUnitHasUsesSectionForAllUnits Value="False"/>
- <MainUnitHasCreateFormStatements Value="False"/>
- <MainUnitHasTitleStatement Value="False"/>
- </Flags>
- <MainUnit Value="0"/>
- <TargetFileExt Value=".exe"/>
- <Title Value="Hold_The_Line"/>
- <ActiveEditorIndexAtStart Value="2"/>
- </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="4">
- <Unit0>
- <Filename Value="Hold_The_Line.dpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="Hold_The_Line"/>
- <CursorPos X="22" Y="1"/>
- <TopLine Value="1"/>
- <EditorIndex Value="0"/>
- <UsageCount Value="20"/>
- <Loaded Value="True"/>
- </Unit0>
- <Unit1>
- <Filename Value="..\SDK\StrUtils.pas"/>
- <UnitName Value="StrUtils"/>
- <CursorPos X="4" Y="13"/>
- <TopLine Value="1"/>
- <EditorIndex Value="2"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
- </Unit1>
- <Unit2>
- <Filename Value="..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas"/>
- <UnitName Value="gl"/>
- <CursorPos X="1" Y="1"/>
- <TopLine Value="1"/>
- <UsageCount Value="10"/>
- </Unit2>
- <Unit3>
- <Filename Value="..\SDK\ModiSDK.pas"/>
- <UnitName Value="ModiSDK"/>
- <CursorPos X="1" Y="8"/>
- <TopLine Value="1"/>
- <EditorIndex Value="1"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
- </Unit3>
- </Units>
- <JumpHistory Count="1" HistoryIndex="0">
- <Position1>
- <Filename Value="..\SDK\StrUtils.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
- </Position1>
- </JumpHistory>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="8"/>
- <PathDelim Value="\"/>
- <SearchPaths>
- <IncludeFiles Value="..\..\src\lib\JEDI-SDL\SDL\Pas\"/>
- </SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <CStyleOperator Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <Linking>
- <Options>
- <ExecutableType Value="Library"/>
- </Options>
- </Linking>
- <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/cmake/plugins/Dont_Get_Worse/dismissed.mp3 b/cmake/plugins/Dont_Get_Worse/dismissed.mp3
deleted file mode 100644
index f478e7a3..00000000
--- a/cmake/plugins/Dont_Get_Worse/dismissed.mp3
+++ /dev/null
Binary files differ
diff --git a/cmake/plugins/Duell/CMakeLists.txt b/cmake/plugins/Duell/CMakeLists.txt
deleted file mode 100644
index d1a40730..00000000
--- a/cmake/plugins/Duell/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# $URL$
-# $Id$
-pascal_add_module(duell Duell.dpr OUTPUT_DIR ${USDX_PLUGIN_DIR} EXCLUDE_FROM_ALL)
-add_dependencies(plugins duell)
diff --git a/cmake/plugins/Duell/Duell.dpr b/cmake/plugins/Duell/Duell.dpr
deleted file mode 100644
index f54edea8..00000000
--- a/cmake/plugins/Duell/Duell.dpr
+++ /dev/null
@@ -1,106 +0,0 @@
-library Duell;
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses
- ModiSDK in '..\SDK\ModiSDK.pas';
-
-//Gave the Plugins Info
-procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Info.Name := 'PLUGIN_DUELL_NAME';
-
- Info.Creator := 'Whiteshark';
- Info.PluginDesc := 'PLUGIN_DUELL_DESC';
-
- Info.Typ := 8;
-
- Info.NumPlayers := 31;
- //Options
- Info.LoadSong := True; //Whether or not a Song should be Loaded
- //Only When Song is Loaded:
- Info.ShowScore := True; //Whether or not the Score should be shown
- Info.ShowNotes := True; //Whether the Note Lines should be displayed
- Info.LoadVideo := True; //Should the Video be loaded ?
- Info.LoadBack := True; //Should the Background be loaded ?
-
- Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
-
- Info.ShowRateBar := False; //Whether the Bar that shows how good the player was sould be displayed
- Info.ShowRateBar_O := True; //Load from Ini whether the Bar should be Displayed
-
- Info.EnLineBonus := False; //Whether LineBonus Should be enabled
- Info.EnLineBonus_O := True; //Load from Ini whether LineBonus Should be enabled
-
- //Options even when song is Not loaded
- Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
- Info.TeamModeOnly := False; //If True the Plugin can only be Played in Team Mode
- Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
- Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
-end;
-
-//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Result := True;
-end;
-
-//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Result := True;
-end;
-
-//Is Executed on Finish, Returns the Playernum of the Winner
-function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- I: Integer;
- MaxScore: Word;
-begin
- Result := 0;
- MaxScore := 0;
- for I := 0 to PlayerInfo.NumPlayers-1 do
- begin
- PlayerInfo.Playerinfo[I].Percentage := PlayerInfo.Playerinfo[I].Score div 9999;
- if (PlayerInfo.Playerinfo[I].Score > MaxScore) then
- begin
- MaxScore := PlayerInfo.Playerinfo[I].Score;
- Case I of
- 0: Result := 1;
- 1: Result := 2;
- 2: Result := 4;
- 3: Result := 8;
- 4: Result := 16;
- 5: Result := 32;
- end;
- end
- else if (PlayerInfo.Playerinfo[I].Score = MaxScore) AND (PlayerInfo.Playerinfo[I].Score <> 0) then
- begin
- Case I of
- 0: Result := Result OR 1;
- 1: Result := Result OR 2;
- 2: Result := Result OR 4;
- 3: Result := Result OR 8;
- 4: Result := Result OR 16;
- 5: Result := Result OR 32;
- end;
- end;
- end;
-
- //When nobody has Points -> Everybody loose
- if (MaxScore = 0) then
- Result := 0;
-end;
-
-exports
- PluginInfo,
- Init,
- Draw,
- Finish;
-
-begin
-
-end. \ No newline at end of file
diff --git a/cmake/plugins/README(Plugins Status).txt b/cmake/plugins/README(Plugins Status).txt
deleted file mode 100644
index a6756832..00000000
--- a/cmake/plugins/README(Plugins Status).txt
+++ /dev/null
@@ -1,12 +0,0 @@
-All plugins are cleared off the SDL stuff (basically SDL_GetTicks), the StrUtils and moduleloader unit and should work on all platforms.
-2009-May-23 KMS
-
-Mac OS X:
-The following plugins can be compiled and used after being put in to the plugins folder: Blind, 5000Points, Duell
-
-2009-Apr-8 KMS
-
-The plugins are currently disabled until the party mode is working again.
-This applies to all platforms supported (Windows, Linux, Mac OS X, FreeBSD).
-
-2009-Jan-20 Karl-Michael Schindler aka Mischi.
diff --git a/cmake/plugins/SDK/ModiSDK.pas b/cmake/plugins/SDK/ModiSDK.pas
deleted file mode 100644
index e0b52a81..00000000
--- a/cmake/plugins/SDK/ModiSDK.pas
+++ /dev/null
@@ -1,164 +0,0 @@
-unit ModiSDK;
-
-interface
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-type // PluginInfo, for init
- TPluginInfo = record
- // Info
- Name: array [0..32] of char; // modus to register for the plugin
- Creator: array [0..32] of char; // name of the author
- PluginDesc: array [0..64] of char; // plugin description
-
- // plugin type, atm: 8 only for partymode modus
- Case Typ: byte of
- 8: (
- // Options
- LoadSong: boolean; // Whether or not a song should be loaded
- // Only when song is loaded:
- ShowNotes: boolean; // Whether the note lines should be displayed
- LoadVideo: boolean; // Should the video be loaded?
- LoadBack: boolean; // Should the background be loaded?
-
- ShowRateBar: boolean; // Whether the bar that shows how good the player was sould be displayed
- ShowRateBar_O: boolean; // Load from ini whether the bar should be displayed
-
- EnLineBonus: boolean; // Whether line bonus should be enabled
- EnLineBonus_O: boolean; // Load from ini whether line bonus should be enabled
-
- BGShowFull: boolean; // Whether the background or the video should be shown full size
- BGShowFull_O: boolean; // Whether the background or the video should be shown full size
-
- // Options -> everytime
- ShowScore: boolean; // Whether or not the score should be shown
- ShowBars: boolean; // Whether the white bars on top and bottom should be drawn
- TeamModeOnly: boolean; // If true the plugin can only be played in team mode
- GetSoundData: boolean; // If true the rdata procedure is called when new sound data is available
- Dummy: boolean; // Should be set to false... for updating plugin interface
-
- NumPlayers: byte // Number of available players for modus
- // Set different bits
- // 1 -> one player
- // 2 -> two players
- // 4 -> three players
- // 8 -> four players
- // 16-> six players
- // e.g. : 10 -> playable with 2 and 4 players
- );
-
- end;
-
- TPlayerInfo = record
- NumPlayers: byte;
- Playerinfo: array[0..5] of record
- Name: PChar; // Name of the player
- Score: word; // Player's score
- Bar: byte; // Percentage of the singbar filled
- PosX: real; // PosX of player's singbar
- PosY: real; // PosY "
- Enabled: boolean; // Whether the player could get points
- Percentage: byte; // Percentage shown on the score screen
- end;
- end;
-
- TTeamInfo = record
- NumTeams: byte;
- Teaminfo: array[0..5] of record
- Name: PChar;
- Score: word;
- Joker: byte;
- CurPlayer: byte;
- NumPlayers: byte;
- Playerinfo: array[0..3] of record
- Name: PChar;
- TimesPlayed: byte;
- end;
- end;
- end;
-
- TsmallTexture = record
- TexNum: integer;
- W: real;
- H: real;
- end;
-
- TSentences = record
- Current: integer; // current part of a line
- High: integer;
- Number: integer;
- Resolution: integer;
- NotesGAP: integer;
- TotalLength: integer;
- Sentence: array of record
- Start: integer;
- StartNote: integer;
- Lyric: string;
- LyricWidth: real;
- End_: integer;
- BaseNote: integer;
- HighNote: integer;
- IlNut: integer;
- TotalNotes: integer;
- Note: array of record
- Color: integer;
- Start: integer;
- Length: integer;
- Tone: integer;
- //Text: string;
- FreeStyle: boolean;
- Typ: integer; // normal note x1, golden note x2
- end;
- end;
- end;
-
- dword = longword;
- hstream = dword;
-
- TTextureType = (
- TEXTURE_TYPE_PLAIN, // Plain (alpha = 1)
- TEXTURE_TYPE_TRANSPARENT, // Alpha is used
- TEXTURE_TYPE_COLORIZED // Alpha is used; Hue of the HSV color-model will be replaced by a new value
- );
-
- // Routines to give to the plugin
- fModi_LoadTex = function (const Name: PChar; Typ: TTextureType): TsmallTexture; // Pointer to texture loader
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- //fModi_Translate = function (const Name, Translation: AChar): integer; // Pointer to translator
- // {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-
- fModi_Print = procedure (const Style, Size: byte; const X, Y: real; const Text: PChar); // Procedure to print text // Now translated automatically
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- fModi_LoadSound = function (const Name: PChar): cardinal; // Procedure that loads a custom sound
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- pModi_PlaySound = procedure (const Index: cardinal); // Plays a custom sound
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-
- TMethodRec = record
- LoadTex: fModi_LoadTex;
- Print: fModi_Print;
- LoadSound: fModi_LoadSound;
- PlaySound: pModi_PlaySound;
- end;
- // DLL functions
- // Give the plugins info
- pModi_PluginInfo = procedure (var Info: TPluginInfo);
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- // Executed on game start // if true game begins, else failure
- fModi_Init = function (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean;
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- // Executed everytime the screen is drawn // if false the game finishes
- fModi_Draw = function (var Playerinfo: TPlayerinfo; const CurSentence: cardinal): boolean;
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- // Is executed on finish, returns the player num of the winner
- fModi_Finish = function (var Playerinfo: TPlayerinfo): byte;
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
- // Procedure called when new sound data is available
- pModi_RData = procedure (handle: hstream; buffer: pointer; len: dword; user: dword);
- {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-
-implementation
-
-end.
diff --git a/cmake/plugins/SDK/USDXStrUtils.pas b/cmake/plugins/SDK/USDXStrUtils.pas
deleted file mode 100644
index 94e5f65f..00000000
--- a/cmake/plugins/SDK/USDXStrUtils.pas
+++ /dev/null
@@ -1,79 +0,0 @@
-unit USDXStrUtils;
-
-interface
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses ModiSDK;
-
-//function StrToAChar(Str: String): AChar;
-function CreateStr(Str: PChar): PChar;
-procedure FreeStr(Str: PChar);
-
-implementation
-
-{$IFDEF FPC}
- {$ASMMODE Intel}
-{$ENDIF}
-
-{function StrToAChar(Str: String): AChar;
-var
- L, I: Integer;
-begin
- L := Length(Str);
- For I := 0 to L-1 do
- AChar[I] := Str[I+1];
-
- For I := L to 254 do
- AChar[I] := #0;
-end; }
-
-function StrCopy(Dest, Source: PChar): PChar; assembler;
-asm
- PUSH EDI
- PUSH ESI
- MOV ESI,EAX
- MOV EDI,EDX
- MOV ECX,0FFFFFFFFH
- XOR AL,AL
- REPNE SCASB
- NOT ECX
- MOV EDI,ESI
- MOV ESI,EDX
- MOV EDX,ECX
- MOV EAX,EDI
- SHR ECX,2
- REP MOVSD
- MOV ECX,EDX
- AND ECX,3
- REP MOVSB
- POP ESI
- POP EDI
-end;
-
-function StrLen(Str: PChar): Cardinal; assembler;
-asm
- MOV EDX,EDI
- MOV EDI,EAX
- MOV ECX,0FFFFFFFFH
- XOR AL,AL
- REPNE SCASB
- MOV EAX,0FFFFFFFEH
- SUB EAX,ECX
- MOV EDI,EDX
-end;
-
-function CreateStr(Str: PChar): PChar;
-begin
- GetMem(Result, StrLen(Str) + 1);
- StrCopy(Result, Str);
-end;
-
-procedure FreeStr(Str: PChar);
-begin
- FreeMem(Str);
-end;
-
-end.
diff --git a/cmake/plugins/Team_Duell/CMakeLists.txt b/cmake/plugins/Team_Duell/CMakeLists.txt
deleted file mode 100644
index 7201f471..00000000
--- a/cmake/plugins/Team_Duell/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# $URL$
-# $Id$
-pascal_add_module(team_duell TeamDuell.dpr
- OUTPUT_DIR ${USDX_PLUGIN_DIR}
- PACKAGES sdl opengl
- EXCLUDE_FROM_ALL
-)
-add_dependencies(plugins team_duell)
diff --git a/cmake/plugins/Team_Duell/TeamDuell.dpr b/cmake/plugins/Team_Duell/TeamDuell.dpr
deleted file mode 100644
index 1371c95d..00000000
--- a/cmake/plugins/Team_Duell/TeamDuell.dpr
+++ /dev/null
@@ -1,274 +0,0 @@
-library TeamDuell ;
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses
- SysUtils,
- ModiSDK in '..\SDK\ModiSDK.pas',
- gl in '..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas';
-
-var
- TeamPlayer: array of array of string;
- StartPoints: array of integer;
- CurSinger, NextSinger: array[0..2] of integer;
- MethodRec: TMethodRec;
- SPT, PlayerSelected: array[0..2] of integer;
- TimeToNextChange, starttick, endtick, ChangeOnSentence: cardinal;
- bps, RTimeToNextChange: double;
- firsttime, secondtime: boolean;
-
-function GetTicks: cardinal;
-// returns a time stamp in milliseconds
-begin
- GetTicks := round(TimeStampToMSecs(DateTimeToTimeStamp(Now)));
-end;
-
-// Give the plugin's info
-procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-begin
- Info.Name := 'PLUGIN_TEAMDUELL_NAME';
-
- Info.Creator := 'jekatt';
- Info.PluginDesc := 'PLUGIN_TEAMDUELL_DESC';
-
- Info.Typ := 8;
-
- Info.NumPlayers := 31;
- // Options
- Info.LoadSong := true; // Whether or not a song should be loaded
- // Only when song is loaded:
- Info.ShowScore := true; // Whether or not the score should be shown
- Info.ShowNotes := true; // Whether the note lines should be displayed
- Info.LoadVideo := true; // Should the video be loaded ?
- Info.LoadBack := true; // Should the background be loaded ?
-
- Info.BGShowFull := false; // Whether the background or the video should be shown full size
- Info.BGShowFull_O := true; // Whether the background or the video should be shown full size
-
- Info.ShowRateBar := true; // Whether the bar that shows how good the player was should be displayed
- Info.ShowRateBar_O := false; // Load from ini whether the bar should be displayed
-
- Info.EnLineBonus := false; // Whether line bonus should be enabled
- Info.EnLineBonus_O := true; // Load from ini whether line bonus should be enabled
-
- // Options even when song is not loaded
- Info.ShowBars := false; // Whether the white bars on top and bottom should be drawn
- Info.TeamModeOnly := true; // if true the plugin can only be played in team mode
- Info.GetSoundData := false; // if true the rdata procedure is called when new sounddata is available
- Info.Dummy := false; // Should be set to false... for updating plugin interface
-end;
-
-// executed on game start. if true game begins, else failure
-function Init (const TeamInfo: TTeamInfo;
- var Playerinfo: TPlayerinfo;
- const Sentences: TSentences;
- const Methods: TMethodRec)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index, J: integer;
-begin
-// Get beginning of sentences
- for Index := 0 to Sentences.High do
- begin
- SetLength(Startpoints, Index+1);
- Startpoints[Index]:=Sentences.Sentence[Index].Start;
- end;
- // Get teams and players
- for Index := 0 to TeamInfo.NumTeams-1 do
- begin
- SetLength(TeamPlayer, Index+1);
- for J := 0 to TeamInfo.Teaminfo[Index].NumPlayers-1 do
- begin
- SetLength(TeamPlayer[Index], J+1);
- TeamPlayer[Index,J] := Copy(string(TeamInfo.Teaminfo[Index].Playerinfo[J].Name), 1, 8);
- if (not(TeamPlayer[Index,J] = (string(TeamInfo.Teaminfo[Index].Playerinfo[J].Name)))) then
- TeamPlayer[Index,J] := TeamPlayer[Index,J]+'.';
- SPT[Index]:=J+1;
- end;
- CurSinger[Index] := TeamInfo.Teaminfo[Index].CurPlayer;
- repeat
- NextSinger[Index] := random(SPT[Index]);
- until not(NextSinger[Index] = CurSinger[Index]) or (SPT[Index] = 1);
- end;
- ChangeOnSentence := 8;
- starttick := GetTicks;
- firsttime := true;
- secondtime := true;
- bps := 1;
- MethodRec := Methods;
- Result := true;
-end;
-
-// Executed every time the screen is drawn; if false the game finishes
-function Draw (var Playerinfo: TPlayerinfo;
- const CurSentence: cardinal)
- : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index, timeline, x, y: integer;
- display: PChar;
- TimeString: PChar;
- start: boolean;
-begin
- // TickCount(firstSentence) (not zero!)
- if (CurSentence = ChangeOnSentence - 7) and (firsttime) then
- begin
- firsttime := false;
- starttick := GetTicks;
- end;
- start := false;
- // show first singer for 5 sec
- if (CurSentence < 1) and ((starttick + 5000) > GetTicks) then
- start := true;
-
- // TickCount(thirdSentence)
- if (CurSentence = 3) and (secondtime) then
- begin
- secondtime := false;
- firsttime := true;
- endtick := GetTicks;
- bps := (Startpoints[3]-Startpoints[1]) * 1000 / (endtick-starttick); // BeatsPerSecond
- end;
-
- // Time to next change
- RTimeToNextChange := ((Startpoints[ChangeOnSentence]-Startpoints[ChangeOnSentence - 7]) / bps) - ((GetTicks - starttick) / 1000);
- TimeToNextChange := Trunc(RTimeToNextChange) + 1;
-
- // Next singer for team I
- for Index := 0 to High(TeamPlayer) do
- begin
- if (CurSentence = ChangeOnSentence) and not(PlayerSelected[Index] = CurSentence) then
- begin
- PlayerSelected[Index] := CurSentence;
- CurSinger[Index] := NextSinger[Index];
- repeat
- NextSinger[Index] := random(SPT[Index]);
- until not(NextSinger[Index] = CurSinger[Index]) or (SPT[Index] = 1) ;
- end;
-
- // display background
- glColor4f (0.8, 0.8, 0.8, 1);
- display := PChar(TeamPlayer[Index,CurSinger[Index]]);
- if (TimeToNextChange <= 11) or (start = true) then
- begin
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_BLEND);
- glColor4f(0, 0, 0, 1);
- glBegin(GL_QUADS);
- glVertex2f(PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY + 8);
- glVertex2f(PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY + 30);
- glVertex2f(PlayerInfo.Playerinfo[Index].PosX + 100, PlayerInfo.Playerinfo[Index].PosY + 30);
- glVertex2f(PlayerInfo.Playerinfo[Index].PosX + 100, PlayerInfo.Playerinfo[Index].PosY + 8);
- glEnd;
- display := 'Next Singer';
-
- // timeline
- x := 270;
- y := 472;
- if (TimeToNextChange <= 5) and (RTimeToNextChange > 0) then
- begin
- timeline := Trunc(RTimeToNextChange*50);
- glColor3f(0, 0, 0);
- glBegin(GL_QUADS);
- glVertex2f(x, y);
- glVertex2f(x, y + 18);
- glVertex2f(x + 6 + 250, y + 18);
- glVertex2f(x + 6 + 250, y);
- glEnd;
- glColor3f(0.2, 0.2, 0.2);
- glBegin(GL_QUADS);
- glVertex2f(x + 3, y + 3);
- glVertex2f(x + 3, y + 15);
- glVertex2f(x + 3 + 250, y + 15);
- glVertex2f(x + 3 + 250, y + 3);
- glEnd;
- glColor3f(0.8, 0.2, 0.2);
- glBegin(GL_QUADS);
- glColor3f(0.9, 0, 0); glVertex2f(x + 3, y + 3);
- glColor3f(0.8, 0.3, 0.3); glVertex2f(x + 3, y + 15);
- glColor3f(0.8, 0.3, 0.3); glVertex2f(x + 3 + timeline, y + 15);
- glColor3f(0.9, 0, 0); glVertex2f(x + 3 + timeline, y + 3);
- glEnd;
- end;
- glDisable(GL_TEXTURE_2D);
- end;
-
- // Names, Timer
- if (TimeToNextChange <= 9) then
- begin display := PChar(TeamPlayer[Index,NextSinger[Index]]);
- glColor4f(0.8, 0.1, 0.2, 1);
-// KMS aka Mischi:
-// try to replace the use of the unit USDXStrUtils
-// original:
-// MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX+85, PlayerInfo.Playerinfo[Index].PosY+10, CreateStr(PChar(IntToStr(Trunc(TimeToNextChange)))));
-// replacement: Is this correct?
- TimeString := PChar(IntToStr(Trunc(TimeToNextChange)));
- MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX+85, PlayerInfo.Playerinfo[Index].PosY+10, TimeString);
- end;
- glColor4f(0.8, 0.8, 0.8, 1);
- if (CurSentence = 0) then
- display := PChar(TeamPlayer[Index,CurSinger[Index]]);
- if (TimeToNextChange <= 11) or (start) then
- MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX+5, PlayerInfo.Playerinfo[Index].PosY+10, display);
- end;
- if (CurSentence = ChangeOnSentence) then
- begin
- ChangeOnSentence := CurSentence + 7;
- firsttime := true;
- end;
- Result := true;
-end;
-
-// is executed on finish, returns the player number of the winner
-function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
- Index: integer;
- MaxScore: word;
-begin
- Result := 0;
- MaxScore := 0;
- for Index := 0 to PlayerInfo.NumPlayers-1 do
- begin
- PlayerInfo.Playerinfo[Index].Percentage := PlayerInfo.Playerinfo[Index].Score div 9999;
- if (PlayerInfo.Playerinfo[Index].Score > MaxScore) then
- begin
- MaxScore := PlayerInfo.Playerinfo[Index].Score;
- case Index of
- 0: Result := 1;
- 1: Result := 2;
- 2: Result := 4;
- 3: Result := 8;
- 4: Result := 16;
- 5: Result := 32;
- end;
- end
- else if (PlayerInfo.Playerinfo[Index].Score = MaxScore) and (PlayerInfo.Playerinfo[Index].Score <> 0) then
- begin
- case Index of
- 0: Result := Result or 1;
- 1: Result := Result or 2;
- 2: Result := Result or 4;
- 3: Result := Result or 8;
- 4: Result := Result or 16;
- 5: Result := Result or 32;
- end;
- end;
- end;
-
- // When nobody has points -> everybody looses
- if (MaxScore = 0) then
- Result := 0;
-end;
-
-exports
- PluginInfo,
- Init,
- Draw,
- Finish;
-
-begin
-
-end.
-
-