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

Function zMenuLoop

src/SB/Game/zMenu.cpp:99–288  ·  view source on GitHub ↗

Equivalent Scheduling is a mess. Some float constants are being pushed onto the stack

Source from the content-addressed store, hash-verified

97// Equivalent
98// Scheduling is a mess. Some float constants are being pushed onto the stack
99U32 zMenuLoop()
100{
101 S32 s = 0;
102 if (sFirstBoot)
103 {
104 zGameModeSwitch(eGameMode_Intro);
105 zGameStateSwitch(0);
106 zMusicNotify(0);
107 }
108 else
109 {
110 zGameModeSwitch(eGameMode_Title);
111 zGameStateSwitch(0);
112 zMusicNotify(0);
113 }
114
115 time_last = 1.0f / float(GET_BUS_FREQUENCY() >> 2) * iTimeGet() - 1.0f / 60.f;
116
117 zGameExtras_NewGameReset();
118
119 iColor_tag black = { 0, 0, 0, 255 }; //BlackColorInitializer;
120 iColor_tag clear = { 0 }; //ClearColorInitializer;
121 xScrFxFade(&black, &clear, 0.0f, NULL, 1);
122 S32 ostrich_delay = 0xa;
123
124 time_last = 1.0f / float(GET_BUS_FREQUENCY() >> 2) * iTimeGet() - 1.0f / 60.f;
125
126 S32 draw_black;
127
128 do
129 {
130 draw_black = 0;
131 if (zGameModeGet() == eGameMode_Intro)
132 {
133 switch (zGameStateGet())
134 {
135 case 0:
136 draw_black = 1;
137 zGameStateSwitch(3);
138 xScrFxFade(&clear, &black, 0.0f, NULL, 1);
139 break;
140 case 3:
141 draw_black = 1;
142 zFMVPlay(zFMVFileGetName(eFMVFile_LogoNick), 0x10000, 2.0f, 1, 0);
143 zFMVPlay(zFMVFileGetName(eFMVFile_LogoTHQ), 0x10000, 2.0f, 1, 0);
144 zFMVPlay(zFMVFileGetName(eFMVFile_LogoRW), 0x10000, 2.0f, 1, 0);
145 holdTmr = 10.0f;
146 zGameModeSwitch(eGameMode_Title);
147 zGameStateSwitch(1);
148 xScrFxFade(&black, &clear, 0.1f, NULL, 1);
149
150 time_last = 1.0f / float(GET_BUS_FREQUENCY() >> 2) * iTimeGet() - 1.0f / 60.f;
151 break;
152 }
153 }
154
155 time_current = 1.0f / float(GET_BUS_FREQUENCY() >> 2) * iTimeGet();
156 time_elapsed = time_current - time_last;

Callers

nothing calls this directly

Calls 15

xScrFxFadeFunction · 0.85
zGameModeGetFunction · 0.85
zGameStateGetFunction · 0.85
zSceneFindObjectFunction · 0.85
xEntIsVisibleFunction · 0.85
zMenuFirstBootSetFunction · 0.85
zMenuFMVPlayFunction · 0.85
xDrawBeginFunction · 0.85
zMenuIsPausedFunction · 0.85
xSndUpdateFunction · 0.85
xCameraBeginFunction · 0.85
zSceneRenderFunction · 0.85

Tested by

no test coverage detected