1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-12-25 11:36:26 -05:00

fix build, rename Common to common (#99)

NTFS life
This commit is contained in:
Robin Eklind 2019-11-06 22:50:20 -06:00 committed by Tim Sarbin
parent cba1bac6ca
commit eaeaf5adb9
2 changed files with 4 additions and 4 deletions

View File

@ -123,7 +123,7 @@ func (v *Engine) mapMpqFiles() {
/* /*
func (v *Engine) mapMpqFiles() { func (v *Engine) mapMpqFiles() {
log.Println("mapping mpq file structure") log.Println("mapping mpq file structure")
v.Files = make(map[string]*Common.MpqFileRecord) v.Files = make(map[string]*common.MpqFileRecord)
v.CheckedPatch = make(map[string]bool) v.CheckedPatch = make(map[string]bool)
for _, mpqFileName := range v.Settings.MpqLoadOrder { for _, mpqFileName := range v.Settings.MpqLoadOrder {
mpqPath := path.Join(v.Settings.MpqPath, mpqFileName) mpqPath := path.Join(v.Settings.MpqPath, mpqFileName)
@ -147,7 +147,7 @@ func (v *Engine) mapMpqFiles() {
} }
continue continue
} }
v.Files[transFilePath] = &Common.MpqFileRecord{ v.Files[transFilePath] = &common.MpqFileRecord{
mpqPath, false, ""} mpqPath, false, ""}
v.CheckedPatch[transFilePath] = false v.CheckedPatch[transFilePath] = false
} }
@ -185,7 +185,7 @@ func (v *Engine) LoadFile(fileName string) []byte {
if fileInPatch { if fileInPatch {
patchLoaded = true patchLoaded = true
// set the path to the patch so it will be loaded there in the future // set the path to the patch so it will be loaded there in the future
mpqFile = &Common.MpqFileRecord{patchMpqFilePath, false, ""} mpqFile = &common.MpqFileRecord{patchMpqFilePath, false, ""}
v.Files[strings.ToLower(fileName)] = mpqFile v.Files[strings.ToLower(fileName)] = mpqFile
} }
} }
@ -208,7 +208,7 @@ func (v *Engine) LoadFile(fileName string) []byte {
} }
// We found the super-secret file! // We found the super-secret file!
found = true found = true
v.Files[strings.ToLower(fileName)] = &Common.MpqFileRecord{mpqFilePath, false, ""} v.Files[strings.ToLower(fileName)] = &common.MpqFileRecord{mpqFilePath, false, ""}
break break
} }
if !found { if !found {