1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-16 04:25:23 +00:00
OpenDiablo2/d2common/d2enum/objectanimationmode_string2enum.go
Ziemas 11f743aa42
Get and use draw order and animation speed for objects (#473)
* String2enum ObjectAnimationMode

* Render objects at their assigned layer

Gets the orderflag from the object record and assign it to the mapentity
so the renderer can get at it.

This adds another render pass that loops through the objects.

* Get object animation speed from their txt entry
2020-06-27 14:30:23 -04:00

41 lines
878 B
Go

// Code generated by "string2enum -samepkg -linecomment -type ObjectAnimationMode"; DO NOT EDIT.
package d2enum
import "fmt"
// ObjectAnimationModeFromString returns the ObjectAnimationMode enum corresponding to s.
func ObjectAnimationModeFromString(s string) ObjectAnimationMode {
if len(s) == 0 {
return 0
}
for i := range _ObjectAnimationMode_index[:len(_ObjectAnimationMode_index)-1] {
if s == _ObjectAnimationMode_name[_ObjectAnimationMode_index[i]:_ObjectAnimationMode_index[i+1]] {
return ObjectAnimationMode(i)
}
}
panic(fmt.Errorf("unable to locate ObjectAnimationMode enum corresponding to %q", s))
}
func _(s string) {
// Check for duplicate string values in type "ObjectAnimationMode".
switch s {
// 0
case "NU":
// 1
case "OP":
// 2
case "ON":
// 3
case "S1":
// 4
case "S2":
// 5
case "S3":
// 6
case "S4":
// 7
case "S5":
}
}