| 3612 | } |
| 3613 | |
| 3614 | void GUI_FactoryWindow_UpdateDetails(const FactoryWindowItem *item) |
| 3615 | { |
| 3616 | int16 y; |
| 3617 | const ObjectInfo *oi = item->objectInfo; |
| 3618 | uint16 type = item->objectType; |
| 3619 | |
| 3620 | /* check the available units and unit count limit */ |
| 3621 | if (oi->available == -1) return; |
| 3622 | |
| 3623 | y = 160; |
| 3624 | if (oi->available <= item->amount) y = 169; |
| 3625 | else if (g_starPortEnforceUnitLimit && g_table_unitInfo[type].movementType != MOVEMENT_WINGER && g_table_unitInfo[type].movementType != MOVEMENT_SLITHER) { |
| 3626 | House *h = g_playerHouse; |
| 3627 | if (h->unitCount >= h->unitCountMax) y = 178; |
| 3628 | } |
| 3629 | GUI_Mouse_Hide_Safe(); |
| 3630 | GUI_Screen_Copy(16, y, 16, 99, 23, 9, SCREEN_1, SCREEN_ACTIVE); |
| 3631 | GUI_Mouse_Show_Safe(); |
| 3632 | } |
| 3633 | |
| 3634 | /** |
| 3635 | * Update the selection in the factory window. |
no test coverage detected