Source

pyGAP / game / engine / io / fs / factory.cpp

#include "io/fs/base.h"
#include "io/fs/pack.h"


namespace io { namespace fs {


Base* create() {
    return new Base();
}


Base* open(const char* filename) {
    Base* fs = create();
    ::io::file::Base* pack = fs->open(filename);
    delete fs;

    if (!pack)
        return NULL;

    Pack* fs_pack = new Pack();
    fs_pack->init(pack);
    return fs_pack;
}


} /* namespace fs */ } /* namespace io */