| 11160 | } |
| 11161 | |
| 11162 | void cFodder::Sprite_Handle_Helicopter(sSprite* pSprite) { |
| 11163 | word_3B4ED[0] = 0; |
| 11164 | int16 Data0 = tool_RandomGet() & 0x0E; |
| 11165 | int16 Data4, Data8, DataC, Data10, Data14, Data18, Data1C; |
| 11166 | sSprite* Data24 = 0, *Data2C = 0; |
| 11167 | |
| 11168 | if (mVersionCurrent->isCoverDisk()) { |
| 11169 | static int FF = 0; |
| 11170 | |
| 11171 | if (++FF == 100) { |
| 11172 | FF = 0; |
| 11173 | //TODO: Fix chopper |
| 11174 | Data0 = 0x01; |
| 11175 | } |
| 11176 | else |
| 11177 | Data0 = 0; |
| 11178 | } |
| 11179 | else |
| 11180 | Data0 = mSprite_Helicopter_Sounds[Data0 / 2]; |
| 11181 | |
| 11182 | if (pSprite->field_22 != eSprite_PersonType_Human) { |
| 11183 | if (pSprite->field_20 <= 1) |
| 11184 | goto loc_19EE5; |
| 11185 | } |
| 11186 | else { |
| 11187 | |
| 11188 | // Just off the ground? |
| 11189 | if (pSprite->field_20 < 2) { |
| 11190 | if (pSprite != mSquad_CurrentVehicle) |
| 11191 | goto loc_19EE5; |
| 11192 | } |
| 11193 | } |
| 11194 | |
| 11195 | word_3B4ED[0] = -1; |
| 11196 | Data4 = pSprite->field_20; |
| 11197 | if (Data4 < 0x10) |
| 11198 | Data4 = 0x10; |
| 11199 | |
| 11200 | Sprite_Map_Sound_Play(Data0); |
| 11201 | |
| 11202 | loc_19EE5:; |
| 11203 | pSprite->field_65 = -1; |
| 11204 | |
| 11205 | if (pSprite->field_38 == eSprite_Anim_None) |
| 11206 | goto loc_1A149; |
| 11207 | |
| 11208 | if (pSprite->field_18 == eSprite_Helicopter_Homing_Enemy2) { |
| 11209 | |
| 11210 | if (mHelicopterCall_X >= 0) { |
| 11211 | |
| 11212 | if (pSprite->field_75 != 0x71) { |
| 11213 | pSprite->field_75 = 0x71; |
| 11214 | pSprite->field_74 = static_cast<int8>(pSprite->field_A); |
| 11215 | } |
| 11216 | |
| 11217 | pSprite->field_A += 1; |
| 11218 | pSprite->field_A &= 0x0F; |
| 11219 |
nothing calls this directly
no test coverage detected