WeaponImage struct
#include <Jazz2/WeaponDefinition.h>
Image of a custom weapon, a sheet of frames in rows and columns.
The frames go by rows from the top left, as FrameConfiguration of a metadata file has them. A sheet that isn't a whole number of frames wide or high leaves the rest out.
Public functions
-
auto GetFrameWidth() const -> std::
int32_t - Returns the width of a frame.
-
auto GetFrameHeight() const -> std::
int32_t - Returns the height of a frame.
- auto operator==(const WeaponImage& other) const -> bool
- auto operator!=(const WeaponImage& other) const -> bool
Public variables
-
SmallVector<std::
uint8_t, 0> Pixels - Palette index of each pixel of the sheet, by rows, 0 is transparent.
-
std::
int32_t Width - Width of the sheet.
-
std::
int32_t Height - Height of the sheet.
-
std::
int32_t FrameColumns - Frames in a row.
-
std::
int32_t FrameRows - Rows of frames.
-
std::
int32_t FrameCount - Number of frames, at most FrameColumns times FrameRows.
- float FrameRate
- Speed of the animation, as
FrameRateof a metadata file. -
std::
int32_t HotspotX - Point of a frame that's at the position of the actor.
-
std::
int32_t HotspotY - Point of a frame that's at the position of the actor.