MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Cycle

Method Cycle

Source/About.cpp:113–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113bool cAbout::Cycle() {
114
115 g_Fodder->GUI_Element_Reset();
116
117 g_Fodder->mSurface->palette_FadeTowardNew();
118 g_Fodder->mSurface->clearBuffer();
119
120 g_Fodder->mGraphics->SetActiveSpriteSheet(eGFX_BRIEFING);
121 g_Fodder->Service_Draw_List();
122
123 if (g_Fodder->mInterruptTick % 2 == 0)
124 g_Fodder->Service_ScrollUp_DrawList();
125
126 {
127 g_Fodder->mString_GapCharID = 0x25;
128 g_Fodder->String_Print_Large("Open Fodder", true, 0x01);
129 g_Fodder->mString_GapCharID = 0x00;
130
131 g_Fodder->GUI_Button_Draw_Small("BACK", 0xB3 + PLATFORM_BASED(0, 25));
132 g_Fodder->GUI_Button_Setup_Small(&cFodder::GUI_Button_Load_Exit);
133 }
134
135 if (g_Fodder->mPhase_Aborted)
136 g_Fodder->GUI_Button_Load_Exit();
137
138 if (g_Fodder->mMouse_Button_Left_Toggle) {
139 g_Fodder->GUI_Handle_Element_Mouse_Check(g_Fodder->mGUI_Elements);
140
141 if (g_Fodder->mGUI_SaveLoadAction == 1) {
142
143 g_Fodder->mSurface->paletteNew_SetToBlack();
144 g_Fodder->mSurface->palette_FadeTowardNew();
145 }
146
147 }
148
149 g_Fodder->Mouse_DrawCursor();
150
151 g_Fodder->mSurface->draw();
152 g_Fodder->Video_Sleep(mSurface, true);
153 g_Fodder->mWindow->RenderAt(g_Fodder->mSurface);
154 //g_Fodder->Video_SurfaceRender(false, false, 0, false);
155
156 if (g_Fodder->mGUI_SaveLoadAction == 1 && !g_Fodder->mSurface->isPaletteAdjusting())
157 return false;
158
159 return true;
160}

Callers 4

menu_loopFunction · 0.45
Phase_LoopMethod · 0.45
Video_SleepMethod · 0.45
AboutMethod · 0.45

Calls 15

GUI_Element_ResetMethod · 0.80
palette_FadeTowardNewMethod · 0.80
clearBufferMethod · 0.80
Service_Draw_ListMethod · 0.80
String_Print_LargeMethod · 0.80
GUI_Button_Draw_SmallMethod · 0.80
GUI_Button_Load_ExitMethod · 0.80
paletteNew_SetToBlackMethod · 0.80
drawMethod · 0.80

Tested by

no test coverage detected