GenericGraphicResource struct
#include <Jazz2/Resources.h>
Shared graphic resource.
Loaded, cached representation of a sprite sheet: the diffuse texture (optionally indexed), an optional collision mask, the frame grid (dimensions and configuration), frame count and animation duration, plus the hotspot, coldspot and gunspot offsets. Owned by ContentResolver and referenced by the per-animation GraphicResource entries that map an AnimState onto a slice of these frames.
Constructors, destructors, conversion operators
- GenericGraphicResource() noexcept
- Creates a new instance.
Public variables
- GenericGraphicResourceFlags Flags
- Resource flags.
-
std::
unique_ptr<Texture> TextureDiffuse - Diffuse texture.
-
std::
unique_ptr<uint8_t[]> Mask - Collision mask.
- Vector2i FrameDimensions
- Frame dimensions.
- Vector2i FrameConfiguration
- Frame configuration.
- float AnimDuration
- Animation duration (in normalized frames).
-
std::
int32_t FrameCount - Frame count.
- Vector2i Hotspot
- Hotspot.
- Vector2i Coldspot
- Optional coldspot.
- Vector2i Gunspot
- Optional gunspot.