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

Method AnimLoad

legacy/D3Launch/BitmapButtonEx.cpp:433–460  ·  view source on GitHub ↗

Loads the animation bitmaps for the button given Format: nameX where X is the frame #

Source from the content-addressed store, hash-verified

431// Loads the animation bitmaps for the button given
432// Format: nameX where X is the frame #
433bool CBitmapButtonEx::AnimLoad(UINT nID, CWnd *parent) {
434 CString res_name, title;
435 int j;
436
437 if (parent == NULL)
438 return FALSE;
439
440 parent->GetDlgItemText(nID, title);
441
442 OutputDebugString("title =");
443 OutputDebugString(title);
444 OutputDebugString("\n");
445
446 // Allocate bitmap objects
447 if (m_NumAnimFrames == 0)
448 return FALSE;
449 m_AnimBitmaps = new CBitmap[m_NumAnimFrames];
450 if (m_AnimBitmaps == NULL)
451 return FALSE;
452
453 // Load in the bitmaps
454 for (j = 0; j < m_NumAnimFrames; j++) {
455 res_name.Format("%s%d", title, j);
456 GetBitmapAndPalette(res_name, &m_AnimBitmaps[j], NULL);
457 }
458
459 return (TRUE);
460}
461
462// Lights/un-Lights the button
463void CBitmapButtonEx::Light(bool bLight) { m_MouseOverBtn = (bLight) ? TRUE : FALSE; }

Callers

nothing calls this directly

Calls 1

GetBitmapAndPaletteFunction · 0.85

Tested by

no test coverage detected