예제 #1
0
    //FUN_4CA68
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        VigObject oVar1;
        uint      uVar1;

        if (arg1 == 5)
        {
            if (parent == null)
            {
                GameManager.instance.FUN_309A0(this);
                uVar1 = 0xfffffffe;
            }
            else
            {
                oVar1 = FUN_2CCBC();
                GameManager.instance.FUN_307CC(oVar1);
                uVar1 = 0xfffffffe;
            }
        }
        else
        {
            uVar1 = 0;
        }

        return(uVar1);
    }
예제 #2
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        int iVar3;

        if (arg1 != 2)
        {
            if (2 < arg1)
            {
                if (arg1 != 3)
                {
                    if (arg1 != 8)
                    {
                        return(0);
                    }

                    GameManager.instance.FUN_300B8(GameManager.instance.DAT_10C8, this);
                    iVar3 = GameManager.instance.FUN_1DD9C();
                    GameManager.instance.FUN_1E628(iVar3, GameManager.instance.DAT_C2C, 65, screen);
                    LevelManager.instance.FUN_4DE54(screen, 39);
                    LevelManager.instance.FUN_309C8(this, 0);
                    return(0xffffffff);
                }
            }
        }

        GameManager.instance.FUN_30CB0(this, 120);
        return(0);
    }
예제 #3
0
    private static void LoadSTRN(VigObject param1, BinaryReader reader)
    {
        ushort    uVar1;
        ushort    uVar2;
        VigObject oVar3;

        uVar1 = (ushort)reader.ReadInt32BE();

        if (reader.BaseStream.Length < 5)
        {
            param1.maxHalfHealth = uVar1;
            uVar2 = uVar1;
        }
        else
        {
            uVar2 = (ushort)reader.ReadInt32BE();
            param1.maxHalfHealth = uVar1;
        }

        param1.maxFullHealth = uVar2;
        oVar3 = param1.child2;

        while (oVar3 != null)
        {
            if (oVar3.maxHalfHealth == 0)
            {
                oVar3.maxHalfHealth = uVar1;
            }

            oVar3 = oVar3.child;
        }
    }
예제 #4
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        sbyte sVar2;

        switch (arg1)
        {
        case 20:
            target = arg2;

            if (tags == 0)
            {
                flags &= 0xfffffcff;
                FUN_30B78();
            }

            if (tags < 2)
            {
                child2.flags &= 0xfffffffd;
                child2.FUN_30BF0();
                sVar2  = (sbyte)GameManager.instance.FUN_1DD9C();
                DAT_18 = sVar2;
                GameManager.instance.FUN_1E098(sVar2, LevelManager.instance.xobfList[42].sndList, 5, 0, true);
                GameManager.instance.FUN_30CB0(this, 2700);
            }

            tags = 2;
            break;
        }

        return(0);
    }
예제 #5
0
    public static VigObject FUN_31D30(_PLACEHOLDER_TYPE param1, XOBF_DB param2, short param3, uint param4)
    {
        VigObject     oVar1;
        _VEHICLE_INIT dVar2;

        vehicleInit.TryGetValue(param1, out dVar2);

        if (dVar2 != null)
        {
            oVar1 = dVar2(param2, param3, param4);

            if (oVar1 != null)
            {
                return(oVar1);
            }
        }

        if (param2 == null || param3 == -1)
        {
            GameObject obj  = new GameObject();
            VigObject  comp = obj.AddComponent(typeof(VigObject)) as VigObject;
            comp.vData = param2;
            return(comp);
        }
        else
        {
            return(param2.ini.FUN_2C17C((ushort)param3, typeof(VigObject), param4));
        }
    }
예제 #6
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        int       iVar8;
        VigObject oVar9;

        switch (arg1)
        {
        case 5:
            if (DAT_1A != 27)
            {
                return(0);
            }

            FUN_2C124(26);
            Utilities.ParentChildren(this, this);

            if ((flags & 0x20) != 0)
            {
                flags &= 0xffffffdf;
                tags   = 2;
                iVar8  = (int)GameManager.FUN_2AC5C();
                oVar9  = GameManager.instance.FUN_30250(GameManager.instance.DAT_1078, (iVar8 * 5 >> 15) + 1200);
                DAT_80 = oVar9;
                GameManager.instance.FUN_30CB0(this, 120);
                return(0);
            }

            break;
        }

        return(0);
    }
예제 #7
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        short      sVar4;
        long       lVar7;
        int        iVar8;
        uint       uVar9;
        Vector3Int local_28;

        switch (arg1)
        {
        case 0:
            FUN_42330(arg2);
            uVar9 = 0;
            break;

        case 1:
            maxHalfHealth = 10;
            goto default;

        default:
            uVar9 = 0;
            break;

        case 12:
            FUN_4336C((Vehicle)arg2, 174);
            sVar4 = (short)(maxHalfHealth - 1);
LAB_437B0:
            maxHalfHealth = (ushort)sVar4;
            uVar9         = 30;

            if (sVar4 == 0)
            {
                FUN_3A368();
                uVar9 = 30;
            }

            break;

        case 13:
            local_28 = Utilities.FUN_24304(arg2.vTransform, ((Vehicle)arg2).target.vTransform.position);
            uVar9    = 0;

            if (local_28.z < 0x1f4000)
            {
                lVar7 = Utilities.Ratan2(local_28.x, local_28.z);
                iVar8 = (int)(lVar7 << 20) >> 20;

                if (iVar8 < 0)
                {
                    iVar8 = -iVar8;
                }

                uVar9 = (uint)(iVar8 < 113 ? 1 : 0);
            }

            break;
        }

        return(uVar9);
    }
예제 #8
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        byte bVar3;

        switch (state)
        {
        case _THROWAWAY_TYPE.Type3:
            if (arg1 == 1)
            {
                bVar3 = 3;

                if (10239 < DAT_58)
                {
                    bVar3 = 1;

                    if (DAT_58 < 30720)
                    {
                        bVar3 = 2;
                    }
                }

                DAT_87 = bVar3;
            }

            break;
        }

        return(0);
    }
예제 #9
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        ushort uVar1;
        uint   uVar2;
        uint   uVar3;
        int    iVar4;
        uint   uVar5;

        switch (arg1)
        {
        case 0:
            FUN_42330(arg2);
            uVar5 = 0;
            break;

        case 1:
            maxHalfHealth = 10;
            flags        |= 0x4000;
            goto default;

        default:
            uVar5 = 0;
            break;

        case 12:
            if (((Vehicle)arg2).doubleDamage == 0)
            {
                uVar2 = 75;
            }
            else
            {
                uVar2 = 150;
            }

            FUN_46480((Vehicle)arg2, 183, 6, (ushort)uVar2);
            uVar1 = (ushort)(maxHalfHealth - 1);
LAB_468B4:
            maxHalfHealth = uVar1;
            uVar3         = uVar1;
LAB_468BC:
            uVar5 = 120;

            if (uVar3 == 0)
            {
                FUN_3A368();
                uVar5 = 120;
            }

            break;

        case 13:
            iVar4 = Utilities.FUN_29F6C(arg2.screen, ((Vehicle)arg2).target.screen);
            uVar5 = (uint)(0x1f3ffe < (uint)(iVar4 - 0x1f4001 ^ 1) ? 1 : 0);
            break;
        }

        return(uVar5);
    }
예제 #10
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        uint uVar1;
        uint uVar2;

        switch (state)
        {
        case _MISSILE_TYPE.Shell:
            if (arg1 != 5)
            {
                return(0);
            }

            GameManager.instance.FUN_1FEB8(vMesh);
            GameManager.instance.FUN_2C4B4(child2);
            uVar2 = 186;

            if ((flags & 0x1000000) != 0)
            {
                uVar2 = 198;
            }

            FUN_2C344(vData, (ushort)uVar2, 8);
            uVar1  = flags;
            flags |= 0x84;

            if ((uVar1 & 0x1000000) == 0)
            {
                state = _MISSILE_TYPE.Projectile;
            }
            else
            {
                state         = _MISSILE_TYPE.Halo;
                DAT_84.flags |= 0x8000000;
            }

            physics2.M2 = 480;
            uVar2       = 0;
            return(uVar2);

        case _MISSILE_TYPE.Projectile:
            if (arg1 != 10)
            {
                return(0);
            }

            if (DAT_84 != arg2)
            {
                return(0);
            }

            DAT_84 = DAT_80;
            break;
        }

        return(0);
    }
예제 #11
0
    private static void LoadBSPI(VigObject param1, BinaryReader reader)
    {
        VigTuple tVar1;
        uint     uVar2;

        tVar1      = GameManager.instance.FUN_30134(GameManager.instance.interObjs, param1);
        uVar2      = reader.ReadUInt32BE();
        tVar1.flag = uVar2 | 0x80000000;
    }
예제 #12
0
    //FUN_400 (MARATHON.DLL)
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 == 5)
        {
            vAnim = null;
            return(0xffffffff);
        }

        return(0);
    }
예제 #13
0
    public static VigObject OnInitialize(XOBF_DB arg1, int arg2, uint arg3)
    {
        Dictionary <int, Type> dict = new Dictionary <int, Type>();

        dict.Add(599, typeof(VigChild));
        VigObject obj = arg1.ini.FUN_2C17C((ushort)arg2, typeof(TestThruster), arg3, dict);

        ((VigChild)obj.child2).state = _CHILD_TYPE.Default;
        return(obj);
    }
예제 #14
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 == 5)
        {
            GameManager.instance.FUN_309A0(this);
            return(0xffffffff);
        }

        return(0);
    }
예제 #15
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 != 5)
        {
            return(0);
        }

        FUN_4EE8C(GameManager.instance.interObjs);
        return(0xffffffff);
    }
예제 #16
0
    private Cannonball FUN_45218(VigObject param1, short param2, ushort param3)
    {
        int        iVar4;
        int        iVar5;
        VigObject  oVar6;
        Ballistic  ppcVar2;
        Cannonball ppcVar3;
        Vector3Int auStack32;

        oVar6   = child2;
        ppcVar2 = LevelManager.instance.xobfList[19].ini.FUN_2C17C(3, typeof(Ballistic), 8) as Ballistic;
        Utilities.ParentChildren(ppcVar2, ppcVar2);
        ppcVar3               = LevelManager.instance.FUN_42408(param1, oVar6, (ushort)param2, typeof(Cannonball), ppcVar2) as Cannonball;
        ppcVar3.flags         = 0x20000094;
        ppcVar3.maxHalfHealth = param3;
        ppcVar3.FUN_305FC();
        ppcVar3.physics2.M2 = 60;
        iVar5 = param1.physics1.X;

        if (iVar5 < 0)
        {
            iVar5 += 127;
        }

        ppcVar3.physics1.Z = (iVar5 >> 7) + ppcVar3.vTransform.rotation.V02 * 6;
        iVar5 = param1.physics1.Y;

        if (iVar5 < 0)
        {
            iVar5 += 127;
        }

        ppcVar3.physics1.W = (iVar5 >> 7) + ppcVar3.vTransform.rotation.V12 * 6;
        iVar5 = param1.physics1.Z;

        if (iVar5 < 0)
        {
            iVar5 += 127;
        }

        ppcVar3.physics2.X = (iVar5 >> 7) + ppcVar3.vTransform.rotation.V22 * 6;
        ppcVar2.FUN_30BF0();
        auStack32 = Utilities.FUN_24094(oVar6.vTransform.rotation, GameManager.DAT_A3C);
        param1.FUN_2B1FC(auStack32, screen);
        iVar4 = GameManager.instance.FUN_1DD9C();
        GameManager.instance.FUN_1E580(iVar4, GameManager.instance.DAT_C2C, 53, ppcVar3.screen);
        maxHalfHealth--;

        if (maxHalfHealth == 0)
        {
            FUN_3A368();
        }

        return(ppcVar3);
    }
예제 #17
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        switch (arg1)
        {
        case 20:
            FUN_3838((TrainEngine)arg2);
            return(0);
        }

        return(0);
    }
예제 #18
0
    public override uint UpdateW(VigObject arg1, int arg2, int arg3)
    {
        switch (arg2)
        {
        case 18:
            GameManager.instance.FUN_327CC(arg1);
            break;
        }

        return(0);
    }
예제 #19
0
    //FUN_4F034
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 == 5)
        {
            FUN_2CCBC();
            GameManager.instance.FUN_2C4B4(this);
            return(0xffffffff);
        }

        return(0);
    }
예제 #20
0
    //FUN_48974
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        switch (state)
        {
        case _OILSLICK_TYPE.Oilslick:
            sbyte sVar1;

            if (arg1 == 5)
            {
                sVar1 = tags;
                tags  = (sbyte)(sVar1 - 1);

                if (sVar1 == 1)
                {
                    FUN_2C124(220);
                    state = _OILSLICK_TYPE.Ballistic;
                    Utilities.ParentChildren(this, this);
                    return(0xffffffff);
                }

                id = 0;
            }

            return(0);

        case _OILSLICK_TYPE.Ballistic:
            VigObject oVar1;
            uint      uVar1;

            if (arg1 == 5)
            {
                if (parent == null)
                {
                    GameManager.instance.FUN_309A0(this);
                    uVar1 = 0xfffffffe;
                }
                else
                {
                    oVar1 = FUN_2CCBC();
                    GameManager.instance.FUN_307CC(oVar1);
                    uVar1 = 0xfffffffe;
                }
            }
            else
            {
                uVar1 = 0;
            }

            return(uVar1);
        }

        return(0);
    }
예제 #21
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 == 5)
        {
            FUN_30C20();
            vAnim  = null;
            flags |= 4;
            return(0xfffffffe);
        }

        return(0);
    }
예제 #22
0
    public int distance;                   //0x30

    public HitDetection(byte[] b)
    {
        self      = null;
        collider1 = new BufferedBinaryReader(b);
        collider2 = new BufferedBinaryReader(b);
        object1   = null;
        object2   = null;
        position  = new Vector3Int();
        normal1   = new Vector3Int();
        normal2   = new Vector3Int();
        distance  = 0;
    }
예제 #23
0
    //FUN_1B0 (STINGER.DLL)
    private static bool FUN_1B0(List <VigTuple> param1, VigObject param2)
    {
        for (int i = 0; i < param1.Count; i++)
        {
            if (param1[i].vObject == param2)
            {
                return(true);
            }
        }

        GameManager.instance.FUN_30080(param1, param2);
        return(false);
    }
예제 #24
0
    public int DAT_BC;            //0xBC

    public static VigObject OnInitialize(XOBF_DB arg1, int arg2, uint arg3)
    {
        Dictionary <int, Type> dict = new Dictionary <int, Type>();

        dict.Add(210, typeof(VigChild));
        dict.Add(211, typeof(VigChild));
        dict.Add(213, typeof(VigChild));
        dict.Add(215, typeof(VigChild));
        VigObject obj = arg1.ini.FUN_2C17C((ushort)arg2, typeof(CraneSmall), arg3, dict);

        FUN_14C0((VigChild)obj.child2, _CHILD_TYPE.Default);
        return(obj);
    }
예제 #25
0
    public override sbyte UpdateW(VigObject arg1, int arg2, TileData arg3)
    {
        int iVar6;

        switch (arg2)
        {
        case 12:
            iVar6 = GameManager.instance.FUN_1DD9C();
            GameManager.instance.FUN_1E098(iVar6, LevelManager.instance.xobfList[42].sndList, 4, 0, true);
            return((sbyte)iVar6);
        }

        return(0);
    }
예제 #26
0
    //FUN_2A78 (ROUTE66.DLL)
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        uint uVar1;

        uVar1 = 0;

        if (arg1 == 5)
        {
            GameManager.instance.FUN_309A0(this);
            uVar1 = 0xffffffff;
        }

        return(uVar1);
    }
예제 #27
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 != 5)
        {
            return(0);
        }

        //GameManager.instance.FUN_309A0(this);
        //return 0xffffffff;
        tags   = 1;
        flags |= 0x20;
        GameManager.instance.FUN_30CB0(this, 40);
        return(0);
    }
예제 #28
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        uint uVar1;

        uVar1 = 0;

        if (arg1 == 5)
        {
            FUN_4EE8C(GameManager.instance.interObjs);
            uVar1 = 0xffffffff;
        }

        return(uVar1);
    }
예제 #29
0
    //FUN_34F8 (LOAD.DLL)
    public static void LoadOBJ(byte[] obj)
    {
        MemoryStream stream = new MemoryStream(obj);

        using (BinaryReader reader = new BinaryReader(stream, Encoding.Default, true))
        {
            string    identifier = new string(reader.ReadChars(4));
            VigObject oVar3      = null;

            if (identifier == "OBJ ")
            {
                if (reader.BaseStream.Position != reader.BaseStream.Length)
                {
                    do
                    {
                        if (reader.BaseStream.Length - reader.BaseStream.Position < 8)
                        {
                            break;
                        }

                        reader.BaseStream.Seek(reader.BaseStream.Position % 2, SeekOrigin.Current);

                        string header    = new string(reader.ReadChars(4));
                        int    chunkSize = reader.ReadInt32BE();

                        if (header == "HEAD")
                        {
                            oVar3 = LoadHEAD(reader, chunkSize);
                        }
                        else
                        {
                            if (header == "BSPI" && oVar3 != null)
                            {
                                LoadBSPI(oVar3, reader);
                            }
                            else if (header == "LGHT" && oVar3 != null)
                            {
                                LoadLGHT(oVar3, reader);
                            }
                            else if (header == "STRN" && oVar3 != null)
                            {
                                LoadSTRN(oVar3, reader);
                            }
                        }
                    } while (reader.BaseStream.Position != reader.BaseStream.Length);
                }
            }
        }
    }
예제 #30
0
    public override uint UpdateW(int arg1, VigObject arg2)
    {
        if (arg1 != 2)
        {
            if (2 < arg1)
            {
                if (arg1 != 3)
                {
                    return(0);
                }
            }
        }

        return(0);
    }