| 322 | } |
| 323 | |
| 324 | void InitCows() |
| 325 | { |
| 326 | int i, dir; |
| 327 | int x, y, xo, yo; |
| 328 | |
| 329 | //if ( pCowCels ) |
| 330 | // assertion_failed(__LINE__, __FILE__, "! pCowCels"); |
| 331 | pCowCels = LoadFileInMem("Towners\\Animals\\Cow.CEL", NULL); |
| 332 | for (i = 0; i < 3; i++) { |
| 333 | x = TownCowX[i]; |
| 334 | y = TownCowY[i]; |
| 335 | dir = TownCowDir[i]; |
| 336 | InitTownerInfo(numtowners, 128, 0, TOWN_COW, TownCowX[i], TownCowY[i], -1, 10); |
| 337 | towner[numtowners]._tNData = pCowCels; |
| 338 | SetTownerGPtrs(towner[numtowners]._tNData, towner[numtowners]._tNAnim); |
| 339 | towner[numtowners]._tNFrames = 12; |
| 340 | NewTownerAnim(numtowners, towner[numtowners]._tNAnim[dir], towner[numtowners]._tNFrames, 3); |
| 341 | towner[numtowners]._tAnimFrame = random_(0, 11) + 1; |
| 342 | towner[numtowners]._tSelFlag = 1; |
| 343 | strcpy(towner[numtowners]._tName, "Cow"); |
| 344 | |
| 345 | xo = x + cowoffx[dir]; |
| 346 | yo = y + cowoffy[dir]; |
| 347 | if (!dMonster[x][yo]) |
| 348 | dMonster[x][yo] = -(numtowners + 1); |
| 349 | if (!dMonster[xo][y]) |
| 350 | dMonster[xo][y] = -(numtowners + 1); |
| 351 | if (!dMonster[xo][yo]) |
| 352 | dMonster[xo][yo] = -(numtowners + 1); |
| 353 | |
| 354 | numtowners++; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | void InitTowners() |
| 359 | { |
no test coverage detected