Esempio n. 1
0
void CFilesManager::loadResourceIndex() {
	if (!_datFile.open("titanic.dat"))
		error("Could not find titanic.dat data file");

	uint headerId = _datFile.readUint32BE();
	uint version = _datFile.readUint16LE();
	if (headerId != MKTAG('S', 'V', 'T', 'N') || version < 1)
		error("Invalid data file");

	// Read in entries
	uint offset, size;
	char c;
	Common::String resourceName;
	for (;;) {
		offset = _datFile.readUint32LE();
		size = _datFile.readUint32LE();
		if (offset == 0 && size == 0)
			break;

		Common::String resName;
		while ((c = _datFile.readByte()) != '\0')
			resName += c;

		_resources[resName] = ResourceEntry(offset, size);
	}
}
Esempio n. 2
0
AROS_UFH3(__startup static int, Start,
	  AROS_UFHA(char *, argstr, A0),
	  AROS_UFHA(ULONG, argsize, D0),
	  AROS_UFHA(struct ExecBase *, sBase, A6))
{
    AROS_USERFUNC_INIT
	
    SysBase = sBase;
    return ResourceEntry();

    AROS_USERFUNC_EXIT
}
Esempio n. 3
0
ResourceEntry* InfoResourceDirectory::ResEtryFactory()
{
	res_entrys_.push_back(ResourceEntry());
	return &res_entrys_[res_entrys_.size() -1];
}