Resources namespace
Structures for game resources.
Classes
- struct FrameRect
- Placement of a single frame in a tightly packed sprite sheet.
- struct GenericGraphicResource
- struct GraphicResource
- Specific graphic resource (from metadata).
- struct GenericSoundResource
- Shared sound resource.
- struct SoundResource
- Specific sound resource (from metadata).
- struct Metadata
- Contains assets for specific object type.
- struct Episode
- Describes an episode.
Enums
- enum class GenericGraphicResourceFlags { None = 0x00, Referenced = 0x01, Indexed = 0x02 }
- Flags for GenericGraphicResource.
- enum class GenericSoundResourceFlags { None = 0x00, Referenced = 0x01 }
- Flags for GenericSoundResource.
- enum class MetadataFlags { None = 0x00, Referenced = 0x01, AsyncFinalizingRequired = 0x02 }
- Flags for Metadata.
- enum class FontType { Small, Medium, Count }
- Font type.
- enum class PrecompiledShader { LightingMesh, Blur, Downsample, Combine, CombineWithWater, CombineWithWaterLow, TexturedBackground, TexturedBackgroundDither, TexturedBackgroundCircle, TexturedBackgroundCircleDither, Colorized, BatchedColorized, Tinted, BatchedTinted, Outline, BatchedOutline, WhiteMask, BatchedWhiteMask, PartialWhiteMask, BatchedPartialWhiteMask, FrozenMask, BatchedFrozenMask, PaletteRemap, BatchedPaletteRemap, OutlinePalette, BatchedOutlinePalette, WhiteMaskPalette, BatchedWhiteMaskPalette, PartialWhiteMaskPalette, BatchedPartialWhiteMaskPalette, FrozenMaskPalette, BatchedFrozenMaskPalette, TintedPalette, BatchedTintedPalette, ShieldFire, BatchedShieldFire, ShieldLightning, BatchedShieldLightning, ResizeHQ2x, Resize3xBrz, ResizeCrtScanlines, ResizeCrtShadowMask, ResizeCrtApertureGrille, ResizeMonochrome, ResizeSabr, ResizeCleanEdge, Antialiasing, Transition, TouchCircle, Count }
- Precompiled shader.
Functions
-
auto IsMaskPixelSolid(const std::
uint8_t* mask, std:: int32_t index) -> bool - Returns whether the pixel at the given flat index is solid in a GenericGraphicResource::
Mask.
Variables
-
static std::
uint8_t MaskAlphaThreshold constexpr - Shared graphic resource.
Enum documentation
enum class Jazz2:: Resources:: GenericGraphicResourceFlags
#include <Jazz2/Resources.h>
Flags for GenericGraphicResource.
Per-resource state of a shared graphic. GenericGraphicResourceFlags::
| Enumerators | |
|---|---|
| None |
None |
| Referenced |
The resource is referenced and should not be released |
| Indexed |
Diffuse texture stores raw palette indices instead of baked colors. The index is in the red channel, so the texture must be rendered with the PrecompiledShader:: |
enum class Jazz2:: Resources:: GenericSoundResourceFlags
#include <Jazz2/Resources.h>
Flags for GenericSoundResource.
Per-resource state of a shared sound. GenericSoundResourceFlags::
| Enumerators | |
|---|---|
| None |
None |
| Referenced |
The resource is referenced and should not be released |
enum class Jazz2:: Resources:: MetadataFlags
#include <Jazz2/Resources.h>
Flags for Metadata.
Per-resource state of a loaded metadata. MetadataFlags::
| Enumerators | |
|---|---|
| None |
None |
| Referenced |
The metadata is referenced and should not be released |
| AsyncFinalizingRequired |
The metadata still requires asynchronous finalization |
enum class Jazz2:: Resources:: FontType
#include <Jazz2/Resources.h>
Font type.
Selects one of the engine's built-in bitmap fonts — a small and a medium size — used when requesting a font from ContentResolver. FontType::
| Enumerators | |
|---|---|
| Small |
Small |
| Medium |
Medium |
| Count |
Count of supported font types |
enum class Jazz2:: Resources:: PrecompiledShader
#include <Jazz2/Resources.h>
Precompiled shader.
Identifies one of the engine's built-in shader programs, compiled up front by ContentResolver and requested by this value. It covers the lighting and blur/downsample/combine post-processing passes, the textured background variants, the per-sprite effect shaders (colorized, tinted, outline, white/frozen masks) and their batched, palette and tile-map mesh variants, the optional upscaling/CRT rescalers, plus antialiasing, screen transition and touch-control shaders. PrecompiledShader::
| Enumerators | |
|---|---|
| LightingMesh |
Light aggregation shader, one draw for all lights of a viewport |
| Blur |
Blur |
| Downsample |
Downsample |
| Combine |
Combine render passes |
| CombineWithWater |
Combine render passes with water effect |
| CombineWithWaterLow |
Combine render passes with low quality water effect |
| TexturedBackground |
Textured background |
| TexturedBackgroundDither |
Textured background with dithering |
| TexturedBackgroundCircle |
Circular textured background |
| TexturedBackgroundCircleDither |
Circular textured background with dithering |
| Colorized |
Colorized |
| BatchedColorized |
Batched variant of Colorized |
| Tinted |
Tinted |
| BatchedTinted |
Batched variant of Tinted |
| Outline |
Outline |
| BatchedOutline |
Batched variant of Outline |
| WhiteMask |
White mask |
| BatchedWhiteMask |
Batched variant of WhiteMask |
| PartialWhiteMask |
Partial white mask |
| BatchedPartialWhiteMask |
Batched variant of PartialWhiteMask |
| FrozenMask |
Frozen mask |
| BatchedFrozenMask |
Batched variant of FrozenMask |
| PaletteRemap |
Remaps indexed sprites through a palette texture |
| BatchedPaletteRemap |
Batched variant of PaletteRemap |
| OutlinePalette |
Palette variant of Outline |
| BatchedOutlinePalette |
Batched variant of OutlinePalette |
| WhiteMaskPalette |
Palette variant of WhiteMask |
| BatchedWhiteMaskPalette |
Batched variant of WhiteMaskPalette |
| PartialWhiteMaskPalette |
Palette variant of PartialWhiteMask |
| BatchedPartialWhiteMaskPalette |
Batched variant of PartialWhiteMaskPalette |
| FrozenMaskPalette |
Palette variant of FrozenMask |
| BatchedFrozenMaskPalette |
Batched variant of FrozenMaskPalette |
| TintedPalette |
Palette variant of Tinted |
| BatchedTintedPalette |
Batched variant of TintedPalette |
| ShieldFire |
Fire shield effect |
| BatchedShieldFire |
Batched variant of ShieldFire |
| ShieldLightning |
Lightning shield effect |
| BatchedShieldLightning |
Batched variant of ShieldLightning |
| ResizeHQ2x |
HQ2× upscaling |
| Resize3xBrz |
3×BRZ upscaling |
| ResizeCrtScanlines |
CRT scanlines upscaling |
| ResizeCrtShadowMask |
CRT shadow mask upscaling |
| ResizeCrtApertureGrille |
CRT aperture grille upscaling |
| ResizeMonochrome |
Monochrome upscaling |
| ResizeSabr |
SABR upscaling |
| ResizeCleanEdge |
CleanEdge upscaling |
| Antialiasing |
Antialiasing |
| Transition |
Screen transition effect |
| TouchCircle |
Touch control circle |
| Count |
Number of precompiled shaders |
Function documentation
bool Jazz2:: Resources:: IsMaskPixelSolid(const std:: uint8_t* mask,
std:: int32_t index)
#include <Jazz2/Resources.h>
Returns whether the pixel at the given flat index is solid in a GenericGraphicResource::
Variable documentation
static std:: uint8_t Jazz2:: Resources:: MaskAlphaThreshold constexpr
#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.
Alpha above which a sprite pixel counts as solid when its collision mask is built