hedgewars/uGears.pas
changeset 2366 b38efe489615
parent 2365 12b5373f4058
child 2376 ece7b87f1334
equal deleted inserted replaced
2365:12b5373f4058 2366:b38efe489615
  1270 	end;
  1270 	end;
  1271 
  1271 
  1272 if (RopePoints.Count > 0) or (Gear^.Elasticity.QWordValue > 0) then
  1272 if (RopePoints.Count > 0) or (Gear^.Elasticity.QWordValue > 0) then
  1273 	begin
  1273 	begin
  1274 	glDisable(GL_TEXTURE_2D);
  1274 	glDisable(GL_TEXTURE_2D);
  1275 	glEnable(GL_LINE_SMOOTH);
  1275 	//glEnable(GL_LINE_SMOOTH);
  1276 
  1276 
  1277 	glPushMatrix;
  1277 	glPushMatrix;
  1278 
  1278 
  1279 	glTranslatef(WorldDx, WorldDy, 0);
  1279 	glTranslatef(WorldDx, WorldDy, 0);
  1280 	
  1280 	
  1281 	glLineWidth(4.0);
  1281 	glLineWidth(4.0);
  1282 
  1282 
  1283 	glColor4ub($B0, $B0, $B0, $D0);
  1283 	glColor3ub($B0, $B0, $B0);
  1284 
  1284 
  1285 	glEnableClientState(GL_VERTEX_ARRAY);
  1285 	glEnableClientState(GL_VERTEX_ARRAY);
  1286 	glVertexPointer(2, GL_INT, 0, @RopePoints.rounded[0]);
  1286 	glVertexPointer(2, GL_INT, 0, @RopePoints.rounded[0]);
  1287 	glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
  1287 	glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
  1288 	glColor4f(1, 1, 1, 1);
  1288 	glColor4f(1, 1, 1, 1);
  1289 
  1289 
  1290 	glPopMatrix;
  1290 	glPopMatrix;
  1291 	
  1291 	
  1292 	glEnable(GL_TEXTURE_2D);
  1292 	glEnable(GL_TEXTURE_2D);
  1293 	glDisable(GL_LINE_SMOOTH)
  1293 	//glDisable(GL_LINE_SMOOTH)
  1294 	end
  1294 	end
  1295 end;
  1295 end;
  1296 
  1296 
  1297 procedure DrawRope(Gear: PGear);
  1297 procedure DrawRope(Gear: PGear);
  1298 var roplen: LongInt;
  1298 var roplen: LongInt;