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

Function loadDataTable

Projects/CoX/Utilities/MapViewer/src/PiggTools.cpp:77–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

loadPiggFunction · 0.70

Calls 3

push_backMethod · 0.80
readPODFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected