diff --git a/src/module/audio/decoder.ts b/src/module/audio/decoder.ts index 3494bb4..d38cfe2 100644 --- a/src/module/audio/decoder.ts +++ b/src/module/audio/decoder.ts @@ -7,7 +7,7 @@ import type { AudioPlayer } from './player'; const fileSignatures: [AudioType, number[]][] = [ [AudioType.Mp3, [0x49, 0x44, 0x33]], [AudioType.Ogg, [0x4f, 0x67, 0x67, 0x53]], - [AudioType.Wav, [52, 0x49, 0x46, 0x46]], + [AudioType.Wav, [0x52, 0x49, 0x46, 0x46]], [AudioType.Flac, [0x66, 0x4c, 0x61, 0x43]], [AudioType.Aac, [0xff, 0xf1]], [AudioType.Aac, [0xff, 0xf9]] @@ -87,7 +87,7 @@ export abstract class AudioDecoder { logger.error( 25, [...toCheck] - .map(v => v.toString().padStart(2, '0')) + .map(v => v.toString(16).padStart(2, '0')) .join(' ') .toUpperCase() ); diff --git a/src/source/data.d.ts b/src/source/data.d.ts index 9fffa0a..86e6e08 100644 --- a/src/source/data.d.ts +++ b/src/source/data.d.ts @@ -1,3 +1,4 @@ + type FloorIds = | 'empty' | 'MT0' @@ -105,7 +106,7 @@ type FloorIds = | 'MT94' | 'MT95' | 'MT96' - | 'MT97'; + | 'MT97' type ImageIds = | 'IQ.png' @@ -139,7 +140,7 @@ type ImageIds = | 'tower7.webp' | 'winskin.png' | 'winskin2.png' - | 'winskin3.png'; + | 'winskin3.png' type AnimationIds = | 'amazed' @@ -163,7 +164,7 @@ type AnimationIds = | 'sweat' | 'sweat2' | 'sword' - | 'zone'; + | 'zone' type SoundIds = | '008-System08.opus' @@ -205,7 +206,7 @@ type SoundIds = | 'shop.opus' | 'thunder.opus' | 'tree.opus' - | 'zone.opus'; + | 'zone.opus' type BgmIds = | 'beforeBoss.opus' @@ -228,33 +229,35 @@ type BgmIds = | 'towerBoss2.opus' | 'towerBoss3.opus' | 'winter.opus' - | 'winterTown.opus'; + | 'winterTown.opus' -type FontIds = 'normal' | 'FiraCode'; +type FontIds = + | 'normal' + | 'FiraCode' interface NameMap { - 确定: 'confirm.opus'; - 取消: 'cancel.opus'; - 操作失败: 'error.opus'; - 光标移动: 'cursor.opus'; - 打开界面: 'open_ui.opus'; - 读档: 'load.opus'; - 存档: 'save.opus'; - 获得道具: 'item.opus'; - 回血: 'recovery.opus'; - 炸弹: 'bomb.opus'; - 飞行器: 'centerFly.opus'; - 开关门: 'door.opus'; - 上下楼: 'floor.opus'; - 跳跃: 'jump.opus'; - 破墙镐: 'pickaxe.opus'; - 破冰镐: 'icePickaxe.opus'; - 宝石: 'gem.opus'; - 阻激夹域: 'zone.opus'; - 穿脱装备: 'equip.opus'; - 背景音乐: 'bgm.opus'; - 攻击: 'attack.opus'; - 背景图: 'bg.jpg'; - 商店: 'shop.opus'; - 领域: 'zone'; + '确定': 'confirm.opus'; + '取消': 'cancel.opus'; + '操作失败': 'error.opus'; + '光标移动': 'cursor.opus'; + '打开界面': 'open_ui.opus'; + '读档': 'load.opus'; + '存档': 'save.opus'; + '获得道具': 'item.opus'; + '回血': 'recovery.opus'; + '炸弹': 'bomb.opus'; + '飞行器': 'centerFly.opus'; + '开关门': 'door.opus'; + '上下楼': 'floor.opus'; + '跳跃': 'jump.opus'; + '破墙镐': 'pickaxe.opus'; + '破冰镐': 'icePickaxe.opus'; + '宝石': 'gem.opus'; + '阻激夹域': 'zone.opus'; + '穿脱装备': 'equip.opus'; + '背景音乐': 'bgm.opus'; + '攻击': 'attack.opus'; + '背景图': 'bg.jpg'; + '商店': 'shop.opus'; + '领域': 'zone'; }