| 196 | } |
| 197 | |
| 198 | void zNPCDuplotron::ParseChild(xBase* child) |
| 199 | { |
| 200 | S32 i; |
| 201 | |
| 202 | switch (child->baseType) |
| 203 | { |
| 204 | case eBaseTypeMovePoint: |
| 205 | this->spawner->AddSpawnPoint((zMovePoint*)child); |
| 206 | break; |
| 207 | case eBaseTypeNPC: |
| 208 | this->spawner->AddSpawnNPC((zNPCCommon*)child); |
| 209 | break; |
| 210 | case eBaseTypeGroup: |
| 211 | { |
| 212 | xGroup* grp = (xGroup*)child; |
| 213 | S32 cnt = xGroupGetCount(grp); |
| 214 | for (i = 0; i < cnt; i++) |
| 215 | { |
| 216 | xBase* grpitem = xGroupGetItemPtr(grp, i); |
| 217 | if (grpitem != NULL) |
| 218 | { |
| 219 | U8 grpitemType = grpitem->baseType; |
| 220 | if (grpitemType == eBaseTypeMovePoint) |
| 221 | { |
| 222 | this->spawner->AddSpawnPoint((zMovePoint*)grpitem); |
| 223 | } |
| 224 | else if (grpitemType == eBaseTypeNPC) |
| 225 | { |
| 226 | this->spawner->AddSpawnNPC((zNPCCommon*)grpitem); |
| 227 | } |
| 228 | else if (grpitemType == eBaseTypeGroup) |
| 229 | { |
| 230 | this->ParseChild(grpitem); |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | break; |
| 235 | } |
| 236 | |
| 237 | default: |
| 238 | xSceneID2Name(globals.sceneCur, child->id); |
| 239 | break; |
| 240 | } |
| 241 | |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | void zNPCDuplotron::Process(xScene* xscn, F32 dt) |
| 246 | { |
no test coverage detected