Renamed ObjectDetailRecord

This commit is contained in:
Intyre 2020-12-18 19:02:34 +01:00
parent 2dc490b152
commit 05e9f34765
4 changed files with 6 additions and 6 deletions

View File

@ -263,7 +263,7 @@ func (f *MapEntityFactory) NewCastOverlay(x, y int, overlayRecord *d2records.Ove
}
// NewObject creates an instance of AnimatedComposite
func (f *MapEntityFactory) NewObject(x, y int, objectRec *d2records.ObjectDetailsRecord,
func (f *MapEntityFactory) NewObject(x, y int, objectRec *d2records.ObjectDetailRecord,
palettePath string) (*Object, error) {
locX, locY := float64(x), float64(y)
entity := &Object{

View File

@ -20,7 +20,7 @@ type Object struct {
composite *d2asset.Composite
highlight bool
// nameLabel d2ui.Label
objectRecord *d2records.ObjectDetailsRecord
objectRecord *d2records.ObjectDetailRecord
drawLayer int
name string
}

View File

@ -11,7 +11,7 @@ func objectDetailsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
i := 0
for d.Next() {
record := &ObjectDetailsRecord{
record := &ObjectDetailRecord{
Index: i,
Name: d.String("Name"),
Description: d.String("description - not loaded"),

View File

@ -1,10 +1,10 @@
package d2records
// ObjectDetails stores all of the ObjectDetailRecords
type ObjectDetails map[int]*ObjectDetailsRecord
type ObjectDetails map[int]*ObjectDetailRecord
// ObjectDetailsRecord represents the settings for one type of object from objects.txt
type ObjectDetailsRecord struct {
// ObjectDetailRecord represents the settings for one type of object from objects.txt
type ObjectDetailRecord struct {
Index int // Line number in file, this is the actual index used for objects
FrameCount [8]int // how many frames does this mode have, 0 = skip
FrameDelta [8]int // what rate is the animation played at (256 = 100% speed)