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

Function DeltaImportData

Source/msg.cpp:1187–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185}
1186
1187void DeltaImportData(BYTE cmd, DWORD recv_offset)
1188{
1189 BYTE i;
1190 BYTE *src;
1191
1192 if (sgRecvBuf[0])
1193 PkwareDecompress(&sgRecvBuf[1], recv_offset, 4721);
1194
1195 src = &sgRecvBuf[1];
1196 if (cmd == CMD_DLEVEL_JUNK) {
1197 DeltaImportJunk(src);
1198 } else if (cmd >= CMD_DLEVEL_0 && cmd <= CMD_DLEVEL_16) {
1199 i = cmd - CMD_DLEVEL_0;
1200 src = DeltaImportItem(src, sgLevels[i].item);
1201 src = DeltaImportObject(src, sgLevels[i].object);
1202 DeltaImportMonster(src, sgLevels[i].monster);
1203 } else {
1204 app_fatal("msg:1");
1205 }
1206
1207 sgbDeltaChunks++;
1208 sgbDeltaChanged = TRUE;
1209}
1210
1211BYTE *DeltaImportItem(BYTE *src, TCmdPItem *dst)
1212{

Callers 1

On_DLEVELFunction · 0.85

Calls 6

PkwareDecompressFunction · 0.85
DeltaImportJunkFunction · 0.85
DeltaImportItemFunction · 0.85
DeltaImportObjectFunction · 0.85
DeltaImportMonsterFunction · 0.85
app_fatalFunction · 0.85

Tested by

no test coverage detected