예제 #1
0
파일: PSXGPU.cs 프로젝트: ArtReeX/memoria
    private unsafe static void exeLineG2(PSX_LIBGPU.LINE_G2 *ObjPtr)
    {
        Boolean abe    = PSXGPU.IsSemiTrans(ObjPtr->code);
        Color32 c      = new Color32(ObjPtr->r0, ObjPtr->g0, ObjPtr->b0, Byte.MaxValue);
        Color32 c2     = new Color32(ObjPtr->r1, ObjPtr->g1, ObjPtr->b1, 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);

        PSXGPU.DrawLineG2(abe, c, p, c2, vector);
    }
예제 #2
0
파일: SFXMesh.cs 프로젝트: ArtReeX/memoria
 public unsafe void LineG2(PSX_LIBGPU.LINE_G2 *obj)
 {
     SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)((Int32)obj->x0 + SFXMeshBase.drOffsetX), (Single)((Int32)obj->y0 + SFXMeshBase.drOffsetY), SFXMesh.zDepth);
     this.vbPos[this.vbOffset] = SFXMesh.gPos[SFXMesh.gPosIndex++];
     SFXMesh.gPos[SFXMesh.gPosIndex].Set((Single)((Int32)obj->x1 + SFXMeshBase.drOffsetX), (Single)((Int32)obj->y1 + SFXMeshBase.drOffsetY), SFXMesh.zDepth);
     this.vbPos[this.vbOffset + 1]     = 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]         = SFXMesh.gCol[SFXMesh.gColIndex++];
     SFXMesh.gCol[SFXMesh.gColIndex].r = obj->r1;
     SFXMesh.gCol[SFXMesh.gColIndex].g = obj->g1;
     SFXMesh.gCol[SFXMesh.gColIndex].b = obj->b1;
     SFXMesh.gCol[SFXMesh.gColIndex].a = this.alpha;
     this.vbCol[this.vbOffset + 1]     = SFXMesh.gCol[SFXMesh.gColIndex++];
     this.ibIndex[this.ibOffset++]     = this.vbOffset;
     this.ibIndex[this.ibOffset++]     = this.vbOffset + 1;
     this.vbOffset += 2;
 }