| 185 | } |
| 186 | |
| 187 | void 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 | |
| 213 | BYTE *DeltaExportItem(BYTE *dst, TCmdPItem *src) |
| 214 | { |
no test coverage detected