Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18 | Rev 20 | ||
---|---|---|---|
Line 1572... | Line 1572... | ||
1572 | } |
1572 | } |
1573 | 1573 | ||
1574 | // IDA: int __usercall ChooseStartRace@<EAX>(int *pRank@<EAX>) |
1574 | // IDA: int __usercall ChooseStartRace@<EAX>(int *pRank@<EAX>) |
1575 | int ChooseStartRace(int* pRank) { |
1575 | int ChooseStartRace(int* pRank) { |
1576 | LOG_TRACE("(%p)", pRank); |
1576 | LOG_TRACE("(%p)", pRank); |
1577 | - | ||
1578 |
|
1577 | NOT_IMPLEMENTED(); |
1579 | return 1; |
- | |
1580 | } |
1578 | } |
1581 | 1579 | ||
1582 | // IDA: void __usercall SetUpOtherNetThings(tNet_game_details *pNet_game@<EAX>) |
1580 | // IDA: void __usercall SetUpOtherNetThings(tNet_game_details *pNet_game@<EAX>) |
1583 | void SetUpOtherNetThings(tNet_game_details* pNet_game) { |
1581 | void SetUpOtherNetThings(tNet_game_details* pNet_game) { |
1584 | LOG_TRACE("(%p)", pNet_game); |
1582 | LOG_TRACE("(%p)", pNet_game); |
1585 | 1583 | ||
1586 | StartLoadingScreen(); |
1584 | StartLoadingScreen(); |
1587 | gProgram_state.skill_level = 1; |
1585 | gProgram_state.skill_level = 1; |
1588 | InitGame(pNet_game->start_race); |
1586 | InitGame(pNet_game->start_race); |
1589 | } |
1587 | } |
1590 | 1588 | ||
1591 | // IDA: void __usercall RequestCarDetails(tNet_game_details *pNet_game@<EAX>) |
1589 | // IDA: void __usercall RequestCarDetails(tNet_game_details *pNet_game@<EAX>) |
1592 | void RequestCarDetails(tNet_game_details* pNet_game) { |
1590 | void RequestCarDetails(tNet_game_details* pNet_game) { |
1593 | tNet_message* message; |
1591 | tNet_message* message; |
1594 | LOG_TRACE("(%p)", pNet_game); |
1592 | LOG_TRACE("(%p)", pNet_game); |
1595 | 1593 | ||
Line 1604... | Line 1602... | ||
1604 | // IDA: int __cdecl PickARandomCar() |
1602 | // IDA: int __cdecl PickARandomCar() |
1605 | int PickARandomCar(void) { |
1603 | int PickARandomCar(void) { |
1606 | int i; |
1604 | int i; |
1607 | int cars[120]; |
1605 | int cars[120]; |
1608 | int array_size; |
1606 | int array_size; |
1609 | LOG_TRACE("()"); |
1607 | LOG_TRACE("()"); |
1610 | 1608 | ||
1611 | array_size = 0; |
1609 | array_size = 0; |
1612 | for (i = 0; i < gNumber_of_racers; i++) { |
1610 | for (i = 0; i < gNumber_of_racers; i++) { |
1613 | if (gCar_details[i].ownership == eCar_owner_none) { |
1611 | if (gCar_details[i].ownership == eCar_owner_none) { |
1614 | cars[array_size] = i; |
1612 | cars[array_size] = i; |
Line 1699... | Line 1697... | ||
1699 | } else { |
1697 | } else { |
1700 | if (*pCar_index < 0) { |
1698 | if (*pCar_index < 0) { |
1701 | *pCar_index = PickARandomCar(); |
1699 | *pCar_index = PickARandomCar(); |
1702 | car_index = 0; |
1700 | car_index = 0; |
1703 | for (i = 0; i < gNumber_of_racers; i++) { |
1701 | for (i = 0; i < gNumber_of_racers; i++) { |
1704 | if (gCar_details[i].ownership |
1702 | if (gCar_details[i].ownership != eCar_owner_not_allowed) { |
1705 | gProgram_state.cars_available[car_index] = i; |
1703 | gProgram_state.cars_available[car_index] = i; |
1706 | car_index++; |
1704 | car_index++; |
1707 | } |
1705 | } |
1708 | } |
1706 | } |
1709 | gProgram_state.number_of_cars = car_index; |
1707 | gProgram_state.number_of_cars = car_index; |
Line 1760... | Line 1758... | ||
1760 | DoFeatureUnavailableInDemo(); |
1758 | DoFeatureUnavailableInDemo(); |
1761 | return 0; |
1759 | return 0; |
1762 | } |
1760 | } |
1763 | 1761 | ||
1764 | if (gAusterity_mode) { |
1762 | if (gAusterity_mode) { |
1765 | NetFullScreenMessage( |
1763 | NetFullScreenMessage(192, 0); |
1766 | return 0; |
1764 | return 0; |
1767 | } |
1765 | } |
1768 | if (NetInitialise()) { |
1766 | if (NetInitialise()) { |
1769 | SuspendPendingFlic(); |
1767 | SuspendPendingFlic(); |
1770 | DoErrorInterface(kMiscString_NetworkPlayIsNotAvailable); |
1768 | DoErrorInterface(kMiscString_NetworkPlayIsNotAvailable); |
Line 1814... | Line 1812... | ||
1814 | return 0; |
1812 | return 0; |
1815 | } else { |
1813 | } else { |
1816 | return 1; |
1814 | return 1; |
1817 | } |
1815 | } |
1818 | case eJoin_or_host_host: |
1816 | case eJoin_or_host_host: |
1819 | #if defined(DETHRACE_FIX_BUGS) |
- | |
1820 | /* Don't allow hosting a game when the game is launched with --no-bind */ |
- | |
1821 | if (harness_game_config.no_bind) { |
- | |
1822 | DoErrorInterface(76); |
- | |
1823 | return 0; |
- | |
1824 | } |
- | |
1825 | #endif |
- | |
1826 | gProgram_state.frank_or_anniness = eFrankie; |
1817 | gProgram_state.frank_or_anniness = eFrankie; |
1827 | if (!OriginalCarmaCDinDrive()) { |
1818 | if (!OriginalCarmaCDinDrive()) { |
1828 | DoErrorInterface(kMiscString_PLEASE_INSERT_THE_CARMAGEDDON_CD); |
1819 | DoErrorInterface(kMiscString_PLEASE_INSERT_THE_CARMAGEDDON_CD); |
1829 | return 0; |
1820 | return 0; |
1830 | } |
1821 | } |