| 329 | } |
| 330 | |
| 331 | int16 cFodder::GUI_Sidebar_SquadIcon_Set() { |
| 332 | int16 Data1C = 0; |
| 333 | sSprite* Vehicle = 0; |
| 334 | const sGUI_SquadVehicleIcon* SquadIcon = mGUI_Squad_Vehicle_Icons; |
| 335 | |
| 336 | // No Troops in Squad? |
| 337 | if (!mSquads_TroopCount[mGUI_Loop_Squad_Current]) |
| 338 | return 0; |
| 339 | |
| 340 | // More than 1 troop in squad? |
| 341 | if (mSquads_TroopCount[mGUI_Loop_Squad_Current] != 1) |
| 342 | Data1C = 1; |
| 343 | |
| 344 | // Squad not in vehicle? |
| 345 | if (!mSquad_CurrentVehicles[mGUI_Loop_Squad_Current]) |
| 346 | goto loc_2F593; |
| 347 | |
| 348 | |
| 349 | Vehicle = mSquad_CurrentVehicles[mGUI_Loop_Squad_Current]; |
| 350 | |
| 351 | for (;; ++SquadIcon) { |
| 352 | if (SquadIcon->mVehicleType < 0) |
| 353 | goto loc_2F593; |
| 354 | |
| 355 | if (Vehicle->field_6F == SquadIcon->mVehicleType) |
| 356 | goto loc_2F586; |
| 357 | } |
| 358 | loc_2F586:; |
| 359 | Data1C = SquadIcon->mIconID; |
| 360 | |
| 361 | loc_2F593:; |
| 362 | |
| 363 | // has status changed? |
| 364 | if (Data1C == mGUI_Squad_Icon[mGUI_Loop_Squad_Current]) |
| 365 | return 0; |
| 366 | |
| 367 | mGUI_Squad_Icon[mGUI_Loop_Squad_Current] = Data1C; |
| 368 | return -1; |
| 369 | } |
| 370 | |
| 371 | void cFodder::GUI_Sidebar_Draw() { |
| 372 | Mission_Final_TimeToDie(); |
nothing calls this directly
no outgoing calls
no test coverage detected