Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into MapMacros
Browse files Browse the repository at this point in the history
  • Loading branch information
Clownacy committed Jun 9, 2016
2 parents 30278e5 + d1be3de commit a73fe6e
Show file tree
Hide file tree
Showing 124 changed files with 1,449 additions and 1,239 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ SonLVL INI Files/dllcache
SonLVL INI Files/SonLVL.log
sonic.lst
errors.txt
s1built.prev.bin
20 changes: 10 additions & 10 deletions Constants.asm
Expand Up @@ -24,10 +24,10 @@ z80_port_2_control: equ $A1000A
z80_expansion_control: equ $A1000C
z80_bus_request: equ $A11100
z80_reset: equ $A11200
ym2612_a0: equ $A04000
ym2612_d0: equ $A04001
ym2612_a1: equ $A04002
ym2612_d1: equ $A04003
ym2612_a0: equ $A04000
ym2612_d0: equ $A04001
ym2612_a1: equ $A04002
ym2612_d1: equ $A04003

security_addr: equ $A14000

Expand All @@ -36,7 +36,7 @@ zTrackPlaybackControl: equ 0 ; All tracks
zTrackVoiceControl: equ 1 ; All tracks
zTrackTempoDivider: equ 2 ; All tracks
zTrackDataPointer: equ 4 ; All tracks (4 bytes)
zTrackKeyOffset: equ 8 ; FM/PSG only (sometimes written to as a word, to include zTrackVolume)
zTrackTranspose: equ 8 ; FM/PSG only (sometimes written to as a word, to include zTrackVolume)
zTrackVolume: equ 9 ; FM/PSG only
zTrackAMSFMSPan: equ $A ; FM/DAC only
zTrackVoiceIndex: equ $B ; FM/PSG only
Expand All @@ -54,7 +54,7 @@ zTrackModulationSpeed: equ $19 ; FM/PSG only
zTrackModulationDelta: equ $1A ; FM/PSG only
zTrackModulationSteps: equ $1B ; FM/PSG only
zTrackModulationVal: equ $1C ; FM/PSG only (2 bytes)
zTrackFreqDisplacement: equ $1E ; FM/PSG only
zTrackDetune: equ $1E ; FM/PSG only
zTrackPSGNoise: equ $1F ; PSG only
zTrackFeedbackAlgo: equ $1F ; FM only
zTrackVoicePtr: equ $20 ; FM SFX only (4 bytes)
Expand Down Expand Up @@ -185,7 +185,7 @@ afReset: equ $FB ; reset animation and 2nd object routine counter
af2ndRoutine: equ $FA ; increment 2nd routine counter

; Background music
bgm__First equ $81
bgm__First: equ $81
bgm_GHZ: equ ((ptr_mus81-MusicIndex)/4)+bgm__First
bgm_LZ: equ ((ptr_mus82-MusicIndex)/4)+bgm__First
bgm_MZ: equ ((ptr_mus83-MusicIndex)/4)+bgm__First
Expand All @@ -208,7 +208,7 @@ bgm_Emerald: equ ((ptr_mus93-MusicIndex)/4)+bgm__First
bgm__Last: equ ((ptr_musend-MusicIndex-4)/4)+bgm__First

; Sound effects
sfx__First equ $A0
sfx__First: equ $A0
sfx_Jump: equ ((ptr_sndA0-SoundIndex)/4)+sfx__First
sfx_Lamppost: equ ((ptr_sndA1-SoundIndex)/4)+sfx__First
sfx_A2: equ ((ptr_sndA2-SoundIndex)/4)+sfx__First
Expand Down Expand Up @@ -260,11 +260,11 @@ sfx_Signpost: equ ((ptr_sndCF-SoundIndex)/4)+sfx__First
sfx__Last: equ ((ptr_sndend-SoundIndex-4)/4)+sfx__First

; Special sound effects
spec__First equ $D0
spec__First: equ $D0
sfx_Waterfall: equ ((ptr_sndD0-SpecSoundIndex)/4)+spec__First
spec__Last: equ ((ptr_specend-SpecSoundIndex-4)/4)+spec__First

flg__First equ $E0
flg__First: equ $E0
bgm_Fade: equ ((ptr_flgE0-Sound_ExIndex)/4)+flg__First
sfx_Sega: equ ((ptr_flgE1-Sound_ExIndex)/4)+flg__First
bgm_Speedup: equ ((ptr_flgE2-Sound_ExIndex)/4)+flg__First
Expand Down
9 changes: 9 additions & 0 deletions PlaneEd Projects/Hidden Japanese Credits.txt
@@ -0,0 +1,9 @@
Palette File: ../palette/Sega2.bin
Mapping File: ../tilemaps/Hidden Japanese Credits.bin
Art File: ../artnem/Hidden Japanese Credits.bin
Mapping Compression: Enigma
Art Compression: Nemesis
x-Size: 0x28
y-Size: 0x1C
Palette Offset: 0x20
Palette Length: 0x20
9 changes: 9 additions & 0 deletions PlaneEd Projects/SS Background 1.txt
@@ -0,0 +1,9 @@
Palette File: ../palette/Special Stage.bin
Mapping File: ../tilemaps/SS Background 1.bin
Art File: ../artnem/Special Birds & Fish.bin
Mapping Compression: Enigma
Art Compression: Nemesis
x-Size: 0x08
y-Size: 0x08
Palette Offset: 0x20
Palette Length: 0x40
9 changes: 9 additions & 0 deletions PlaneEd Projects/SS Background 2.txt
@@ -0,0 +1,9 @@
Palette File: ../palette/Special Stage.bin
Mapping File: ../tilemaps/SS Background 2.bin
Art File: ../artnem/Special Clouds.bin
Mapping Compression: Enigma
Art Compression: Nemesis
x-Size: 0x40
y-Size: 0x40
Palette Offset: 0x40
Palette Length: 0x20
10 changes: 10 additions & 0 deletions PlaneEd Projects/Title Screen.txt
@@ -0,0 +1,10 @@
Palette File: ../palette/Title Screen.bin
Mapping File: ../tilemaps/Title Screen.bin
Art File: ../artnem/Title Screen Foreground.bin
Mapping Compression: Enigma
Art Compression: Nemesis
x-Size: 0x22
y-Size: 0x16
Palette Offset: 0x00
Palette Length: 0x20
Tile Offset: 0x200
3 changes: 3 additions & 0 deletions PlaneEd Projects/readme.txt
@@ -0,0 +1,3 @@
These files are for use with PlaneEd. Simply drag and drop a file onto PlaneEd.exe to start it.

You can find PlaneEd at http://info.sonicretro.org/PlaneED
97 changes: 97 additions & 0 deletions SonLVL INI Files/GHZ/SpikedPole.cs
@@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using SonicRetro.SonLVL.API;

namespace S1ObjectDefinitions.GHZ
{
class SpikedPole : ObjectDefinition
{
private List<Sprite> imgs = new List<Sprite>();

public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/GHZ Spiked Log.bin", CompressionType.Nemesis);
for (int i = 0; i < 8; i++)
{
imgs.Add(ObjectHelper.MapASMToBmp(artfile, "../_maps/Spiked Pole Helix.asm", i, 2));
}
}

public override ReadOnlyCollection<byte> Subtypes
{
get { return new ReadOnlyCollection<byte>(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 }); }
}

public override string Name
{
get { return "Helix of spikes on a pole"; }
}

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

public override byte DefaultSubtype { get { return 0x10; } }

public override string SubtypeName(byte subtype)
{
return Math.Min(0x16, (int)subtype) + " spikes";
}

public override Sprite Image
{
get { return imgs[0]; }
}

public override Sprite SubtypeImage(byte subtype)
{
return imgs[0];
}

public override Rectangle GetBounds(ObjectEntry obj, Point camera)
{
int spikeoffset = Math.Min(0x16, (int)obj.SubType)<<3;
return new Rectangle(obj.X - (spikeoffset + 4) + imgs[0].X - camera.X, obj.Y + imgs[0].Y - camera.Y, spikeoffset*2, imgs[0].Height*2);
}

public override Sprite GetSprite(ObjectEntry obj)
{
List<Sprite> sprs = new List<Sprite>();
int spikeoffset = Math.Min(0x16, (int)obj.SubType)<<3;
for (int i = 0; i < Math.Min(0x16, (int)obj.SubType); i++)
{
sprs.Add(new Sprite(imgs[i&7].Image, new Point(imgs[i&7].X - spikeoffset, imgs[i&7].Y)));
spikeoffset -= 0x10;
}
Sprite spr = new Sprite(sprs.ToArray());
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}

private PropertySpec[] customProperties = new PropertySpec[] {
new PropertySpec("Spikes", typeof(int), "Extended", null, null, GetSpikes, SetSpikes),
};

public override PropertySpec[] CustomProperties
{
get
{
return customProperties;
}
}

private static object GetSpikes(ObjectEntry obj)
{
return Math.Min(0x16, (int)obj.SubType);
}

private static void SetSpikes(ObjectEntry obj, object value)
{
obj.SubType = (byte)(Math.Max(1, (Math.Min(0x16, (int)value))));
}
}
}
5 changes: 2 additions & 3 deletions SonLVL INI Files/objGHZ.ini
Expand Up @@ -5,9 +5,8 @@ codetype=S1ObjectDefinitions.GHZ.Bridge
codefile=GHZ/SwingingPlatform.cs
codetype=S1ObjectDefinitions.GHZ.SwingingPlatform
[17]
name=Helix of spikes on a pole
subtypes=10
defaultsubtype=10
codefile=GHZ/SpikedPole.cs
codetype=S1ObjectDefinitions.GHZ.SpikedPole
[18]
xmlfile=GHZ/Platform.xml
[1A]
Expand Down

0 comments on commit a73fe6e

Please sign in to comment.