Esempio n. 1
0
    public unsafe void PolyF4(PSX_LIBGPU.POLY_F4 *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.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;
    }
Esempio n. 2
0
    private unsafe static void exePolyF4(PSX_LIBGPU.POLY_F4 *ObjPtr)
    {
        Boolean abe     = PSXGPU.IsSemiTrans(ObjPtr->code);
        Color32 color   = new Color32(ObjPtr->r0, ObjPtr->g0, ObjPtr->b0, Byte.MaxValue);
        Vector3 p       = new Vector3((Single)ObjPtr->x0, (Single)ObjPtr->y0, PSXGPU.zDepth);
        Vector3 vector  = new Vector3((Single)ObjPtr->x1, (Single)ObjPtr->y1, PSXGPU.zDepth);
        Vector3 vector2 = new Vector3((Single)ObjPtr->x2, (Single)ObjPtr->y2, PSXGPU.zDepth);
        Vector3 p2      = new Vector3((Single)ObjPtr->x3, (Single)ObjPtr->y3, PSXGPU.zDepth);

        PSXGPU.DrawPolyG3(abe, color, p, color, vector, color, vector2);
        PSXGPU.DrawPolyG3(abe, color, vector2, color, vector, color, p2);
    }