1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-05 01:37:17 -05:00

Renamed SoundDetailRecord

This commit is contained in:
Intyre 2020-12-18 18:51:41 +01:00
parent a62e21a572
commit af6a8272dd
4 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ const originalFPS float64 = 25
// A Sound that can be started and stopped
type Sound struct {
effect d2interface.SoundEffect
entry *d2records.SoundDetailsRecord
entry *d2records.SoundDetailRecord
volume float64
vTarget float64
vRate float64

View File

@ -433,7 +433,7 @@ func (r *RecordManager) lookupObject(act, typ, id int) *ObjectLookupRecord {
}
// SelectSoundByIndex selects a sound by its ID
func (r *RecordManager) SelectSoundByIndex(index int) *SoundDetailsRecord {
func (r *RecordManager) SelectSoundByIndex(index int) *SoundDetailRecord {
for idx := range r.Sound.Details {
if r.Sound.Details[idx].Index == index {
return r.Sound.Details[idx]

View File

@ -9,7 +9,7 @@ func soundDetailsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
records := make(SoundDetails)
for d.Next() {
entry := &SoundDetailsRecord{
entry := &SoundDetailRecord{
Handle: d.String("Sound"),
Index: d.Number("Index"),
FileName: d.String("FileName"),

View File

@ -1,10 +1,10 @@
package d2records
// SoundDetails is a map of the SoundEntries
type SoundDetails map[string]*SoundDetailsRecord
type SoundDetails map[string]*SoundDetailRecord
// SoundDetailsRecord represents a sound entry
type SoundDetailsRecord struct {
// SoundDetailRecord represents a sound entry
type SoundDetailRecord struct {
Handle string
FileName string
Index int