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 DeferredGraphicResource
- Description of a graphic resource that is loaded on first use.
- 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, Pinned = 0x04 }
- Flags for Metadata.
- enum class FontType { Small, Medium, Count }
- Font type.
- enum class PrecompiledShader { LightingMesh, Blur, Downsample, Combine, CombineWithWater, CombineWithWaterLow, CombineDither, CombineWithWaterDither, CombineWithWaterLowDither, Water, WaterLow, TexturedBackground, TexturedBackgroundDither, TexturedBackgroundTunnel, TexturedBackgroundTunnelDither, TexturedBackgroundPlus, TexturedBackgroundPlusDither, TexturedBackgroundTunnelPlus, TexturedBackgroundTunnelPlusDither, TexturedBackgroundCylinder, TexturedBackgroundCylinderDither, TexturedBackgroundWave, TexturedBackgroundWaveDither, TileMapMeshHeat, TileMapMeshHeatPalette, Colorized, BatchedColorized, Tinted, BatchedTinted, Outline, BatchedOutline, WhiteMask, BatchedWhiteMask, PartialWhiteMask, BatchedPartialWhiteMask, FrozenMask, BatchedFrozenMask, PaletteRemap, BatchedPaletteRemap, OutlinePalette, BatchedOutlinePalette, WhiteMaskPalette, BatchedWhiteMaskPalette, PartialWhiteMaskPalette, BatchedPartialWhiteMaskPalette, FrozenMaskPalette, BatchedFrozenMaskPalette, TintedPalette, BatchedTintedPalette, SingleColor, BatchedSingleColor, SingleColorPalette, BatchedSingleColorPalette, 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 |
| Pinned |
The metadata stays loaded even when nothing requests it, see ContentResolver:: |
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 |
| CombineDither |
Combine in the colors of the 16-bit renderer of JJ2+, see DitheringScope:: |
| CombineWithWaterDither |
CombineWithWater in the colors of the 16-bit renderer of JJ2+ |
| CombineWithWaterLowDither |
CombineWithWaterLow in the colors of the 16-bit renderer of JJ2+ |
| Water |
Water in front of a layer behind the others, drawn in the middle of the scene |
| WaterLow |
Low quality variant of Water |
| TexturedBackground |
Textured background |
| TexturedBackgroundDither |
Textured background with dithering |
| TexturedBackgroundTunnel |
Tunnel textured background |
| TexturedBackgroundTunnelDither |
Tunnel textured background with dithering |
| TexturedBackgroundPlus |
Textured background in the perspective of JJ2+ |
| TexturedBackgroundPlusDither |
Textured background in the perspective of JJ2+ with dithering |
| TexturedBackgroundTunnelPlus |
Tunnel textured background of JJ2+ |
| TexturedBackgroundTunnelPlusDither |
Tunnel textured background of JJ2+ with dithering |
| TexturedBackgroundCylinder |
Cylinder textured background |
| TexturedBackgroundCylinderDither |
Cylinder textured background with dithering |
| TexturedBackgroundWave |
Wave textured background |
| TexturedBackgroundWaveDither |
Wave textured background with dithering |
| TileMapMeshHeat |
Tiles of the heat effect, see Tiles:: |
| TileMapMeshHeatPalette |
Tiles of the heat effect with palette |
| 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 |
| SingleColor |
The shape of a sprite in a single color, see Tiles:: |
| BatchedSingleColor |
Batched variant of SingleColor |
| SingleColorPalette |
Palette variant of SingleColor |
| BatchedSingleColorPalette |
Batched variant of SingleColorPalette |
| 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