mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-06-12 18:50:42 +00:00
testing to see if this fixes the github build issues (#715)
This commit is contained in:
parent
439b2e7472
commit
52125932f8
|
@ -37,7 +37,7 @@ func LoadAnimationData(rawData []byte) {
|
||||||
for i := 0; i < dataCount; i++ {
|
for i := 0; i < dataCount; i++ {
|
||||||
cofNameBytes := streamReader.ReadBytes(numCofNameBytes)
|
cofNameBytes := streamReader.ReadBytes(numCofNameBytes)
|
||||||
data := &AnimationDataRecord{
|
data := &AnimationDataRecord{
|
||||||
COFName: strings.ReplaceAll(string(cofNameBytes), string(0), ""),
|
COFName: strings.ReplaceAll(string(cofNameBytes), string(byte(0)), ""),
|
||||||
FramesPerDirection: int(streamReader.GetInt32()),
|
FramesPerDirection: int(streamReader.GetInt32()),
|
||||||
AnimationSpeed: int(streamReader.GetInt32()),
|
AnimationSpeed: int(streamReader.GetInt32()),
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,8 @@ func LoadObjectTypes(objectTypeData []byte) {
|
||||||
nameBytes := streamReader.ReadBytes(nameSize)
|
nameBytes := streamReader.ReadBytes(nameSize)
|
||||||
tokenBytes := streamReader.ReadBytes(tokenSize)
|
tokenBytes := streamReader.ReadBytes(tokenSize)
|
||||||
ObjectTypes[i] = ObjectTypeRecord{
|
ObjectTypes[i] = ObjectTypeRecord{
|
||||||
Name: strings.TrimSpace(strings.ReplaceAll(string(nameBytes), string(0), "")),
|
Name: strings.TrimSpace(strings.ReplaceAll(string(nameBytes), string(byte(0)), "")),
|
||||||
Token: strings.TrimSpace(strings.ReplaceAll(string(tokenBytes), string(0), "")),
|
Token: strings.TrimSpace(strings.ReplaceAll(string(tokenBytes), string(byte(0)), "")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ func Load(fileData []byte) (*COF, error) {
|
||||||
layer.Transparent = streamReader.GetByte() != 0
|
layer.Transparent = streamReader.GetByte() != 0
|
||||||
layer.DrawEffect = d2enum.DrawEffect(streamReader.GetByte())
|
layer.DrawEffect = d2enum.DrawEffect(streamReader.GetByte())
|
||||||
weaponClassStr := streamReader.ReadBytes(4) //nolint:gomnd // Binary data
|
weaponClassStr := streamReader.ReadBytes(4) //nolint:gomnd // Binary data
|
||||||
layer.WeaponClass = d2enum.WeaponClassFromString(strings.TrimSpace(strings.ReplaceAll(string(weaponClassStr), string(0), "")))
|
layer.WeaponClass = d2enum.WeaponClassFromString(strings.TrimSpace(strings.ReplaceAll(string(weaponClassStr), string(byte(0)), "")))
|
||||||
result.CofLayers[i] = layer
|
result.CofLayers[i] = layer
|
||||||
result.CompositeLayers[layer.Type] = i
|
result.CompositeLayers[layer.Type] = i
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user