import 'package:wolf_3d_dart/src/registry/modules/entity_asset_module.dart';
import 'package:wolf_3d_dart/src/registry/modules/hud_module.dart';
import 'package:wolf_3d_dart/src/registry/modules/menu_pic_module.dart';
import 'package:wolf_3d_dart/src/registry/modules/music_module.dart';
import 'package:wolf_3d_dart/src/registry/modules/sfx_module.dart';

/// The top-level asset registry attached to every [WolfensteinData] instance.
///
/// Access version-specific asset IDs through the five typed modules:
///
/// ```dart
/// data.registry.sfx.resolve(SoundEffect.pistolFire)
/// data.registry.music.musicForLevel(episode, level)
/// data.registry.entities.resolve(EntityKey.guard)
/// data.registry.hud.faceForHealth(player.health)
/// data.registry.menu.resolve(MenuPicKey.title)
/// ```
///
/// To provide a fully custom asset layout, implement all five module
/// interfaces and pass them to this constructor, then supply the resulting
/// [AssetRegistry] to [WolfensteinLoader.loadFromBytes].
class AssetRegistry {
  const AssetRegistry({
    required this.sfx,
    required this.music,
    required this.entities,
    required this.hud,
    required this.menu,
  });

  /// Sound-effect slot resolution.
  final SfxModule sfx;

  /// Music track routing (menu and per-level).
  final MusicModule music;

  /// Entity sprite-range and availability data.
  final EntityAssetModule entities;

  /// HUD image index resolution.
  final HudModule hud;

  /// Menu VGA picture index resolution.
  final MenuPicModule menu;
}
