Skip to content

Commit

Permalink
Don't chop off the last frame of the explosion, add an additional emp…
Browse files Browse the repository at this point in the history
…ty frame to explode.dat, and load in that empty frame.
  • Loading branch information
AaronKelley committed May 22, 2020
1 parent b83dc2c commit c1dcf9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Binary file modified PlayerSourceTrad/Data/explode.dat
Binary file not shown.
14 changes: 7 additions & 7 deletions PlayerSourceTrad/LemGame.pas
Expand Up @@ -37,7 +37,7 @@ interface
DX, DY: ShortInt
end;
TParticleArray = packed array[0..79] of TParticleRec;
TParticleTable = packed array[0..50] of TParticleArray;
TParticleTable = packed array[0..51] of TParticleArray;

const
ParticleColorIndices: array[0..15] of Byte = (
Expand Down Expand Up @@ -103,7 +103,7 @@ TLemming = class
LemFrame : Integer; // current animationframe
LemMaxFrame : Integer; // copy from LMA
LemAnimationType : Integer; // copy from LMA
LemParticleTimer : Integer; // @particles, 52 downto 0, after explosion
LemParticleTimer : Integer; // @particles, 53 downto 0, after explosion
LemParticleFrame : Integer; // the "frame" of the particle drawing algorithm
FrameTopDy : Integer; // = -LMA.FootY (ccexplore compatible)
FrameLeftDx : Integer; // = -LMA.FootX (ccexplore compatible)
Expand Down Expand Up @@ -709,8 +709,8 @@ implementation
LEMMING_MAX_X = 1647;
LEMMING_MAX_Y = 163;

PARTICLE_FRAMECOUNT = 52;
PARTICLE_FINISH_FRAMECOUNT = 52;
PARTICLE_FRAMECOUNT = 53;
PARTICLE_FINISH_FRAMECOUNT = 53;

function CheckRectCopy(const A, B: TRect): Boolean;
begin
Expand Down Expand Up @@ -2228,7 +2228,7 @@ procedure TLemmingGame.EraseParticles(L: TLemming);
Drawn := False;

with L do
if LemParticleFrame <= 50 then
if LemParticleFrame <= 51 then
for i := 0 to 79 do
begin
X := fParticles[LemParticleFrame][i].DX;
Expand Down Expand Up @@ -2280,7 +2280,7 @@ procedure TLemmingGame.DrawParticles(L: TLemming);
Drawn := False;

with L do
if LemParticleFrame <= 50 then
if LemParticleFrame <= 51 then
for i := 0 to 79 do
begin
X := fParticles[LemParticleFrame][i].DX;
Expand Down Expand Up @@ -2481,7 +2481,7 @@ procedure TLemmingGame.DrawLemmings;
end;
end // not LemmingRemoved
// @particles, check explosiondrawing if the lemming is dead
else if LemParticleTimer > 1 then begin
else if LemParticleTimer > 0 then begin
DrawParticles(CurrentLemming);
end;

Expand Down

0 comments on commit c1dcf9a

Please sign in to comment.