MCPcopy Create free account
hub / github.com/Segs/Segs / loadDataTable

Function loadDataTable

Projects/CoX/Utilities/piggtool/main.cpp:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78bool loadDataTable(QFile &src,Pigg_DataTable &target)
79{
80 int table_sizes;
81 int num_entries;
82
83 if(!readPOD(src,target.datapool_flag))
84 return false;
85 if(!readPOD(src,table_sizes))
86 return false;
87 if(!readPOD(src,num_entries))
88 return false;
89 while(num_entries>0)
90 {
91 uint32_t entrysize;
92 if(!readPOD(src,entrysize))
93 return false;
94 if(entrysize>0)
95 target.data_parts.push_back(QString::fromLocal8Bit(src.read(entrysize)));
96 num_entries -= entrysize+4;
97 }
98 return true;
99}
100
101bool loadPigg(const QString &fname,PiggFile &pigg)
102{

Callers 1

loadPiggFunction · 0.70

Calls 3

push_backMethod · 0.80
readPODFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected