Skip to content

Commit

Permalink
Sync with master
Browse files Browse the repository at this point in the history
  • Loading branch information
FraGag committed May 20, 2015
2 parents 2a62c74 + d806a87 commit afa3d88
Show file tree
Hide file tree
Showing 44 changed files with 2,617 additions and 2,351 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
@@ -0,0 +1,7 @@
*.asm text
*.txt text
*.xml text
*.cs text
*.ini text
*.bin binary

50 changes: 25 additions & 25 deletions SonLVL INI Files/Common/EggPrison.xml
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<ObjDef xmlns="http://www.sonicretro.org" Name="Egg Prison" Image="capsule">
<Images>
<ImageFromMappings id="capsule">
<ArtFile filename="../artnem/Prison Capsule.bin" />
<MapFile type="ASM" filename="../_maps/Prison Capsule.asm" frame="0" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="button">
<ArtFile filename="../artnem/Prison Capsule.bin" />
<MapFile type="ASM" filename="../_maps/Prison Capsule.asm" frame="1" startpal="0" />
</ImageFromMappings>
</Images>
<Subtypes>
<Subtype id="00" name="Capsule" image="capsule" />
<Subtype id="01" name="Button" image="button" />
</Subtypes>
<Properties>
<BitsProperty name="Type" type="EggPrisonType" startbit="0" length="1" />
</Properties>
<Enums>
<Enum name="EggPrisonType">
<EnumMember name="Capsule" />
<EnumMember name="Button" />
</Enum>
</Enums>
<?xml version="1.0" encoding="utf-8"?>
<ObjDef xmlns="http://www.sonicretro.org" Name="Egg Prison" Image="capsule">
<Images>
<ImageFromMappings id="capsule">
<ArtFile filename="../artnem/Prison Capsule.bin" />
<MapFile type="ASM" filename="../_maps/Prison Capsule.asm" frame="0" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="button">
<ArtFile filename="../artnem/Prison Capsule.bin" />
<MapFile type="ASM" filename="../_maps/Prison Capsule.asm" frame="1" startpal="0" />
</ImageFromMappings>
</Images>
<Subtypes>
<Subtype id="00" name="Capsule" image="capsule" />
<Subtype id="01" name="Button" image="button" />
</Subtypes>
<Properties>
<BitsProperty name="Type" type="EggPrisonType" startbit="0" length="1" />
</Properties>
<Enums>
<Enum name="EggPrisonType">
<EnumMember name="Capsule" />
<EnumMember name="Button" />
</Enum>
</Enums>
</ObjDef>
8 changes: 4 additions & 4 deletions SonLVL INI Files/Common/Invisible lava marker.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ObjDef xmlns="http://www.sonicretro.org" Name="Invisible lava marker" Image="img1" Debug="true">
<Images>
<ImageFromMappings id="img1">
<ArtFile filename=".../artnem/Monitors.bin" />
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="Binary" filename="Common/Invisible lava marker map.bin" frame="0" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="img2">
<ArtFile filename=".../artnem/Monitors.bin" />
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="Binary" filename="Common/Invisible lava marker map.bin" frame="1" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="img3">
<ArtFile filename=".../artnem/Monitors.bin" />
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="Binary" filename="Common/Invisible lava marker map.bin" frame="2" startpal="0" />
</ImageFromMappings>
</Images>
Expand Down
134 changes: 67 additions & 67 deletions SonLVL INI Files/Common/InvisibleBlock.cs
@@ -1,68 +1,68 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using SonicRetro.SonLVL.API;

namespace S1ObjectDefinitions.Common
{
class InvisibleBlock : ObjectDefinition
{
private Sprite img;

public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/Monitors.bin", CompressionType.Nemesis);
img = ObjectHelper.MapASMToBmp(artfile, "../_maps/Invisible Barriers.asm", 0, 0);
}

public override ReadOnlyCollection<byte> Subtypes
{
get { return new ReadOnlyCollection<byte>(new byte[] { 0 }); }
}

public override string Name
{
get { return "Invisible solid block"; }
}

public override bool RememberState
{
get { return true; }
}

public override string SubtypeName(byte subtype)
{
return ((subtype >> 4) + 1) + "x" + ((subtype & 0xF) + 1) + " blocks";
}

public override Sprite Image
{
get { return img; }
}

public override Sprite SubtypeImage(byte subtype)
{
return img;
}

public override Sprite GetSprite(ObjectEntry obj)
{
int w = ((obj.SubType >> 4) + 1) * 16;
int h = ((obj.SubType & 0xF) + 1) * 16;
BitmapBits bmp = new BitmapBits(w, h);
bmp.DrawRectangle(0x1C, 0, 0, w - 1, h - 1);
Sprite spr = new Sprite(new Sprite(bmp, new Point(-(w / 2), -(h / 2))), img);
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}

public override Rectangle GetBounds(ObjectEntry obj, Point camera)
{
int w = ((obj.SubType >> 4) + 1) * 16;
int h = ((obj.SubType & 0xF) + 1) * 16;
return new Rectangle(obj.X - (w / 2) - camera.X, obj.Y - (h / 2) - camera.Y, w, h);
}

public override bool Debug { get { return true; } }
}
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using SonicRetro.SonLVL.API;

namespace S1ObjectDefinitions.Common
{
class InvisibleBlock : ObjectDefinition
{
private Sprite img;

public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/Monitors.bin", CompressionType.Nemesis);
img = ObjectHelper.MapASMToBmp(artfile, "../_maps/Invisible Barriers.asm", 0, 0);
}

public override ReadOnlyCollection<byte> Subtypes
{
get { return new ReadOnlyCollection<byte>(new byte[] { 0 }); }
}

public override string Name
{
get { return "Invisible solid block"; }
}

public override bool RememberState
{
get { return true; }
}

public override string SubtypeName(byte subtype)
{
return ((subtype >> 4) + 1) + "x" + ((subtype & 0xF) + 1) + " blocks";
}

public override Sprite Image
{
get { return img; }
}

public override Sprite SubtypeImage(byte subtype)
{
return img;
}

public override Sprite GetSprite(ObjectEntry obj)
{
int w = ((obj.SubType >> 4) + 1) * 16;
int h = ((obj.SubType & 0xF) + 1) * 16;
BitmapBits bmp = new BitmapBits(w, h);
bmp.DrawRectangle(0x1C, 0, 0, w - 1, h - 1);
Sprite spr = new Sprite(new Sprite(bmp, new Point(-(w / 2), -(h / 2))), img);
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}

public override Rectangle GetBounds(ObjectEntry obj, Point camera)
{
int w = ((obj.SubType >> 4) + 1) * 16;
int h = ((obj.SubType & 0xF) + 1) * 16;
return new Rectangle(obj.X - (w / 2) - camera.X, obj.Y - (h / 2) - camera.Y, w, h);
}

public override bool Debug { get { return true; } }
}
}
154 changes: 77 additions & 77 deletions SonLVL INI Files/Common/Monitor.xml
@@ -1,78 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<ObjDef xmlns="http://www.sonicretro.org" Name="Monitor" Image="img" RememberState="true">
<Images>
<ImageFromMappings id="img">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="0" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="static">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="1" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="eggman">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="3" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="sonic">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="4" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="shoes">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="5" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="shield">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="6" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="invincibility">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="7" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="rings">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="8" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="s">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="9" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="goggles">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="10" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="broken">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="11" startpal="0" />
</ImageFromMappings>
</Images>
<Subtypes>
<Subtype id="00" name="Static" image="static" />
<Subtype id="01" name="Eggman" image="eggman" />
<Subtype id="02" name="Sonic" image="sonic" />
<Subtype id="03" name="Shoes" image="shoes" />
<Subtype id="04" name="Shield" image="shield" />
<Subtype id="05" name="Invincibility" image="invincibility" />
<Subtype id="06" name="Rings" image="rings" />
<Subtype id="07" name="S" image="s" />
<Subtype id="08" name="Goggles" image="goggles" />
<Subtype id="09" name="Broken" image="broken" />
</Subtypes>
<Properties>
<BitsProperty name="Contents" type="MonitorType" startbit="0" length="4" />
</Properties>
<Enums>
<Enum name="MonitorType">
<EnumMember name="Static" />
<EnumMember name="Eggman" />
<EnumMember name="Sonic" />
<EnumMember name="Shoes" />
<EnumMember name="Shield" />
<EnumMember name="Invincibility" />
<EnumMember name="Rings" />
<EnumMember name="S" />
<EnumMember name="Goggles" />
<EnumMember name="Broken" />
</Enum>
</Enums>
<?xml version="1.0" encoding="utf-8"?>
<ObjDef xmlns="http://www.sonicretro.org" Name="Monitor" Image="img" RememberState="true">
<Images>
<ImageFromMappings id="img">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="0" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="static">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="1" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="eggman">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="3" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="sonic">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="4" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="shoes">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="5" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="shield">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="6" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="invincibility">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="7" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="rings">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="8" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="s">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="9" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="goggles">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="10" startpal="0" />
</ImageFromMappings>
<ImageFromMappings id="broken">
<ArtFile filename="../artnem/Monitors.bin" />
<MapFile type="ASM" filename="../_maps/Monitor.asm" frame="11" startpal="0" />
</ImageFromMappings>
</Images>
<Subtypes>
<Subtype id="00" name="Static" image="static" />
<Subtype id="01" name="Eggman" image="eggman" />
<Subtype id="02" name="Sonic" image="sonic" />
<Subtype id="03" name="Shoes" image="shoes" />
<Subtype id="04" name="Shield" image="shield" />
<Subtype id="05" name="Invincibility" image="invincibility" />
<Subtype id="06" name="Rings" image="rings" />
<Subtype id="07" name="S" image="s" />
<Subtype id="08" name="Goggles" image="goggles" />
<Subtype id="09" name="Broken" image="broken" />
</Subtypes>
<Properties>
<BitsProperty name="Contents" type="MonitorType" startbit="0" length="4" />
</Properties>
<Enums>
<Enum name="MonitorType">
<EnumMember name="Static" />
<EnumMember name="Eggman" />
<EnumMember name="Sonic" />
<EnumMember name="Shoes" />
<EnumMember name="Shield" />
<EnumMember name="Invincibility" />
<EnumMember name="Rings" />
<EnumMember name="S" />
<EnumMember name="Goggles" />
<EnumMember name="Broken" />
</Enum>
</Enums>
</ObjDef>

0 comments on commit afa3d88

Please sign in to comment.