| 15422 | } |
| 15423 | |
| 15424 | void cFodder::Sprite_Handle_Troop_Direct_TowardMouse(sSprite* pSprite) { |
| 15425 | |
| 15426 | int16 Data0 = mMouseX; |
| 15427 | Data0 += mCameraX >> 16; |
| 15428 | Data0 -= 0x18; |
| 15429 | |
| 15430 | int16 Data4 = mMouseY; |
| 15431 | Data4 += mCameraY >> 16; |
| 15432 | |
| 15433 | Sprite_Direction_Between_Points(pSprite, Data0, Data4); |
| 15434 | Sprite_Set_Direction_To_Next(pSprite); |
| 15435 | |
| 15436 | int StoredAnim = pSprite->field_8; |
| 15437 | mStoredSpriteFrame = pSprite->field_A; |
| 15438 | Sprite_Handle_Troop_Animation(pSprite); |
| 15439 | |
| 15440 | if (!pSprite->field_43) |
| 15441 | return; |
| 15442 | |
| 15443 | // FIX: This isn't original. and was added due to a case where the animation is changed |
| 15444 | // in Sprite_Handle_Troop_Animation, but the frame is pointing to a frame not |
| 15445 | // available in the new animation (issue 64) |
| 15446 | if ((pSprite->field_8 >= 0x10 && pSprite->field_8 < 0x18) || |
| 15447 | (pSprite->field_8 >= 0x20 && pSprite->field_8 < 0x28)) { |
| 15448 | if(mStoredSpriteFrame >= 1) |
| 15449 | mStoredSpriteFrame = 0; |
| 15450 | } |
| 15451 | |
| 15452 | if ((pSprite->field_8 >= 0x18 && pSprite->field_8 < 0x20) || |
| 15453 | (pSprite->field_8 >= 0x28 && pSprite->field_8 < 0x30)) { |
| 15454 | if (mStoredSpriteFrame >= 2) |
| 15455 | mStoredSpriteFrame = 0; |
| 15456 | } |
| 15457 | |
| 15458 | pSprite->field_A = mStoredSpriteFrame; |
| 15459 | } |
| 15460 | |
| 15461 | void cFodder::Sprite_XY_Store(sSprite* pSprite) { |
| 15462 | mSprite_Reached_Target = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected