Esempio n. 1
0
    private unsafe static void TILE(PSX_LIBGPU.TILE *tag, Int32 w, Int32 h)
    {
        UInt32  currentABR = SFXKey.GetCurrentABR(tag->code);
        SFXMesh mesh       = SFXRender.GetMesh(currentABR, tag->code);

        mesh.TILE(tag, w, h);
    }
Esempio n. 2
0
    private unsafe static void SPRT(PSX_LIBGPU.SPRT *tag, Int32 w, Int32 h)
    {
        UInt32  meshKey = SFXKey.GetCurrentABRTex(tag->code, tag->clut) | 67108864u;
        SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);

        mesh.SPRT(tag, w, h);
    }
Esempio n. 3
0
    private unsafe static void PolyBGT4(PSX_LIBGPU.POLY_GT4 *tag)
    {
        UInt32  meshKey = SFXKey.GetABRTex(tag->code, tag->clut, tag->tpage) | 67108864u | 536870912u;
        SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);

        mesh.PolyBGT4(tag);
    }
Esempio n. 4
0
    private unsafe static void PolyFT4(PSX_LIBGPU.POLY_FT4 *tag, UInt32 fillter = 0u)
    {
        UInt32  meshKey = SFXKey.GetABRTex(tag->code, tag->clut, tag->tpage) | fillter;
        SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);

        mesh.PolyFT4(tag);
    }
Esempio n. 5
0
    private unsafe static void PolyGT4(PSX_LIBGPU.POLY_GT4 *tag)
    {
        UInt32  abrtex = SFXKey.GetABRTex(tag->code, tag->clut, tag->tpage);
        SFXMesh mesh   = SFXRender.GetMesh(abrtex, tag->code);

        mesh.PolyGT4(tag);
    }
Esempio n. 6
0
    public unsafe static void Add(PSX_LIBGPU.P_TAG *tag)
    {
        Int32 num = (Int32)(tag->code & 252);

        if (num == 32)
        {
            UInt32  meshKey = SFXKey.GetCurrentABR(tag->code);
            SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);
            mesh.PolyF3((PSX_LIBGPU.POLY_F3 *)tag);
            return;
        }
        if (num == 36)
        {
            if (SFX.currentEffectID != 149)
            {
                SFXRender.PolyFT3((PSX_LIBGPU.POLY_FT3 *)tag);
            }
            return;
        }
        if (num == 40)
        {
            UInt32  meshKey = SFXKey.GetCurrentABR(tag->code);
            SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);
            mesh.PolyF4((PSX_LIBGPU.POLY_F4 *)tag);
            return;
        }
        if (num == 44)
        {
            SFXRender.PolyFT4((PSX_LIBGPU.POLY_FT4 *)tag, 0u);
            return;
        }
        if (num == 48)
        {
            UInt32  meshKey = SFXKey.GetCurrentABR(tag->code);
            SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);
            mesh.PolyG3((PSX_LIBGPU.POLY_G3 *)tag);
            return;
        }
        if (num == 52)
        {
            SFXRender.PolyGT3((PSX_LIBGPU.POLY_GT3 *)tag);
            return;
        }
        if (num == 56)
        {
            UInt32  meshKey = SFXKey.GetCurrentABR(tag->code);
            SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);
            mesh.PolyG4((PSX_LIBGPU.POLY_G4 *)tag);
            return;
        }
        if (num == 60)
        {
            if (SFX.currentEffectID != 126 && SFX.currentEffectID != 149 && SFX.currentEffectID != 395)
            {
                SFXRender.PolyGT4((PSX_LIBGPU.POLY_GT4 *)tag);
            }
            return;
        }
        if (num == 64)
        {
            UInt32  meshKey = SFXKey.GetCurrentABR(tag->code) | 134217728u;
            SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);
            mesh.LineF2((PSX_LIBGPU.LINE_F2 *)tag);
            return;
        }
        if (num == 68)
        {
            SFXRender.PolyBFT4((PSX_LIBGPU.POLY_FT4 *)tag);
            return;
        }
        if (num == 72)
        {
            SFXRender.PolyBGT4((PSX_LIBGPU.POLY_GT4 *)tag);
            return;
        }
        if (num == 76)
        {
            SFXRender.PolyFT4((PSX_LIBGPU.POLY_FT4 *)tag, 33554432u);
            return;
        }
        if (num == 80)
        {
            UInt32  meshKey = SFXKey.GetCurrentABR(tag->code) | 134217728u;
            SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);
            mesh.LineG2((PSX_LIBGPU.LINE_G2 *)tag);
            return;
        }
        if (num == 96)
        {
            SFXRender.TILE((PSX_LIBGPU.TILE *)tag, (Int32)((PSX_LIBGPU.TILE *)tag)->w, (Int32)((PSX_LIBGPU.TILE *)tag)->h);
            return;
        }
        if (num == 100)
        {
            SFXRender.SPRT((PSX_LIBGPU.SPRT *)tag, (Int32)((PSX_LIBGPU.SPRT *)tag)->w, (Int32)((PSX_LIBGPU.SPRT *)tag)->h);
            return;
        }
        if (num == 104)
        {
            SFXRender.TILE((PSX_LIBGPU.TILE *)tag, 1, 1);
            return;
        }
        if (num == 112)
        {
            SFXRender.TILE((PSX_LIBGPU.TILE *)tag, 8, 8);
            return;
        }
        if (num == 116)
        {
            SFXRender.SPRT((PSX_LIBGPU.SPRT *)tag, 8, 8);
            return;
        }
        if (num == 120)
        {
            SFXRender.TILE((PSX_LIBGPU.TILE *)tag, 16, 16);
            return;
        }
        if (num != 124)
        {
            switch (tag->code)
            {
            case 225:
                if (tag->getLen() == 1u)
                {
                    SFXRender.DR_TPAGE((PSX_LIBGPU.DR_TPAGE *)tag);
                }
                else
                {
                    SFXRender.DR_TPAGE((PSX_LIBGPU.DR_TPAGE *)tag);
                }
                break;

            case 228:
                SFXRender.DR_AREA((PSX_LIBGPU.DR_AREA *)tag);
                break;

            case 229:
                SFXRender.DR_OFFSET((PSX_LIBGPU.DR_OFFSET *)tag);
                break;

            case 231:
                if (SFX.currentEffectID != 395 && SFX.currentEffectID != 126)
                {
                    SFXRender.DR_MOVE((PSX_LIBGPU.DR_MOVE *)tag);
                }
                break;
            }
            return;
        }
        SFXRender.SPRT((PSX_LIBGPU.SPRT *)tag, 16, 16);
    }