mirror of https://github.com/PCSX2/pcsx2.git
GregMiscellaneous: zzogl-pg:
* copy some vertex instead of re compute them twice * pass vertex as reference avoid useless copy on the stack... git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3964 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
aa64da2561
commit
02efc340e8
|
@ -86,6 +86,17 @@ struct VertexGPU
|
|||
{
|
||||
f = ((s16)(v).f << 7) | 0x7f;
|
||||
}
|
||||
|
||||
void operator = (const VertexGPU &v) {
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
f = v.f;
|
||||
rgba = v.rgba;
|
||||
z = v.z;
|
||||
s = v.s;
|
||||
t = v.t;
|
||||
q = v.q;
|
||||
}
|
||||
};
|
||||
|
||||
extern GSconf conf;
|
||||
|
|
|
@ -279,7 +279,7 @@ void Kick::TriangleFan()
|
|||
OUTPUT_VERT(p[2], 2);
|
||||
}
|
||||
|
||||
void Kick::SetKickVertex(VertexGPU *p, Vertex v, int next)
|
||||
void Kick::SetKickVertex(VertexGPU *p, Vertex &v, int next)
|
||||
{
|
||||
SET_VERTEX(p, next);
|
||||
p->move_z(v, vb[prim->ctxt].zprimmask);
|
||||
|
@ -314,17 +314,17 @@ void Kick::Sprite()
|
|||
|
||||
VertexGPU* p = curvb.pBufferData + curvb.nCount;
|
||||
|
||||
// process sprite as 2 triangles. The common diagonal is 0,1 and 3,4
|
||||
SetKickVertex(&p[0], gs.gsvertex[last], next);
|
||||
SetKickVertex(&p[3], gs.gsvertex[last], next);
|
||||
SetKickVertex(&p[1], gs.gsvertex[last], last);
|
||||
SetKickVertex(&p[4], gs.gsvertex[last], last);
|
||||
SetKickVertex(&p[2], gs.gsvertex[last], next);
|
||||
|
||||
// Duplicate the vertex
|
||||
p[3] = p[0];
|
||||
p[2] = p[0];
|
||||
p[4] = p[1];
|
||||
p[5] = p[1];
|
||||
// Move some vertex x coord to create the others corners of the sprite
|
||||
p[2].s = p[1].s;
|
||||
p[2].x = p[1].x;
|
||||
|
||||
SetKickVertex(&p[5], gs.gsvertex[last], last);
|
||||
|
||||
p[5].s = p[0].s;
|
||||
p[5].x = p[0].x;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class Kick
|
|||
{
|
||||
private:
|
||||
void SET_VERTEX(VertexGPU *p, int i);
|
||||
void SetKickVertex(VertexGPU *p, Vertex v, int next);
|
||||
void SetKickVertex(VertexGPU *p, Vertex &v, int next);
|
||||
void OUTPUT_VERT(VertexGPU vert, u32 id);
|
||||
public:
|
||||
Kick() { }
|
||||
|
|
Loading…
Reference in New Issue