aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/plugins/Don't_Get_Worse
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
commit1ab628e8ad6c85c8f1b562f10480253ee3e622b7 (patch)
treed21621f68850ecd7762137e1c4387fa15731a811 /Lua/plugins/Don't_Get_Worse
parent6ec275387c320d3d9a8f5b6fe185687643565b8c (diff)
downloadusdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.gz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.xz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.zip
merged trunk into lua branch
plugin loading is disabled atm because of a bug reading the files (lua may be the reason). Reading the files in usdx and passing the contents to lua may solve this git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2019 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Lua/plugins/Don't_Get_Worse')
-rw-r--r--Lua/plugins/Don't_Get_Worse/Hold_The_Line.bdsproj175
-rw-r--r--Lua/plugins/Don't_Get_Worse/Hold_The_Line.dpr222
-rw-r--r--Lua/plugins/Don't_Get_Worse/Hold_The_Line.lpi108
3 files changed, 117 insertions, 388 deletions
diff --git a/Lua/plugins/Don't_Get_Worse/Hold_The_Line.bdsproj b/Lua/plugins/Don't_Get_Worse/Hold_The_Line.bdsproj
deleted file mode 100644
index 8694fb50..00000000
--- a/Lua/plugins/Don't_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/Lua/plugins/Don't_Get_Worse/Hold_The_Line.dpr b/Lua/plugins/Don't_Get_Worse/Hold_The_Line.dpr
index 3ce06463..a7828f8e 100644
--- a/Lua/plugins/Don't_Get_Worse/Hold_The_Line.dpr
+++ b/Lua/plugins/Don't_Get_Worse/Hold_The_Line.dpr
@@ -5,67 +5,74 @@ library Hold_The_Line;
{$ENDIF}
uses
- ModiSDK in '..\SDK\ModiSDK.pas',
- StrUtils in '..\SDK\StrUtils.pas',
- sdl in '..\..\src\lib\JEDI-SDL\SDL\Pas\sdl.pas',
- moduleloader in '..\..\src\lib\JEDI-SDL\SDL\Pas\moduleloader.pas',
- gl in '..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas';
+ 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;
-
-//Gave the Plugins Info
-procedure PluginInfo (var Info: TPluginInfo); stdcall;
+ 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.Name := 'PLUGIN_HDL_NAME';
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_HDL_DESC';
- //Set to Party Modi Plugin
- Info.Typ := 8;
+ // 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 Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
-
- Info.ShowRateBar:= True; //Whether the Bar that shows how good the player was sould be displayed
- Info.ShowRateBar_O := False; //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
+ // 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; stdcall;
+// 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
- I: Integer;
- Texname: PChar;
+ Index: integer;
+// Texname: PChar;
TexType: TTextureType;
begin
+{
TexName := CreateStr(PChar('HDL_Pointer'));
TexType := TEXTURE_TYPE_TRANSPARENT;
PointerTex := Methods.LoadTex(TexName, TexType);
@@ -75,50 +82,56 @@ begin
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;
+// Frame := 0;
MethodRec := Methods;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Enabled := True;
- PlayerInfo.Playerinfo[I].Percentage := 100;
- PlayerTimes[I] := 0;
+ PlayerInfo.Playerinfo[Index].Enabled := true;
+ PlayerInfo.Playerinfo[Index].Percentage := 100;
+ PlayerTimes[Index] := 0;
end;
- Result := True;
+ Result := true;
end;
-//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; stdcall;
+function Draw (var Playerinfo: TPlayerinfo;
+ const CurSentence: cardinal)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+const
+ SoundName : PChar = 'PARTY_DISMISSED';
var
- I: Integer;
- L: Byte;
- C: Byte;
- Text: PChar;
- Blink: Boolean;
- tick: Cardinal;
+ Index: integer;
+ L: byte;
+ C: byte;
+ Tick: cardinal;
begin
- //Aktivate Blink
- If (CurSentence = CountSentences div 5 * 2 - 1) OR (CurSentence = CountSentences div 3 * 2 - 1) then
+ // activate blink
+ if (CurSentence = CountSentences div 5 * 2 - 1) or (CurSentence = CountSentences div 3 * 2 - 1) then
begin
- Tick := SDL_GetTicks() div 400;
- If (Tick <> LastTick) then
+ Tick := round(TimeStampToMSecs(DateTimeToTimeStamp(Now))) div 400;
+ if (Tick <> LastTick) then
begin
LastTick := Tick;
- PointerVisible := Not PointerVisible;
+ PointerVisible := not PointerVisible;
end;
end
else
- PointerVisible := True;
+ PointerVisible := true;
- //Inc Limit
- if (Limit = 0) And (CurSentence >= CountSentences div 5 * 2) then
+ // 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
+ else if (Limit = 1) and (CurSentence >= CountSentences div 3 * 2) then
Inc(Limit);
case Limit of
@@ -129,22 +142,22 @@ begin
C:= 0;
- Result := True;
+ Result := true;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- if PlayerInfo.Playerinfo[I].Enabled then
+ if PlayerInfo.Playerinfo[Index].Enabled then
begin
- if PlayerInfo.Playerinfo[I].Bar < L then
+ if PlayerInfo.Playerinfo[Index].Bar < L then
begin
- PlayerInfo.Playerinfo[I].Enabled := False;
+ PlayerInfo.Playerinfo[Index].Enabled := false;
Inc(C);
- PlayerTimes[I] := CurSentence; //Save Time of Dismission
- //PlaySound
+ PlayerTimes[Index] := CurSentence; // Save Time of Dismission
+ // PlaySound
MethodRec.PlaySound (DismissedSound);
end;
- //Draw Pointer
+ // Draw pointer
if (PointerVisible) then
begin
glColor4f (0.2, 0.8, 0.1, 1);
@@ -156,10 +169,10 @@ begin
glBindTexture(GL_TEXTURE_2D, PointerTex.TexNum);
glBegin(GL_QUADS);
- glTexCoord2f(1/32, 0); glVertex2f(PlayerInfo.Playerinfo[I].PosX + L - 3, PlayerInfo.Playerinfo[I].PosY - 4);
- glTexCoord2f(1/32, 1); glVertex2f(PlayerInfo.Playerinfo[I].PosX + L - 3, PlayerInfo.Playerinfo[I].PosY + 12);
- glTexCoord2f(31/32, 1); glVertex2f(PlayerInfo.Playerinfo[I].PosX+ L + 3, PlayerInfo.Playerinfo[I].PosY + 12);
- glTexCoord2f(31/32, 0); glVertex2f(PlayerInfo.Playerinfo[I].PosX+ L + 3, PlayerInfo.Playerinfo[I].PosY - 4);
+ 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);
@@ -170,45 +183,44 @@ begin
else
begin
Inc(C);
- //Draw Dismissed
- Text := CreateStr(PChar('PARTY_DISMISSED'));
-
+ // Draw dismissed
glColor4f (0.8, 0.8, 0.8, 1);
-
- MethodRec.Print (1, 6, PlayerInfo.Playerinfo[I].PosX, PlayerInfo.Playerinfo[I].PosY-8, Text);
- FreeStr(Text);
+ MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY-8, SoundName);
end;
end;
if (C >= PlayerInfo.NumPlayers-1) then
- Result := False;
+ Result := false;
end;
-//Is Executed on Finish, Returns the Playernum of the Winner
-function Finish (var Playerinfo: TPlayerinfo): byte; stdcall;
+// is executed on finish, returns the player number of the winner
+function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I:Integer;
+ Index: integer;
begin
-Result := 0;
-for I := 0 to PlayerInfo.NumPlayers-1 do
+ Result := 0;
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Percentage := (PlayerTimes[I] * 100) div CountSentences;
- if (PlayerInfo.Playerinfo[I].Enabled) then
+ PlayerInfo.Playerinfo[Index].Percentage := (PlayerTimes[Index] * 100) div CountSentences;
+ if (PlayerInfo.Playerinfo[Index].Enabled) then
begin
- PlayerInfo.Playerinfo[I].Percentage := 100;
- 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;
+ 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;
+ PluginInfo,
+ Init,
+ Draw,
+ Finish;
begin
diff --git a/Lua/plugins/Don't_Get_Worse/Hold_The_Line.lpi b/Lua/plugins/Don't_Get_Worse/Hold_The_Line.lpi
deleted file mode 100644
index bb21d5d9..00000000
--- a/Lua/plugins/Don't_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>