The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
* Update random number functions to avoid IB
Most calls to set seed were using uint32_t already, there were a few variables which were better served by having their type changed from signed to unsigned. The one exception is ItemStruct::_iSeed. This is an identifier that also happens to be used as a seed occasionally so a comment was added documenting this exception.
Includes suggested style changes for Source/towners.h; Source/towners.cpp; Source/msg.h; Source/multi.h
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
This changes one bavious. Previously walking away from the dead guy
would interupt the "Your death shall be reveanged", the interuption
seamed un natural and the code didn't seam to have been specifically
made for this case (TownCtrlMsg).
Fix several edge cases in quests where the incorrect state could be reached
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.
If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
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.