MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zUI_ScenePortalUpdate

Function zUI_ScenePortalUpdate

src/SB/Game/zUI.cpp:1876–1962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1874}
1875
1876void zUI_ScenePortalUpdate()
1877{
1878 for (U32 i = 0; i < WORLD_COUNT; i++)
1879 {
1880 if (!sWorld[i].uiSelected)
1881 {
1882 continue;
1883 }
1884 if (!xEntIsVisible(sWorld[i].uiSelected))
1885 {
1886 continue;
1887 }
1888
1889 refresh_patsocks(i);
1890 hideWorld();
1891 showWorld(i);
1892
1893 sCurrWorld = i;
1894
1895 for (U32 j = 0; j < sWorld[i].numTasks; j++)
1896 {
1897 _zUI* select = sWorld[i].task[j].uiSelected;
1898
1899 if (select && xEntIsVisible(select))
1900 {
1901 sCurrTask = j;
1902
1903 if (sCurrTaskDesc)
1904 {
1905 xEntHide(sCurrTaskDesc);
1906 }
1907
1908 sCurrTaskDesc = sWorld[i].task[j].uiTaskDesc;
1909
1910 if (sCurrTaskDesc)
1911 {
1912 xEntShow(sCurrTaskDesc);
1913 }
1914
1915 if (sWorld[i].task[j].counter->count != 0 || globals.player.g.CheatAlwaysPortal)
1916 {
1917 xEntHide(sNoneTaskDesc);
1918 xEntShow(sTakeTaxi);
1919 }
1920 else
1921 {
1922 if (sCurrTaskDesc)
1923 {
1924 xEntHide(sCurrTaskDesc);
1925 }
1926
1927 xEntShow(sNoneTaskDesc);
1928 xEntHide(sTakeTaxi);
1929 }
1930
1931 if (select->uiButton & XPAD_BUTTON_X && xEntIsVisible(sConfirmation) &&
1932 sWorld[i].task[j].portal.passet &&
1933 (sWorld[i].task[j].counter->count > 0 || globals.player.g.CheatAlwaysPortal))

Callers 1

zSceneUpdateFunction · 0.70

Calls 11

xEntIsVisibleFunction · 0.85
hideWorldFunction · 0.85
showWorldFunction · 0.85
xEntHideFunction · 0.85
xEntShowFunction · 0.85
xprintfFunction · 0.85
refresh_patsocksFunction · 0.70
zUI_PortalToKrabsFunction · 0.70
zSceneSwitchFunction · 0.70
zGameStateSwitchEventFunction · 0.70
zEntEventFunction · 0.50

Tested by

no test coverage detected