mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-05 01:37:17 -05:00
Renamed SoundDetailRecord
This commit is contained in:
parent
a62e21a572
commit
af6a8272dd
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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"),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user