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

View File

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

View File

@@ -23,31 +23,31 @@ class RetailMenuPicModule extends MenuPicModule {
static final Map<MenuPicKey, int> _indices = { static final Map<MenuPicKey, int> _indices = {
// --- Full-screen art --- // --- Full-screen art ---
MenuPicKey.title : 84, MenuPicKey.title: 84,
MenuPicKey.credits : 86, MenuPicKey.credits: 86,
MenuPicKey.pg13 : 85, MenuPicKey.pg13: 85,
// --- Control-panel chrome --- // --- Control-panel chrome ---
MenuPicKey.controlBackground : 23, // C_CONTROLPIC MenuPicKey.controlBackground: 23, // C_CONTROLPIC
MenuPicKey.footer : 15, // C_MOUSELBACKPIC (footer art) MenuPicKey.footer: 15, // C_MOUSELBACKPIC (footer art)
MenuPicKey.heading : 3, // H_TOPWINDOWPIC MenuPicKey.heading: 3, // H_TOPWINDOWPIC
MenuPicKey.optionsLabel : 7, // C_OPTIONSPIC MenuPicKey.optionsLabel: 7, // C_OPTIONSPIC
// --- Cursor / markers --- // --- Cursor / markers ---
MenuPicKey.cursorActive : 8, // C_CURSOR1PIC MenuPicKey.cursorActive: 8, // C_CURSOR1PIC
MenuPicKey.cursorInactive : 9, // C_CURSOR2PIC MenuPicKey.cursorInactive: 9, // C_CURSOR2PIC
MenuPicKey.markerSelected : 11, // C_SELECTEDPIC MenuPicKey.markerSelected: 11, // C_SELECTEDPIC
MenuPicKey.markerUnselected : 10, // C_NOTSELECTEDPIC MenuPicKey.markerUnselected: 10, // C_NOTSELECTEDPIC
// --- Episode selection --- // --- Episode selection ---
MenuPicKey.episode1 : 27, MenuPicKey.episode1: 27,
MenuPicKey.episode2 : 28, MenuPicKey.episode2: 28,
MenuPicKey.episode3 : 29, MenuPicKey.episode3: 29,
MenuPicKey.episode4 : 30, MenuPicKey.episode4: 30,
MenuPicKey.episode5 : 31, MenuPicKey.episode5: 31,
MenuPicKey.episode6 : 32, MenuPicKey.episode6: 32,
// --- Difficulty selection --- // --- Difficulty selection ---
MenuPicKey.difficultyBaby : 16, // C_BABYMODEPIC MenuPicKey.difficultyBaby: 16, // C_BABYMODEPIC
MenuPicKey.difficultyEasy : 17, // C_EASYPIC MenuPicKey.difficultyEasy: 17, // C_EASYPIC
MenuPicKey.difficultyNormal : 18, // C_NORMALPIC MenuPicKey.difficultyNormal: 18, // C_NORMALPIC
MenuPicKey.difficultyHard : 19, // C_HARDPIC MenuPicKey.difficultyHard: 19, // C_HARDPIC
}; };
@override @override
@@ -67,10 +67,10 @@ class RetailMenuPicModule extends MenuPicModule {
@override @override
MenuPicKey difficultyKey(Difficulty difficulty) { MenuPicKey difficultyKey(Difficulty difficulty) {
return switch (difficulty) { return switch (difficulty) {
Difficulty.baby => MenuPicKey.difficultyBaby, Difficulty.baby => MenuPicKey.difficultyBaby,
Difficulty.easy => MenuPicKey.difficultyEasy, Difficulty.easy => MenuPicKey.difficultyEasy,
Difficulty.medium => MenuPicKey.difficultyNormal, 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). // Original WL_INTER.C music table — 60 entries (6 episodes × 10 levels).
static const List<int> _levelMap = [ static const List<int> _levelMap = [
2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 1 2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 1
8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 2 8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 2
13, 14, 15, 16, 13, 14, 15, 16, 17, 18, // Episode 3 13, 14, 15, 16, 13, 14, 15, 16, 17, 18, // Episode 3
2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 4 2, 3, 4, 5, 2, 3, 4, 5, 6, 7, // Episode 4
8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 5 8, 9, 10, 11, 8, 9, 11, 10, 6, 12, // Episode 5
13, 14, 15, 16, 13, 14, 15, 16, 17, 19, // Episode 6 13, 14, 15, 16, 13, 14, 15, 16, 17, 19, // Episode 6
]; ];
// Named MusicKey → track index for keyed lookups. // Named MusicKey → track index for keyed lookups.
static final Map<MusicKey, int> _named = { static final Map<MusicKey, int> _named = {
MusicKey.menuTheme: 1, MusicKey.menuTheme: 1,
MusicKey.level01: 2, MusicKey.level01: 2,
MusicKey.level02: 3, MusicKey.level02: 3,
MusicKey.level03: 4, MusicKey.level03: 4,
MusicKey.level04: 5, MusicKey.level04: 5,
MusicKey.level05: 6, MusicKey.level05: 6,
MusicKey.level06: 7, MusicKey.level06: 7,
MusicKey.level07: 8, MusicKey.level07: 8,
MusicKey.level08: 9, MusicKey.level08: 9,
MusicKey.level09: 10, MusicKey.level09: 10,
MusicKey.level10: 11, MusicKey.level10: 11,
MusicKey.level11: 12, MusicKey.level11: 12,

View File

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

View File

@@ -17,34 +17,34 @@ class SharewareEntityModule extends EntityAssetModule {
EntityKey.guard: const EntityAssetDefinition( EntityKey.guard: const EntityAssetDefinition(
availableInShareware: true, availableInShareware: true,
animations: EnemyAnimationMap( animations: EnemyAnimationMap(
idle: SpriteFrameRange(50, 57), idle: SpriteFrameRange(50, 57),
walking: SpriteFrameRange(58, 89), walking: SpriteFrameRange(58, 89),
dying: SpriteFrameRange(90, 93), dying: SpriteFrameRange(90, 93),
pain: SpriteFrameRange(94, 94), pain: SpriteFrameRange(94, 94),
dead: SpriteFrameRange(95, 95), dead: SpriteFrameRange(95, 95),
attacking: SpriteFrameRange(96, 98), attacking: SpriteFrameRange(96, 98),
), ),
), ),
EntityKey.dog: const EntityAssetDefinition( EntityKey.dog: const EntityAssetDefinition(
availableInShareware: true, availableInShareware: true,
animations: EnemyAnimationMap( animations: EnemyAnimationMap(
idle: SpriteFrameRange(99, 106), idle: SpriteFrameRange(99, 106),
walking: SpriteFrameRange(99, 130), walking: SpriteFrameRange(99, 130),
attacking: SpriteFrameRange(135, 137), attacking: SpriteFrameRange(135, 137),
pain: SpriteFrameRange(0, 0), pain: SpriteFrameRange(0, 0),
dying: SpriteFrameRange(131, 133), dying: SpriteFrameRange(131, 133),
dead: SpriteFrameRange(134, 134), dead: SpriteFrameRange(134, 134),
), ),
), ),
EntityKey.ss: const EntityAssetDefinition( EntityKey.ss: const EntityAssetDefinition(
availableInShareware: true, availableInShareware: true,
animations: EnemyAnimationMap( animations: EnemyAnimationMap(
idle: SpriteFrameRange(138, 145), idle: SpriteFrameRange(138, 145),
walking: SpriteFrameRange(146, 177), walking: SpriteFrameRange(146, 177),
attacking: SpriteFrameRange(184, 186), attacking: SpriteFrameRange(184, 186),
pain: SpriteFrameRange(182, 182), pain: SpriteFrameRange(182, 182),
dying: SpriteFrameRange(178, 181), dying: SpriteFrameRange(178, 181),
dead: SpriteFrameRange(183, 183), dead: SpriteFrameRange(183, 183),
), ),
), ),
// Mutant and Officer are NOT present in shareware; resolving them // 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). // Retail-baseline indices (same layout as RetailMenuPicModule).
static final Map<MenuPicKey, int> _retailBaseline = { static final Map<MenuPicKey, int> _retailBaseline = {
MenuPicKey.title : 84, MenuPicKey.title: 84,
MenuPicKey.credits : 86, MenuPicKey.credits: 86,
MenuPicKey.pg13 : 85, MenuPicKey.pg13: 85,
MenuPicKey.controlBackground : 23, MenuPicKey.controlBackground: 23,
MenuPicKey.footer : 15, MenuPicKey.footer: 15,
MenuPicKey.heading : 3, MenuPicKey.heading: 3,
MenuPicKey.optionsLabel : 7, MenuPicKey.optionsLabel: 7,
MenuPicKey.cursorActive : 8, MenuPicKey.cursorActive: 8,
MenuPicKey.cursorInactive : 9, MenuPicKey.cursorInactive: 9,
MenuPicKey.markerSelected : 11, MenuPicKey.markerSelected: 11,
MenuPicKey.markerUnselected : 10, MenuPicKey.markerUnselected: 10,
MenuPicKey.episode1 : 27, MenuPicKey.episode1: 27,
MenuPicKey.episode2 : 28, MenuPicKey.episode2: 28,
MenuPicKey.episode3 : 29, MenuPicKey.episode3: 29,
MenuPicKey.episode4 : 30, MenuPicKey.episode4: 30,
MenuPicKey.episode5 : 31, MenuPicKey.episode5: 31,
MenuPicKey.episode6 : 32, MenuPicKey.episode6: 32,
MenuPicKey.difficultyBaby : 16, MenuPicKey.difficultyBaby: 16,
MenuPicKey.difficultyEasy : 17, MenuPicKey.difficultyEasy: 17,
MenuPicKey.difficultyNormal : 18, MenuPicKey.difficultyNormal: 18,
MenuPicKey.difficultyHard : 19, MenuPicKey.difficultyHard: 19,
}; };
// Landmark constant: STATUSBARPIC in retail picture-table coords. // Landmark constant: STATUSBARPIC in retail picture-table coords.
@@ -95,17 +95,18 @@ class SharewareMenuPicModule extends MenuPicModule {
MenuPicKey.episode5, MenuPicKey.episode5,
MenuPicKey.episode6, MenuPicKey.episode6,
]; ];
if (episodeIndex >= 0 && episodeIndex < keys.length) return keys[episodeIndex]; if (episodeIndex >= 0 && episodeIndex < keys.length)
return keys[episodeIndex];
return MenuPicKey.episode1; return MenuPicKey.episode1;
} }
@override @override
MenuPicKey difficultyKey(Difficulty difficulty) { MenuPicKey difficultyKey(Difficulty difficulty) {
return switch (difficulty) { return switch (difficulty) {
Difficulty.baby => MenuPicKey.difficultyBaby, Difficulty.baby => MenuPicKey.difficultyBaby,
Difficulty.easy => MenuPicKey.difficultyEasy, Difficulty.easy => MenuPicKey.difficultyEasy,
Difficulty.medium => MenuPicKey.difficultyNormal, 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). // Original WL_INTER.C shareware music table (Episode 1 only).
static const List<int> _levelMap = [ 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 = { static final Map<MusicKey, int> _named = {
MusicKey.menuTheme: 1, MusicKey.menuTheme: 1,
MusicKey.level01: 2, MusicKey.level01: 2,
MusicKey.level02: 3, MusicKey.level02: 3,
MusicKey.level03: 4, MusicKey.level03: 4,
MusicKey.level04: 5, MusicKey.level04: 5,
MusicKey.level05: 6, MusicKey.level05: 6,
MusicKey.level06: 7, MusicKey.level06: 7,
}; };
@override @override

View File

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

View File

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

View File

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

View File

@@ -14,57 +14,57 @@ final class SfxKey {
final String _id; final String _id;
// --- Doors & Environment --- // --- Doors & Environment ---
static const openDoor = SfxKey('openDoor'); static const openDoor = SfxKey('openDoor');
static const closeDoor = SfxKey('closeDoor'); static const closeDoor = SfxKey('closeDoor');
static const pushWall = SfxKey('pushWall'); static const pushWall = SfxKey('pushWall');
// --- Weapons --- // --- Weapons ---
static const knifeAttack = SfxKey('knifeAttack'); static const knifeAttack = SfxKey('knifeAttack');
static const pistolFire = SfxKey('pistolFire'); static const pistolFire = SfxKey('pistolFire');
static const machineGunFire = SfxKey('machineGunFire'); static const machineGunFire = SfxKey('machineGunFire');
static const chainGunFire = SfxKey('chainGunFire'); static const chainGunFire = SfxKey('chainGunFire');
static const enemyFire = SfxKey('enemyFire'); static const enemyFire = SfxKey('enemyFire');
// --- Pickups --- // --- Pickups ---
static const getMachineGun = SfxKey('getMachineGun'); static const getMachineGun = SfxKey('getMachineGun');
static const getAmmo = SfxKey('getAmmo'); static const getAmmo = SfxKey('getAmmo');
static const getChainGun = SfxKey('getChainGun'); static const getChainGun = SfxKey('getChainGun');
static const healthSmall = SfxKey('healthSmall'); static const healthSmall = SfxKey('healthSmall');
static const healthLarge = SfxKey('healthLarge'); static const healthLarge = SfxKey('healthLarge');
static const treasure1 = SfxKey('treasure1'); static const treasure1 = SfxKey('treasure1');
static const treasure2 = SfxKey('treasure2'); static const treasure2 = SfxKey('treasure2');
static const treasure3 = SfxKey('treasure3'); static const treasure3 = SfxKey('treasure3');
static const treasure4 = SfxKey('treasure4'); static const treasure4 = SfxKey('treasure4');
static const extraLife = SfxKey('extraLife'); static const extraLife = SfxKey('extraLife');
// --- Standard Enemies --- // --- Standard Enemies ---
static const guardHalt = SfxKey('guardHalt'); static const guardHalt = SfxKey('guardHalt');
static const dogBark = SfxKey('dogBark'); static const dogBark = SfxKey('dogBark');
static const dogDeath = SfxKey('dogDeath'); static const dogDeath = SfxKey('dogDeath');
static const dogAttack = SfxKey('dogAttack'); static const dogAttack = SfxKey('dogAttack');
static const deathScream1 = SfxKey('deathScream1'); static const deathScream1 = SfxKey('deathScream1');
static const deathScream2 = SfxKey('deathScream2'); static const deathScream2 = SfxKey('deathScream2');
static const deathScream3 = SfxKey('deathScream3'); static const deathScream3 = SfxKey('deathScream3');
static const ssAlert = SfxKey('ssAlert'); static const ssAlert = SfxKey('ssAlert');
static const ssDeath = SfxKey('ssDeath'); static const ssDeath = SfxKey('ssDeath');
// --- Bosses --- // --- Bosses ---
static const bossActive = SfxKey('bossActive'); static const bossActive = SfxKey('bossActive');
static const hansGrosseDeath = SfxKey('hansGrosseDeath'); static const hansGrosseDeath = SfxKey('hansGrosseDeath');
static const schabbs = SfxKey('schabbs'); static const schabbs = SfxKey('schabbs');
static const schabbsDeath = SfxKey('schabbsDeath'); static const schabbsDeath = SfxKey('schabbsDeath');
static const hitlerGreeting = SfxKey('hitlerGreeting'); static const hitlerGreeting = SfxKey('hitlerGreeting');
static const hitlerDeath = SfxKey('hitlerDeath'); static const hitlerDeath = SfxKey('hitlerDeath');
static const mechaSteps = SfxKey('mechaSteps'); static const mechaSteps = SfxKey('mechaSteps');
static const ottoAlert = SfxKey('ottoAlert'); static const ottoAlert = SfxKey('ottoAlert');
static const gretelDeath = SfxKey('gretelDeath'); static const gretelDeath = SfxKey('gretelDeath');
// --- UI & Progression --- // --- UI & Progression ---
static const levelComplete = SfxKey('levelComplete'); static const levelComplete = SfxKey('levelComplete');
static const endBonus1 = SfxKey('endBonus1'); static const endBonus1 = SfxKey('endBonus1');
static const endBonus2 = SfxKey('endBonus2'); static const endBonus2 = SfxKey('endBonus2');
static const noBonus = SfxKey('noBonus'); static const noBonus = SfxKey('noBonus');
static const percent100 = SfxKey('percent100'); static const percent100 = SfxKey('percent100');
@override @override
bool operator ==(Object other) => other is SfxKey && other._id == _id; 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; export 'src/data_types/wolfenstein_data.dart' show WolfensteinData;
// Registry public surface // Registry public surface
export 'src/registry/asset_registry.dart' show AssetRegistry; 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/entity_key.dart' show EntityKey;
export 'src/registry/keys/hud_key.dart' show HudKey; export 'src/registry/keys/hud_key.dart' show HudKey;
export 'src/registry/keys/menu_pic_key.dart' show MenuPicKey; 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/music_module.dart' show MusicModule, MusicRoute;
export 'src/registry/modules/sfx_module.dart' show SfxModule, SoundAssetRef; export 'src/registry/modules/sfx_module.dart' show SfxModule, SoundAssetRef;
export 'src/registry/registry_resolver.dart' export 'src/registry/registry_resolver.dart'
show AssetRegistryResolver, BuiltInAssetRegistryResolver, show
RegistrySelectionContext; AssetRegistryResolver,
export 'src/registry/built_in/retail_asset_registry.dart' BuiltInAssetRegistryResolver,
show RetailAssetRegistry; RegistrySelectionContext;
export 'src/registry/built_in/shareware_asset_registry.dart'
show SharewareAssetRegistry;