MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / TelcomInitPowerEffect

Function TelcomInitPowerEffect

Descent3/TelCom.cpp:2266–2281  ·  view source on GitHub ↗

Initializes the bitmaps, etc needed for power up/down effect

Source from the content-addressed store, hash-verified

2264
2265// Initializes the bitmaps, etc needed for power up/down effect
2266void TelcomInitPowerEffect(void) {
2267 PowerBmps[0] = bm_AllocBitmap(32, 32, 0);
2268 if (PowerBmps[0] == -1)
2269 return;
2270
2271 int i;
2272 uint16_t *bmpdata = bm_data(PowerBmps[0], 0);
2273 for (i = 0; i < 32 * 32; i++)
2274 bmpdata[i] = OPAQUE_FLAG | GR_RGB(0, 0, 0);
2275
2276 PowerBmps[1] = FindTextureName("TelcomPowerbar");
2277 if (PowerBmps[1] == -1)
2278 return;
2279 PowerBmps[1] = GetTextureBitmap(PowerBmps[1], 0);
2280 TC_effect_position = 0;
2281}
2282
2283// Frees the bitmaps, etc for power up/down effect
2284void TelcomFreePowerEffect(void) {

Callers 1

Calls 5

bm_AllocBitmapFunction · 0.85
bm_dataFunction · 0.85
FindTextureNameFunction · 0.85
GetTextureBitmapFunction · 0.85
GR_RGBFunction · 0.50

Tested by

no test coverage detected