Commit 9c5b4f57 authored by The Old Nut Man's avatar The Old Nut Man

Added submodules.

parents
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
\ No newline at end of file
[submodule "Submodules/Eavesdrop"]
path = Submodules/Eavesdrop
url = https://github.com/ArachisH/Eavesdrop
[submodule "Submodules/Flazzy"]
path = Submodules/Flazzy
url = https://github.com/ArachisH/Flazzy
# Tanji
Application for manipulating data between the Habbo Hotel client, and the server.
## Minimum Requirements
* [.NET Framework 4.5](https://www.microsoft.com/en-us/download/details.aspx?id=30653)+
## Capabilities
* Outgoing/Incoming data logging.
* Inject data to the client, or server.
* Block/Replace data being sent, or recieved.
* Create extensions that can extend the functionality of the application.
\ No newline at end of file
Subproject commit 98fc1d5219e1d76f6960b604366e3944e5154954
Subproject commit dcda5a69de0f4ee410b512c154f9fd6308546519
using System.ComponentModel;
using Tangine.Network.Protocol;
namespace Tangine.Controls
{
public class ScheduleTickEventArgs : CancelEventArgs
{
private readonly TanjiSchedulerView.HSchedule _schedule;
public int CurrentCycle { get; }
public int Cycles => _schedule.Cycles;
public double Interval
{
get { return _schedule.Interval; }
set { _schedule.Interval = value; }
}
public HPacket Packet
{
get { return _schedule.Packet; }
set { _schedule.Packet = value; }
}
public ScheduleTickEventArgs(TanjiSchedulerView.HSchedule schedule, int currentCycle)
{
_schedule = schedule;
CurrentCycle = currentCycle;
}
}
}
\ No newline at end of file
using System.Windows.Forms;
using Tangine.Habbo;
namespace Tangine.Controls
{
public class TileEventArgs : MouseEventArgs
{
public HPoint Tile { get; }
public TileEventArgs(HPoint tile, MouseButtons button, int clicks, int x, int y, int delta)
: base(button, clicks, x, y, delta)
{
Tile = tile;
}
}
}
\ No newline at end of file
using System;
using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
namespace Tangine.Controls
{
[DesignerCategory("Code")]
public class TanjiButton : Control, IButtonControl
{
private bool _isPressed;
private const int GRAD_HEIGHT = 10;
/// <summary>
/// Gets or sets a value that is returned to the parent form when the button is clicked.
/// </summary>
[DefaultValue(DialogResult.None)]
public DialogResult DialogResult { get; set; }
[Browsable(false)]
public override Color BackColor
{
get { return base.BackColor; }
set { base.BackColor = value; }
}
[Browsable(false)]
public override Color ForeColor
{
get { return base.ForeColor; }
set { base.ForeColor = value; }
}
[Browsable(false)]
public override Image BackgroundImage
{
get { return base.BackgroundImage; }
set { base.BackgroundImage = value; }
}
[Browsable(false)]
public override ImageLayout BackgroundImageLayout
{
get { return base.BackgroundImageLayout; }
set { base.BackgroundImageLayout = value; }
}
[SettingsBindable(true)]
[Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public override string Text
{
get { return base.Text; }
set { base.Text = value; Invalidate(); }
}
[Localizable(true)]
[DefaultValue(typeof(Size), "100, 20")]
new public Size Size
{
get { return base.Size; }
set { base.Size = value; }
}
private Color _skin = Color.SteelBlue;
[DefaultValue(typeof(Color), "SteelBlue")]
public Color Skin
{
get { return _skin; }
set { _skin = value; Invalidate(); }
}
public TanjiButton()
{
SetStyle((ControlStyles)2050, true);
DoubleBuffered = true;
Size = new Size(100, 20);
BackColor = Color.Transparent;
}
public void PerformClick()
{
if (Enabled)
{
Focus();
base.OnClick(EventArgs.Empty);
}
}
public void NotifyDefault(bool value)
{
Invalidate();
}
protected override void OnClick(EventArgs e)
{ }
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.Clear(Enabled ?
Skin : SystemColors.Control);
using (var pen = new Pen(Color.FromArgb(50, Color.Black)))
{
e.Graphics.DrawRectangle(pen, ClientRectangle.X, ClientRectangle.Y,
ClientRectangle.Width - 1, ClientRectangle.Height - 1);
}
using (var format = new StringFormat())
{
format.Alignment = StringAlignment.Center;
format.LineAlignment = StringAlignment.Center;
if (Enabled)
{
int textOffset = 0;
var clickShadow = Color.FromArgb(25, Color.Black);
var textShadow = Color.FromArgb(_isPressed ? 150 : 100, Color.Black);
if (_isPressed)
{
textOffset++;
var r1 = new Rectangle(0, 0, Width, GRAD_HEIGHT);
using (var clickShadowGradient = new LinearGradientBrush(r1, clickShadow, Color.Transparent, 90))
e.Graphics.FillRectangle(clickShadowGradient, r1);
var r2 = new Rectangle(0, Height - GRAD_HEIGHT, Width, GRAD_HEIGHT);
using (var clickShadowGradient = new LinearGradientBrush(r2, clickShadow, Color.Transparent, 270))
e.Graphics.FillRectangle(clickShadowGradient, r2);
}
using (var textShadowBrush = new SolidBrush(textShadow))
{
e.Graphics.DrawString(Text, Font, textShadowBrush,
new Rectangle(textOffset + 1, textOffset + 1, Width, Height), format);
}
e.Graphics.DrawString(Text, Font, Brushes.White,
new Rectangle(textOffset, textOffset, Width, Height), format);
}
else
{
using (var solidBrush = new SolidBrush(Color.FromArgb(150, Color.Black)))
{
e.Graphics.DrawString(Text, Font, solidBrush,
new Rectangle(0, 0, Width, Height), format);
}
}
}
base.OnPaint(e);
}
protected override void OnMouseUp(MouseEventArgs e)
{
bool isLeft = (e.Button == MouseButtons.Left);
if (isLeft)
{
_isPressed = false;
Focus();
Invalidate();
}
base.OnMouseUp(e);
if (isLeft &&
ClientRectangle.Contains(e.Location))
{
base.OnClick(e);
}
}
protected override void OnMouseDown(MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
_isPressed = true;
Focus();
Invalidate();
}
base.OnMouseDown(e);
}
}
}
\ No newline at end of file
using System;
using System.Windows.Forms;
using System.ComponentModel;
using System.Collections.Generic;
using Tangine.Network.Protocol;
namespace Tangine.Controls
{
[DesignerCategory("Code")]
public class TanjiConstructView : TanjiListView
{
private HPacket _cachedPacket;
private readonly List<object> _valuesWritten;
public IReadOnlyList<object> ValuesWritten { get; }
public TanjiConstructView()
{
_valuesWritten = new List<object>();
ValuesWritten = _valuesWritten.AsReadOnly();
}
public void WriteInteger(int value)
{
WriteInteger(value, 1);
}
public void WriteInteger(int value, int amount)
{
WriteValue("Integer", value,
HEncoding.BigEndian.GetBytes(value), amount);
}
public void WriteBoolean(bool value)
{
WriteBoolean(value, 1);
}
public void WriteBoolean(bool value, int amount)
{
WriteValue("Boolean", value,
HEncoding.BigEndian.GetBytes(value), amount);
}
public void WriteString(string value)
{
WriteString(value, 1);
}