MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xGridEmpty

Function xGridEmpty

src/SB/Core/x/xGrid.cpp:71–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void xGridEmpty(xGrid* grid)
72{
73 for (S32 x = 0; x < grid->nx; ++x)
74 {
75 for (S32 z = 0; z < grid->nz; ++z)
76 {
77 xGridBound** head = &grid->cells[z * grid->nx];
78 xGridBound* curr = head[x];
79 while (curr)
80 {
81 xGridBound* currnext = curr->next;
82 xGridBoundInit(curr, curr->data);
83 curr = currnext;
84 }
85 head[x] = NULL;
86 }
87 }
88
89 xGridBound* curr = grid->other;
90 while (curr)
91 {
92 xGridBound* nextnext = curr->next;
93 xGridBoundInit(curr, curr->data);
94 curr = nextnext;
95 }
96 grid->other = NULL;
97}
98
99bool xGridAddToCell(xGridBound** boundList, xGridBound* bound)
100{

Callers 1

xGridKillFunction · 0.70

Calls 1

xGridBoundInitFunction · 0.85

Tested by

no test coverage detected