MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / LoadSoundGroupZipFile

Function LoadSoundGroupZipFile

Source/Main/altmain.cpp:100–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void LoadSoundGroupZipFile(const std::string& path) {
101 ExpandedZipFile ezf;
102 UnZip(path, ezf);
103
104 unsigned num_entries = ezf.GetNumEntries();
105 for (unsigned i = 0; i < num_entries; ++i) {
106 const char* filename;
107 const char* data;
108 unsigned size;
109 ezf.GetEntry(i, filename, data, size);
110
111 const char* suffix = GetSuffix(filename);
112 switch (suffix[0]) {
113 case 'x': // xml
114 LoadSoundGroup(filename, data);
115 break;
116 case 'w': // wav
117 LoadSound(filename, data);
118 break;
119 }
120 }
121}
122
123void CheckCase(const char* path) {
124 std::string corrected;

Callers

nothing calls this directly

Calls 6

UnZipFunction · 0.85
GetSuffixFunction · 0.85
LoadSoundGroupFunction · 0.85
LoadSoundFunction · 0.85
GetNumEntriesMethod · 0.80
GetEntryMethod · 0.80

Tested by

no test coverage detected