mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-20 23:47:16 -05:00
Added LevelPreset file loading
This commit is contained in:
parent
55b241c56d
commit
9fc416e8e2
@ -43,13 +43,14 @@ func LoadLevelPresets(fileProvider FileProvider) {
|
||||
LevelPresets[i].Animate = sr.GetInt32() != 0
|
||||
LevelPresets[i].KillEdge = sr.GetInt32() != 0
|
||||
LevelPresets[i].FillBlanks = sr.GetInt32() != 0
|
||||
sr.GetInt32() // What is this field?
|
||||
LevelPresets[i].SizeX = sr.GetInt32()
|
||||
LevelPresets[i].SizeY = sr.GetInt32()
|
||||
LevelPresets[i].AutoMap = sr.GetInt32() != 0
|
||||
LevelPresets[i].Scan = sr.GetInt32() != 0
|
||||
LevelPresets[i].Pops = sr.GetInt32()
|
||||
LevelPresets[i].PopPad = sr.GetInt32()
|
||||
sr.GetInt32()
|
||||
sr.GetUInt32() // Most likely NumFiles
|
||||
for fileIdx := 0; fileIdx < 6; fileIdx++ {
|
||||
strData, _ := sr.ReadBytes(60)
|
||||
s := strings.Trim(string(strData), string(0))
|
||||
@ -61,6 +62,7 @@ func LoadLevelPresets(fileProvider FileProvider) {
|
||||
|
||||
}
|
||||
LevelPresets[i].Dt1Mask = sr.GetUInt32()
|
||||
|
||||
}
|
||||
log.Printf("Loaded %d LevelPreset records")
|
||||
log.Printf("Loaded %d LevelPreset records", len(LevelPresets))
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ func CreateEngine() *Engine {
|
||||
result.loadSoundEntries()
|
||||
Common.LoadTextDictionary(result)
|
||||
Common.LoadLevelTypes(result)
|
||||
//Common.LoadLevelPresets(result)
|
||||
Common.LoadLevelPresets(result)
|
||||
result.SoundManager = Sound.CreateManager(result)
|
||||
result.SoundManager.SetVolumes(result.Settings.BgmVolume, result.Settings.SfxVolume)
|
||||
result.UIManager = UI.CreateManager(result, *result.SoundManager)
|
||||
|
Loading…
x
Reference in New Issue
Block a user