This repository has been archived by the owner on Feb 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added UI Dropdowns and migrated to custom SDL bindings
- Loading branch information
Showing
25 changed files
with
11,616 additions
and
15 deletions.
There are no files selected for viewing
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,5 +1,6 @@ | ||
/[Bb]in/ | ||
/[Oo]bj/ | ||
/[Ll]ib/ | ||
/.vs/ | ||
/.vscode/ | ||
*.gba | ||
|
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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bin/ | ||
obj/ | ||
*.pidb | ||
*.userprefs | ||
*.suo |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* SDL2# - C# Wrapper for SDL2 | ||
* | ||
* Copyright (c) 2013-2024 Ethan Lee. | ||
* | ||
* This software is provided 'as-is', without any express or implied warranty. | ||
* In no event will the authors be held liable for any damages arising from | ||
* the use of this software. | ||
* | ||
* Permission is granted to anyone to use this software for any purpose, | ||
* including commercial applications, and to alter it and redistribute it | ||
* freely, subject to the following restrictions: | ||
* | ||
* 1. The origin of this software must not be misrepresented; you must not | ||
* claim that you wrote the original software. If you use this software in a | ||
* product, an acknowledgment in the product documentation would be | ||
* appreciated but is not required. | ||
* | ||
* 2. Altered source versions must be plainly marked as such, and must not be | ||
* misrepresented as being the original software. | ||
* | ||
* 3. This notice may not be removed or altered from any source distribution. | ||
* | ||
* Ethan "flibitijibibo" Lee <[email protected]> | ||
* | ||
*/ |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Makefile for SDL2# | ||
# Written by Ethan "flibitijibibo" Lee | ||
|
||
# Source Lists | ||
SRC = \ | ||
src/SDL2.cs \ | ||
src/SDL2_gfx.cs \ | ||
src/SDL2_image.cs \ | ||
src/SDL2_mixer.cs \ | ||
src/SDL2_ttf.cs | ||
|
||
# Targets | ||
|
||
debug: clean-debug | ||
mkdir -p bin/Debug | ||
cp app.config bin/Debug/SDL2-CS.dll.config | ||
mcs /unsafe -debug -out:bin/Debug/SDL2-CS.dll -target:library $(SRC) | ||
|
||
clean-debug: | ||
rm -rf bin/Debug | ||
|
||
release: clean-release | ||
mkdir -p bin/Release | ||
cp app.config bin/Release/SDL2-CS.dll.config | ||
mcs /unsafe -optimize -out:bin/Release/SDL2-CS.dll -target:library $(SRC) | ||
|
||
clean-release: | ||
rm -rf bin/Release | ||
|
||
clean: clean-debug clean-release | ||
rm -rf bin | ||
|
||
all: debug release |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
This is SDL2#, a C# wrapper for SDL2. | ||
|
||
Project Website: https://github.com/flibitijibibo/SDL2-CS | ||
|
||
License | ||
------- | ||
SDL2 and SDL2# are released under the zlib license. See LICENSE for details. | ||
|
||
About SDL2 | ||
---------- | ||
For more information about SDL2, visit the SDL wiki: | ||
|
||
http://wiki.libsdl.org/moin.fcg/FrontPage | ||
|
||
About the C# Wrapper | ||
-------------------- | ||
The C# wrapper was written to be used for FNA's platform support. However, this | ||
is written in a way that can be used for any general C# application. | ||
|
||
The wrapper provides bindings for the following libraries: | ||
- SDL2 | ||
- SDL2_gfx | ||
- SDL2_image | ||
- SDL2_mixer | ||
- SDL2_ttf | ||
|
||
Note that SDL2# will not provide every single SDL2 function. This is due to | ||
limitations in the C# language that would cause major conflicts with the native | ||
SDL2 library and its extensions. | ||
|
||
SDL2# is a pure port of the C headers. The naming schemes for this library will | ||
be exactly as they are done in the C library, with little-to-no concern for | ||
"appropriate" C# style. The namespace indicates that this is SDL2, the class | ||
names will indicate which library file the function/type/value exists in, and | ||
everything else will be as close to the C version as technically possible. | ||
|
||
About the Visual Studio Debugger | ||
-------------------------------- | ||
When running C# applications under the Visual Studio debugger, native code that | ||
names threads with the 0x406D1388 exception will silently exit. To prevent this | ||
exception from being thrown by SDL, add this line before your SDL_Init call: | ||
|
||
SDL.SDL_SetHint(SDL.SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1"); |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>net8.0</TargetFrameworks> | ||
<Platforms>x64</Platforms> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<EnableDefaultItems>false</EnableDefaultItems> | ||
<AssemblyName>SDL2-CS</AssemblyName> | ||
<RootNamespace>SDL2</RootNamespace> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<IsTrimmable>true</IsTrimmable> | ||
<EnableAOTAnalyzer>true</EnableAOTAnalyzer> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SDLSettingsPropsFilePath>$(SolutionDir)SDL2-CS.Settings.props</SDLSettingsPropsFilePath> | ||
</PropertyGroup> | ||
<Import Project="$(SDLSettingsPropsFilePath)" Condition="Exists('$(SDLSettingsPropsFilePath)')" /> | ||
<Target Name="ValidatePropsFilePath" BeforeTargets="BeforeBuild"> | ||
<Message Importance="High" Text="No property overrides found at '$(SDLSettingsPropsFilePath)'" Condition="!Exists('$(SDLSettingsPropsFilePath)')" /> | ||
<Message Importance="High" Text="Loaded property overrides from '$(SDLSettingsPropsFilePath)'" Condition="Exists('$(SDLSettingsPropsFilePath)')" /> | ||
</Target> | ||
<ItemGroup> | ||
<Compile Include="src\SDL2.cs" /> | ||
<Compile Include="src\SDL2_gfx.cs" /> | ||
<Compile Include="src\SDL2_image.cs" /> | ||
<Compile Include="src\SDL2_mixer.cs" /> | ||
<Compile Include="src\SDL2_ttf.cs" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.