mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-10-01 15:46:17 -04:00
Renamed ObjectDetailRecord
This commit is contained in:
parent
2dc490b152
commit
05e9f34765
@ -263,7 +263,7 @@ func (f *MapEntityFactory) NewCastOverlay(x, y int, overlayRecord *d2records.Ove
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewObject creates an instance of AnimatedComposite
|
// 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) {
|
palettePath string) (*Object, error) {
|
||||||
locX, locY := float64(x), float64(y)
|
locX, locY := float64(x), float64(y)
|
||||||
entity := &Object{
|
entity := &Object{
|
||||||
|
@ -20,7 +20,7 @@ type Object struct {
|
|||||||
composite *d2asset.Composite
|
composite *d2asset.Composite
|
||||||
highlight bool
|
highlight bool
|
||||||
// nameLabel d2ui.Label
|
// nameLabel d2ui.Label
|
||||||
objectRecord *d2records.ObjectDetailsRecord
|
objectRecord *d2records.ObjectDetailRecord
|
||||||
drawLayer int
|
drawLayer int
|
||||||
name string
|
name string
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ func objectDetailsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
|
|||||||
i := 0
|
i := 0
|
||||||
|
|
||||||
for d.Next() {
|
for d.Next() {
|
||||||
record := &ObjectDetailsRecord{
|
record := &ObjectDetailRecord{
|
||||||
Index: i,
|
Index: i,
|
||||||
Name: d.String("Name"),
|
Name: d.String("Name"),
|
||||||
Description: d.String("description - not loaded"),
|
Description: d.String("description - not loaded"),
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package d2records
|
package d2records
|
||||||
|
|
||||||
// ObjectDetails stores all of the ObjectDetailRecords
|
// 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
|
// ObjectDetailRecord represents the settings for one type of object from objects.txt
|
||||||
type ObjectDetailsRecord struct {
|
type ObjectDetailRecord struct {
|
||||||
Index int // Line number in file, this is the actual index used for objects
|
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
|
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)
|
FrameDelta [8]int // what rate is the animation played at (256 = 100% speed)
|
||||||
|
Loading…
Reference in New Issue
Block a user