Beispiel #1
0
        /// <summary>
        /// Creates a new SubRoutine instance.
        /// </summary>
        /// <param name="TID">ID of the track for this SubRoutine.</param>
        /// <param name="Address">Address of this SubRoutine in HIT.</param>
        /// <param name="Parent">The HIT that contains this SubRoutine.</param>
        public SubRoutine(uint TID, uint Address, Hit Parent)
        {
            HitParent = Parent;
            Initialize();

            TrackID = TID;

            if (Address != 0)
            {
                m_InstCounter = Address;
            }
            else
            {
                m_Track    = FileManager.GetTRK(TrackID);
                m_SoundID  = m_Track.SoundID;
                SimpleMode = true;
            }

            m_Registers.Add(0x5, 0);     //v1
            m_Registers.Add(0x6, 0);     //v2
            m_Registers.Add(0x7, 0);     //v3
            m_Registers.Add(0x8, 0);     //v4
            m_Registers.Add(0x9, 0);     //v5
            m_Registers.Add(0xa, 0);     //v6
            m_Registers.Add(0xb, 0);     //v7
            m_Registers.Add(0xc, 0);     //v8
            m_Registers.Add(0xd, 0);     //h1
            m_Registers.Add(0xe, 0);     //h2
            m_Registers.Add(0xf, 0);     //h3
            m_Registers.Add(0x10, 0);    //h4

            m_LocalVars.Add(0x10, 0);    //argstype
            m_LocalVars.Add(0x11, 0);    //trackdatasource
            m_LocalVars.Add(0x12, 0);    //patch
            m_LocalVars.Add(0x13, 0);    //priority
            m_LocalVars.Add(0x14, 0);    //vol
            m_LocalVars.Add(0x15, 0);    //extvol
            m_LocalVars.Add(0x16, 0);    //pan
            m_LocalVars.Add(0x17, 0);    //pitch
            m_LocalVars.Add(0x18, 0);    //paused
            m_LocalVars.Add(0x19, 0);    //fxtype
            m_LocalVars.Add(0x1a, 0);    //fxlevel
            m_LocalVars.Add(0x1b, 0);    //duckpri
            m_LocalVars.Add(0x1c, 0);    //Is3d
            m_LocalVars.Add(0x1d, 0);    //IsHeadRelative
            //m_LocalVars.Add(0x1d, 0); //HeadRelative
            m_LocalVars.Add(0x1e, 0);    //MinDistance
            m_LocalVars.Add(0x1f, 0);    //MaxDistance
            m_LocalVars.Add(0x20, 0);    //X
            m_LocalVars.Add(0x21, 0);    //Y
            m_LocalVars.Add(0x22, 0);    //Z
            m_LocalVars.Add(0x23, 0);    //attack
            m_LocalVars.Add(0x24, 0);    //decay
            m_LocalVars.Add(0x25, 0);    //isStreamed
            //m_LocalVars.Add(0x25, 0); //stream
            m_LocalVars.Add(0x26, 0);    //bufsizemult
            m_LocalVars.Add(0x27, 0);    //fade_dest
            m_LocalVars.Add(0x28, 0);    //fade_var
            m_LocalVars.Add(0x29, 0);    //fade_speed
            m_LocalVars.Add(0x2a, 0);    //fade_on
            m_LocalVars.Add(0x2b, 0);    //Preload
            m_LocalVars.Add(0x2c, 0);    //isplaying
            m_LocalVars.Add(0x2d, 0);    //whattodowithupdate
            m_LocalVars.Add(0x2e, 0);    //tempo
            m_LocalVars.Add(0x2f, 0);    //target
            m_LocalVars.Add(0x30, 0);    //ctrlgroup
            m_LocalVars.Add(0x31, 0);    //interrupt
            m_LocalVars.Add(0x32, 0);    //ispositioned
            m_LocalVars.Add(0x33, 0);    //loop
            m_LocalVars.Add(0x34, 0);    //source
            //m_LocalVars.Add(0x34, 0); //AppObjectId
            m_LocalVars.Add(0x35, 0);    //callbackarg
            m_LocalVars.Add(0x36, 0);    //pitchrandmin
            m_LocalVars.Add(0x37, 0);    //pitchrandmax
            m_LocalVars.Add(0x38, 0);    //spl
            m_LocalVars.Add(0x39, 0);    //sem
            m_LocalVars.Add(0x3a, 0);    //starttrackid
            m_LocalVars.Add(0x3b, 0);    //endtrackid
            m_LocalVars.Add(0x3c, 0);    //startdelay
            m_LocalVars.Add(0x3d, 0);    //fadeinspeed
            m_LocalVars.Add(0x3e, 0);    //fadeoutspeed
            m_LocalVars.Add(0x3f, 0);    //hitlist
            m_LocalVars.Add(0x40, 0);    //velocx
            m_LocalVars.Add(0x41, 0);    //velocy
            m_LocalVars.Add(0x42, 0);    //velocz
            m_LocalVars.Add(0x43, 0);    //orientx
            m_LocalVars.Add(0x44, 0);    //orienty
            m_LocalVars.Add(0x45, 0);    //orientz

            m_ObjectVars.Add(0x271a, 0); //IsInsideViewFrustum
            m_ObjectVars.Add(0x271b, 0); //PositionX
            m_ObjectVars.Add(0x271c, 0); //PositionY
            m_ObjectVars.Add(0x271d, 0); //PositionZ
            m_ObjectVars.Add(0x271e, 0); //OrientationX
            m_ObjectVars.Add(0x271f, 0); //OrientationY
            m_ObjectVars.Add(0x2720, 0); //OrientationZ
            m_ObjectVars.Add(0x2721, 0); //ViewUpX
            m_ObjectVars.Add(0x2722, 0); //ViewUpY
            m_ObjectVars.Add(0x2723, 0); //ViewUpZ
            m_ObjectVars.Add(0x2725, 0); //IsObscured
            m_ObjectVars.Add(0x2726, 0); //Gender
            m_ObjectVars.Add(0x2727, 0); //Age
            m_ObjectVars.Add(0x2728, 0); //CookingSkill
            m_ObjectVars.Add(0x2729, 0); //CleaningSkill
            m_ObjectVars.Add(0x272a, 0); //CreativitySkill
            m_ObjectVars.Add(0x272b, 0); //RepairSkill
            m_ObjectVars.Add(0x272c, 0); //GardeningSkill
            m_ObjectVars.Add(0x272d, 0); //MusiccSkillSkill
            m_ObjectVars.Add(0x272e, 0); //LiteracySkill
            m_ObjectVars.Add(0x272f, 0); //LogicSkill
            m_ObjectVars.Add(0x2730, 0); //Mood
            m_ObjectVars.Add(0x2731, 0); //Niceness
            m_ObjectVars.Add(0x2732, 0); //Activeness
            m_ObjectVars.Add(0x2733, 0); //Generousness
            m_ObjectVars.Add(0x2734, 0); //Playfulness
            m_ObjectVars.Add(0x2735, 0); //Outgoingness
            m_ObjectVars.Add(0x2736, 0); //Neatness

            m_Args.Add(0x0, 0);          //arg0
            m_Args.Add(0x1, 0);          //arg1
            m_Args.Add(0x2, 0);          //arg2
            m_Args.Add(0x3, 0);          //arg3
            m_Args.Add(0x4, 0);          //arg4
        }