Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
Missiles _mimfnum is being used for a lot more then just directions and
can also be a 16 degree direction so can't apply enum verbs and
restricitons to it in most cases. This in turns also affects SetMissDir
and some other functions that have to stay int.
NewPlrAnim: Use default arguments instead of overloads
StartPlrHit: Fix skippedAnimationFrames - Frames starts with 1
Add missing comment for StartPlrHit
Fix GotHit-Animation: Skipping Frames corrected and adjusted _pAnimGameTicksSinceSequenceStarted for animations that don't start with a additional tick.
Thanks @StephenCWills for the gothit skipping frame calculation logic :-)
Update StartWalk: calculated numSkippedFrames in own line.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
StartPlrHit: always initialize skippedAnimationFrames
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Update nthread_GetProgressToNextGameTick comment
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
fix spelling "lenght" instead of "length"
Update NewPlrAnim comment
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
GetFrameToUseForPlayerRendering: avoid one "else"
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.
We now have access to SDL surface manipulation functions.
`gpBuffer` and `gpBufEnd` are completely gone 🧹
This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.