コード例 #1
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public DoorObject(NitroOverlay ovl, uint offset, int num, int layer)
            : base(ovl, offset, layer)
        {
            m_UniqueID = (uint)(0x20000000 | num);
            m_Type = 9;

            ID = 0;
            Position.X = (float)((short)m_Overlay.Read16(m_Offset + 0x0)) / 1000f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000f;
            YRotation = ((float)((short)m_Overlay.Read16(m_Offset + 0x6)) / 4096f) * 22.5f;

            DoorType = m_Overlay.Read8(m_Offset + 0xA);
            if (DoorType > 0x17) DoorType = 0x17;

            InAreaID = m_Overlay.Read8(m_Offset + 0x9);
            OutAreaID = InAreaID >> 4;
            InAreaID &= 0xF;

            PlaneSizeX = m_Overlay.Read8(m_Offset + 0x8);
            PlaneSizeY = PlaneSizeX >> 4;
            PlaneSizeX &= 0xF;

            m_Renderer = InitialiseRenderer();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #2
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public SimpleObject(NitroOverlay ovl, uint offset, int num, int layer, int area)
            : base(ovl, offset, layer)
        {
            m_Area = area;
            m_UniqueID = (uint)(0x10000000 | num);
            m_Type = 5;

            ushort idparam = m_Overlay.Read16(m_Offset);
            ID = (ushort)(idparam & 0x1FF);
            Position.X = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x6)) / 1000f;
            YRotation = 0.0f;

            Parameters = new ushort[1];
            Parameters[0] = (ushort)(idparam >> 9);

            m_Renderer = InitialiseRenderer();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #3
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                public override PropertyTable GenerateProperties()
                {
                    PropertyTable properties = new PropertyTable();

                    properties.Properties.Add(
                        new PropertySpec("File ID", typeof(uint), "", "File ID for accessing this file", m_FileID, "", typeof(UInt32Converter)));
                    properties.Properties.Add(
                        new PropertySpec("Volume", typeof(byte), "", "Volume", m_Volume, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Player Priority", typeof(byte), "", "Player Priority", m_PlayerPriority, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Player Number", typeof(byte), "", "Player Number", m_PlayerNumber, "", typeof(ByteConverter)));
                    for (int i = 0; i < 5; i++)
                    {
                        properties.Properties.Add(
                            new PropertySpec("Reserved [" + i + "]", typeof(byte), "", "Reserved [" + i + "]", m_Reserved[i], "", typeof(ByteConverter)));
                    }

                    properties["File ID"] = m_FileID;
                    properties["Volume"] = m_Volume;
                    properties["Player Priority"] = m_PlayerPriority;
                    properties["Player Number"] = m_PlayerNumber;
                    for (int i = 0; i < 5; i++)
                        properties["Reserved [" + i + "]"] = m_Reserved[i];

                    return properties;
                }
コード例 #4
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                public override PropertyTable GenerateProperties()
                {
                    PropertyTable properties = new PropertyTable();

                    properties.Properties.Add(
                        new PropertySpec("Count", typeof(byte), "", "The first byte states how many of the ChannelNumber[16] is used (non 0xff)", m_Count, "", typeof(ByteConverter)));
                    for (int i = 0; i < 16; i++)
                    {
                        properties.Properties.Add(
                            new PropertySpec("Channel Number [" + i + "]", typeof(byte), "", "ChannelNumber [" + i + "] 0xff if not in use", m_ChannelNumber[i], "", typeof(ByteConverter)));
                    }
                    for (int i = 0; i < 7; i++)
                    {
                        properties.Properties.Add(
                            new PropertySpec("Padding [" + i + "]", typeof(byte), "", "Padding [" + i + "]", m_Padding[i], "", typeof(ByteConverter)));
                    }

                    properties["Count"] = m_Count;
                    for (int i = 0; i < 16; i++)
                        properties["Channel Number [" + i + "]"] = m_ChannelNumber[i];
                    for (int i = 0; i < 7; i++)
                        properties["Padding [" + i + "]"] = m_Padding[i];

                    return properties;
                }
コード例 #5
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                    public override PropertyTable GenerateProperties()
                    {
                        PropertyTable properties = new PropertyTable();

                        properties.Properties.Add(
                            new PropertySpec("Type", typeof(byte), "", "Type"/*"0x0700: SEQ, 0x0803: SEQARC, 0x0601: BANK, 0x0402: WAVEARC"*/, m_Type, "", typeof(ByteConverter)));
                        properties.Properties.Add(
                            new PropertySpec("Load Flag", typeof(byte), "", "Load Flag", m_LoadFlag, "", typeof(ByteConverter)));
                        properties.Properties.Add(
                            new PropertySpec("Padding", typeof(ushort), "", "Padding", m_Padding, "", typeof(UInt16Converter)));
                        properties.Properties.Add(
                            new PropertySpec("Index", typeof(uint), "", "The entry number in the relevant Record (SEQ/SEQARC/BANK/WAVEARC)", m_Index, "", typeof(UInt32Converter)));

                        properties["Type"] = m_Type;
                        properties["Load Flag"] = m_LoadFlag;
                        properties["Padding"] = m_Padding;
                        properties["Index"] = m_Index;

                        return properties;
                    }
コード例 #6
0
        public static void GenerateProperties(Particle.System.Def def, List <Particle.Texture> textures)
        {
            PropertyTable props = new PropertyTable();

            Particle.MainInfo info = def.m_MainInfo;

            props.AddProperty(new PropertySpec("Spawn Shape", typeof(int), "General", "The shape that the particles spawn from", (int)info.m_SpawnShape, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "Point", "Sphere", "Circle (Randomly)", "Circle (Evenly)", "Ball", "Disc" }.ToList()) }));
            props.AddProperty(new PropertySpec("Draw Mode", typeof(int), "General", "How the particle is drawn on screen", (int)info.m_DrawMode, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "Billboard", "Velocity Stretch", "3D" }.ToList()) }));
            props.AddProperty(new PropertySpec("Plane", typeof(int), "General", "If the spawn shape is a plane (circle or disc), which axis the plane is perpendicular to", (int)info.m_Plane, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "Z", "Y", "X", "System Direction" }.ToList()) }));
            props.AddProperty(new PropertySpec("Rotate", typeof(bool), "General", "Whether the particle can rotate", info.m_Rotate, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Random Initial Angle", typeof(bool), "General", "Whether to use a random initial angle instead of 0°", info.m_RandomInitAng, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Self Destruct", typeof(bool), "General", "Whether the particle system should self destruct. Usually false for long particles, usually true for short particles.", info.m_SelfDestruct, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Follow System", typeof(bool), "General", "Whether the particles should follow their parent system when it moves", info.m_FollowSystem, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Rotate Around Weird Axis", typeof(bool), "General", "If the particles are rendered in 3D, whether to rotate the particles around the weird axis <-1/sqrt(3), -1/sqrt(3), -1/sqrt(3)> instead of <0, 1, 0>.", info.m_WeirdAxis, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Horizontal if 3D", typeof(bool), "General", "If the particle is rendered in 3D, whether the particle should be horizontal and not vertical", info.m_HorzIf3D, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Rate", typeof(float), "General", "The number of particles the system spawns each frame (can be a fraction)", info.m_Rate, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x80000, 0x80000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Distance", typeof(float), "General", "The initial maximum distance from the system's position", info.m_StartHorzDist, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Direction X", typeof(float), "General", "The direction the system points (It's recommended to normalize the vector)", info.m_Dir.X, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Direction Y", typeof(float), "General", "The direction the system points (It's recommended to normalize the vector)", info.m_Dir.Y, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Direction Z", typeof(float), "General", "The direction the system points (It's recommended to normalize the vector)", info.m_Dir.Z, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Color", typeof(Color), "General", "The main color of the particles", info.m_Color, typeof(ColorTypeEditor), typeof(ColorTypeConverter)));
            props.AddProperty(new PropertySpec("Horizontal Speed", typeof(float), "General", "The initial speed away from the particle system's position", info.m_HorzSpeed, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Vertical Speed", typeof(float), "General", "The initial speed in the particle system's direction", info.m_VertSpeed, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Scale", typeof(float), "General", "Half the side length of the particle square", info.m_Scale, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Horizontal Scale Multiplier", typeof(float), "General", "What the horizontal scale is multiplied by", info.m_HorzScaleMult, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Minimum Angular Speed", typeof(int), "General", "The minimum angular speed in degrees per frame", info.m_MinAngleSpeed, "", typeof(AngleTypeConverter)));
            props.AddProperty(new PropertySpec("Maximum Angular Speed", typeof(int), "General", "The maximum angular speed in degrees per frame", info.m_MaxAngleSpeed, "", typeof(AngleTypeConverter)));
            props.AddProperty(new PropertySpec("Frames", typeof(int), "General", "The number of frames the particle system can spawn particles", info.m_Frames, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xffff) }));
            props.AddProperty(new PropertySpec("Lifetime", typeof(int), "General", "The number of frames the particle exists for", info.m_Lifetime, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xffff) }));
            props.AddProperty(new PropertySpec("Scale Randomness", typeof(int), "General", "How random the scales of the particles are. Varies between 0 and 255", info.m_ScaleRand, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
            props.AddProperty(new PropertySpec("Lifetime Randomness", typeof(int), "General", "How random the lifetimes of the particles are. Varies between 0 and 255", info.m_LifetimeRand, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
            props.AddProperty(new PropertySpec("Speed Randomness", typeof(int), "General", "How random the speeds of the particles are. Varies between 0 and 255", info.m_SpeedRand, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
            props.AddProperty(new PropertySpec("Period", typeof(int), "General", "One more than the number of frames between particle spawnings.", info.m_SpawnPeriod, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(1, 0xff) }));
            props.AddProperty(new PropertySpec("Opacity", typeof(int), "General", "The opacity of the particles on a scale of 0 to 31", info.m_Alpha, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0x1f) }));
            props.AddProperty(new PropertySpec("Speed Falloff", typeof(int), "General", "Dictates how fast the speed should decelerate or accelerate. 128 is normal speed", info.m_SpeedFalloff, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
            props.AddProperty(new PropertySpec("Sprite ID", typeof(int), "General", "The ID of the texture to use", textures.IndexOf(info.m_Sprite), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, highestTextureID) }));
            props.AddProperty(new PropertySpec("Alternate Length", typeof(int), "General", "An alternate number of frames to use for transitions instead of the lifetime", info.m_AltLength, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
            props.AddProperty(new PropertySpec("Velocity Stretch Factor", typeof(float), "General", "If the particles are velocity stretched, by how much to velocity stretch them", info.m_VelStretchFactor, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
            props.AddProperty(new PropertySpec("Texture Repeat X", typeof(int), "General", "How much to repeat the texture in the X direction", info.m_LogTexRepeatHorz, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "1", "2", "4", "8" }.ToList()) }));
            props.AddProperty(new PropertySpec("Texture Repeat Y", typeof(int), "General", "How much to repeat the texture in the Y direction", info.m_LogTexRepeatVert, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "1", "2", "4", "8" }.ToList()) }));
            props.AddProperty(new PropertySpec("Has Scale Transition", typeof(bool), "General", "Whether to transition the particles' sizes", def.m_ScaleTrans != null, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Color Transition", typeof(bool), "General", "Whether to transition the particles' colors", def.m_ColorTrans != null, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Alpha Transition", typeof(bool), "General", "Whether to transition the particles' opacities", def.m_AlphaTrans != null, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Texture Sequence", typeof(bool), "General", "Whether to transition the particles' sprites", def.m_TexSeq != null, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Glitter", typeof(bool), "General", "Whether to have particles spawning particles", def.m_Glitter != null, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Acceleration Effect", typeof(bool), "General", "Whether to accelerate the particles", def.m_Effects.FindIndex(x => x is Particle.Acceleration) != -1, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Jitter Effect", typeof(bool), "General", "Whether to have the particles jitter", def.m_Effects.FindIndex(x => x is Particle.Jitter) != -1, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Converge Effect", typeof(bool), "General", "Whether the particles should converge to a point", def.m_Effects.FindIndex(x => x is Particle.Converge) != -1, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Turn Effect", typeof(bool), "General", "Whether to rotate the entire particle system", def.m_Effects.FindIndex(x => x is Particle.Turn) != -1, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Limit Plane Effect", typeof(bool), "General", "Whether to limit the particles' heights (unused and untested)", def.m_Effects.FindIndex(x => x is Particle.LimitPlane) != -1, "", typeof(BoolTypeConverter)));
            props.AddProperty(new PropertySpec("Has Radius Converge Effect", typeof(bool), "General", "Whether the particles should converge to a circle", def.m_Effects.FindIndex(x => x is Particle.RadiusConverge) != -1, "", typeof(BoolTypeConverter)));

            if (def.m_ScaleTrans != null)
            {
                GenerateScaleTransitionProperties(def, textures, props);
            }
            if (def.m_ColorTrans != null)
            {
                GenerateColorTransitionProperties(def, textures, props);
            }
            if (def.m_AlphaTrans != null)
            {
                GenerateAlphaTransitionProperties(def, textures, props);
            }
            if (def.m_TexSeq != null)
            {
                GenerateTextureSequenceProperties(def, textures, props);
            }
            if (def.m_Glitter != null)
            {
                GenerateGlitterProperties(def, textures, props);
            }
            if (def.m_Effects.FindIndex(x => x is Particle.Acceleration) != -1)
            {
                GenerateAccelerationProperties(def, textures, props);
            }
            if (def.m_Effects.FindIndex(x => x is Particle.Jitter) != -1)
            {
                GenerateJitterProperties(def, textures, props);
            }
            if (def.m_Effects.FindIndex(x => x is Particle.Converge) != -1)
            {
                GenerateConvergeProperties(def, textures, props);
            }
            if (def.m_Effects.FindIndex(x => x is Particle.Turn) != -1)
            {
                GenerateTurnProperties(def, textures, props);
            }
            if (def.m_Effects.FindIndex(x => x is Particle.LimitPlane) != -1)
            {
                GenerateLimitPlaneProperties(def, textures, props);
            }
            if (def.m_Effects.FindIndex(x => x is Particle.RadiusConverge) != -1)
            {
                GenerateRadiusConvergeProperties(def, textures, props);
            }

            def.m_Properties = props;
        }
コード例 #7
0
 public static void GenerateLimitPlaneProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.LimitPlane limitPlane = (Particle.LimitPlane)def.m_Effects.Find(x => x is Particle.LimitPlane);
     props.AddProperty(new PropertySpec("Position Y (Limit Plane)", typeof(float), "Effect: Limit Plane", "The ABSOLUTE Y position of the limit plane.", limitPlane.m_PosY, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Reverse Speed Multiplier", typeof(float), "Effect: Limit Plane", "The amount to multiply the speed by when a particle bounces off the limit plane.", limitPlane.m_ReverseSpeedMult, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Behavior (Limit Plane)", typeof(int), "Effect: Limit Plane", "What should happen if a particle hits the limit plane", (int)limitPlane.m_Behavior, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "Disappear", "Bounce" }.ToList()) }));
 }
コード例 #8
0
 public static void GenerateJitterProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.Jitter jitter = (Particle.Jitter)def.m_Effects.Find(x => x is Particle.Jitter);
     props.AddProperty(new PropertySpec("Impulse X", typeof(float), "Effect: Jitter", "The change in velocity of the particles", jitter.m_Mag.X, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Impulse Y", typeof(float), "Effect: Jitter", "The change in velocity of the particles", jitter.m_Mag.Y, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Impulse Z", typeof(float), "Effect: Jitter", "The change in velocity of the particles", jitter.m_Mag.Z, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Period (Jitter)", typeof(int), "Effect: Jitter", "The period of velocity changes.", jitter.m_Period, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(1, 0xffff) }));
 }
コード例 #9
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public FogObject(NitroOverlay ovl, uint offset, int num, int layer, int area)
            : base(ovl, offset, layer)
        {
            m_Area = area;
            m_Type = 8;
            m_UniqueID = (uint)(0x50000000 | num);

            Parameters = new ushort[6];
            Parameters[0] = m_Overlay.Read8(m_Offset);
            Parameters[1] = m_Overlay.Read8(m_Offset + 1);
            Parameters[2] = m_Overlay.Read8(m_Offset + 2);
            Parameters[3] = m_Overlay.Read8(m_Offset + 3);
            Parameters[4] = m_Overlay.Read16(m_Offset + 4);
            Parameters[5] = m_Overlay.Read16(m_Offset + 6);

            //m_Renderer = new ColorCubeRenderer(Color.FromArgb(255, 255, 0), Color.FromArgb(Parameters[1], Parameters[2], Parameters[3]), true);
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #10
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public EntranceObject(NitroOverlay ovl, uint offset, int num, int layer, int id)
            : base(ovl, offset, layer)
        {
            m_UniqueID = (uint)(0x20000000 | num);
            m_EntranceID = id;
            m_Type = 1;

            ID = 0;
            Position.X = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000.0f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000.0f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x6)) / 1000.0f;
            YRotation = ((float)((short)m_Overlay.Read16(m_Offset + 0xA)) / 4096f) * 22.5f;

            Parameters = new ushort[5];
            Parameters[0] = m_Overlay.Read16(m_Offset + 0x0);
            Parameters[1] = m_Overlay.Read16(m_Offset + 0x8);
            Parameters[2] = m_Overlay.Read16(m_Offset + 0xC);
            Parameters[3] = m_Overlay.Read16(m_Offset + 0xE);

            m_Renderer = InitialiseRenderer();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #11
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public ExitObject(NitroOverlay ovl, uint offset, int num, int layer)
            : base(ovl, offset, layer)
        {
            m_UniqueID = (uint)(0x20000000 | num);
            m_Type = 10;

            Position.X = (float)((short)m_Overlay.Read16(m_Offset)) / 1000.0f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000.0f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000.0f;
            YRotation = ((float)((short)m_Overlay.Read16(m_Offset + 0x8)) / 4096f) * 22.5f;

            LevelID = m_Overlay.Read8(m_Offset + 0xA);
            EntranceID = m_Overlay.Read8(m_Offset + 0xB);
            Param1 = m_Overlay.Read16(m_Offset + 0x6);
            Param2 = m_Overlay.Read16(m_Offset + 0xC);

            m_Renderer = InitialiseRenderer();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #12
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public Type14Object(NitroOverlay ovl, uint offset, int num, int layer, int area)
            : base(ovl, offset, layer)
        {
            m_Area = area;
            m_Type = 14;
            m_UniqueID = (uint)(0x50000000 | num);

            Parameters = new ushort[4];
            Parameters[0] = m_Overlay.Read8(m_Offset);
            Parameters[1] = m_Overlay.Read8(m_Offset + 1);
            Parameters[2] = m_Overlay.Read8(m_Offset + 2);
            Parameters[3] = m_Overlay.Read8(m_Offset + 3);

            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #13
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public TpSrcObject(NitroOverlay ovl, uint offset, int num, int layer)
            : base(ovl, offset, layer)
        {
            m_UniqueID = (uint)(0x20000000 | num);
            m_Type = 6;

            Position.X = (float)((short)m_Overlay.Read16(m_Offset)) / 1000.0f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000.0f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000.0f;
            YRotation = 0.0f;

            Parameters = new ushort[2];
            Parameters[0] = m_Overlay.Read8(m_Offset + 0x6);
            Parameters[1] = m_Overlay.Read8(m_Offset + 0x07);

            m_Renderer = InitialiseRenderer();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #14
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        //private Hashtable m_PParams;
        public StandardObject(NitroOverlay ovl, uint offset, int num, int layer, int area)
            : base(ovl, offset, layer)
        {
            m_Area = area;
            m_UniqueID = (uint)(0x10000000 | num);
            m_Type = 0;

            ID = m_Overlay.Read16(m_Offset);
            Position.X = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x6)) / 1000f;
            YRotation = ((float)((short)m_Overlay.Read16(m_Offset + 0xA)) / 4096f) * 22.5f;

            Parameters = new ushort[3];
            Parameters[0] = m_Overlay.Read16(m_Offset + 0xE);
            Parameters[1] = m_Overlay.Read16(m_Offset + 0x8);
            Parameters[2] = m_Overlay.Read16(m_Offset + 0xC);

            m_Renderer = InitialiseRenderer();
            // m_PParams = new Hashtable();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #15
0
 public static void GenerateGlitterProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.Glitter glitter = def.m_Glitter;
     props.AddProperty(new PropertySpec("Has Effects", typeof(bool), "Glitter", "Whether the glitter particles use the same effects", glitter.m_HasEffects, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Has Scale Transition (Glitter)", typeof(bool), "Glitter", "Whether to transition the scale multiplier to 1.0", glitter.m_HasScaleTrans, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Has Alpha Transition (Glitter)", typeof(bool), "Glitter", "Whether to fade glitter particles away", glitter.m_HasAlphaTrans, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Angle Copy Mode", typeof(int), "Glitter", "What angle properties glitter particles should copy from their parent particles", (int)glitter.m_AngleCopyMode, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "None", "Angle", "Angle and Angular Speed" }.ToList()) }));
     props.AddProperty(new PropertySpec("Follow System (Glitter)", typeof(bool), "Glitter", "Whether glitter particles should follow their parent system when it moves", glitter.m_FollowSystem, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Use Glitter Color", typeof(bool), "Glitter", "Whether glitter particles use the glitter color instead of the main color", glitter.m_UseGlitterColor, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Draw Mode (Glitter)", typeof(int), "Glitter", "How glitter particles are drawn on screen", (int)glitter.m_DrawMode, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "Billboard", "Velocity Stretch", "3D" }.ToList()) }));
     props.AddProperty(new PropertySpec("Speed Randomness (Glitter)", typeof(float), "Glitter", "The maximum difference in velocity between a glitter particle and its parent", glitter.m_SpeedRand, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Scale (Glitter)", typeof(float), "Glitter", "The initial scale if glitter particles have a scale transition", glitter.m_Scale, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x80000, 0x80000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Lifetime (Glitter)", typeof(int), "Glitter", "The number of frames glitter particles exist for", glitter.m_Lifetime, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xffff) }));
     props.AddProperty(new PropertySpec("Speed Multiplier", typeof(int), "Glitter", "How fast glitter particles go compared to their parent particles (x / 256)", glitter.m_SpeedMult, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Scale Multiplier", typeof(int), "Glitter", "How big glitter particles are compared to their parent particles assuming no scale transition ((x + 1) / 64)", glitter.m_ScaleMult, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Color (Glitter)", typeof(Color), "Glitter", "The glitter color of the particles", glitter.m_Color, typeof(ColorTypeEditor), typeof(ColorTypeConverter)));
     props.AddProperty(new PropertySpec("Rate (Glitter)", typeof(int), "Glitter", "The number of glitter particles each particle spawns per frame spawning particles (integer)", glitter.m_Rate, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Wait", typeof(int), "Glitter", "The fraction of a particle's lifetime that should pass before it spawns glitter ((x + 1) / 256)", glitter.m_Wait, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Period (Glitter)", typeof(int), "Glitter", "One more than the number of frames between glitter particle spawnings.", glitter.m_Period, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(1, 0xff) }));
     props.AddProperty(new PropertySpec("Sprite ID (Glitter)", typeof(int), "Glitter", "The ID of the texture to use", textures.IndexOf(glitter.m_Sprite), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Texture Repeat X (Glitter)", typeof(int), "Glitter", "How much to repeat the texture in the X direction", glitter.m_LogTexRepeatHorz, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "1", "2", "4", "8" }.ToList()) }));
     props.AddProperty(new PropertySpec("Texture Repeat Y (Glitter)", typeof(int), "Glitter", "How much to repeat the texture in the Y direction", glitter.m_LogTexRepeatVert, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "1", "2", "4", "8" }.ToList()) }));
 }
コード例 #16
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public MinimapScaleObject(NitroOverlay ovl, uint offset, int num, int layer, int area)
            : base(ovl, offset, layer)
        {
            m_Type = 12;
            m_Area = area;
            m_UniqueID = (uint)(0x50000000 | num);

            Parameters = new ushort[1];
            Parameters[0] = m_Overlay.Read16(m_Offset);

            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #17
0
 public static void GenerateAccelerationProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.Acceleration accel = (Particle.Acceleration)def.m_Effects.Find(x => x is Particle.Acceleration);
     props.AddProperty(new PropertySpec("Acceleration X", typeof(float), "Effect: Acceleration", "The acceleration of the particles", accel.m_Accel.X, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Acceleration Y", typeof(float), "Effect: Acceleration", "The acceleration of the particles", accel.m_Accel.Y, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Acceleration Z", typeof(float), "Effect: Acceleration", "The acceleration of the particles", accel.m_Accel.Z, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-64, 64, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
 }
コード例 #18
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public MinimapTileIDObject(NitroOverlay ovl, uint offset, int num, int layer, int id)
            : base(ovl, offset, layer)
        {
            m_Type = 11;
            m_MinimapTileIDNum = id;
            m_UniqueID = (uint)(0x50000000 | num);

            Parameters = new ushort[2];
            Parameters[0] = m_Overlay.Read16(m_Offset);

            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #19
0
 public static void GenerateTurnProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.Turn turn = (Particle.Turn)def.m_Effects.Find(x => x is Particle.Turn);
     props.AddProperty(new PropertySpec("Angular Speed", typeof(int), "Effect: Turn", "The angular speed, of course", turn.m_AngleSpeed, "", typeof(AngleTypeConverter)));
     props.AddProperty(new PropertySpec("Axis", typeof(int), "Effect: Turn", "The rotation axis, which goes through the system's position", (int)turn.m_Axis, "", typeof(ItemListTypeConverter), new Attribute[] { new ItemListAttribute(new string[] { "X", "Y", "Z" }.ToList()) }));
 }
コード例 #20
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public PathObject(NitroOverlay ovl, uint offset, int num)
            : base(ovl, offset, 0)
        {
            m_UniqueID = (uint)(0x30000000 | num);
            m_Type = 3;

            Parameters = new ushort[5];
            Parameters[0] = m_Overlay.Read16(m_Offset);
            Parameters[1] = (ushort)m_Overlay.Read8(m_Offset + 0x2);
            Parameters[2] = (ushort)m_Overlay.Read8(m_Offset + 0x3);
            Parameters[3] = (ushort)m_Overlay.Read8(m_Offset + 0x4);
            Parameters[4] = (ushort)m_Overlay.Read8(m_Offset + 0x5);

            m_Properties = new PropertyTable();
            GenerateProperties();
        }
コード例 #21
0
 public static void GenerateRadiusConvergeProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.RadiusConverge converge = (Particle.RadiusConverge)def.m_Effects.Find(x => x is Particle.RadiusConverge);
     props.AddProperty(new PropertySpec("Offset X (Radius Converge)", typeof(float), "Effect: Radius Converge", "The offset from system position the particles converge to", converge.m_Offset.X, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Offset Y (Radius Converge)", typeof(float), "Effect: Radius Converge", "The offset from system position the particles converge to", converge.m_Offset.Y, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Offset Z (Radius Converge)", typeof(float), "Effect: Radius Converge", "The offset from system position the particles converge to", converge.m_Offset.Z, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-0x400000, 0x400000, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Magnitude (Radius Converge)", typeof(float), "Effect: Radius Converge", "The magnitude of convergence", converge.m_Mag, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
 }
コード例 #22
0
 public static void GenerateScaleTransitionProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.ScaleTransition scaleTrans = def.m_ScaleTrans;
     props.AddProperty(new PropertySpec("Scale Multiplier 1", typeof(float), "Scale Transition", "The first scale multiplier", scaleTrans.m_Start, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Scale Multiplier 2", typeof(float), "Scale Transition", "The second scale multiplier", scaleTrans.m_Middle, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Scale Multiplier 3", typeof(float), "Scale Transition", "The last scale multiplier", scaleTrans.m_End, "", typeof(FloatTypeConverter), new Attribute[] { new FloatRangeAttribute(-8, 8, FloatRangeAttribute.Inclusivity.INCLUDE_FIRST) }));
     props.AddProperty(new PropertySpec("Transition 1-2 End (Scale)", typeof(int), "Scale Transition", "When the transition from 1st to 2nd values should end (x / 256)", scaleTrans.m_Trans1End, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Transition 2-3 Start (Scale)", typeof(int), "Scale Transition", "When the transition from 2nd to last values should start (x / 256)", scaleTrans.m_Trans2Start, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Use Alternate Length (Scale)", typeof(bool), "Scale Transition", "Whether to base the 'percents' off the alternate length instead of the lifetime", scaleTrans.m_UseAltLength, "", typeof(BoolTypeConverter)));
 }
コード例 #23
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                public override PropertyTable GenerateProperties()
                {
                    PropertyTable properties = new PropertyTable();

                    properties.Properties.Add(
                        new PropertySpec("File ID", typeof(uint), "", "File ID for accessing this file", m_FileID, "", typeof(UInt32Converter)));
                    properties.Properties.Add(
                        new PropertySpec("WAVEARC [0]", typeof(ushort), "", "Associated WAVEARC. 0xffff if not in use (4) [0]", m_WaveArc[0], "", typeof(UInt16Converter)));
                    properties.Properties.Add(
                        new PropertySpec("WAVEARC [1]", typeof(ushort), "", "Associated WAVEARC. 0xffff if not in use (4) [1]", m_WaveArc[1], "", typeof(UInt16Converter)));
                    properties.Properties.Add(
                        new PropertySpec("WAVEARC [2]", typeof(ushort), "", "Associated WAVEARC. 0xffff if not in use (4) [2]", m_WaveArc[2], "", typeof(UInt16Converter)));
                    properties.Properties.Add(
                        new PropertySpec("WAVEARC [3]", typeof(ushort), "", "Associated WAVEARC. 0xffff if not in use (4) [3]", m_WaveArc[3], "", typeof(UInt16Converter)));

                    properties["File ID"] = m_FileID;
                    properties["WAVEARC [0]"] = m_WaveArc[0];
                    properties["WAVEARC [1]"] = m_WaveArc[1];
                    properties["WAVEARC [2]"] = m_WaveArc[2];
                    properties["WAVEARC [3]"] = m_WaveArc[3];

                    return properties;
                }
コード例 #24
0
 public static void GenerateColorTransitionProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.ColorTransition colorTrans = def.m_ColorTrans;
     props.AddProperty(new PropertySpec("Color 1", typeof(Color), "Color Transition", "The first color. The second color is the main color.", colorTrans.m_Start, typeof(ColorTypeEditor), typeof(ColorTypeConverter)));
     props.AddProperty(new PropertySpec("Color 3", typeof(Color), "Color Transition", "The last color. The second color is the main color.", colorTrans.m_End, typeof(ColorTypeEditor), typeof(ColorTypeConverter)));
     props.AddProperty(new PropertySpec("Transition 1-2 Start (Color)", typeof(int), "Color Transition", "When the transition from 1st to 2nd values should start (x / 256)", colorTrans.m_Trans1Start, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Transition 2-3 Start (Color)", typeof(int), "Color Transition", "When the transition from 2nd to last values should start (x / 256)", colorTrans.m_Trans2Start, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Transition 2-3 End (Color)", typeof(int), "Color Transition", "When the transition from 2nd to last values should end (x / 256)", colorTrans.m_Trans2End, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Use As Options (Color)", typeof(bool), "Color Transition", "Whether the values should be assigned randomly to particles instead of having a transition", colorTrans.m_UseAsOptions, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Use Alternate Length (Color)", typeof(bool), "Color Transition", "Whether to base the 'percents' off the alternate length instead of the lifetime", colorTrans.m_UseAltLength, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Smooth Transition", typeof(bool), "Color Transition", "Whether the transitions should be smooth and not sharp", colorTrans.m_SmoothTrans, "", typeof(BoolTypeConverter)));
 }
コード例 #25
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                public override PropertyTable GenerateProperties()
                {
                    PropertyTable properties = new PropertyTable();

                    properties.Properties.Add(
                        new PropertySpec("Sequence Max", typeof(byte), "", "Sequence Max", m_SequenceMax, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Padding", typeof(byte), "", "Padding", m_Padding, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Alloc. Channel Bit Flag", typeof(ushort), "", "Alloc. Channel Bit Flag", m_AllocChannelBitFlag, "", typeof(UInt16Converter)));
                    properties.Properties.Add(
                        new PropertySpec("Heap Size", typeof(uint), "", "Heap Size", m_HeapSize, "", typeof(UInt32Converter)));

                    properties["Sequence Max"] = m_SequenceMax;
                    properties["Padding"] = m_Padding;
                    properties["Alloc. Channel Bit Flag"] = m_AllocChannelBitFlag;
                    properties["Heap Size"] = m_HeapSize;

                    return properties;
                }
コード例 #26
0
 public static void GenerateAlphaTransitionProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.AlphaTransition alphaTrans = def.m_AlphaTrans;
     props.AddProperty(new PropertySpec("Opacity 1", typeof(int), "Alpha Transition", "The first opacity multiplier on a scale of 0 to 31", alphaTrans.m_Start, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0x1f) }));
     props.AddProperty(new PropertySpec("Opacity 2", typeof(int), "Alpha Transition", "The second opacity multiplier on a scale of 0 to 31", alphaTrans.m_Middle, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0x1f) }));
     props.AddProperty(new PropertySpec("Opacity 3", typeof(int), "Alpha Transition", "The last opacity multiplier on a scale of 0 to 31", alphaTrans.m_End, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0x1f) }));
     props.AddProperty(new PropertySpec("Flicker", typeof(int), "Alpha Transition", "The magnitude of the flicker. Varies between 0 and 255", alphaTrans.m_Flicker, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Transition 1-2 End (Alpha)", typeof(int), "Alpha Transition", "When the transition from 1st to 2nd values should end (x / 256)", alphaTrans.m_Trans1End, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Transition 2-3 Start (Alpha)", typeof(int), "Alpha Transition", "When the transition from 2nd to last values should start (x / 256)", alphaTrans.m_Trans2Start, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 0xff) }));
     props.AddProperty(new PropertySpec("Use Alternate Length (Alpha)", typeof(bool), "Alpha Transition", "Whether to base the 'percents' off the alternate length instead of the lifetime", alphaTrans.m_UseAltLength, "", typeof(BoolTypeConverter)));
 }
コード例 #27
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                public override PropertyTable GenerateProperties()
                {
                    PropertyTable properties = new PropertyTable();

                    properties.Properties.Add(
                        new PropertySpec("File ID", typeof(uint), "", "File ID for accessing this file", m_FileID, "", typeof(UInt32Converter)));
                    properties.Properties.Add(
                        new PropertySpec("Bank", typeof(ushort), "", "Associated Bank", m_Bank, "", typeof(UInt16Converter)));
                    properties.Properties.Add(
                        new PropertySpec("Volume", typeof(byte), "", "Volume", m_Volume, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Channel Priority", typeof(byte), "", "Channel Priority", m_ChannelPriority, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Player Priority", typeof(byte), "", "Player Priority", m_PlayerPriority, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Player Number", typeof(byte), "", "Player Number", m_PlayerNumber, "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Unknown 2 [0]", typeof(byte), "", "Unknown 2 [0]", m_Unknown2[0], "", typeof(ByteConverter)));
                    properties.Properties.Add(
                        new PropertySpec("Unknown 2 [1]", typeof(byte), "", "Unknown 2 [1]", m_Unknown2[1], "", typeof(ByteConverter)));

                    properties["File ID"] = m_FileID;
                    properties["Bank"] = m_Bank;
                    properties["Volume"] = m_Volume;
                    properties["Channel Priority"] = m_ChannelPriority;
                    properties["Player Priority"] = m_PlayerPriority;
                    properties["Player Number"] = m_PlayerNumber;
                    properties["Unknown 2 [0]"] = m_Unknown2[0];
                    properties["Unknown 2 [1]"] = m_Unknown2[1];

                    return properties;
                }
コード例 #28
0
 public static void GenerateTextureSequenceProperties(Particle.System.Def def, List <Particle.Texture> textures, PropertyTable props)
 {
     Particle.TextureSequence texSeq = def.m_TexSeq;
     props.AddProperty(new PropertySpec("Sprite ID 1", typeof(int), "Texture Sequence", "The 1st texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[0]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 2", typeof(int), "Texture Sequence", "The 2nd texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[1]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 3", typeof(int), "Texture Sequence", "The 3rd texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[2]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 4", typeof(int), "Texture Sequence", "The 4th texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[3]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 5", typeof(int), "Texture Sequence", "The 5th texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[4]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 6", typeof(int), "Texture Sequence", "The 6th texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[5]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 7", typeof(int), "Texture Sequence", "The 7th texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[6]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Sprite ID 8", typeof(int), "Texture Sequence", "The 8th texture's ID (-1 if not used)", textures.IndexOf(texSeq.m_Sprites[7]), "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(-1, highestTextureID) })); //TODO: Make limit depend on number of textures loaded
     props.AddProperty(new PropertySpec("Number of Sprites", typeof(int), "Texture Sequence", "How many sprites to actually use", texSeq.m_NumSprites, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 8) }));
     props.AddProperty(new PropertySpec("Interval", typeof(int), "Texture Sequence", "The time (x / 256) that each sprite should show up", texSeq.m_Interval, "", typeof(IntTypeConverter), new Attribute[] { new IntRangeAttribute(0, 255) }));
     props.AddProperty(new PropertySpec("Use As Options (Texture)", typeof(bool), "Texture Sequence", "Whether the values should be assigned randomly to particles instead of having a transition", texSeq.m_UseAsOptions, "", typeof(BoolTypeConverter)));
     props.AddProperty(new PropertySpec("Use Alternate Length (Texture)", typeof(bool), "Texture Sequence", "Whether to base the 'percents' off the alternate length instead of the lifetime", texSeq.m_UseAltLength, "", typeof(BoolTypeConverter)));
 }
コード例 #29
0
ファイル: SDATInfoEditor.cs プロジェクト: RicoPlays/sm64dse
                public override PropertyTable GenerateProperties()
                {
                    PropertyTable properties = new PropertyTable();

                    properties.Properties.Add(
                        new PropertySpec("File ID", typeof(uint), "", "File ID for accessing this file", m_FileID, "", typeof(UInt32Converter)));
                    properties.Properties.Add(
                        new PropertySpec("Flags", typeof(byte), "", "Flags", m_Flag, "", typeof(ByteConverter)));

                    properties["File ID"] = m_FileID;
                    properties["Flags"] = m_Flag;

                    return properties;
                }
コード例 #30
0
ファイル: LevelObject.cs プロジェクト: RicoPlays/sm64dse
        public PathPointObject(NitroOverlay ovl, uint offset, int num, int nodeID)
            : base(ovl, offset, 0)
        {
            m_UniqueID = (uint)(0x30000000 | num);
            m_Type = 2;
            m_NodeID = nodeID;

            Position.X = (float)((short)m_Overlay.Read16(m_Offset)) / 1000f;
            Position.Y = (float)((short)m_Overlay.Read16(m_Offset + 0x2)) / 1000f;
            Position.Z = (float)((short)m_Overlay.Read16(m_Offset + 0x4)) / 1000f;

            m_Renderer = InitialiseRenderer();
            m_Properties = new PropertyTable();
            GenerateProperties();
        }