示例#1
0
    private unsafe static void PolyBFT4(PSX_LIBGPU.POLY_FT4 *tag)
    {
        UInt32  meshKey = SFXKey.GetABRTex(tag->code, tag->clut, tag->tpage) | 67108864u | 536870912u;
        SFXMesh mesh    = SFXRender.GetMesh(meshKey, tag->code);

        mesh.PolyBFT4(tag);
    }
示例#2
0
文件: PSXGPU.cs 项目: ArtReeX/memoria
    private unsafe static void exePolyFT4(PSX_LIBGPU.POLY_FT4 *p)
    {
        Boolean tge = PSXGPU.IsShadeTex(p->code);

        PSXGPU.DrawPolyGT3(PSXGPU.DRAW_BEGIN, p->code, p->clut, p->tpage, tge, ref p->rgbc0, ref p->xy0, ref p->uv0, ref p->rgbc0, ref p->xy1, ref p->uv1, ref p->rgbc0, ref p->xy2, ref p->uv2);
        PSXGPU.DrawPolyGT3(PSXGPU.DRAW_END, p->code, p->clut, p->tpage, tge, ref p->rgbc0, ref p->xy2, ref p->uv2, ref p->rgbc0, ref p->xy1, ref p->uv1, ref p->rgbc0, ref p->xy3, ref p->uv3);
    }
示例#3
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);
    }
示例#4
0
    public unsafe void PolyBFT4(PSX_LIBGPU.POLY_FT4 *obj)
    {
        Int32 num  = (Int32)obj->x0 + SFXMeshBase.drOffsetX;
        Int32 num2 = (Int32)obj->y0 + SFXMeshBase.drOffsetY;
        Int32 num3 = (Int32)obj->x1 + SFXMeshBase.drOffsetX;
        Int32 num4 = (Int32)obj->y1 + SFXMeshBase.drOffsetY;
        Int32 num5 = (Int32)obj->x2 + SFXMeshBase.drOffsetX;
        Int32 num6 = (Int32)obj->y2 + SFXMeshBase.drOffsetY;
        Int32 num7 = (Int32)obj->x3 + SFXMeshBase.drOffsetX;
        Int32 num8 = (Int32)obj->y3 + SFXMeshBase.drOffsetY;

        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num, (Single)num2, SFXMesh.zDepth);
        this.vbPos[this.vbOffset] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num3, (Single)num4, SFXMesh.zDepth);
        this.vbPos[this.vbOffset + 1] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num5, (Single)num6, SFXMesh.zDepth);
        this.vbPos[this.vbOffset + 2] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num7, (Single)num8, SFXMesh.zDepth);
        this.vbPos[this.vbOffset + 3] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        Single num9  = 0f;
        Single num10 = 240f;

        if ((this.key >> 16 & 31u) != 0u)
        {
            num9 = 128f;
        }
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u0 + num9, num10 - (Single)obj->v0);
        this.vbTex[this.vbOffset] = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u1 + num9, num10 - (Single)obj->v1);
        this.vbTex[this.vbOffset + 1] = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u2 + num9, num10 - (Single)obj->v2);
        this.vbTex[this.vbOffset + 2] = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u3 + num9, num10 - (Single)obj->v3);
        this.vbTex[this.vbOffset + 3]     = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gCol[SFXMesh.gColIndex].r = obj->r0;
        SFXMesh.gCol[SFXMesh.gColIndex].g = obj->g0;
        SFXMesh.gCol[SFXMesh.gColIndex].b = obj->b0;
        SFXMesh.gCol[SFXMesh.gColIndex].a = this.alpha;
        this.vbCol[this.vbOffset]         = (this.vbCol[this.vbOffset + 1] = (this.vbCol[this.vbOffset + 2] = (this.vbCol[this.vbOffset + 3] = SFXMesh.gCol[SFXMesh.gColIndex++])));
        this.ibIndex[this.ibOffset++]     = this.vbOffset;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 1;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 2;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 2;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 1;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 3;
        this.vbOffset += 4;
    }
示例#5
0
    public unsafe void PolyFT4(PSX_LIBGPU.POLY_FT4 *obj)
    {
        Int32 num  = (Int32)obj->x0 + SFXMeshBase.drOffsetX;
        Int32 num2 = (Int32)obj->y0 + SFXMeshBase.drOffsetY;
        Int32 num3 = (Int32)obj->x1 + SFXMeshBase.drOffsetX;
        Int32 num4 = (Int32)obj->y1 + SFXMeshBase.drOffsetY;
        Int32 num5 = (Int32)obj->x2 + SFXMeshBase.drOffsetX;
        Int32 num6 = (Int32)obj->y2 + SFXMeshBase.drOffsetY;
        Int32 num7 = (Int32)obj->x3 + SFXMeshBase.drOffsetX;
        Int32 num8 = (Int32)obj->y3 + SFXMeshBase.drOffsetY;

        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num, (Single)num2, SFXMesh.zDepth);
        this.vbPos[this.vbOffset] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num3, (Single)num4, SFXMesh.zDepth);
        this.vbPos[this.vbOffset + 1] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num5, (Single)num6, SFXMesh.zDepth);
        this.vbPos[this.vbOffset + 2] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)num7, (Single)num8, SFXMesh.zDepth);
        this.vbPos[this.vbOffset + 3] = SFXMesh.gPos[SFXMesh.gPosIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u0, (Single)obj->v0);
        this.vbTex[this.vbOffset] = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u1, (Single)obj->v1);
        this.vbTex[this.vbOffset + 1] = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u2, (Single)obj->v2);
        this.vbTex[this.vbOffset + 2] = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gTex[SFXMesh.gTexIndex].Set((Single)obj->u3, (Single)obj->v3);
        this.vbTex[this.vbOffset + 3]     = SFXMesh.gTex[SFXMesh.gTexIndex++];
        SFXMesh.gCol[SFXMesh.gColIndex].r = obj->r0;
        SFXMesh.gCol[SFXMesh.gColIndex].g = obj->g0;
        SFXMesh.gCol[SFXMesh.gColIndex].b = obj->b0;
        SFXMesh.gCol[SFXMesh.gColIndex].a = this.GetShadeAlpha(obj->code);
        this.vbCol[this.vbOffset]         = (this.vbCol[this.vbOffset + 1] = (this.vbCol[this.vbOffset + 2] = (this.vbCol[this.vbOffset + 3] = SFXMesh.gCol[SFXMesh.gColIndex++])));
        this.ibIndex[this.ibOffset++]     = this.vbOffset;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 1;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 2;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 2;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 1;
        this.ibIndex[this.ibOffset++]     = this.vbOffset + 3;
        this.vbOffset += 4;
    }