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

Function DeltaImportJunk

Source/msg.cpp:1253–1287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1251}
1252
1253void DeltaImportJunk(BYTE *src)
1254{
1255 int i;
1256 MultiQuests *mq;
1257
1258 for (i = 0; i < MAXPORTAL; i++) {
1259 if (*src == 0xFF) {
1260 memset(&sgJunk.portal[i], 0xFF, sizeof(DPortal));
1261 src++;
1262 SetPortalStats(i, FALSE, 0, 0, 0, 0);
1263 } else {
1264 memcpy(&sgJunk.portal[i], src, sizeof(DPortal));
1265 src += sizeof(DPortal);
1266 SetPortalStats(
1267 i,
1268 TRUE,
1269 sgJunk.portal[i].x,
1270 sgJunk.portal[i].y,
1271 sgJunk.portal[i].level,
1272 sgJunk.portal[i].ltype);
1273 }
1274 }
1275
1276 mq = sgJunk.quests;
1277 for (i = 0; i < MAXMULTIQUESTS; i++) {
1278 if (questlist[i]._qflags & 1) {
1279 memcpy(mq, src, sizeof(MultiQuests));
1280 src += sizeof(MultiQuests);
1281 quests[i]._qlog = mq->qlog;
1282 quests[i]._qactive = mq->qstate;
1283 quests[i]._qvar1 = mq->qvar1;
1284 mq++;
1285 }
1286 }
1287}
1288
1289DWORD On_SYNCDATA(TCmd *pCmd, int pnum)
1290{

Callers 1

DeltaImportDataFunction · 0.85

Calls 1

SetPortalStatsFunction · 0.85

Tested by

no test coverage detected