336 |
336 |
337 if State <> 0 then gear^.State:= State; |
337 if State <> 0 then gear^.State:= State; |
338 |
338 |
339 case Gear^.Kind of |
339 case Gear^.Kind of |
340 vgtFlake: if cFlattenFlakes then gear^.Layer:= 0 |
340 vgtFlake: if cFlattenFlakes then gear^.Layer:= 0 |
341 else if random(3) <> 0 then gear^.Layer:= 0 // 67% |
341 else if random(3) = 0 then gear^.Layer:= 0 // 33% - far back |
342 else if random(3) <> 0 then gear^.Layer:= 1 // 22% |
342 else if random(3) = 0 then gear^.Layer:= 4 // 22% - mid-distance |
343 else gear^.Layer:= random(2)+2; // 6% each |
343 else if random(2) = 0 then gear^.Layer:= 5 // 22% - just behind land |
344 |
344 else if random(4) = 0 then gear^.Layer:= 6 // 15% - just in front of land |
345 // 0: this layer is very distant in the background when stereo |
345 else gear^.Layer:= 2; // 7% - close up |
|
346 |
|
347 vgtCloud: if cFlattenClouds then gear^.Layer:= 5 |
|
348 else if random(3) = 0 then gear^.Layer:= 0 |
|
349 else gear^.Layer:= random(2) + 4; |
|
350 |
|
351 // 0: this layer is very distant in the background when in stereo |
346 vgtTeamHealthSorter, |
352 vgtTeamHealthSorter, |
347 vgtSmoothWindBar, |
353 vgtSmoothWindBar: gear^.Layer:= 0; |
348 vgtCloud: gear^.Layer:= 0; |
354 |
349 |
355 |
350 // 1: this layer is on the land level (which is close but behind the screen plane) when stereo |
356 // 1: this layer is on the land level (which is close but behind the screen plane) when stereo |
351 vgtSmokeTrace, |
357 vgtSmokeTrace, |
352 vgtEvilTrace, |
358 vgtEvilTrace, |
353 vgtLineTrail, |
359 vgtLineTrail, |
483 Gear:= VisualGearLayers[0]; |
492 Gear:= VisualGearLayers[0]; |
484 while Gear <> nil do |
493 while Gear <> nil do |
485 begin |
494 begin |
486 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
495 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
487 case Gear^.Kind of |
496 case Gear^.Kind of |
|
497 vgtCloud: if SuddenDeathDmg then |
|
498 DrawTextureF(SpritesData[sprSDCloud].Texture, 0.5, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprCloud].Width, SpritesData[sprCloud].Height) |
|
499 else |
|
500 DrawTextureF(SpritesData[sprCloud].Texture, 0.5, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprCloud].Width, SpritesData[sprCloud].Height); |
488 vgtFlake: if cFlattenFlakes then |
501 vgtFlake: if cFlattenFlakes then |
489 begin |
502 begin |
490 if SuddenDeathDmg then |
503 if SuddenDeathDmg then |
491 if vobSDVelocity = 0 then |
504 if vobSDVelocity = 0 then |
492 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
505 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
509 if vobVelocity = 0 then |
522 if vobVelocity = 0 then |
510 DrawTextureF(SpritesData[sprFlake].Texture, 0.5, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height) |
523 DrawTextureF(SpritesData[sprFlake].Texture, 0.5, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height) |
511 else |
524 else |
512 DrawRotatedTextureF(SpritesData[sprFlake].Texture, 0.5, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle) |
525 DrawRotatedTextureF(SpritesData[sprFlake].Texture, 0.5, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle) |
513 end; |
526 end; |
514 vgtCloud: if SuddenDeathDmg then |
|
515 DrawSprite(sprSDCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
|
516 else |
|
517 DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame); |
|
518 end; |
527 end; |
519 if Gear^.Tint <> $FFFFFFFF then Tint($FF,$FF,$FF,$FF); |
528 if Gear^.Tint <> $FFFFFFFF then Tint($FF,$FF,$FF,$FF); |
520 Gear:= Gear^.NextGear |
529 Gear:= Gear^.NextGear |
521 end |
530 end |
522 end; |
531 end; |
575 while Gear <> nil do |
584 while Gear <> nil do |
576 begin |
585 begin |
577 tinted:= false; |
586 tinted:= false; |
578 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
587 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
579 case Gear^.Kind of |
588 case Gear^.Kind of |
|
589 (* |
580 vgtFlake: if SuddenDeathDmg then |
590 vgtFlake: if SuddenDeathDmg then |
581 if vobSDVelocity = 0 then |
591 if vobSDVelocity = 0 then |
582 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
592 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
583 else |
593 else |
584 DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle) |
594 DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle) |
585 else |
595 else |
586 if vobVelocity = 0 then |
596 if vobVelocity = 0 then |
587 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
597 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
588 else |
598 else |
589 DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle); |
599 DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);*) |
590 vgtSpeechBubble: begin |
600 vgtSpeechBubble: begin |
591 if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then |
601 if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then |
592 begin |
602 begin |
593 tinted:= true; |
603 tinted:= true; |
594 Tint($FF, $FF, $FF, $66); |
604 Tint($FF, $FF, $FF, $66); |
701 else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer); |
711 else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer); |
702 end; |
712 end; |
703 if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF); |
713 if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF); |
704 Gear:= Gear^.NextGear |
714 Gear:= Gear^.NextGear |
705 end |
715 end |
706 end |
716 end; |
|
717 // this layer is half-way between the screen plane (depth = 0) when in stereo, and the land |
|
718 4: begin |
|
719 Gear:= VisualGearLayers[4]; |
|
720 while Gear <> nil do |
|
721 begin |
|
722 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
|
723 case Gear^.Kind of |
|
724 vgtCloud: if SuddenDeathDmg then |
|
725 DrawTextureF(SpritesData[sprSDCloud].Texture, 0.8, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprCloud].Width, SpritesData[sprCloud].Height) |
|
726 else |
|
727 DrawTextureF(SpritesData[sprCloud].Texture, 0.8, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprCloud].Width, SpritesData[sprCloud].Height); |
|
728 vgtFlake: if SuddenDeathDmg then |
|
729 if vobSDVelocity = 0 then |
|
730 DrawTextureF(SpritesData[sprSDFlake].Texture, 0.8, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height) |
|
731 else |
|
732 DrawRotatedTextureF(SpritesData[sprSDFlake].Texture, 0.8, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle) |
|
733 else |
|
734 if vobVelocity = 0 then |
|
735 DrawTextureF(SpritesData[sprFlake].Texture, 0.8, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height) |
|
736 else |
|
737 DrawRotatedTextureF(SpritesData[sprFlake].Texture, 0.8, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, SpritesData[sprFlake].Width, SpritesData[sprFlake].Height, Gear^.Angle); |
|
738 end; |
|
739 if (Gear^.Tint <> $FFFFFFFF) then Tint($FF,$FF,$FF,$FF); |
|
740 Gear:= Gear^.NextGear |
|
741 end |
|
742 end; |
|
743 // this layer is on the screen plane (depth = 0) when stereo, but just behind the land |
|
744 5: begin |
|
745 Gear:= VisualGearLayers[5]; |
|
746 while Gear <> nil do |
|
747 begin |
|
748 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
|
749 case Gear^.Kind of |
|
750 vgtCloud: if SuddenDeathDmg then |
|
751 DrawSprite(sprSDCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
|
752 else |
|
753 DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame); |
|
754 vgtFlake: if SuddenDeathDmg then |
|
755 if vobSDVelocity = 0 then |
|
756 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
|
757 else |
|
758 DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle) |
|
759 else |
|
760 if vobVelocity = 0 then |
|
761 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
|
762 else |
|
763 DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle); |
|
764 end; |
|
765 if (Gear^.Tint <> $FFFFFFFF) then Tint($FF,$FF,$FF,$FF); |
|
766 Gear:= Gear^.NextGear |
|
767 end |
|
768 end; |
|
769 // this layer is on the screen plane (depth = 0) when stereo, but just in front of the land |
|
770 6: begin |
|
771 Gear:= VisualGearLayers[6]; |
|
772 while Gear <> nil do |
|
773 begin |
|
774 if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint); |
|
775 case Gear^.Kind of |
|
776 vgtFlake: if SuddenDeathDmg then |
|
777 if vobSDVelocity = 0 then |
|
778 DrawSprite(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
|
779 else |
|
780 DrawRotatedF(sprSDFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle) |
|
781 else |
|
782 if vobVelocity = 0 then |
|
783 DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame) |
|
784 else |
|
785 DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle); |
|
786 end; |
|
787 if (Gear^.Tint <> $FFFFFFFF) then Tint($FF,$FF,$FF,$FF); |
|
788 Gear:= Gear^.NextGear |
|
789 end |
|
790 end; |
707 end; |
791 end; |
708 end; |
792 end; |
709 |
793 |
710 function VisualGearByUID(uid : Longword) : PVisualGear; |
794 function VisualGearByUID(uid : Longword) : PVisualGear; |
711 var vg: PVisualGear; |
795 var vg: PVisualGear; |