Refactor entity, HUD, menu, music, and SFX modules for improved readability and consistency in code formatting

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-19 13:46:00 +01:00
parent fcda0f9ff4
commit 6e53da7095
13 changed files with 253 additions and 241 deletions

View File

@@ -14,56 +14,56 @@ class RetailEntityModule extends EntityAssetModule {
EntityKey.guard: const EntityAssetDefinition(
availableInShareware: true,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(50, 57),
walking: SpriteFrameRange(58, 89),
dying: SpriteFrameRange(90, 93),
pain: SpriteFrameRange(94, 94),
dead: SpriteFrameRange(95, 95),
idle: SpriteFrameRange(50, 57),
walking: SpriteFrameRange(58, 89),
dying: SpriteFrameRange(90, 93),
pain: SpriteFrameRange(94, 94),
dead: SpriteFrameRange(95, 95),
attacking: SpriteFrameRange(96, 98),
),
),
EntityKey.dog: const EntityAssetDefinition(
availableInShareware: true,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(99, 106),
walking: SpriteFrameRange(99, 130),
idle: SpriteFrameRange(99, 106),
walking: SpriteFrameRange(99, 130),
attacking: SpriteFrameRange(135, 137),
pain: SpriteFrameRange(0, 0),
dying: SpriteFrameRange(131, 133),
dead: SpriteFrameRange(134, 134),
pain: SpriteFrameRange(0, 0),
dying: SpriteFrameRange(131, 133),
dead: SpriteFrameRange(134, 134),
),
),
EntityKey.ss: const EntityAssetDefinition(
availableInShareware: true,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(138, 145),
walking: SpriteFrameRange(146, 177),
idle: SpriteFrameRange(138, 145),
walking: SpriteFrameRange(146, 177),
attacking: SpriteFrameRange(184, 186),
pain: SpriteFrameRange(182, 182),
dying: SpriteFrameRange(178, 181),
dead: SpriteFrameRange(183, 183),
pain: SpriteFrameRange(182, 182),
dying: SpriteFrameRange(178, 181),
dead: SpriteFrameRange(183, 183),
),
),
EntityKey.mutant: const EntityAssetDefinition(
availableInShareware: false,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(187, 194),
walking: SpriteFrameRange(195, 226),
idle: SpriteFrameRange(187, 194),
walking: SpriteFrameRange(195, 226),
attacking: SpriteFrameRange(234, 237),
pain: SpriteFrameRange(231, 231),
dying: SpriteFrameRange(227, 232, excluded: {231}),
dead: SpriteFrameRange(233, 233),
pain: SpriteFrameRange(231, 231),
dying: SpriteFrameRange(227, 232, excluded: {231}),
dead: SpriteFrameRange(233, 233),
),
),
EntityKey.officer: const EntityAssetDefinition(
availableInShareware: false,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(238, 245),
walking: SpriteFrameRange(246, 277),
idle: SpriteFrameRange(238, 245),
walking: SpriteFrameRange(246, 277),
attacking: SpriteFrameRange(285, 287),
pain: SpriteFrameRange(282, 282),
dying: SpriteFrameRange(278, 283, excluded: {282}),
dead: SpriteFrameRange(284, 284),
pain: SpriteFrameRange(282, 282),
dying: SpriteFrameRange(278, 283, excluded: {282}),
dead: SpriteFrameRange(284, 284),
),
),
// Bosses: no standard EnemyAnimationMap; sprite selection is handled

View File

@@ -23,31 +23,31 @@ class RetailHudModule extends HudModule {
];
static final Map<HudKey, int> _indices = {
HudKey.statusBar : 83,
HudKey.statusBar: 83,
// Digits — '0' is index 96; subsequent digits follow sequentially.
HudKey.digit0 : 96,
HudKey.digit1 : 97,
HudKey.digit2 : 98,
HudKey.digit3 : 99,
HudKey.digit4 : 100,
HudKey.digit5 : 101,
HudKey.digit6 : 102,
HudKey.digit7 : 103,
HudKey.digit8 : 104,
HudKey.digit9 : 105,
HudKey.digit0: 96,
HudKey.digit1: 97,
HudKey.digit2: 98,
HudKey.digit3: 99,
HudKey.digit4: 100,
HudKey.digit5: 101,
HudKey.digit6: 102,
HudKey.digit7: 103,
HudKey.digit8: 104,
HudKey.digit9: 105,
// BJ face bands (each band's base; 3 animated variants follow).
HudKey.faceHealthy : 106,
HudKey.faceScratched : 109,
HudKey.faceHurt : 112,
HudKey.faceWounded : 115,
HudKey.faceBadlyWounded : 118,
HudKey.faceDying : 121,
HudKey.faceNearDeath : 124,
HudKey.faceDead : 127,
HudKey.faceHealthy: 106,
HudKey.faceScratched: 109,
HudKey.faceHurt: 112,
HudKey.faceWounded: 115,
HudKey.faceBadlyWounded: 118,
HudKey.faceDying: 121,
HudKey.faceNearDeath: 124,
HudKey.faceDead: 127,
// Weapon icons.
HudKey.pistolIcon : 89,
HudKey.machineGunIcon : 90,
HudKey.chainGunIcon : 91,
HudKey.pistolIcon: 89,
HudKey.machineGunIcon: 90,
HudKey.chainGunIcon: 91,
};
@override

View File

@@ -23,31 +23,31 @@ class RetailMenuPicModule extends MenuPicModule {
static final Map<MenuPicKey, int> _indices = {
// --- Full-screen art ---
MenuPicKey.title : 84,
MenuPicKey.credits : 86,
MenuPicKey.pg13 : 85,
MenuPicKey.title: 84,
MenuPicKey.credits: 86,
MenuPicKey.pg13: 85,
// --- Control-panel chrome ---
MenuPicKey.controlBackground : 23, // C_CONTROLPIC
MenuPicKey.footer : 15, // C_MOUSELBACKPIC (footer art)
MenuPicKey.heading : 3, // H_TOPWINDOWPIC
MenuPicKey.optionsLabel : 7, // C_OPTIONSPIC
MenuPicKey.controlBackground: 23, // C_CONTROLPIC
MenuPicKey.footer: 15, // C_MOUSELBACKPIC (footer art)
MenuPicKey.heading: 3, // H_TOPWINDOWPIC
MenuPicKey.optionsLabel: 7, // C_OPTIONSPIC
// --- Cursor / markers ---
MenuPicKey.cursorActive : 8, // C_CURSOR1PIC
MenuPicKey.cursorInactive : 9, // C_CURSOR2PIC
MenuPicKey.markerSelected : 11, // C_SELECTEDPIC
MenuPicKey.markerUnselected : 10, // C_NOTSELECTEDPIC
MenuPicKey.cursorActive: 8, // C_CURSOR1PIC
MenuPicKey.cursorInactive: 9, // C_CURSOR2PIC
MenuPicKey.markerSelected: 11, // C_SELECTEDPIC
MenuPicKey.markerUnselected: 10, // C_NOTSELECTEDPIC
// --- Episode selection ---
MenuPicKey.episode1 : 27,
MenuPicKey.episode2 : 28,
MenuPicKey.episode3 : 29,
MenuPicKey.episode4 : 30,
MenuPicKey.episode5 : 31,
MenuPicKey.episode6 : 32,
MenuPicKey.episode1: 27,
MenuPicKey.episode2: 28,
MenuPicKey.episode3: 29,
MenuPicKey.episode4: 30,
MenuPicKey.episode5: 31,
MenuPicKey.episode6: 32,
// --- Difficulty selection ---
MenuPicKey.difficultyBaby : 16, // C_BABYMODEPIC
MenuPicKey.difficultyEasy : 17, // C_EASYPIC
MenuPicKey.difficultyNormal : 18, // C_NORMALPIC
MenuPicKey.difficultyHard : 19, // C_HARDPIC
MenuPicKey.difficultyBaby: 16, // C_BABYMODEPIC
MenuPicKey.difficultyEasy: 17, // C_EASYPIC
MenuPicKey.difficultyNormal: 18, // C_NORMALPIC
MenuPicKey.difficultyHard: 19, // C_HARDPIC
};
@override
@@ -67,10 +67,10 @@ class RetailMenuPicModule extends MenuPicModule {
@override
MenuPicKey difficultyKey(Difficulty difficulty) {
return switch (difficulty) {
Difficulty.baby => MenuPicKey.difficultyBaby,
Difficulty.easy => MenuPicKey.difficultyEasy,
Difficulty.baby => MenuPicKey.difficultyBaby,
Difficulty.easy => MenuPicKey.difficultyEasy,
Difficulty.medium => MenuPicKey.difficultyNormal,
Difficulty.hard => MenuPicKey.difficultyHard,
Difficulty.hard => MenuPicKey.difficultyHard,
};
}
}

View File

@@ -10,25 +10,25 @@ class RetailMusicModule extends MusicModule {
// Original WL_INTER.C music table — 60 entries (6 episodes × 10 levels).
static const List<int> _levelMap = [
2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 1
8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 2
13, 14, 15, 16, 13, 14, 15, 16, 17, 18, // Episode 3
2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 4
8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 5
13, 14, 15, 16, 13, 14, 15, 16, 17, 19, // Episode 6
2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 1
8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 2
13, 14, 15, 16, 13, 14, 15, 16, 17, 18, // Episode 3
2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 4
8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 5
13, 14, 15, 16, 13, 14, 15, 16, 17, 19, // Episode 6
];
// Named MusicKey → track index for keyed lookups.
static final Map<MusicKey, int> _named = {
MusicKey.menuTheme: 1,
MusicKey.level01: 2,
MusicKey.level02: 3,
MusicKey.level03: 4,
MusicKey.level04: 5,
MusicKey.level05: 6,
MusicKey.level06: 7,
MusicKey.level07: 8,
MusicKey.level08: 9,
MusicKey.level01: 2,
MusicKey.level02: 3,
MusicKey.level03: 4,
MusicKey.level04: 5,
MusicKey.level05: 6,
MusicKey.level06: 7,
MusicKey.level07: 8,
MusicKey.level08: 9,
MusicKey.level09: 10,
MusicKey.level10: 11,
MusicKey.level11: 12,

View File

@@ -11,52 +11,52 @@ class RetailSfxModule extends SfxModule {
static final Map<SfxKey, int> _slots = {
// --- Doors & Environment ---
SfxKey.openDoor : WolfSound.openDoor,
SfxKey.closeDoor : WolfSound.closeDoor,
SfxKey.pushWall : WolfSound.pushWall,
SfxKey.openDoor: WolfSound.openDoor,
SfxKey.closeDoor: WolfSound.closeDoor,
SfxKey.pushWall: WolfSound.pushWall,
// --- Weapons ---
SfxKey.knifeAttack : WolfSound.knifeAttack,
SfxKey.pistolFire : WolfSound.pistolFire,
SfxKey.machineGunFire : WolfSound.machineGunFire,
SfxKey.chainGunFire : WolfSound.gatlingFire,
SfxKey.enemyFire : WolfSound.naziFire,
SfxKey.knifeAttack: WolfSound.knifeAttack,
SfxKey.pistolFire: WolfSound.pistolFire,
SfxKey.machineGunFire: WolfSound.machineGunFire,
SfxKey.chainGunFire: WolfSound.gatlingFire,
SfxKey.enemyFire: WolfSound.naziFire,
// --- Pickups ---
SfxKey.getMachineGun : WolfSound.getMachineGun,
SfxKey.getAmmo : WolfSound.getAmmo,
SfxKey.getChainGun : WolfSound.getGatling,
SfxKey.healthSmall : WolfSound.healthSmall,
SfxKey.healthLarge : WolfSound.healthLarge,
SfxKey.treasure1 : WolfSound.treasure1,
SfxKey.treasure2 : WolfSound.treasure2,
SfxKey.treasure3 : WolfSound.treasure3,
SfxKey.treasure4 : WolfSound.treasure4,
SfxKey.extraLife : WolfSound.extraLife,
SfxKey.getMachineGun: WolfSound.getMachineGun,
SfxKey.getAmmo: WolfSound.getAmmo,
SfxKey.getChainGun: WolfSound.getGatling,
SfxKey.healthSmall: WolfSound.healthSmall,
SfxKey.healthLarge: WolfSound.healthLarge,
SfxKey.treasure1: WolfSound.treasure1,
SfxKey.treasure2: WolfSound.treasure2,
SfxKey.treasure3: WolfSound.treasure3,
SfxKey.treasure4: WolfSound.treasure4,
SfxKey.extraLife: WolfSound.extraLife,
// --- Standard Enemies ---
SfxKey.guardHalt : WolfSound.guardHalt,
SfxKey.dogBark : WolfSound.dogBark,
SfxKey.dogDeath : WolfSound.dogDeath,
SfxKey.dogAttack : WolfSound.dogAttack,
SfxKey.deathScream1 : WolfSound.deathScream1,
SfxKey.deathScream2 : WolfSound.deathScream2,
SfxKey.deathScream3 : WolfSound.deathScream3,
SfxKey.ssAlert : WolfSound.ssSchutzstaffel,
SfxKey.ssDeath : WolfSound.ssMeinGott,
SfxKey.guardHalt: WolfSound.guardHalt,
SfxKey.dogBark: WolfSound.dogBark,
SfxKey.dogDeath: WolfSound.dogDeath,
SfxKey.dogAttack: WolfSound.dogAttack,
SfxKey.deathScream1: WolfSound.deathScream1,
SfxKey.deathScream2: WolfSound.deathScream2,
SfxKey.deathScream3: WolfSound.deathScream3,
SfxKey.ssAlert: WolfSound.ssSchutzstaffel,
SfxKey.ssDeath: WolfSound.ssMeinGott,
// --- Bosses ---
SfxKey.bossActive : WolfSound.bossActive,
SfxKey.hansGrosseDeath : WolfSound.mutti,
SfxKey.schabbs : WolfSound.schabbsHas,
SfxKey.schabbsDeath : WolfSound.eva,
SfxKey.hitlerGreeting : WolfSound.gutenTag,
SfxKey.hitlerDeath : WolfSound.scheist,
SfxKey.mechaSteps : WolfSound.mechSteps,
SfxKey.ottoAlert : WolfSound.spion,
SfxKey.gretelDeath : WolfSound.neinSoVass,
SfxKey.bossActive: WolfSound.bossActive,
SfxKey.hansGrosseDeath: WolfSound.mutti,
SfxKey.schabbs: WolfSound.schabbsHas,
SfxKey.schabbsDeath: WolfSound.eva,
SfxKey.hitlerGreeting: WolfSound.gutenTag,
SfxKey.hitlerDeath: WolfSound.scheist,
SfxKey.mechaSteps: WolfSound.mechSteps,
SfxKey.ottoAlert: WolfSound.spion,
SfxKey.gretelDeath: WolfSound.neinSoVass,
// --- UI & Progression ---
SfxKey.levelComplete : WolfSound.levelDone,
SfxKey.endBonus1 : WolfSound.endBonus1,
SfxKey.endBonus2 : WolfSound.endBonus2,
SfxKey.noBonus : WolfSound.noBonus,
SfxKey.percent100 : WolfSound.percent100,
SfxKey.levelComplete: WolfSound.levelDone,
SfxKey.endBonus1: WolfSound.endBonus1,
SfxKey.endBonus2: WolfSound.endBonus2,
SfxKey.noBonus: WolfSound.noBonus,
SfxKey.percent100: WolfSound.percent100,
};
@override

View File

@@ -17,34 +17,34 @@ class SharewareEntityModule extends EntityAssetModule {
EntityKey.guard: const EntityAssetDefinition(
availableInShareware: true,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(50, 57),
walking: SpriteFrameRange(58, 89),
dying: SpriteFrameRange(90, 93),
pain: SpriteFrameRange(94, 94),
dead: SpriteFrameRange(95, 95),
idle: SpriteFrameRange(50, 57),
walking: SpriteFrameRange(58, 89),
dying: SpriteFrameRange(90, 93),
pain: SpriteFrameRange(94, 94),
dead: SpriteFrameRange(95, 95),
attacking: SpriteFrameRange(96, 98),
),
),
EntityKey.dog: const EntityAssetDefinition(
availableInShareware: true,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(99, 106),
walking: SpriteFrameRange(99, 130),
idle: SpriteFrameRange(99, 106),
walking: SpriteFrameRange(99, 130),
attacking: SpriteFrameRange(135, 137),
pain: SpriteFrameRange(0, 0),
dying: SpriteFrameRange(131, 133),
dead: SpriteFrameRange(134, 134),
pain: SpriteFrameRange(0, 0),
dying: SpriteFrameRange(131, 133),
dead: SpriteFrameRange(134, 134),
),
),
EntityKey.ss: const EntityAssetDefinition(
availableInShareware: true,
animations: EnemyAnimationMap(
idle: SpriteFrameRange(138, 145),
walking: SpriteFrameRange(146, 177),
idle: SpriteFrameRange(138, 145),
walking: SpriteFrameRange(146, 177),
attacking: SpriteFrameRange(184, 186),
pain: SpriteFrameRange(182, 182),
dying: SpriteFrameRange(178, 181),
dead: SpriteFrameRange(183, 183),
pain: SpriteFrameRange(182, 182),
dying: SpriteFrameRange(178, 181),
dead: SpriteFrameRange(183, 183),
),
),
// Mutant and Officer are NOT present in shareware; resolving them

View File

@@ -19,27 +19,27 @@ class SharewareMenuPicModule extends MenuPicModule {
// Retail-baseline indices (same layout as RetailMenuPicModule).
static final Map<MenuPicKey, int> _retailBaseline = {
MenuPicKey.title : 84,
MenuPicKey.credits : 86,
MenuPicKey.pg13 : 85,
MenuPicKey.controlBackground : 23,
MenuPicKey.footer : 15,
MenuPicKey.heading : 3,
MenuPicKey.optionsLabel : 7,
MenuPicKey.cursorActive : 8,
MenuPicKey.cursorInactive : 9,
MenuPicKey.markerSelected : 11,
MenuPicKey.markerUnselected : 10,
MenuPicKey.episode1 : 27,
MenuPicKey.episode2 : 28,
MenuPicKey.episode3 : 29,
MenuPicKey.episode4 : 30,
MenuPicKey.episode5 : 31,
MenuPicKey.episode6 : 32,
MenuPicKey.difficultyBaby : 16,
MenuPicKey.difficultyEasy : 17,
MenuPicKey.difficultyNormal : 18,
MenuPicKey.difficultyHard : 19,
MenuPicKey.title: 84,
MenuPicKey.credits: 86,
MenuPicKey.pg13: 85,
MenuPicKey.controlBackground: 23,
MenuPicKey.footer: 15,
MenuPicKey.heading: 3,
MenuPicKey.optionsLabel: 7,
MenuPicKey.cursorActive: 8,
MenuPicKey.cursorInactive: 9,
MenuPicKey.markerSelected: 11,
MenuPicKey.markerUnselected: 10,
MenuPicKey.episode1: 27,
MenuPicKey.episode2: 28,
MenuPicKey.episode3: 29,
MenuPicKey.episode4: 30,
MenuPicKey.episode5: 31,
MenuPicKey.episode6: 32,
MenuPicKey.difficultyBaby: 16,
MenuPicKey.difficultyEasy: 17,
MenuPicKey.difficultyNormal: 18,
MenuPicKey.difficultyHard: 19,
};
// Landmark constant: STATUSBARPIC in retail picture-table coords.
@@ -95,17 +95,18 @@ class SharewareMenuPicModule extends MenuPicModule {
MenuPicKey.episode5,
MenuPicKey.episode6,
];
if (episodeIndex >= 0 && episodeIndex < keys.length) return keys[episodeIndex];
if (episodeIndex >= 0 && episodeIndex < keys.length)
return keys[episodeIndex];
return MenuPicKey.episode1;
}
@override
MenuPicKey difficultyKey(Difficulty difficulty) {
return switch (difficulty) {
Difficulty.baby => MenuPicKey.difficultyBaby,
Difficulty.easy => MenuPicKey.difficultyEasy,
Difficulty.baby => MenuPicKey.difficultyBaby,
Difficulty.easy => MenuPicKey.difficultyEasy,
Difficulty.medium => MenuPicKey.difficultyNormal,
Difficulty.hard => MenuPicKey.difficultyHard,
Difficulty.hard => MenuPicKey.difficultyHard,
};
}
}

View File

@@ -10,17 +10,26 @@ class SharewareMusicModule extends MusicModule {
// Original WL_INTER.C shareware music table (Episode 1 only).
static const List<int> _levelMap = [
2, 3, 4, 5, 2, 3, 4, 5, 6, 7,
2,
3,
4,
5,
2,
3,
4,
5,
6,
7,
];
static final Map<MusicKey, int> _named = {
MusicKey.menuTheme: 1,
MusicKey.level01: 2,
MusicKey.level02: 3,
MusicKey.level03: 4,
MusicKey.level04: 5,
MusicKey.level05: 6,
MusicKey.level06: 7,
MusicKey.level01: 2,
MusicKey.level02: 3,
MusicKey.level03: 4,
MusicKey.level04: 5,
MusicKey.level05: 6,
MusicKey.level06: 7,
};
@override

View File

@@ -14,19 +14,19 @@ final class EntityKey {
final String _id;
// --- Standard Enemies ---
static const guard = EntityKey('guard');
static const dog = EntityKey('dog');
static const ss = EntityKey('ss');
static const mutant = EntityKey('mutant');
static const guard = EntityKey('guard');
static const dog = EntityKey('dog');
static const ss = EntityKey('ss');
static const mutant = EntityKey('mutant');
static const officer = EntityKey('officer');
// --- Bosses (Wolf3D) ---
static const hansGrosse = EntityKey('hansGrosse');
static const drSchabbs = EntityKey('drSchabbs');
static const hitler = EntityKey('hitler');
static const mechaHitler = EntityKey('mechaHitler');
static const hansGrosse = EntityKey('hansGrosse');
static const drSchabbs = EntityKey('drSchabbs');
static const hitler = EntityKey('hitler');
static const mechaHitler = EntityKey('mechaHitler');
static const ottoGiftmacher = EntityKey('ottoGiftmacher');
static const gretelGrosse = EntityKey('gretelGrosse');
static const gretelGrosse = EntityKey('gretelGrosse');
@override
bool operator ==(Object other) => other is EntityKey && other._id == _id;

View File

@@ -29,19 +29,19 @@ final class HudKey {
static const digit9 = HudKey('digit9');
// --- BJ face health bands (each maps to the base of 3 animated frames) ---
static const faceHealthy = HudKey('faceHealthy'); // health 85100
static const faceScratched = HudKey('faceScratched'); // health 6984
static const faceHurt = HudKey('faceHurt'); // health 5368
static const faceWounded = HudKey('faceWounded'); // health 3752
static const faceBadlyWounded = HudKey('faceBadlyWounded'); // health 2136
static const faceDying = HudKey('faceDying'); // health 520
static const faceNearDeath = HudKey('faceNearDeath'); // health 14
static const faceDead = HudKey('faceDead'); // health ≤ 0
static const faceHealthy = HudKey('faceHealthy'); // health 85100
static const faceScratched = HudKey('faceScratched'); // health 6984
static const faceHurt = HudKey('faceHurt'); // health 5368
static const faceWounded = HudKey('faceWounded'); // health 3752
static const faceBadlyWounded = HudKey('faceBadlyWounded'); // health 2136
static const faceDying = HudKey('faceDying'); // health 520
static const faceNearDeath = HudKey('faceNearDeath'); // health 14
static const faceDead = HudKey('faceDead'); // health ≤ 0
// --- Weapon icons ---
static const pistolIcon = HudKey('pistolIcon');
static const pistolIcon = HudKey('pistolIcon');
static const machineGunIcon = HudKey('machineGunIcon');
static const chainGunIcon = HudKey('chainGunIcon');
static const chainGunIcon = HudKey('chainGunIcon');
@override
bool operator ==(Object other) => other is HudKey && other._id == _id;

View File

@@ -14,20 +14,20 @@ final class MenuPicKey {
final String _id;
// --- Full-screen art ---
static const title = MenuPicKey('title');
static const title = MenuPicKey('title');
static const credits = MenuPicKey('credits');
static const pg13 = MenuPicKey('pg13');
static const pg13 = MenuPicKey('pg13');
// --- Control-panel chrome ---
static const controlBackground = MenuPicKey('controlBackground');
static const footer = MenuPicKey('footer');
static const heading = MenuPicKey('heading');
static const optionsLabel = MenuPicKey('optionsLabel');
static const footer = MenuPicKey('footer');
static const heading = MenuPicKey('heading');
static const optionsLabel = MenuPicKey('optionsLabel');
// --- Cursor / selection markers ---
static const cursorActive = MenuPicKey('cursorActive');
static const cursorActive = MenuPicKey('cursorActive');
static const cursorInactive = MenuPicKey('cursorInactive');
static const markerSelected = MenuPicKey('markerSelected');
static const markerSelected = MenuPicKey('markerSelected');
static const markerUnselected = MenuPicKey('markerUnselected');
// --- Episode selection ---
@@ -39,10 +39,10 @@ final class MenuPicKey {
static const episode6 = MenuPicKey('episode6');
// --- Difficulty selection ---
static const difficultyBaby = MenuPicKey('difficultyBaby');
static const difficultyEasy = MenuPicKey('difficultyEasy');
static const difficultyBaby = MenuPicKey('difficultyBaby');
static const difficultyEasy = MenuPicKey('difficultyEasy');
static const difficultyNormal = MenuPicKey('difficultyNormal');
static const difficultyHard = MenuPicKey('difficultyHard');
static const difficultyHard = MenuPicKey('difficultyHard');
@override
bool operator ==(Object other) => other is MenuPicKey && other._id == _id;

View File

@@ -14,57 +14,57 @@ final class SfxKey {
final String _id;
// --- Doors & Environment ---
static const openDoor = SfxKey('openDoor');
static const openDoor = SfxKey('openDoor');
static const closeDoor = SfxKey('closeDoor');
static const pushWall = SfxKey('pushWall');
static const pushWall = SfxKey('pushWall');
// --- Weapons ---
static const knifeAttack = SfxKey('knifeAttack');
static const pistolFire = SfxKey('pistolFire');
static const knifeAttack = SfxKey('knifeAttack');
static const pistolFire = SfxKey('pistolFire');
static const machineGunFire = SfxKey('machineGunFire');
static const chainGunFire = SfxKey('chainGunFire');
static const enemyFire = SfxKey('enemyFire');
static const chainGunFire = SfxKey('chainGunFire');
static const enemyFire = SfxKey('enemyFire');
// --- Pickups ---
static const getMachineGun = SfxKey('getMachineGun');
static const getAmmo = SfxKey('getAmmo');
static const getChainGun = SfxKey('getChainGun');
static const healthSmall = SfxKey('healthSmall');
static const healthLarge = SfxKey('healthLarge');
static const treasure1 = SfxKey('treasure1');
static const treasure2 = SfxKey('treasure2');
static const treasure3 = SfxKey('treasure3');
static const treasure4 = SfxKey('treasure4');
static const extraLife = SfxKey('extraLife');
static const getAmmo = SfxKey('getAmmo');
static const getChainGun = SfxKey('getChainGun');
static const healthSmall = SfxKey('healthSmall');
static const healthLarge = SfxKey('healthLarge');
static const treasure1 = SfxKey('treasure1');
static const treasure2 = SfxKey('treasure2');
static const treasure3 = SfxKey('treasure3');
static const treasure4 = SfxKey('treasure4');
static const extraLife = SfxKey('extraLife');
// --- Standard Enemies ---
static const guardHalt = SfxKey('guardHalt');
static const dogBark = SfxKey('dogBark');
static const dogDeath = SfxKey('dogDeath');
static const dogAttack = SfxKey('dogAttack');
static const guardHalt = SfxKey('guardHalt');
static const dogBark = SfxKey('dogBark');
static const dogDeath = SfxKey('dogDeath');
static const dogAttack = SfxKey('dogAttack');
static const deathScream1 = SfxKey('deathScream1');
static const deathScream2 = SfxKey('deathScream2');
static const deathScream3 = SfxKey('deathScream3');
static const ssAlert = SfxKey('ssAlert');
static const ssDeath = SfxKey('ssDeath');
static const ssAlert = SfxKey('ssAlert');
static const ssDeath = SfxKey('ssDeath');
// --- Bosses ---
static const bossActive = SfxKey('bossActive');
static const bossActive = SfxKey('bossActive');
static const hansGrosseDeath = SfxKey('hansGrosseDeath');
static const schabbs = SfxKey('schabbs');
static const schabbsDeath = SfxKey('schabbsDeath');
static const hitlerGreeting = SfxKey('hitlerGreeting');
static const hitlerDeath = SfxKey('hitlerDeath');
static const mechaSteps = SfxKey('mechaSteps');
static const ottoAlert = SfxKey('ottoAlert');
static const gretelDeath = SfxKey('gretelDeath');
static const schabbs = SfxKey('schabbs');
static const schabbsDeath = SfxKey('schabbsDeath');
static const hitlerGreeting = SfxKey('hitlerGreeting');
static const hitlerDeath = SfxKey('hitlerDeath');
static const mechaSteps = SfxKey('mechaSteps');
static const ottoAlert = SfxKey('ottoAlert');
static const gretelDeath = SfxKey('gretelDeath');
// --- UI & Progression ---
static const levelComplete = SfxKey('levelComplete');
static const endBonus1 = SfxKey('endBonus1');
static const endBonus2 = SfxKey('endBonus2');
static const noBonus = SfxKey('noBonus');
static const percent100 = SfxKey('percent100');
static const endBonus1 = SfxKey('endBonus1');
static const endBonus2 = SfxKey('endBonus2');
static const noBonus = SfxKey('noBonus');
static const percent100 = SfxKey('percent100');
@override
bool operator ==(Object other) => other is SfxKey && other._id == _id;

View File

@@ -27,6 +27,10 @@ export 'src/data_types/wolf_level.dart' show WolfLevel;
export 'src/data_types/wolfenstein_data.dart' show WolfensteinData;
// Registry public surface
export 'src/registry/asset_registry.dart' show AssetRegistry;
export 'src/registry/built_in/retail_asset_registry.dart'
show RetailAssetRegistry;
export 'src/registry/built_in/shareware_asset_registry.dart'
show SharewareAssetRegistry;
export 'src/registry/keys/entity_key.dart' show EntityKey;
export 'src/registry/keys/hud_key.dart' show HudKey;
export 'src/registry/keys/menu_pic_key.dart' show MenuPicKey;
@@ -40,9 +44,7 @@ export 'src/registry/modules/menu_pic_module.dart'
export 'src/registry/modules/music_module.dart' show MusicModule, MusicRoute;
export 'src/registry/modules/sfx_module.dart' show SfxModule, SoundAssetRef;
export 'src/registry/registry_resolver.dart'
show AssetRegistryResolver, BuiltInAssetRegistryResolver,
RegistrySelectionContext;
export 'src/registry/built_in/retail_asset_registry.dart'
show RetailAssetRegistry;
export 'src/registry/built_in/shareware_asset_registry.dart'
show SharewareAssetRegistry;
show
AssetRegistryResolver,
BuiltInAssetRegistryResolver,
RegistrySelectionContext;