1177 procedure RenderWorldEdge(Lag: Longword); |
1177 procedure RenderWorldEdge(Lag: Longword); |
1178 var |
1178 var |
1179 VertexBuffer: array [0..3] of TVertex2f; |
1179 VertexBuffer: array [0..3] of TVertex2f; |
1180 c1, c2: LongWord; // couple of colours for edges |
1180 c1, c2: LongWord; // couple of colours for edges |
1181 begin |
1181 begin |
1182 if WorldEdge <> weNone then |
1182 if (WorldEdge = weSea) or (WorldEdge = weSky) or (WorldEdge = weBounce) then |
1183 begin |
1183 begin |
1184 (* I think for a bounded world, will fill the left and right areas with black or something. Also will probably want various border effects/animations based on border type. Prob also, say, trigger a border animation timer on an impact. *) |
1184 (* I think for a bounded world, will fill the left and right areas with black or something. Also will probably want various border effects/animations based on border type. Prob also, say, trigger a border animation timer on an impact. *) |
1185 |
1185 |
1186 glDisable(GL_TEXTURE_2D); |
1186 glDisable(GL_TEXTURE_2D); |
1187 glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
1187 glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
1442 DrawWaves(-1, 100, - (cWaveHeight + (cWaveHeight shr 1)), 0); |
1442 DrawWaves(-1, 100, - (cWaveHeight + (cWaveHeight shr 1)), 0); |
1443 |
1443 |
1444 changeDepth(RM, cStereo_Land); |
1444 changeDepth(RM, cStereo_Land); |
1445 DrawVisualGears(5); |
1445 DrawVisualGears(5); |
1446 DrawLand(WorldDx, WorldDy); |
1446 DrawLand(WorldDx, WorldDy); |
|
1447 if WorldEdge = weWrap then |
|
1448 begin |
|
1449 DrawLand(WorldDx - playWidth, WorldDy); |
|
1450 DrawLand(WorldDx + playWidth, WorldDy); |
|
1451 end; |
1447 |
1452 |
1448 DrawWater(255, 0); |
1453 DrawWater(255, 0); |
1449 |
1454 |
1450 (* |
1455 (* |
1451 // Attack bar |
1456 // Attack bar |
1469 i) |
1474 i) |
1470 end |
1475 end |
1471 end; |
1476 end; |
1472 *) |
1477 *) |
1473 |
1478 |
|
1479 |
|
1480 if WorldEdge = weWrap then |
|
1481 begin |
|
1482 // remember original value |
|
1483 i:= WorldDx; |
|
1484 WorldDx:= i - playWidth; |
|
1485 DrawVisualGears(1); |
|
1486 DrawGears(); |
|
1487 DrawVisualGears(6); |
|
1488 WorldDx:= i + playWidth; |
|
1489 DrawVisualGears(1); |
|
1490 DrawGears(); |
|
1491 DrawVisualGears(6); |
|
1492 // reset to original value |
|
1493 WorldDx:= i; |
|
1494 end; |
|
1495 |
1474 DrawVisualGears(1); |
1496 DrawVisualGears(1); |
1475 DrawGears; |
1497 DrawGears; |
1476 DrawVisualGears(6); |
1498 DrawVisualGears(6); |
|
1499 |
1477 |
1500 |
1478 if SuddenDeathDmg then |
1501 if SuddenDeathDmg then |
1479 DrawWater(SDWaterOpacity, 0) |
1502 DrawWater(SDWaterOpacity, 0) |
1480 else |
1503 else |
1481 DrawWater(WaterOpacity, 0); |
1504 DrawWater(WaterOpacity, 0); |
1506 DrawWaves(-1, 50, - (cWaveHeight shr 1), 0); |
1529 DrawWaves(-1, 50, - (cWaveHeight shr 1), 0); |
1507 |
1530 |
1508 // everything after this ChangeDepth will be drawn outside the screen |
1531 // everything after this ChangeDepth will be drawn outside the screen |
1509 // note: negative parallax gears should last very little for a smooth stereo effect |
1532 // note: negative parallax gears should last very little for a smooth stereo effect |
1510 ChangeDepth(RM, cStereo_Outside); |
1533 ChangeDepth(RM, cStereo_Outside); |
|
1534 if WorldEdge = weWrap then |
|
1535 begin |
|
1536 // remember original value |
|
1537 i:= WorldDx; |
|
1538 WorldDx:= i - playWidth; |
|
1539 DrawVisualGears(2); |
|
1540 WorldDx:= i + playWidth; |
|
1541 DrawVisualGears(2); |
|
1542 // reset to original value |
|
1543 WorldDx:= i; |
|
1544 end; |
1511 DrawVisualGears(2); |
1545 DrawVisualGears(2); |
1512 |
1546 |
1513 // everything after this ResetDepth will be drawn at screen level (depth = 0) |
1547 // everything after this ResetDepth will be drawn at screen level (depth = 0) |
1514 // note: everything that needs to be readable should be on this level |
1548 // note: everything that needs to be readable should be on this level |
1515 ResetDepth(RM); |
1549 ResetDepth(RM); |
|
1550 if WorldEdge = weWrap then |
|
1551 begin |
|
1552 // remember original value |
|
1553 i:= WorldDx; |
|
1554 WorldDx:= i - playWidth; |
|
1555 DrawVisualGears(3); |
|
1556 WorldDx:= i + playWidth; |
|
1557 DrawVisualGears(3); |
|
1558 // reset to original value |
|
1559 WorldDx:= i; |
|
1560 end; |
1516 DrawVisualGears(3); |
1561 DrawVisualGears(3); |
1517 |
1562 |
1518 {$WARNINGS OFF} |
1563 {$WARNINGS OFF} |
1519 // Target |
1564 // Target |
1520 if (TargetPoint.X <> NoPointX) and (CurrentTeam <> nil) and (CurrentHedgehog <> nil) then |
1565 if (TargetPoint.X <> NoPointX) and (CurrentTeam <> nil) and (CurrentHedgehog <> nil) then |