예제 #1
0
파일: PSXGPU.cs 프로젝트: ArtReeX/memoria
    private unsafe static void exeLineF2(PSX_LIBGPU.LINE_F2 *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);

        PSXGPU.DrawLineG2(abe, color, p, color, vector);
    }
예제 #2
0
파일: SFXMesh.cs 프로젝트: ArtReeX/memoria
 public unsafe void LineF2(PSX_LIBGPU.LINE_F2 *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]         = (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;
 }