[][src]Crate genie_drs

.drs is the resource archive file format for the Genie Engine, used by Age of Empires 1/2 and Star Wars: Galactic Battlegrounds. .drs files contain tables, each of which contain resources of a single type. Resources are identified by a numeric identifier.

Example

use std::fs::File;
use genie_drs::DRSReader;

let mut file = File::open("test.drs").unwrap();
let drs = DRSReader::new(&mut file).unwrap();

for table in drs.tables() {
    for resource in table.resources() {
        let content = drs.read_resource(&mut file, table.resource_type, resource.id).unwrap();
        println!("{}: {:?}", resource.id, std::str::from_utf8(&content).unwrap());
    }
}

Structs

DRSHeader

The DRS archive header.

DRSReader

A DRS archive reader.

DRSResource

A single resource in a DRS archive.

DRSTable

A table containing resource entries.

Type Definitions

DRSResourceIterator
DRSTableIterator
ResourceType

A resource type name.