Overview
Comment: | Add a file for copying sounds from HEROFALL.EXE |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
043f25eb8d8cf148c7099607f2d2a169 |
User & Date: | user on 2020-11-24 00:45:29 |
Other Links: | manifest | tags |
Context
2020-11-26
| ||
01:41 | Implement objtrash() and generation number increasing; move initialization to a separate subroutine check-in: daf44d7fbb user: user tags: trunk | |
2020-11-24
| ||
00:45 | Add a file for copying sounds from HEROFALL.EXE check-in: 043f25eb8d user: user tags: trunk | |
2020-11-22
| ||
04:29 | Implement level selection in game play mode (not yet complete; needs to initialize the level too), and add some more keyboard commands to the class selection menu in the editor. check-in: c1e8833d15 user: user tags: trunk | |
Changes
Added sounds.js version [02ef9788f0].
> > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | // This program will read the sounds from HEROFALL.EXE // The output is written to a Hamster archive to stdout "use strict"; const hamarc=require("hamarc"); const fs=require("fs"); const out=new hamarc.File(1); const hdr=Buffer.allocUnsafe(12); const fil=fs.openSync(process.argv[2],"r"); let n=0; let o=process.argv[3]?parseInt(process.argv[3],16):0x5CD92; for(;;) { if(fs.readSync(fil,hdr,0,12,o)<12) break; if(hdr.toString("ascii",0,4)!="RIFF" || hdr.toString("ascii",8,12)!="WAVE") break; let len=hdr.readUInt32LE(4); let buf=Buffer.allocUnsafeSlow(len+8); fs.readSync(fil,buf,0,len,o); out.put(n+".WAV",buf); o+=len+8; n++; } |