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

Function zUI_PortalToKrabs

src/SB/Game/zUI.cpp:1845–1874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1843}
1844
1845void zUI_PortalToKrabs(U32 taskNum)
1846{
1847 xPortalAsset* passet = &sWorld[WORLD_KRABS].task[taskNum].portalAsset;
1848 S32 c1 = sWorld[WORLD_B1].task[0].counter->count;
1849 S32 c2 = sWorld[WORLD_B2].task[0].counter->count;
1850 char tempString[32];
1851
1852 strcpy(tempString, "KS_SPAT_MARKER_01");
1853
1854 if (c1 != 2 && c2 != 2)
1855 {
1856 // Player has not beaten Poseidome
1857 // Send them to Area 1 Krabs
1858 tempString[16] = '1';
1859 }
1860 else if (c1 == 2 && c2 != 2)
1861 {
1862 // Player has not beaten Industrial Park
1863 // Send them to Area 2 Krabs
1864 tempString[16] = '2';
1865 }
1866 else if (c1 == 2 && c2 == 2)
1867 {
1868 // Player has beaten Poseidome and Industrial Park
1869 // Send them to Area 3 Krabs
1870 tempString[16] = '3';
1871 }
1872
1873 passet->assetMarkerID = xStrHash(tempString);
1874}
1875
1876void zUI_ScenePortalUpdate()
1877{

Callers 1

zUI_ScenePortalUpdateFunction · 0.70

Calls 1

xStrHashFunction · 0.50

Tested by

no test coverage detected