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

Method GUI_Sidebar_Grenades_Draw

Source/GUI_Element.cpp:114–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113
114void cFodder::GUI_Sidebar_Grenades_Draw() {
115 int16 Data0 = mGUI_Loop_Squad_Current;
116 int16 Data8, DataC, Data4, Data10;
117
118 if (!mSquad_Grenades[mGUI_Loop_Squad_Current])
119 goto loc_2ED63;
120
121 if (mSquad_CurrentWeapon[mGUI_Loop_Squad_Current] != eWeapon_Grenade)
122 goto loc_2ED63;
123
124 if (!mGUI_Loop_Is_CurrentSquad) {
125 loc_2ED63:;
126 Data0 = 0xC4;
127 }
128 else {
129 Data0 = 0xC3;
130 }
131
132 // Draw Grenade Icon
133 Data8 = 0;
134 DataC = mGUI_Loop_Draw_Y;
135 DataC += 0x0E;
136
137 mGraphics->Sidebar_Copy_Sprite_To_ScreenBufPtr(Data0, Data8, DataC);
138
139 Data0 = mSquad_Grenades[mGUI_Loop_Squad_Current];
140 if (!Data0)
141 return;
142
143 Data4 = 0;
144 Data8 = 0x0D;
145 DataC = mGUI_Loop_Draw_Y;
146 DataC += 0x19;
147 Data10 = 0xAF;
148
149 if (mSquad_CurrentWeapon[mGUI_Loop_Squad_Current] != eWeapon_Grenade)
150 goto loc_2EDF7;
151
152 if (mGUI_Loop_Is_CurrentSquad)
153 goto loc_2EDFD;
154
155loc_2EDF7:;
156 Data10 = 0xB9;
157
158loc_2EDFD:;
159 GUI_Sidebar_Number_Draw(Data0, Data4, Data8, DataC, Data10);
160
161}
162
163void cFodder::GUI_Prepare_Button_Grenade() {
164 if (!mGUI_Loop_Is_CurrentSquad)

Callers

nothing calls this directly

Tested by

no test coverage detected