コード例 #1
0
int main( int argc, char **argv ) {
    int defs_ok = _LANG_DEFS_OK();

    if( argc < 5 || argc > 10 ) {
        fatal( "usage: msgencod [-w] [-i] [-ip] [-q] [-p] <gml> <msgc> <msgh> <levh>" );
    }
    if( ! defs_ok ) {
        fatal( "language index mismatch" );
    }
    processOptions( argv + 1 );
    readGML();
    if( flags.gen_gpick ) {
        writeMsgHGP();
        writeMsgCGP();
        writeLevHGP();
    }else{
        compressMsgs();
        writeMsgH();
        writeMsgC();
        writeLevH();
    }
    closeFiles();
    if( flags.international ) {
        dumpInternational();
    }
    if( ! flags.quiet ) {
        dumpStats();
    }
    if( warnings != 0 && flags.warnings_always_rebuild ) {
        forceRebuild();
    }
    return( errors ? EXIT_FAILURE : EXIT_SUCCESS );
}
コード例 #2
0
void GeometryBuffer::addIndex(uint8* buf, uint32 size)
{
	indexData.resize(indexData.size() + size);
	std::copy(buf, buf+size, indexData.end() - size);
	forceRebuild();
}
コード例 #3
0
void GeometryBuffer::setIndex(uint8* buf, uint32 size)
{
	indexData.clear();
	addIndex(buf, size);
	forceRebuild();
}
コード例 #4
0
void GeometryBuffer::add(uint8* buf, uint32 size)
{
	data.resize(data.size() + size);
	std::copy(buf, buf+size, data.end() - size);
	forceRebuild();
}
コード例 #5
0
void GeometryBuffer::clear()
{
	data.clear();
	forceRebuild();
}