-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* git add --renormalize . * Mark migrations as generated code * Fix mismatch between .gitattributes and .editorconfig * Fix double-spaces in code * Correct some indentation * Fix multiline collection/object inits w/ multiple per line * Enforce spaces between params and attributes * Enforce no space in target-typed `new(` * Enforce space in `if (`/`switch (` * Enforce braces on conditional * Enforce `switch` expression brace on next line * Remove pointless space after final argument * The linter wants this IDK * Fix commented `namespace` statement * Document `dotnet format` and some additional de facto rules
- Loading branch information
Showing
41 changed files
with
674 additions
and
611 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
* text=auto | ||
# per .editorconfig, C# source files should use \r\n (and VB but who cares) | ||
*.cs text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
*.user | ||
.vs/** | ||
.idea/** | ||
**/bin/** | ||
**/obj/** | ||
**/Release/** | ||
**/Debug/** | ||
**/packages/** | ||
*.g.cs | ||
TASVideos/CommonAssemblyInfo.cs | ||
packages-microsoft-prod.deb | ||
TASVideos/Properties/serviceDependencies.json | ||
TASVideos/Properties/serviceDependencies.local.json | ||
TASVideos.sln.personal.DotSettings | ||
TASVideos.Data/SampleData/SampleData-MsSql.sql | ||
TASVideos.Data/SampleData/SampleData-Postgres.sql | ||
TASVideos/logs/ | ||
TASVideos/nohup.out | ||
*.user | ||
.vs/** | ||
.idea/** | ||
**/bin/** | ||
**/obj/** | ||
**/Release/** | ||
**/Debug/** | ||
**/packages/** | ||
*.g.cs | ||
TASVideos/CommonAssemblyInfo.cs | ||
packages-microsoft-prod.deb | ||
TASVideos/Properties/serviceDependencies.json | ||
TASVideos/Properties/serviceDependencies.local.json | ||
TASVideos.sln.personal.DotSettings | ||
TASVideos.Data/SampleData/SampleData-MsSql.sql | ||
TASVideos.Data/SampleData/SampleData-Postgres.sql | ||
TASVideos/logs/ | ||
TASVideos/nohup.out | ||
TASVideos/tasvideos.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"editor.insertSpaces": false, | ||
"editor.detectIndentation": false | ||
{ | ||
"editor.insertSpaces": false, | ||
"editor.detectIndentation": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/TASVideos/TASVideos.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "build_forumengine", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/TASVideos.ForumEngineTempTest/TASVideos.ForumEngineTempTest.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "build_wikiengine", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/TASVideos.WikiEngineTest/TASVideos.WikiEngineTest.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
} | ||
] | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/TASVideos/TASVideos.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "build_forumengine", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/TASVideos.ForumEngineTempTest/TASVideos.ForumEngineTempTest.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "build_wikiengine", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/TASVideos.WikiEngineTest/TASVideos.WikiEngineTest.csproj" | ||
], | ||
"problemMatcher": "$msCompile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
<add key="Custom Packages" value="custompackages" /> | ||
</packageSources> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
<add key="Custom Packages" value="custompackages" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
namespace TASVideos.MovieParsers.Parsers; | ||
|
||
[FileExtension("ctm")] | ||
internal class Ctm : Parser, IParser | ||
{ | ||
private const decimal FrameRate = 268111856.0M / 4481136.0M; // https://github.com/citra-emu/citra/blob/a2f34ea82b5a31a7e842d0099921b85b8bce403f/src/core/hw/gpu.h#L27 | ||
private const int InputRate = 234; // Rate at which inputs are polled per second | ||
|
||
public async Task<IParseResult> Parse(Stream file, long length) | ||
{ | ||
var result = new SuccessResult(FileExtension) | ||
{ | ||
Region = RegionType.Ntsc, | ||
SystemCode = SystemCodes.N3ds | ||
}; | ||
|
||
using var br = new BinaryReader(file); | ||
var header = new string(br.ReadChars(4)); | ||
if (header != "CTM\x1b") | ||
{ | ||
return InvalidFormat(); | ||
} | ||
|
||
br.ReadUInt64(); // Title ID | ||
br.ReadBytes(20); // Git hash of Citra revision | ||
br.ReadUInt64(); // Init time of system clock | ||
br.ReadUInt64(); // Movie ID | ||
br.ReadChars(32); // Author | ||
result.RerecordCount = br.ReadInt32(); | ||
result.Frames = (int)Math.Ceiling((decimal)br.ReadUInt64() / InputRate * FrameRate); | ||
|
||
return await Task.FromResult(result); | ||
} | ||
} | ||
namespace TASVideos.MovieParsers.Parsers; | ||
|
||
[FileExtension("ctm")] | ||
internal class Ctm : Parser, IParser | ||
{ | ||
private const decimal FrameRate = 268111856.0M / 4481136.0M; // https://github.com/citra-emu/citra/blob/a2f34ea82b5a31a7e842d0099921b85b8bce403f/src/core/hw/gpu.h#L27 | ||
private const int InputRate = 234; // Rate at which inputs are polled per second | ||
|
||
public async Task<IParseResult> Parse(Stream file, long length) | ||
{ | ||
var result = new SuccessResult(FileExtension) | ||
{ | ||
Region = RegionType.Ntsc, | ||
SystemCode = SystemCodes.N3ds | ||
}; | ||
|
||
using var br = new BinaryReader(file); | ||
var header = new string(br.ReadChars(4)); | ||
if (header != "CTM\x1b") | ||
{ | ||
return InvalidFormat(); | ||
} | ||
|
||
br.ReadUInt64(); // Title ID | ||
br.ReadBytes(20); // Git hash of Citra revision | ||
br.ReadUInt64(); // Init time of system clock | ||
br.ReadUInt64(); // Movie ID | ||
br.ReadChars(32); // Author | ||
result.RerecordCount = br.ReadInt32(); | ||
result.Frames = (int)Math.Ceiling((decimal)br.ReadUInt64() / InputRate * FrameRate); | ||
|
||
return await Task.FromResult(result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.