MCPcopy Create free account
hub / github.com/diasurgical/devilution / DeltaExportData

Function DeltaExportData

Source/msg.cpp:187–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void DeltaExportData(int pnum)
188{
189 BYTE *dst, *dstEnd;
190 int size, i;
191 char src;
192
193 if (sgbDeltaChanged) {
194 dst = (BYTE *)DiabloAllocPtr(4722);
195 for (i = 0; i < NUMLEVELS; i++) {
196 dstEnd = dst + 1;
197 dstEnd = DeltaExportItem(dstEnd, sgLevels[i].item);
198 dstEnd = DeltaExportObject(dstEnd, sgLevels[i].object);
199 dstEnd = DeltaExportMonster(dstEnd, sgLevels[i].monster);
200 size = msg_comp_level(dst, dstEnd);
201 dthread_send_delta(pnum, i + CMD_DLEVEL_0, dst, size);
202 }
203 dstEnd = dst + 1;
204 dstEnd = DeltaExportJunk(dstEnd);
205 size = msg_comp_level(dst, dstEnd);
206 dthread_send_delta(pnum, CMD_DLEVEL_JUNK, dst, size);
207 mem_free_dbg(dst);
208 }
209 src = 0;
210 dthread_send_delta(pnum, CMD_DLEVEL_END, &src, 1);
211}
212
213BYTE *DeltaExportItem(BYTE *dst, TCmdPItem *src)
214{

Callers 1

multi_handle_deltaFunction · 0.85

Calls 8

DiabloAllocPtrFunction · 0.85
DeltaExportItemFunction · 0.85
DeltaExportObjectFunction · 0.85
DeltaExportMonsterFunction · 0.85
msg_comp_levelFunction · 0.85
dthread_send_deltaFunction · 0.85
DeltaExportJunkFunction · 0.85
mem_free_dbgFunction · 0.85

Tested by

no test coverage detected