Initial commit

This commit is contained in:
2021-04-10 14:08:20 +02:00
parent 3d7e2b3143
commit 11ebd8db64
140 changed files with 1313 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Text;
using XVector3 = Microsoft.Xna.Framework.Vector3;
using System.Numerics;
using SynthySound;
namespace EvilSatellites
{
public class AudioAsset
{
private List<ISoundEffect3D> _SoundList { get; set; }
private string _Path;
private Synthy _Engine;
private Vector3 _Position;
public Vector3 Position
{
get
{
return _Position;
}
set
{
_Position = value;
foreach (var sound in _SoundList)
{
sound.Position = value;
}
}
}
private Random rnd;
private int _Min;
private int _Max;
public AudioAsset(Synthy engine, string path, int min, int max)
{
_SoundList = new List<ISoundEffect3D>();
_Engine = engine;
_Path = path;
_Max = max;
_Min = min;
rnd = new Random();
LoadAssets();
}
private void LoadAssets()
{
for (var i = _Min; i <= _Max; i++)
{
Console.WriteLine(_Path + "/" + i.ToString() + ".wav");
_SoundList.Add(_Engine.Load3D(_Path + "/" + i.ToString() + ".wav"));
}
}
public void Play()
{
var index = rnd.Next(_SoundList.Count);
_SoundList[index].Reset();
_SoundList[index].Play();
}
public void AddEffect(IEffect effect)
{
foreach (var sound in _SoundList)
{
sound.ConnectToEffect(effect);
}
}
public void RemoveEffect(IEffect effect)
{
foreach (var sound in _SoundList)
{
sound.DisconnectFromEffect(effect);
}
}
public void Dispose()
{
foreach (var sound in _SoundList)
{
sound.Destroy();
}
}
}
}
+15
View File
@@ -0,0 +1,15 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:DesktopGL
/config:
/profile:Reach
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#
+41
View File
@@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Remove="Icon.ico" />
<None Remove="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icon.ico" />
<EmbeddedResource Include="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup>
<ItemGroup>
<TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
</ItemGroup>
<ItemGroup>
<Reference Include="CppSharp.Runtime">
<HintPath>..\..\Synthizer\Synthy\bin\Debug\netstandard2.1\CppSharp.Runtime.dll</HintPath>
</Reference>
<Reference Include="Synthizer.Net">
<HintPath>..\..\Synthizer\Synthy\bin\Debug\netstandard2.1\Synthizer.Net.dll</HintPath>
</Reference>
<Reference Include="Synthy">
<HintPath>..\..\Synthizer\Synthy\bin\Debug\netstandard2.1\Synthy.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
+56
View File
@@ -0,0 +1,56 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using SynthySound;
namespace EvilSatellites
{
public class Game1 : Game
{
private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;
private ScreenManager _manager;
public Game1()
{
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
_manager = new ScreenManager(this);
Components.Add(_manager);
}
protected override void Initialize()
{
// TODO: Add your initialization logic here
_manager.AddScreen(new EvilSatellites.Screens.GameScreen());
base.Initialize();
}
protected override void LoadContent()
{
_spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
}
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
_manager.Update(gameTime);
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
base.Draw(gameTime);
}
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
namespace EvilSatellites
{
public interface IScreen
{
public void Activate();
public void Deactivate();
public void Update(GameTime gameTime);
public void HandleInput(GameTime gameTime, KeyboardState inputs);
ScreenManager Manager { get; set; }
ScreenState State { get; set; }
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

@@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
namespace EvilSatellites.Objects
{
public abstract class AbstractGameObject : IGameObject
{
private Vector3 _Position;
public Vector3 Position
{
get => _Position;
set => _Position = value;
}
private Vector3 _Orientation;
public Vector3 Orientation
{
get => _Orientation;
set => _Orientation = value;
}
public float Theta { get; set; }
private Matrix _Rotation;
public Matrix Rotation
{
get => _Rotation;
set => _Rotation = value;
}
public IScreen Screen;
public ObjectType Type { get; set; }
public AbstractGameObject(IScreen screen)
{
Screen = screen;
Type = ObjectType.Generic;
}
public void RotateX(float angle)
{
Matrix rotate = Matrix.CreateFromAxisAngle(_Rotation.Right, angle);
_Rotation *= rotate;
Orientation = _Rotation.Forward;
}
public void RotateY(float angle)
{
Matrix rotate = Matrix.CreateFromAxisAngle(_Rotation.Up, angle);
_Rotation *= rotate;
Orientation = _Rotation.Forward;
}
public void RotateZ(float angle)
{
Matrix rotate = Matrix.CreateFromAxisAngle(_Rotation.Forward, angle);
_Rotation *= rotate;
Orientation = _Rotation.Forward;
}
public void Pitch(Single pitch)
{
Matrix rotate = Matrix.CreateFromYawPitchRoll(0, pitch, 0);
_Rotation *= rotate;
Orientation = _Rotation.Forward;
}
public void Move(Vector3 pose)
{
var move = Vector3.Transform(pose, _Rotation);
// move.Normalize();
_Position += move;
}
public abstract void Update(GameTime gameTime);
public abstract void Activate();
public abstract void Destroy();
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
namespace EvilSatellites.Objects
{
public interface IGameObject
{
void Activate();
void Destroy();
Vector3 Position { get; set; }
Vector3 Orientation { get; set; }
float Theta { get; set; }
Matrix Rotation { get; set; }
void Update(GameTime gameTime);
ObjectType Type { get; set; }
void Move(Vector3 pose);
}
}
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace EvilSatellites.Objects
{
public enum ObjectType
{
Generic,
Player
}
}
+35
View File
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
namespace EvilSatellites.Objects
{
public class Player : AbstractGameObject
{
private Vector3 _PrevPos;
public Player(IScreen screen): base(screen)
{
Type = ObjectType.Player;
Position = new Vector3(10, 0, 0);
Rotation = Matrix.Identity;
Orientation = Rotation.Forward;
Activate();
}
override public void Activate()
{
return;
}
public override void Destroy()
{
return;
}
override public void Update(GameTime gameTime)
{
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using SynthySound;
namespace EvilSatellites.Objects
{
class SynthyProp : AbstractGameObject
{
private ISoundEffect3D Sound;
public SynthyProp(IScreen screen, Vector3 pos): base(screen)
{
Sound = Screen.Manager.Sound.Load3D(@"sfx/ambience/water1.wav");
Sound.Loop = true;
Position = pos;
Sound.Position = new System.Numerics.Vector3(pos.X, pos.Y, pos.Z);
Sound.ConnectToEffect(Screen.Manager.EnvironmentEffect);
Activate();
}
public override void Activate()
{
Sound.Play();
}
public override void Destroy()
{
Sound.Destroy();
}
override public void Update(GameTime gameTime)
{
Sound.Position = new System.Numerics.Vector3(Position.X, Position.Y, Position.Z);
}
}
}
+14
View File
@@ -0,0 +1,14 @@
using System;
namespace EvilSatellites
{
public static class Program
{
[STAThread]
static void Main()
{
using (var game = new Game1())
game.Run();
}
}
}
+10
View File
@@ -0,0 +1,10 @@
using System.Numerics;
namespace EvilSatellites.Quadtree
{
public interface Positional
{
Vector3 Position { get; }
Vector3 Dimensions { get; }
}
}
+40
View File
@@ -0,0 +1,40 @@
using System.Collections.Generic;
using System.Numerics;
namespace EvilSatellites.Quadtree
{
public class Quadtree<T> where T : Positional
{
public Vector3 Dimensions { get; set; }
public int MaxLevels;
public int MaxObjects;
public QuadtreeNode<T> Root;
public Quadtree(Vector3 dimensions, int maxLevels, int maxObjects)
{
Dimensions = dimensions;
this.MaxLevels = maxLevels;
this.MaxObjects = maxObjects;
this.Root = new QuadtreeNode<T>(new Vector3(0, 0, 0), Dimensions, MaxLevels, MaxObjects, 0);
}
public void Add(T obj)
{
Root.Add(obj);
}
public void Clear()
{
this.Root = new QuadtreeNode<T>(new Vector3(0, 0, 0), Dimensions, MaxLevels, MaxObjects, 0);
}
public List<T> Find(Vector3 Position, Vector3 dimensions)
{
return Root.Find(Position, dimensions);
}
public List<T> Find(Vector3 Position)
{
return Root.Find(Position, new Vector3(1, 1, 1));
}
}
}
+309
View File
@@ -0,0 +1,309 @@
using System;
using System.Collections.Generic;
using System.Numerics;
namespace EvilSatellites.Quadtree
{
public class QuadtreeNode<T> where T : Positional
{
public enum Direction
{
UpperTopLeft,
UpperTopRight,
UpperBottomLeft,
UpperBottomRight,
LowerTopLeft,
LowerTopRight,
LowerBottomLeft,
LowerBottomRight,
Here
}
public List<T> Objects;
public List<QuadtreeNode<T>> Nodes;
public Vector3 Position;
public Vector3 Dimensions;
public int CurrentLevel;
public int MaxObjects;
public int MaxLevels;
public QuadtreeNode(Vector3 position, Vector3 dimensions, int maxLevels, int maxObjects, int currentLevel)
{
this.Position = position;
this.Dimensions = dimensions;
Objects = new List<T>();
Nodes = new List<QuadtreeNode<T>>();
this.CurrentLevel = currentLevel;
this.MaxLevels = maxLevels;
this.MaxObjects = maxObjects;
}
public void Add(T obj)
{
if (Nodes.Count > 0)
{
var indecies = GetIndecies(obj.Position, obj.Dimensions);
foreach (var index in indecies)
{
if (Nodes[index].Intersects(obj.Position, obj.Dimensions))
{
Nodes[index].Add(obj);
}
}
return;
}
Objects.Add(obj);
if (Objects.Count > this.MaxObjects)
{
if (Nodes.Count > 0)
{
DistributeObjects();
}
else
{
Split();
}
}
}
private void Split()
{
if (CurrentLevel >= MaxLevels)
{
return;
}
var halfWidth = Dimensions.X / 2;
var halfHeight = Dimensions.Y / 2;
var halfDepth = Dimensions.Z / 2;
var upperTopLeft = new Vector3(Position.X, Position.Y + halfHeight, Position.Z+halfDepth);
var upperTopRight = new Vector3(Position.X + halfWidth, Position.Y + halfHeight, Position.Z + halfDepth);
var upperBottomLeft = new Vector3(Position.X, Position.Y, Position.Z + halfDepth);
var upperBottomRight = new Vector3(Position.X + halfWidth, Position.Y, Position.Z + halfDepth);
var lowerTopLeft = new Vector3(Position.X, Position.Y + halfHeight, Position.Z);
var lowerTopRight = new Vector3(Position.X + halfWidth, Position.Y + halfHeight, Position.Z);
var lowerBottomLeft = new Vector3(Position.X, Position.Y, Position.Z);
var lowerBottomRight = new Vector3(Position.X + halfWidth, Position.Y, Position.Z);
var upperTopLeftNode = new QuadtreeNode<T>(
upperTopLeft,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var upperTopRightNode = new QuadtreeNode<T>(
upperTopRight,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var upperBottomLeftNode = new QuadtreeNode<T>(
upperBottomLeft,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var upperBottomRightNode = new QuadtreeNode<T>(
upperBottomRight,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var lowerTopLeftNode = new QuadtreeNode<T>(
lowerTopLeft,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var lowerTopRightNode = new QuadtreeNode<T>(
lowerTopRight,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var lowerBottomLeftNode = new QuadtreeNode<T>(
lowerBottomLeft,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
var lowerBottomRightNode = new QuadtreeNode<T>(
lowerBottomRight,
Dimensions / 2,
MaxLevels,
MaxObjects,
CurrentLevel + 1
);
Nodes.Add(upperTopLeftNode);
Nodes.Add(upperTopRightNode);
Nodes.Add(upperBottomLeftNode);
Nodes.Add(upperBottomRightNode);
Nodes.Add(lowerTopLeftNode);
Nodes.Add(lowerTopRightNode);
Nodes.Add(lowerBottomLeftNode);
Nodes.Add(lowerBottomRightNode);
DistributeObjects();
}
private void DistributeObjects()
{
List<T> movedObjects = new List<T>();
for (var i = 0; i < Objects.Count; i++)
{
var indecies = GetIndecies(Objects[i].Position, Objects[i].Dimensions);
foreach (var index in indecies)
{
if (Nodes[index].Intersects(Objects[i].Position, Objects[i].Dimensions))
{
Nodes[index].Add(Objects[i]);
movedObjects.Add(Objects[i]);
}
}
}
foreach (var obj in movedObjects)
{
Objects.Remove(obj);
}
movedObjects.Clear();
}
public int GetIndex(Vector3 position)
{
if (Nodes.Count == 0)
{
return -1;
}
var halfwidth = Dimensions.X / 2;
var halfHeight = Dimensions.Y / 2;
var halfDepth = Dimensions.Z / 2;
var isTop = (position.Y > this.Position.Y + halfHeight);
var isRight = (position.X > this.Position.X + halfwidth);
var isUpper = (position.X > this.Position.X + halfwidth);
if (isUpper)
{
if (isTop)
{
if (isRight)
{
return 1;
}
else
{
return 0;
}
}
else
{
if (isRight)
{
return 3;
}
else
{
return 2;
}
}
}
else
{
if (isTop)
{
if (isRight)
{
return 5;
}
else
{
return 4;
}
}
else
{
if (isRight)
{
return 7;
}
else
{
return 6;
}
}
}
}
public List<int> GetIndecies(Vector3 position, Vector3 dimensions)
{
List<int> indecies = new List<int>();
for (var i = 0; i < Nodes.Count; i++)
{
if (Nodes[i].Intersects(position, dimensions)) indecies.Add(i);
}
return indecies;
}
public List<T> Find(Vector3 position, Vector3 dimensions)
{
var results = new List<T>();
if (!Intersects(position, dimensions))
{
return results;
}
var index = GetIndex(position);
if (index == -1)
{
return Objects;
}
if (!Nodes[index].Intersects(position, dimensions))
{
results.AddRange(Objects);
for (var i = 0; i < Nodes.Count; i++)
{
if (Nodes[i].Intersects(position, dimensions))
{
results.AddRange(Nodes[i].GetAllObjects());
}
}
}
else
{
results.AddRange(Nodes[index].Find(position, dimensions));
}
return results;
}
public bool Intersects(Vector3 position, Vector3 dimensions)
{
return (position.X <= (this.Position.X + this.Dimensions.X) && (position.X + dimensions.X) >= this.Position.X) && (position.Y <= (this.Position.Y + this.Dimensions.Y) && (position.Y + dimensions.Y) >= this.Position.Y) && (position.Z <= (this.Position.Z + this.Dimensions.Z) && (position.Z + dimensions.Z) >= this.Position.Z);
}
public bool Fits(Vector3 position, Vector3 dimensions)
{
return (
(position.X >= this.Position.X && position.X <= this.Position.X + this.Dimensions.X && position.Y >= this.Position.Y && position.Y <= this.Position.Y + this.Dimensions.Y) &&
(position.X + dimensions.X >= this.Position.X && position.X + dimensions.X <= this.Position.X + this.Dimensions.X && position.Y + dimensions.Y >= this.Position.Y && position.Y + dimensions.Y <= this.Position.Y + this.Dimensions.Y)
);
}
public List<T> GetAllObjects()
{
List<T> objs = new List<T>();
objs.AddRange(Objects);
if (Nodes.Count > 0)
{
for (var i = 0; i < Nodes.Count; i++)
{
objs.AddRange(Nodes[i].GetAllObjects());
}
}
return objs;
}
}
}
+72
View File
@@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using SynthySound;
using Microsoft.Xna.Framework.Audio;
namespace EvilSatellites
{
public class ScreenManager : DrawableGameComponent
{
private List<IScreen> _Screens;
private IScreen _CurrentScreen;
private Game _Game;
private bool _Running = false;
public Synthy Sound = new Synthy();
public FDNReverb EnvironmentEffect;
public AudioListener Listener = new AudioListener();
public ScreenManager(Game instance): base(instance)
{
EnvironmentEffect = Sound.CreateReverb();
EnvironmentEffect.Delay = 0.03;
EnvironmentEffect.Wet = 30;
EnvironmentEffect.T60 = 3.3;
EnvironmentEffect.Defusion = 1;
EnvironmentEffect.FreePath = 0.22;
_Game = instance;
_Screens = new List<IScreen>();
_CurrentScreen = null;
}
public override void Initialize()
{
_Running = true;
foreach (var screen in _Screens)
{
screen.Activate();
}
base.Initialize();
}
public void AddScreen(IScreen screen)
{
screen.Manager = this;
if (_Running) screen.Activate();
_Screens.Add(screen);
}
public void RemoveScreen(IScreen screen)
{
if (!_Screens.Contains(screen))
{
throw new Exception("Cannot remove a screen that isn't added to manager");
}
screen.Deactivate();
_Screens.Remove(screen);
}
public void Update(GameTime gameTime)
{
Sound.Update();
var input = Keyboard.GetState();
foreach (var screen in _Screens)
{
if (screen.State == ScreenState.Active) screen.HandleInput(gameTime, input);
screen.Update(gameTime);
}
base.Update(gameTime);
}
}
}
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace EvilSatellites
{
public enum ScreenState
{
Active,
Hidden
}
}
+57
View File
@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using SynthySound;
using System.Linq;
using EvilSatellites.Objects;
namespace EvilSatellites.Screens
{
public class GameScreen : IScreen
{
public ScreenManager Manager { get; set; }
public ScreenState State { get; set; }
public List<IGameObject> Objects = new List<IGameObject>();
private float Theta = 0;
public void Activate()
{
State = ScreenState.Active;
Player player = new Player(this);
Objects.Add(player);
return;
}
public void Deactivate()
{
State = ScreenState.Hidden;
return;
}
public void Update(GameTime gameTime)
{
foreach (var obj in Objects)
{
obj.Update(gameTime);
if (obj.Type == ObjectType.Player)
{
// obj.TranslateForward();
Manager.Sound.ListenerPosition = new System.Numerics.Vector3(obj.Position.X, obj.Position.Y, obj.Position.Z);
Manager.Sound.ListenerOrientationForward = System.Numerics.Vector3.Normalize(new System.Numerics.Vector3(obj.Rotation.Forward.X, obj.Rotation.Forward.Y, obj.Rotation.Forward.Z));
Manager.Sound.ListenerOrientationUpwards = System.Numerics.Vector3.Normalize(new System.Numerics.Vector3(obj.Rotation.Up.X, obj.Rotation.Up.Y, obj.Rotation.Up.Z));
Manager.Listener.Position = obj.Position;
Manager.Listener.Forward = obj.Rotation.Forward;
Manager.Listener.Up = obj.Rotation.Up;
// Console.WriteLine(Manager.Sound.ListenerOrientationForward);
// Console.WriteLine(Manager.Sound.ListenerOrientationUpwards);
}
}
return;
}
public void HandleInput(GameTime gameTime, KeyboardState inputs)
{
}
}
}
+75
View File
@@ -0,0 +1,75 @@
/**
* Product: Tolk
* File: Tolk.cs
* Description: .NET wrapper class (in C#).
* Copyright: (c) 2014, Davy Kager <mail@davykager.nl>
* License: LGPLv3
*/
using System;
using System.Runtime.InteropServices;
namespace DavyKager {
public sealed class Tolk {
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
private static extern void Tolk_Load();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_IsLoaded();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
private static extern void Tolk_Unload();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
private static extern void Tolk_TrySAPI(
[MarshalAs(UnmanagedType.I1)]bool trySAPI);
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
private static extern void Tolk_PreferSAPI(
[MarshalAs(UnmanagedType.I1)]bool preferSAPI);
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
private static extern IntPtr Tolk_DetectScreenReader();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_HasSpeech();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_HasBraille();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_Output(
[MarshalAs(UnmanagedType.LPWStr)]String str,
[MarshalAs(UnmanagedType.I1)]bool interrupt);
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_Speak(
[MarshalAs(UnmanagedType.LPWStr)]String str,
[MarshalAs(UnmanagedType.I1)]bool interrupt);
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_Braille(
[MarshalAs(UnmanagedType.LPWStr)]String str);
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_IsSpeaking();
[DllImport("Tolk.dll", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
private static extern bool Tolk_Silence();
// Prevent construction
private Tolk() {}
public static void Load() { Tolk_Load(); }
public static bool IsLoaded() { return Tolk_IsLoaded(); }
public static void Unload() { Tolk_Unload(); }
public static void TrySAPI(bool trySAPI) { Tolk_TrySAPI(trySAPI); }
public static void PreferSAPI(bool preferSAPI) { Tolk_PreferSAPI(preferSAPI); }
// Prevent the marshaller from freeing the unmanaged string
public static String DetectScreenReader() { return Marshal.PtrToStringUni(Tolk_DetectScreenReader()); }
public static bool HasSpeech() { return Tolk_HasSpeech(); }
public static bool HasBraille() { return Tolk_HasBraille(); }
public static bool Output(String str, bool interrupt = false) { return Tolk_Output(str, interrupt); }
public static bool Speak(String str, bool interrupt = false) { return Tolk_Speak(str, interrupt); }
public static bool Braille(String str) { return Tolk_Braille(str); }
public static bool IsSpeaking() { return Tolk_IsSpeaking(); }
public static bool Silence() { return Tolk_Silence(); }
}
}
+43
View File
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="EvilSatellites"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3b0d5e043ebed222700820ce1c55d9c17dca63818f3d1b5b1e2d1902329a9b7
size 1823142
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:108d766249e2f51f330b0284e575a1d64936414cad0e4446f1bdf30a72e5a730
size 2089826
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d47cb047800cfbd9189404b46991b7e2c5d1623a37cb1d235e34b5389d90cbd
size 2778404
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b77babc3153c25d827a353c6f8acccee57b562364dd33ddfbbaea4afba9ed83c
size 3146198
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21fe42fb9aef435fd94bfab29cb5792ad219231c28ab02a589e0d75cc453ef9a
size 430184
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5297bd23f5a4dfe62b10beb547652327ee3f7a29439c3996b73e223ffc3c250
size 442472
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e9878ae9f183394009ed4a6a5878b90ae598543e7b7224d2a21f36a5a500f71
size 460904
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cada75a6d88118b4f6c0e1dfc052b1b06725a0857b31579bc9055b95415a2fa6
size 409704
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c0d917fd4ca24e134971cd127c235f34e9c50d496355f142ab821388b396bd2
size 395368
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:985a5aaa3fd5b4f80e46790c3150cabcf51e0e2e247562bfe6e0c8d64408b077
size 424040
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:47a7e2649bd0513dd8a826d174d43aa2ab58f1bf3e04acb5eb312af699e6eb00
size 403560
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ac9aa00ee03ec73be6375ca2fa46ecdbd8185f9b63d4e05467d4cb7466c18dd
size 376434
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25cdd9401f3059b2851050a494c2718b495ef6d8c2626b84f1d29e97def593ad
size 407390
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e45bd6b6bd8eff497a9863c01849b112c02da735d46f15f52266cfa14f53ade8
size 415110
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64a559e9c6f2f4d5956a8e6a112307e44252419e819457e2748a5f0674ac466a
size 375742
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3411f05051f25c5dc772ec614dbc81dfb19ae59fdf63dfd6fa270c7d9f069532
size 356302
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5f0d2068aabda1451680aeb9d273da58a512c1aa079b1f1bbc3fcfc170682c87
size 392542
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4903561d4ab046f2c51f032b0114470a49602eeee4fc0abe39b368600be3dd8c
size 428570
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac884f3ce0ba07ded98cf14039e1f0fda8d316ed03d7d886b8f91733628bd90e
size 133132
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba3e5e7c9e4adcd0fa26c5aab2c0efdd0d92a6cba19c6b19a785cfd1e231a44d
size 136780
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9dcc26bc353473406a5ce1d152bf104a1b97dc4f776ed836eee3601f41737e86
size 112558
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6866924e3ce77bb73a8fe78300e7f88da22aab220fb856d82a0f2b063dab8f63
size 119506
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53b4150409ec140af2fa72ef99ac8615f11b63e35210b71ff02c8787011201eb
size 163972
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5295e17040ed2ecb7f5fb635b6f04b7c32b482e0f20ef0a6974d55d30270b6fb
size 258256
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ce5d862af7ce41f1e7f524d526eeb7a057752cff9d251dfeb996e883a01a15a
size 159700
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:463649735897c6d569f49c16120dab2ccb8c3ea76cfd3e106f4995e9c04f383e
size 182318
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef4df01030cec6911bea57abaa1640b6e9b2424ad4bf83ae617637563fa16711
size 194922
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c86f95b9949c69d9e44b9be77907874b7cd01828e4f9b6ca89d1526613a35752
size 136638
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba81baac2f16a5713539bc943f489dcc0177e5d6c7abf5a8fc54631e31e1721a
size 155694
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea56d4c7938807206e7a8b16735c78a68040b64516731755e279533c82de12d1
size 110674
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe5fbe9068b7ac7d5c869d1c0712f8001bc9c84cd5635c37c23b4c28b6f954e5
size 159958
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21478a92c07b037d7dc9c906f75dddc9953e98d46272cf5eeabfc5694b2eccbf
size 226634
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30f154c29ee01c7e2294c660a2736709ec088df715e0d5e68c90fa317f7fa2b8
size 245864
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3c595557f6dd08080a7e7f3595d5fece1e0bf7d57553f6ad552423746ff941bf
size 335976
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d964bd7051412c0901af58c8ea3782e6907c2e0294eaca37028620dfe645212c
size 286824
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f1c83dcb75dcb70eaab586c6e3acee452b5e4aadef80e06b189088f4b4d127f7
size 176232
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1be3e931b1529a0caa4aaf27d378a93ec03a57884f4bb16dcd5d7aa342730c20
size 176232
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b81d6ee3c61e33f527cf61a23dcdaa1fdfb2c4cfa086e4e1d789b8332b57462
size 329832
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:938528842f460b8ab3d4303fbacedc6d0906f4856f1ae962e8891cf0535ec467
size 327784
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eecd0d8694ed11b415a0f41d18a99f11e0ec1523b85678665024c8b04786bc48
size 212762
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d6eea592be801c4d6adcf55abaf7fbb0a11671a3c0cae4e5147d4ffdb708e2ea
size 299542
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2278def2f68dac34f77fc4c1e4246fc4796e50c8f664b86aa74293ff5b5bfdc
size 247750
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6debce92fda2d74e40f0c981541ae156e148b74733bf50263b51bab81e27e832
size 153978
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1718771fcc5d4593643f70567e5a340595d33c70d1e8ccc35bc72c5676975d70
size 149126
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de432f13581026c0052f91be9541da6c756e0013b6fa3f9426a7fea3b6b67c73
size 289214
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38e69ba396f02a96e8838b4ac5da5ffd861b48d917a45703636d95fe1d0a1709
size 191394
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2567de029eb287cfd777662d89cd5531cdf56248e6f0bfcdf8d8726e9821f0d5
size 490542
Binary file not shown.
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e9b293467138400fbafc19e183c6eb4cb4d03611287b9bf23b35adc227687656
size 172900
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3f4637aff4bbdd26d1ca41fa1b704263b37651d6fb4a77f3626c5ff08ac4fe46
size 232174
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f48f8136ab47a111b973ccf3ed73da21078e3f74ef3d603f2f2f60de96141572
size 288622
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ebdfdcb5cbf5ae1b0795834677ea4dbd81cd8a09b2a6cd85dbe23e1d401026ea
size 162802
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46ff473e285e54ee161c3ec06c875538942e8b20618f3bc661cdf3bc09dcb7cf
size 94946
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef1f76f324d04589b4bb1feeca156a9a14edb0bcaa27381c67a895b438166b16
size 140882
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71d4b0dd223f057255bc3414ed110736b680399d90fc33eb2d517dfb888b74fd
size 170690
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8c552aba8efff391a3f28325ac1ea091fab9e351c10adfc84a71acb840776747
size 180438
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25a2f90e69de29e0347a8eef796af6558e0ee6f93a9bb75d114d95a1468623e6
size 151142
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:337123c8d25333c158e719e809d2a934d884df4f8c047d02625e53d6a26230af
size 654142
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27bb2c5f1b6708c5987fbde107337e5830b2fc15f741c5373a28e2201b715b88
size 1051854
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d9900107ff88f63ee5e8d68ef1cf038f47dcdcae3e252bf9b95df695ad1fb955
size 12536
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:81f41d5e74d05d442d33844e18ae048abda911f846170511bbdac06d747a2bb2
size 40278
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42b59d004164a9851701bbc43435f6380caa28a6c5bda39dffbb6908215ba16d
size 24596
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d34d6dd7dddd80cfd4a20e0729644b5b4d76eb25177239d0600850ce75d30a9b
size 182148
Binary file not shown.
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:07cc958b1de51f624133aba86181fdcadde2fde9d12b0c16f7feac4bdf29fb94
size 8512
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:031fcd549601d22afcb4c661ec02a5244fad941ad181b62c73f2273268e5937b
size 21686
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:78e61118c6504226fefbdbf1f24c9ec4f5dc8d983ee520206fed0566e23c17f5
size 119526
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More