- again M$ compiler madness, absolute insanity, its why I love gcc and hate vc

This commit is contained in:
Mark Vejvoda 2011-02-09 01:42:58 +00:00
parent 49d7f5f036
commit bcc82a381d

View File

@ -2752,8 +2752,11 @@ void Renderer::renderMinimap(){
glEnable(GL_BLEND);
const int itemCount = attackEffects->getWaterSplashCount() * 12;
Vec2f vertices[itemCount];
Vec4f colors[itemCount];
if(itemCount > 0) {
vector<Vec2f> vertices;
vertices.resize(itemCount);
vector<Vec4f> colors;
colors.resize(itemCount);
// draw attack alarm
int vertexIndex = 0;
@ -2767,12 +2770,12 @@ void Renderer::renderMinimap(){
float attackX=mx +pos.x*zoom.x;
float attackY=my +mh -pos.y*zoom.y;
if(ws->getEnabled()){
// glBegin(GL_QUADS);
// glVertex2f(attackX-scale, attackY-scale);
// glVertex2f(attackX-scale, attackY+scale);
// glVertex2f(attackX+scale, attackY+scale);
// glVertex2f(attackX+scale, attackY-scale);
// glEnd();
// glBegin(GL_QUADS);
// glVertex2f(attackX-scale, attackY-scale);
// glVertex2f(attackX-scale, attackY+scale);
// glVertex2f(attackX+scale, attackY+scale);
// glVertex2f(attackX+scale, attackY-scale);
// glEnd();
colors[vertexIndex] = Vec4f(1.f, 1.f, 0.f, alpha);
vertices[vertexIndex] = Vec2f(attackX-scale, attackY-scale);
@ -2811,7 +2814,7 @@ void Renderer::renderMinimap(){
vertices[vertexIndex] = Vec2f(attackX, attackY);
vertexIndex++;
/*
/*
glBegin(GL_TRIANGLES);
glColor4f(1.f, 1.f, 0.f, alpha);
glVertex2f(attackX-scale, attackY-scale);
@ -2840,7 +2843,7 @@ void Renderer::renderMinimap(){
glColor4f(1.f, 1.f, 0.f, 0.8f);
glVertex2f(attackX, attackY);
glEnd();
*/
*/
}
}
@ -2854,6 +2857,7 @@ void Renderer::renderMinimap(){
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
}
}
glDisable(GL_BLEND);
@ -2861,8 +2865,10 @@ void Renderer::renderMinimap(){
VisibleQuadContainerCache &qCache = getQuadCache();
if(qCache.visibleUnitList.size() > 0) {
uint32 unitIdx=0;
Vec2f unit_vertices[qCache.visibleUnitList.size()*4];
Vec3f unit_colors[qCache.visibleUnitList.size()*4];
vector<Vec2f> unit_vertices;
unit_vertices.resize(qCache.visibleUnitList.size()*4);
vector<Vec3f> unit_colors;
unit_colors.resize(qCache.visibleUnitList.size()*4);
for(int visibleIndex = 0;
visibleIndex < qCache.visibleUnitList.size(); ++visibleIndex) {