1. Sylvain Rouquette
  2. pyGAP

Source

pyGAP / game / engine / text / pack.cpp

#include "text/pack.h"

#include "text/string.h"

#include "formats/text.h"


namespace text {


Pack::Pack() : pack_(NULL) {
}


Pack::~Pack() {
    ::formats::text::Pack::deallocate(pack_);
}

void Pack::init(::formats::text::Pack* pack) {
    pack_ = pack;
}

String*  Pack::create_string(uint16_t id) const {
    if (id >= pack_->strings_size)
        return NULL;

    return new String(&pack_->strings[id]);
}


} /* namespace text */