Skip to content

Commit

Permalink
feat(clientdb): add SoundEntriesRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Jan 15, 2024
1 parent c9b701b commit 864005e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/lib/clientdb/record/SoundEntriesRecord.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import * as io from '@wowserhq/io';
import ClientDbRecord from '../ClientDbRecord.js';
import * as dbIo from '../io.js';

const recordIo = io.struct({
id: io.int32le,
soundType: io.int32le,
name: dbIo.string,
file: io.array(dbIo.string, { size: 10 }),
freq: io.array(io.int32le, { size: 10 }),
directoryBase: dbIo.string,
volumeFloat: io.float32le,
flags: io.int32le,
minDistance: io.float32le,
distanceCutoff: io.float32le,
eaxdef: io.int32le,
soundEntriesAdvancedId: io.int32le,
});

class SoundEntriesRecord extends ClientDbRecord {
soundType: number;
name: string;
file: string[];
freq: number[];
directoryBase: string;
volumeFloat: number;
flags: number;
minDistance: number;
distanceCutoff: number;
eaxdef: number;
soundEntriesAdvancedId: number;

constructor() {
super(recordIo);
}
}

export default SoundEntriesRecord;
export { SoundEntriesRecord };
1 change: 1 addition & 0 deletions src/lib/clientdb/records.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export * from './record/LightRecord.js';
export * from './record/LightFloatBandRecord.js';
export * from './record/LightIntBandRecord.js';
export * from './record/LightParamsRecord.js';
export * from './record/SoundEntriesRecord.js';
export * from './record/ZoneMusicRecord.js';

0 comments on commit 864005e

Please sign in to comment.