hedgewars/GearDrawing.inc
author smxx
Sat, 01 May 2010 20:15:38 +0000
changeset 3392 9d5d01b52ae8
parent 3390 1d4926d10a9e
child 3393 595655a09b26
permissions -rw-r--r--
Engine: * Reverted poison color change to make Tiy happy ;)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     1
procedure DrawHH(Gear: PGear);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     2
var i, t: LongInt;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     3
    amt: TAmmoType;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     4
    hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt;  // hedgehog, crosshair, temp, sprite, direction
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     5
    lx, ly, dx, dy, ax, ay, aAngle, dAngle, hAngle: real;  // laser, change
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     6
    defaultPos, HatVisible: boolean;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     7
    HH: PHedgehog;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     8
begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
     9
HH:= PHedgehog(Gear^.Hedgehog);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    10
if HH^.Unplaced then exit;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    11
m:= 1;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    12
if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    13
if (Gear^.State and gstHHDeath) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    14
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    15
    DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    16
    exit
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    17
    end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    18
else if (Gear^.State and gstHHGone) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    19
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    20
    DrawRotatedF(sprTeleport, hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy, Gear^.Pos, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    21
    exit
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    22
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    23
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    24
defaultPos:= true;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    25
HatVisible:= false;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    26
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    27
sx:= hwRound(Gear^.X) + 1 + WorldDx;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    28
sy:= hwRound(Gear^.Y) - 3 + WorldDy;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    29
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    30
if HH^.Effects[hePoisoned] then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    31
    begin
3392
9d5d01b52ae8 Engine:
smxx
parents: 3390
diff changeset
    32
    Tint($00, $FF, $40, $40);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    33
    DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360);
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
    34
    Tint($FF, $FF, $FF, $FF)
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    35
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    36
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    37
if ((Gear^.State and gstWinner) <> 0) and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    38
   ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    39
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    40
    DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    41
            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    42
            2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    43
            0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    44
            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    45
    defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    46
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    47
if (Gear^.State and gstDrowning) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    48
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    49
    DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    50
            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    51
            1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    52
            7,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    53
            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    54
    defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    55
    end else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    56
if (Gear^.State and gstLoser) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    57
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    58
    DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    59
            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    60
            2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    61
            3,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    62
            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    63
    defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    64
    end else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    65
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    66
if (Gear^.State and gstHHDriven) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    67
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    68
    if ((Gear^.State and gstHHThinking) = 0) and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    69
       (ShowCrosshair  or ((CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope))) and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    70
       ((Gear^.State and (gstAttacked or gstAnimation)) = 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    71
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    72
(* These calculations are a little complex for a few reasons:
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    73
   1: I need to draw the laser from weapon origin to nearest land
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    74
   2: I need to start the beam outside the hedgie for attractiveness.
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    75
   3: I need to extend the beam beyond land.
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    76
   This routine perhaps should be pushed into uStore or somesuch instead of continuuing the increase in size of this function.
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    77
*)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    78
        dx:= hwSign(Gear^.dX) * m * Sin(Gear^.Angle * pi / cMaxAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    79
        dy:= - Cos(Gear^.Angle * pi / cMaxAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    80
        if cLaserSighting then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    81
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    82
            lx:= hwRound(Gear^.X);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    83
            ly:= hwRound(Gear^.Y);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    84
            lx:= lx + dx * 16;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    85
            ly:= ly + dy * 16;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    86
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    87
            ax:= dx * 4;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    88
            ay:= dy * 4;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    89
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    90
            tx:= round(lx);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    91
            ty:= round(ly);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    92
            hx:= tx;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    93
            hy:= ty;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    94
            while ((ty and LAND_HEIGHT_MASK) = 0) and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    95
                ((tx and LAND_WIDTH_MASK) = 0) and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    96
                (Land[ty, tx] = 0) do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    97
                begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    98
                lx:= lx + ax;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
    99
                ly:= ly + ay;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   100
                tx:= round(lx);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   101
                ty:= round(ly)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   102
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   103
            // reached edge of land. assume infinite beam. Extend it way out past camera
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   104
            if ((ty and LAND_HEIGHT_MASK) <> 0) or ((tx and LAND_WIDTH_MASK) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   105
                begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   106
                tx:= round(lx + ax * (LAND_WIDTH div 4));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   107
                ty:= round(ly + ay * (LAND_WIDTH div 4));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   108
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   109
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   110
            //if (abs(lx-tx)>8) or (abs(ly-ty)>8) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   111
                begin
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   112
                glEnable(GL_LINE_SMOOTH);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   113
                glDisable(GL_TEXTURE_2D);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   114
                glLineWidth(1.0);
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   115
                Tint($FF, $00, $00, $C0);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   116
                glBegin(GL_LINES);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   117
                glVertex3f(hx + WorldDx, hy + WorldDy, 0);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   118
                glVertex3f(tx + WorldDx, ty + WorldDy, 0);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   119
                glEnd();
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   120
                glLineWidth(5.0);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   121
                glBegin(GL_LINES);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   122
                glVertex3f(tx + WorldDx - 0.5, ty + WorldDy, 0);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   123
                glVertex3f(tx + WorldDx + 0.5, ty + WorldDy, 0);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   124
                glEnd();
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   125
                Tint($FF, $FF, $FF, $FF);
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   126
                glDisable(GL_LINE_SMOOTH);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   127
                glEnable(GL_TEXTURE_2D);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   128
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   129
            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   130
        // draw crosshair
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   131
        cx:= Round(hwRound(Gear^.X) + dx * 80);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   132
        cy:= Round(hwRound(Gear^.Y) + dy * 80);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   133
        DrawRotatedTex(HH^.Team^.CrosshairTex,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   134
                12, 12, cx + WorldDx, cy + WorldDy, 0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   135
                hwSign(Gear^.dX) * (Gear^.Angle * 180.0) / cMaxAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   136
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   137
    hx:= hwRound(Gear^.X) + 1 + 8 * hwSign(Gear^.dX) + WorldDx;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   138
    hy:= hwRound(Gear^.Y) - 2 + WorldDy;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   139
    aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   140
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   141
    if CurAmmoGear <> nil then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   142
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   143
        case CurAmmoGear^.Kind of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   144
            gtShotgunShot: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   145
                    if (CurAmmoGear^.State and gstAnimation <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   146
                        DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   147
                    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   148
                        DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   149
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   150
            gtDEagleShot: DrawRotated(sprDEagle, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   151
            gtSniperRifleShot: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   152
                    if (CurAmmoGear^.State and gstAnimation <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   153
                        DrawRotatedF(sprSniperRifle, hx, hy, 1, hwSign(Gear^.dX), aangle)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   154
                    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   155
                        DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   156
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   157
            gtBallgun: DrawRotated(sprHandBallgun, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   158
            gtRCPlane: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   159
                DrawRotated(sprHandPlane, hx, hy, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   160
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   161
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   162
            gtRope: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   163
                if Gear^.X < CurAmmoGear^.X then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   164
                    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   165
                    dAngle:= 0;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   166
                    hAngle:= 180;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   167
                    i:= 1
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   168
                    end else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   169
                    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   170
                    dAngle:= 180;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   171
                    hAngle:= 0;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   172
                    i:= -1
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   173
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   174
                sx:= hwRound(Gear^.X) + WorldDx;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   175
                sy:= hwRound(Gear^.Y) + WorldDy;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   176
               if ((Gear^.State and gstWinner) = 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   177
                   begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   178
                   DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   179
                           i,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   180
                           1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   181
                           0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   182
                           DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   183
                   with HH^ do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   184
                       if (HatTex <> nil) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   185
                           DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, 32,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   186
                               i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   187
                   end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   188
                DrawAltWeapon(Gear, sx, sy);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   189
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   190
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   191
            gtBlowTorch: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   192
                DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   193
                DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   194
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   195
                        3,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   196
                        HH^.visStepPos div 2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   197
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   198
                with HH^ do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   199
                    if (HatTex <> nil) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   200
                       DrawTextureF(HatTex,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   201
                           1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   202
                           sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   203
                           hwRound(Gear^.Y) - 8 + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   204
                           0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   205
                           hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   206
                           32,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   207
                           32);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   208
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   209
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   210
            gtShover: DrawRotated(sprHandBaseball, hx, hy, hwSign(Gear^.dX), aangle + 180);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   211
            gtFirePunch: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   212
                DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   213
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   214
                        1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   215
                        4,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   216
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   217
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   218
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   219
            gtPickHammer: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   220
                defaultPos:= false;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   221
                dec(sy,20);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   222
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   223
            gtTeleport: defaultPos:= false;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   224
            gtWhip: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   225
                DrawRotatedF(sprWhip,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   226
                        sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   227
                        sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   228
                        1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   229
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   230
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   231
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   232
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   233
            gtKamikaze: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   234
                if CurAmmoGear^.Pos = 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   235
                    DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   236
                            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   237
                            1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   238
                            6,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   239
                            0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   240
                else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   241
                    DrawRotatedF(sprKamikaze,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   242
                            hwRound(Gear^.X) + WorldDx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   243
                            hwRound(Gear^.Y) + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   244
                            CurAmmoGear^.Pos - 1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   245
                            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   246
                            aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   247
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   248
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   249
            gtSeduction: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   250
                if CurAmmoGear^.Pos >= 6 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   251
                    DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   252
                            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   253
                            2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   254
                            2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   255
                            0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   256
                else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   257
                    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   258
                    DrawRotatedF(sprDress,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   259
                            hwRound(Gear^.X) + WorldDx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   260
                            hwRound(Gear^.Y) + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   261
                            CurAmmoGear^.Pos,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   262
                            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   263
                            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   264
                    DrawSprite(sprCensored, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 20 + WorldDy, 0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   265
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   266
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   267
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   268
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   269
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   270
        case CurAmmoGear^.Kind of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   271
            gtShotgunShot,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   272
            gtDEagleShot,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   273
            gtSniperRifleShot,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   274
            gtShover: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   275
                DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   276
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   277
                        0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   278
                        4,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   279
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   280
                defaultPos:= false;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   281
                HatVisible:= true
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   282
            end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   283
        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   284
    end else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   285
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   286
    if ((Gear^.State and gstHHJumping) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   287
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   288
    DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   289
        hwSign(Gear^.dX)*m,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   290
        1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   291
        1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   292
        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   293
    HatVisible:= true;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   294
    defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   295
    end else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   296
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   297
    if (Gear^.Message and (gm_Left or gm_Right) <> 0) and (not isCursorVisible) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   298
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   299
        DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   300
            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   301
            0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   302
            HH^.visStepPos div 2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   303
            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   304
        defaultPos:= false;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   305
        HatVisible:= true
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   306
        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   307
    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   308
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   309
    if ((Gear^.State and gstAnimation) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   310
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   311
        if (TWave(Gear^.Tag) < Low(TWave)) or (TWave(Gear^.Tag) > High(TWave)) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   312
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   313
            Gear^.State:= Gear^.State and not gstAnimation;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   314
            end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   315
        else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   316
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   317
            DrawRotatedF(Wavez[TWave(Gear^.Tag)].Sprite,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   318
                    sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   319
                    sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   320
                    Gear^.Pos,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   321
                    hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   322
                    0.0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   323
            defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   324
            end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   325
        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   326
    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   327
    if ((Gear^.State and gstAttacked) = 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   328
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   329
        if HH^.Timer > 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   330
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   331
            // There must be a tidier way to do this. Anyone?
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   332
            if aangle <= 90 then aangle:= aangle+360;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   333
            if Gear^.dX > _0 then aangle:= aangle-((aangle-240)*HH^.Timer/10)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   334
            else aangle:= aangle+((240-aangle)*HH^.Timer/10);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   335
            dec(HH^.Timer)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   336
            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   337
        amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   338
        case amt of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   339
            amBazooka: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   340
            amMortar: DrawRotated(sprHandMortar, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   341
            amMolotov: DrawRotated(sprHandMolotov, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   342
            amBallgun: DrawRotated(sprHandBallgun, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   343
            amDrill: DrawRotated(sprHandDrill, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   344
            amRope: DrawRotated(sprHandRope, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   345
            amShotgun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   346
            amDEagle: DrawRotated(sprHandDEagle, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   347
            amSineGun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   348
            amPortalGun: DrawRotatedF(sprPortalGun, hx, hy, 0, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   349
            amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   350
            amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   351
            amCake: DrawRotated(sprHandCake, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   352
            amGrenade: DrawRotated(sprHandGrenade, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   353
            amWatermelon: DrawRotated(sprHandMelon, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   354
            amSkip: DrawRotated(sprHandSkip, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   355
            amClusterBomb: DrawRotated(sprHandCluster, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   356
            amDynamite: DrawRotated(sprHandDynamite, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   357
            amHellishBomb: DrawRotated(sprHandHellish, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   358
            amMine: DrawRotated(sprHandMine, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   359
            amSeduction: DrawRotated(sprHandSeduction, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   360
            amVampiric: DrawRotated(sprHandVamp, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   361
            amRCPlane: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   362
                DrawRotated(sprHandPlane, hx, hy, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   363
                defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   364
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   365
            amGirder: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   366
                DrawRotated(sprHandConstruction, hx, hy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   367
                DrawSpriteClipped(sprGirder,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   368
                                  sx-256,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   369
                                  sy-256,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   370
                                  LongInt(topY)+WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   371
                                  LongInt(rightX)+WorldDx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   372
                                  cWaterLine+WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   373
                                  LongInt(leftX)+WorldDx)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   374
                end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   375
            amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   376
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   377
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   378
        case amt of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   379
            amAirAttack,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   380
            amMineStrike: DrawRotated(sprHandAirAttack, sx, hwRound(Gear^.Y) + WorldDy, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   381
            amPickHammer: DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   382
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   383
                        1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   384
                        2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   385
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   386
            amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   387
            amKamikaze: DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   388
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   389
                        1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   390
                        5,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   391
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   392
            amWhip: DrawRotatedF(sprWhip,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   393
                        sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   394
                        sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   395
                        0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   396
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   397
                        0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   398
        else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   399
            DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   400
                hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   401
                0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   402
                4,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   403
                0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   404
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   405
            HatVisible:= true;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   406
            (* with HH^ do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   407
                if (HatTex <> nil)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   408
                and (HatVisibility > 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   409
                    DrawTextureF(HatTex,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   410
                        HatVisibility,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   411
                        sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   412
                        hwRound(Gear^.Y) - 8 + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   413
                        0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   414
                        hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   415
                        32,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   416
                        32); *)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   417
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   418
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   419
        case amt of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   420
            amBaseballBat: DrawRotated(sprHandBaseball,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   421
                    hwRound(Gear^.X) + 1 - 4 * hwSign(Gear^.dX) + WorldDx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   422
                    hwRound(Gear^.Y) + 6 + WorldDy, hwSign(Gear^.dX), aangle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   423
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   424
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   425
        defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   426
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   427
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   428
end else // not gstHHDriven
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   429
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   430
    if (Gear^.Damage > 0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   431
    and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   432
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   433
        DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   434
            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   435
            2,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   436
            1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   437
            Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   438
        defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   439
        end else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   440
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   441
    if ((Gear^.State and gstHHJumping) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   442
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   443
        DrawHedgehog(sx, sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   444
            hwSign(Gear^.dX)*m,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   445
            1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   446
            1,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   447
            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   448
        defaultPos:= false
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   449
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   450
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   451
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   452
with HH^ do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   453
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   454
    if defaultPos then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   455
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   456
        DrawRotatedF(sprHHIdle,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   457
            sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   458
            sy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   459
            (RealTicks div 128 + Gear^.Pos) mod 19,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   460
            hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   461
            0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   462
        HatVisible:= true;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   463
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   464
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   465
    if HatVisible then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   466
        if HatVisibility < 1.0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   467
            HatVisibility:= HatVisibility + 0.2
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   468
        else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   469
    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   470
        if HatVisibility > 0.0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   471
            HatVisibility:= HatVisibility - 0.2;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   472
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   473
    if (HatTex <> nil)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   474
    and (HatVisibility > 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   475
        if DefaultPos then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   476
            DrawTextureF(HatTex,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   477
                HatVisibility,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   478
                sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   479
                hwRound(Gear^.Y) - 8 + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   480
                (RealTicks div 128 + Gear^.Pos) mod 19,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   481
                hwSign(Gear^.dX),
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   482
                32,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   483
                32)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   484
        else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   485
            DrawTextureF(HatTex,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   486
                HatVisibility,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   487
                sx,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   488
                hwRound(Gear^.Y) - 8 + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   489
                0,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   490
                hwSign(Gear^.dX)*m,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   491
                32,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   492
                32);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   493
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   494
if (Gear^.State and gstHHDriven) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   495
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   496
(*    if (CurAmmoGear = nil) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   497
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   498
        amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   499
        case amt of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   500
            amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   501
            end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   502
        end; *)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   503
    if CurAmmoGear <> nil then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   504
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   505
        case CurAmmoGear^.Kind of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   506
            gtJetpack: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   507
                       DrawSprite(sprJetpack, sx-32, sy-32, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   508
                       if (CurAmmoGear^.MsgParam and gm_Up) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 1);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   509
                       if (CurAmmoGear^.MsgParam and gm_Left) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 2);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   510
                       if (CurAmmoGear^.MsgParam and gm_Right) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 3);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   511
                       if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   512
                       DrawAltWeapon(Gear, sx, sy)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   513
                       end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   514
            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   515
        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   516
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   517
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   518
with HH^ do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   519
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   520
    if ((Gear^.State and not gstWinner) = 0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   521
        or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   522
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   523
        t:= hwRound(Gear^.Y) - cHHRadius - 12 + WorldDy;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   524
        if (cTagsMask and htTransparent) <> 0 then
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   525
            Tint($FF, $FF, $FF, $80);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   526
        if ((cTagsMask and htHealth) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   527
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   528
            dec(t, HealthTagTex^.h + 2);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   529
            DrawCentered(hwRound(Gear^.X) + WorldDx, t, HealthTagTex)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   530
            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   531
        if (cTagsMask and htName) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   532
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   533
            dec(t, NameTagTex^.h + 2);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   534
            DrawCentered(hwRound(Gear^.X) + WorldDx, t, NameTagTex)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   535
            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   536
        if (cTagsMask and htTeamName) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   537
            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   538
            dec(t, Team^.NameTagTex^.h + 2);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   539
            DrawCentered(hwRound(Gear^.X) + WorldDx, t, Team^.NameTagTex)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   540
            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   541
        if (cTagsMask and htTransparent) <> 0 then
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   542
            Tint($FF, $FF, $FF, $FF)
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   543
        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   544
    if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   545
        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   546
        if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   547
            DrawSprite(sprFinger, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 64 + WorldDy,
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   548
                        GameTicks div 32 mod 16);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   549
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   550
        if (Gear^.State and gstDrowning) = 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   551
            if (Gear^.State and gstHHThinking) <> 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   552
                DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, (RealTicks shr 9) mod 8)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   553
        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   554
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   555
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   556
if HH^.Effects[hePoisoned] then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   557
    begin
3392
9d5d01b52ae8 Engine:
smxx
parents: 3390
diff changeset
   558
    Tint($00, $FF, $40, $80);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   559
    DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   560
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   561
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   562
if Gear^.Invulnerable then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   563
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   564
    Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750))));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   565
    DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   566
    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   567
if cVampiric and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   568
   (CurrentHedgehog^.Gear <> nil) and
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   569
   (CurrentHedgehog^.Gear = Gear) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   570
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   571
    Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750))));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   572
    DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   573
    end;
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   574
    Tint($FF, $FF, $FF, $FF)
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   575
end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   576
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   577
procedure DrawGears;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   578
var Gear, HHGear: PGear;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   579
    i: Longword;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   580
    startX, endX, startY, endY: LongInt;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   581
begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   582
Gear:= GearsList;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   583
while Gear<>nil do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   584
    begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   585
    case Gear^.Kind of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   586
       gtAmmo_Bomb: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   587
       gtGasBomb: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   588
    gtMolotov: DrawRotated(sprMolotov, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   589
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   590
       gtRCPlane: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   591
                  if (Gear^.Tag = -1) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   592
                     DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, -1,  DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   593
                  else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   594
                     DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,0,DxDy2Angle(Gear^.dY, Gear^.dX));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   595
                  if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   596
                     DrawRotatedf(sprFinger, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, GameTicks div 32 mod 16, 0, DxDy2Angle(Gear^.X - TrainingTargetGear^.X, TrainingTargetGear^.Y - Gear^.Y));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   597
                  end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   598
       gtBall: DrawRotatedf(sprBalls, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tag,0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   599
// Still need portal types and states
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   600
       gtPortal: DrawRotatedf(sprPortal, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0,0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   601
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   602
       gtDrill: DrawRotated(sprDrill, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   603
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   604
        gtHedgehog: DrawHH(Gear);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   605
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   606
    gtAmmo_Grenade: DrawRotated(sprGrenade, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   607
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   608
       gtHealthTag: if Gear^.Tex <> nil then DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   609
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   610
           gtGrave: DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   611
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   612
             gtBee: DrawRotatedF(sprBee, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   613
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   614
      gtPickHammer: DrawSprite(sprPHammer, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 50 + LongInt(((GameTicks shr 5) and 1) * 2) + WorldDy, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   615
            gtRope: DrawRope(Gear);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   616
      gtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   617
       gtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 32 + WorldDy, Gear^.State);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   618
            gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   619
                           DrawRotated(sprMineOff, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   620
                       else if Gear^.Health <> 0 then DrawRotated(sprMineOn, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   621
                       else DrawRotated(sprMineDead, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   622
            gtCase: case Gear^.Pos of
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   623
                         posCaseAmmo  : begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   624
                                        i:= (GameTicks shr 6) mod 64;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   625
                                        if i > 18 then i:= 0;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   626
                                        DrawSprite(sprCase, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, i);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   627
                                        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   628
                         posCaseHealth: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   629
                                        i:= ((GameTicks shr 6) + 38) mod 64;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   630
                                        if i > 13 then i:= 0;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   631
                                        DrawSprite(sprFAid, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, i);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   632
                                        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   633
                         posCaseUtility: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   634
                                        i:= (GameTicks shr 6) mod 70;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   635
                                        if i > 23 then i:= 0;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   636
                                        i:= i mod 12;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   637
                                        DrawSprite(sprUtility, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, i);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   638
                                        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   639
                         end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   640
      gtExplosives: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   641
                    if ((Gear^.State and gstDrowning) <> 0) then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   642
                        DrawSprite(sprExplosivesRoll, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, 0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   643
                    else if Gear^.State and gstAnimation = 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   644
                        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   645
                        i:= (GameTicks shr 6 + Gear^.uid*3) mod 64;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   646
                        if i > 18 then i:= 0;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   647
                        DrawSprite(sprExplosives, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, i)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   648
                        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   649
                    else if Gear^.State and gsttmpFlag = 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   650
                        DrawRotatedF(sprExplosivesRoll, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) +4 + WorldDy, 0, 0, Gear^.DirAngle)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   651
                    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   652
                        DrawRotatedF(sprExplosivesRoll, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) +4 + WorldDy, 1, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   653
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   654
        gtDynamite: DrawSprite2(sprDynamite, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, Gear^.Tag and 1, Gear^.Tag shr 1);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   655
     gtClusterBomb: DrawRotated(sprClusterBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   656
         gtCluster: DrawSprite(sprClusterParticle, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   657
           gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks div 128 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   658
       gtParachute: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   659
                    DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   660
                    DrawAltWeapon(Gear, hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   661
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   662
       gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - SpritesData[sprAirplane].Width div 2 + WorldDx, hwRound(Gear^.Y) - SpritesData[sprAirplane].Height div 2 + WorldDy, 0)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   663
                                     else DrawSprite(sprAirplane, hwRound(Gear^.X) - SpritesData[sprAirplane].Width div 2 + WorldDx, hwRound(Gear^.Y) - SpritesData[sprAirplane].Height div 2 + WorldDy, 1);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   664
         gtAirBomb: DrawRotated(sprAirBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   665
        gtTeleport: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   666
                    HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   667
                    if not PHedgehog(Gear^.Hedgehog)^.Unplaced then DrawRotatedF(sprTeleport, hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy, Gear^.Pos, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   668
                    DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   669
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   670
        gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, (GameTicks shr 6) mod 12);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   671
          gtTarget: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   672
                    Tint($FF, $FF, $FF, floor($FF * Gear^.Timer / 1000));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   673
                    DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   674
                    Tint($FF, $FF, $FF, $FF);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   675
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   676
          gtMortar: DrawRotated(sprMortar, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   677
          gtCake: if Gear^.Pos = 6 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   678
                     DrawRotatedf(sprCakeWalk, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   679
                  else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   680
                     DrawRotatedf(sprCakeDown, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 5 - Gear^.Pos, hwSign(Gear^.dX), 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   681
       gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   682
      gtWatermelon: DrawRotatedf(sprWatermelon, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   683
      gtMelonPiece: DrawRotatedf(sprWatermelon, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 1, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   684
     gtHellishBomb: DrawRotated(sprHellishBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   685
      gtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   686
           gtBirdy: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   687
                    if Gear^.State and gstAnimation = gstAnimation then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   688
                        begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   689
                        if Gear^.State and gstTmpFlag = 0 then // Appearing
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   690
                            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   691
                            endX:= hwRound(Gear^.X);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   692
                            endY:= hwRound(Gear^.Y);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   693
                            if Gear^.Tag < 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   694
                                startX:= max(LAND_WIDTH + 1024, endX + 2048)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   695
                            else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   696
                                startX:= max(-LAND_WIDTH - 1024, endX - 2048);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   697
                            startY:= endY - 256;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   698
                            DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + trunc((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1)), startY + WorldDy + trunc((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   699
                            end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   700
                        else // Disappearing
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   701
                            begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   702
                            startX:= hwRound(Gear^.X);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   703
                            startY:= hwRound(Gear^.Y);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   704
                            if Gear^.Tag > 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   705
                                endX:= max(LAND_WIDTH + 1024, startX + 2048)
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   706
                            else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   707
                                endX:= max(-LAND_WIDTH - 1024, startX - 2048);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   708
                            endY:= startY + 256;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   709
                            DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + trunc((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + trunc((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY)) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   710
                            end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   711
                        end
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   712
                    else
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   713
                        DrawTextureF(SpritesData[sprBirdy].Texture, 1, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   714
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   715
    gtBigExplosion: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   716
                    Tint($FF, $FF, $FF, floor($FF * (1 - power(Gear^.Timer / 250, 4))));
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   717
                    DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   718
                    Tint($FF, $FF, $FF, $FF);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   719
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   720
             gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 16, 16, Gear^.DirAngle);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   721
           gtPiano: begin
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   722
                    if (Gear^.State and gstDrowning) = 0 then
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   723
                        begin
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   724
                        Tint($FF, $FF, $FF, $10);
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   725
                        for i:= 8 downto 1 do
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   726
                            DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128, 0);
3390
1d4926d10a9e Engine:
smxx
parents: 3387
diff changeset
   727
                        Tint($FF, $FF, $FF, $FF)
3387
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   728
                        end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   729
                    DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 128, 128, 0);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   730
                    end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   731
         end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   732
      if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex);
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   733
      Gear:= Gear^.NextGear
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   734
      end;
733f4001b8b9 Break out DrawHH/DrawGear to reduce scrolling in uGears.pas, add portal graphics
nemo
parents:
diff changeset
   735
end;