mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Support Polish version of H3 data files
This commit is contained in:
		| @@ -11,12 +11,16 @@ | ||||
| 		[ | ||||
| 			{"type" : "lod", "path" : "Data/H3ab_bmp.lod"}, | ||||
| 			{"type" : "lod", "path" : "Data/H3bitmap.lod"}, | ||||
| 			{"type" : "lod", "path" : "Data/h3abp_bm.lod"}, // Polish version of H3 only | ||||
| 			{"type" : "lod", "path" : "Data/H3pbitma.lod"}, // Polish version of H3 only | ||||
| 			{"type" : "dir",  "path" : "Data"} | ||||
| 		], | ||||
| 		"SPRITES/": | ||||
| 		[ | ||||
| 			{"type" : "lod", "path" : "Data/H3ab_spr.lod"}, | ||||
| 			{"type" : "lod", "path" : "Data/H3sprite.lod"}, | ||||
| 			{"type" : "lod", "path" : "Data/h3abp_sp.lod"}, // Polish version of H3 only | ||||
| 			{"type" : "lod", "path" : "Data/H3psprit.lod"}, // Polish version of H3 only | ||||
| 			{"type" : "dir",  "path" : "Sprites"} | ||||
| 		], | ||||
| 		"SOUNDS/": | ||||
|   | ||||
| @@ -152,12 +152,12 @@ void CArchiveLoader::initSNDArchive(const std::string &mountPoint, CFileInputStr | ||||
| 		char filename[40]; | ||||
| 		reader.read(reinterpret_cast<ui8*>(filename), 40); | ||||
|  | ||||
| 		//for some reason entries in snd have format NAME\0WAVRUBBISH.... | ||||
| 		//we need to replace first \0 with dot and take the 3 chars with extension (and drop the rest) | ||||
| 		// for some reason entries in snd have format NAME\0WAVRUBBISH.... | ||||
| 		// and Polish version does not have extension at all | ||||
| 		// we need to replace first \0 with dot and add wav extension manuall - we don't expect other types here anyway | ||||
| 		ArchiveEntry entry; | ||||
| 		entry.name  = filename; // till 1st \0 | ||||
| 		entry.name += '.'; | ||||
| 		entry.name += std::string(filename + entry.name.size(), 3); | ||||
| 		entry.name += ".wav"; | ||||
|  | ||||
| 		entry.offset = reader.readInt32(); | ||||
| 		entry.fullSize = reader.readInt32(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user