mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-02-20 09:02:00 -07:00
Use CreateTBitmap()
Replace: - GetSharedTBitmap() - LoadRawBitmap() - LoadTBitmap()
This commit is contained in:
parent
da52f61897
commit
7fa189e3da
@ -882,9 +882,9 @@ void MobileUnitBuildForm::DefUpdate(BuilderGob *pbldr, bool fBuildInProgress)
|
||||
|
||||
void MobileUnitBuildForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
{
|
||||
RawBitmap *prbm = LoadRawBitmap("buildformbkgd.rbm");
|
||||
BltHelper(pbm, prbm, pupd, m_rc.left, m_rc.top);
|
||||
delete prbm;
|
||||
TBitmap *ptbm = CreateTBitmap("buildformbkgd.png");
|
||||
BltHelper(pbm, ptbm, pupd, m_rc.left, m_rc.top);
|
||||
delete ptbm;
|
||||
}
|
||||
|
||||
void MobileUnitBuildForm::OnUnitCompleted(BuilderGob *pbldr, UnitType ut)
|
||||
|
||||
@ -227,7 +227,7 @@ void CutSceneForm::Layout(char *pszBitmap)
|
||||
// Set the bitmap (which resizes its control)
|
||||
|
||||
BitmapControl *pbmc = (BitmapControl *)GetControlPtr(kidcBitmap);
|
||||
pbmc->SetBitmap(LoadRawBitmap(pszBitmap));
|
||||
pbmc->SetBitmap(CreateTBitmap(pszBitmap));
|
||||
pbmc->GetRect(&rcBitmap);
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ void Ecom(int nCharFrom, int nCharTo, char *pszMessage, int nBackground, bool fM
|
||||
BitmapControl *pbmc = (BitmapControl *)pfrm->GetControlPtr(kidcFromBitmap);
|
||||
char *pszBitmap = s_aszPortraits[nCharFrom];
|
||||
if (pszBitmap != NULL) {
|
||||
pbmc->SetBitmap(LoadTBitmap(pszBitmap));
|
||||
pbmc->SetBitmap(CreateTBitmap(pszBitmap));
|
||||
pbmc->Show(true);
|
||||
} else {
|
||||
pbmc->Show(false);
|
||||
@ -128,7 +128,7 @@ void Ecom(int nCharFrom, int nCharTo, char *pszMessage, int nBackground, bool fM
|
||||
pbmc = (BitmapControl *)pfrm->GetControlPtr(kidcToBitmap);
|
||||
pszBitmap = s_aszPortraits[nCharTo];
|
||||
if (pszBitmap != NULL) {
|
||||
pbmc->SetBitmap(LoadTBitmap(pszBitmap));
|
||||
pbmc->SetBitmap(CreateTBitmap(pszBitmap));
|
||||
pbmc->Show(true);
|
||||
} else {
|
||||
pbmc->Show(false);
|
||||
|
||||
@ -609,7 +609,7 @@ bool SurfaceDecalGob::Init(WCoord wx, WCoord wy, dword ff, const char *pszBitmap
|
||||
m_wy = wy;
|
||||
|
||||
if (pszBitmap != NULL) {
|
||||
m_ptbm = GetSharedTBitmap((char *)pszBitmap);
|
||||
m_ptbm = CreateTBitmap((char *)pszBitmap);
|
||||
if (m_ptbm == NULL)
|
||||
return false;
|
||||
} else {
|
||||
@ -756,7 +756,7 @@ bool SceneryGob::Init(WCoord wx, WCoord wy, dword ff, const char *pszBitmap, con
|
||||
m_wx = wx;
|
||||
m_wy = wy;
|
||||
|
||||
m_ptbm = GetSharedTBitmap((char *)pszBitmap);
|
||||
m_ptbm = CreateTBitmap((char *)pszBitmap);
|
||||
if (m_ptbm == NULL)
|
||||
return false;
|
||||
|
||||
@ -777,7 +777,7 @@ bool SceneryGob::LoadState(Stream *pstm)
|
||||
return false;
|
||||
char szBitmap[kcbFilename];
|
||||
pstm->ReadString(szBitmap, sizeof(szBitmap));
|
||||
m_ptbm = GetSharedTBitmap(szBitmap);
|
||||
m_ptbm = CreateTBitmap(szBitmap);
|
||||
return Gob::LoadState(pstm);
|
||||
}
|
||||
|
||||
@ -996,15 +996,15 @@ static TBitmap *s_aptbmArrows[9];
|
||||
|
||||
void LoadArrows()
|
||||
{
|
||||
s_aptbmArrows[0] = LoadTBitmap("arrow0.tbm");
|
||||
s_aptbmArrows[1] = LoadTBitmap("arrow1.tbm");
|
||||
s_aptbmArrows[2] = LoadTBitmap("arrow2.tbm");
|
||||
s_aptbmArrows[3] = LoadTBitmap("arrow3.tbm");
|
||||
s_aptbmArrows[4] = LoadTBitmap("arrow4.tbm");
|
||||
s_aptbmArrows[5] = LoadTBitmap("arrow5.tbm");
|
||||
s_aptbmArrows[6] = LoadTBitmap("arrow6.tbm");
|
||||
s_aptbmArrows[7] = LoadTBitmap("arrow7.tbm");
|
||||
s_aptbmArrows[8] = LoadTBitmap("x.tbm");
|
||||
s_aptbmArrows[0] = CreateTBitmap("arrow0.tbm");
|
||||
s_aptbmArrows[1] = CreateTBitmap("arrow1.tbm");
|
||||
s_aptbmArrows[2] = CreateTBitmap("arrow2.tbm");
|
||||
s_aptbmArrows[3] = CreateTBitmap("arrow3.tbm");
|
||||
s_aptbmArrows[4] = CreateTBitmap("arrow4.tbm");
|
||||
s_aptbmArrows[5] = CreateTBitmap("arrow5.tbm");
|
||||
s_aptbmArrows[6] = CreateTBitmap("arrow6.tbm");
|
||||
s_aptbmArrows[7] = CreateTBitmap("arrow7.tbm");
|
||||
s_aptbmArrows[8] = CreateTBitmap("x.tbm");
|
||||
}
|
||||
|
||||
void FreeArrows()
|
||||
|
||||
@ -712,9 +712,9 @@ void ColorOptionsForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
{
|
||||
// Draw the fancy background bitmap
|
||||
|
||||
RawBitmap *prbm = LoadRawBitmap("titlescreenbkgd.rbm");
|
||||
BltHelper(pbm, prbm, pupd, m_rc.left, m_rc.top);
|
||||
delete prbm;
|
||||
TBitmap *ptbm = CreateTBitmap("titlescreenbkgd.png");
|
||||
BltHelper(pbm, ptbm, pupd, m_rc.left, m_rc.top);
|
||||
delete ptbm;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@ -75,8 +75,8 @@ bool HqGob::InitClass(IniReader *pini)
|
||||
|
||||
// Preload the placement tile bitmaps
|
||||
|
||||
s_ptbmPlacementGood = LoadTBitmap("placementGood.tbm");
|
||||
s_ptbmPlacementBad = LoadTBitmap("placementBad.tbm");
|
||||
s_ptbmPlacementGood = CreateTBitmap("placementGood.tbm");
|
||||
s_ptbmPlacementBad = CreateTBitmap("placementBad.tbm");
|
||||
|
||||
// Sound effects
|
||||
|
||||
@ -517,9 +517,9 @@ void StructureBuildForm::OnControlNotify(word idc, int nNotify)
|
||||
|
||||
void StructureBuildForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
{
|
||||
RawBitmap *prbm = LoadRawBitmap("buildformbkgd.rbm");
|
||||
BltHelper(pbm, prbm, pupd, m_rc.left, m_rc.top);
|
||||
delete prbm;
|
||||
TBitmap *ptbm = CreateTBitmap("buildformbkgd.rbm");
|
||||
BltHelper(pbm, ptbm, pupd, m_rc.left, m_rc.top);
|
||||
delete ptbm;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
@ -587,9 +587,9 @@ void UpgradeForm::OnControlSelected(word idc)
|
||||
|
||||
void UpgradeForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
{
|
||||
RawBitmap *prbm = LoadRawBitmap("buildformbkgd.rbm");
|
||||
BltHelper(pbm, prbm, pupd, m_rc.left, m_rc.top);
|
||||
delete prbm;
|
||||
TBitmap *ptbm = CreateTBitmap("buildformbkgd.rbm");
|
||||
BltHelper(pbm, ptbm, pupd, m_rc.left, m_rc.top);
|
||||
delete ptbm;
|
||||
}
|
||||
|
||||
} // namespace wi
|
||||
} // namespace wi
|
||||
|
||||
@ -963,9 +963,9 @@ void ShellForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
|
||||
Size sizDib;
|
||||
pbm->GetSize(&sizDib);
|
||||
RawBitmap *prbm = LoadRawBitmap("titlescreenbkgd.rbm");
|
||||
TBitmap *ptbm = CreateTBitmap("titlescreenbkgd.rbm");
|
||||
Size sizBmp;
|
||||
prbm->GetSize(&sizBmp);
|
||||
ptbm->GetSize(&sizBmp);
|
||||
|
||||
// Draw middle
|
||||
Rect rcBmp;
|
||||
@ -973,7 +973,7 @@ void ShellForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
rcBmp.top = (sizDib.cy - sizBmp.cy) / 2;
|
||||
rcBmp.right = rcBmp.left + sizBmp.cx;
|
||||
rcBmp.bottom = rcBmp.top + sizBmp.cy;
|
||||
BltHelper(pbm, prbm, pupd, rcBmp.left, rcBmp.top);
|
||||
BltHelper(pbm, ptbm, pupd, rcBmp.left, rcBmp.top);
|
||||
|
||||
#if 0
|
||||
// Draw left
|
||||
@ -987,7 +987,7 @@ void ShellForm::OnPaintBackground(DibBitmap *pbm, UpdateMap *pupd)
|
||||
}
|
||||
#endif
|
||||
|
||||
delete prbm;
|
||||
delete ptbm;
|
||||
|
||||
// If the screen is wider than the form we clear those areas
|
||||
// out first to the form's background color
|
||||
|
||||
@ -98,7 +98,7 @@ bool StructGob::InitClass(StructConsts *pstruc, IniReader *pini)
|
||||
// Preload the repair symbol bitmap
|
||||
|
||||
if (s_ptbmRepairing == NULL) {
|
||||
s_ptbmRepairing = LoadTBitmap("repairing_symbol.tbm");
|
||||
s_ptbmRepairing = CreateTBitmap("repairing_symbol.tbm");
|
||||
if (s_ptbmRepairing == NULL) {
|
||||
Assert("Failed to load repairing_symbol.tbm");
|
||||
return false;
|
||||
@ -108,7 +108,7 @@ bool StructGob::InitClass(StructConsts *pstruc, IniReader *pini)
|
||||
// Preload the needs power symbol bitmap
|
||||
|
||||
if (s_ptbmNeedsPower == NULL) {
|
||||
s_ptbmNeedsPower = LoadTBitmap("needs_power_symbol.tbm");
|
||||
s_ptbmNeedsPower = CreateTBitmap("needs_power_symbol.tbm");
|
||||
if (s_ptbmNeedsPower == NULL) {
|
||||
Assert("Failed to load needs_power_symbol.tbm");
|
||||
return false;
|
||||
@ -118,7 +118,7 @@ bool StructGob::InitClass(StructConsts *pstruc, IniReader *pini)
|
||||
// Preload the need credits symbol bitmap
|
||||
|
||||
if (s_ptbmNeedCredits == NULL) {
|
||||
s_ptbmNeedCredits = LoadTBitmap("needs_credits_symbol.tbm");
|
||||
s_ptbmNeedCredits = CreateTBitmap("needs_credits_symbol.tbm");
|
||||
if (s_ptbmNeedCredits == NULL) {
|
||||
Assert("Failed to load need_credits_symbol.tbm");
|
||||
return false;
|
||||
|
||||
@ -189,10 +189,10 @@ bool UnitGob::InitClass(UnitConsts *puntc, IniReader *pini)
|
||||
// If they aren't already loaded, load the scorch marks
|
||||
|
||||
if (gaptbmScorches[0] == NULL) {
|
||||
gaptbmScorches[0] = LoadTBitmap("scorch_8x8.tbm");
|
||||
gaptbmScorches[1] = LoadTBitmap("scorch_16x16.tbm");
|
||||
gaptbmScorches[2] = LoadTBitmap("scorch_32x16.tbm");
|
||||
gaptbmScorches[3] = LoadTBitmap("scorch_48x48.tbm");
|
||||
gaptbmScorches[0] = CreateTBitmap("scorch_8x8.tbm");
|
||||
gaptbmScorches[1] = CreateTBitmap("scorch_16x16.tbm");
|
||||
gaptbmScorches[2] = CreateTBitmap("scorch_32x16.tbm");
|
||||
gaptbmScorches[3] = CreateTBitmap("scorch_48x48.tbm");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -58,21 +58,21 @@ bool FogMap::Init(Size *psizTile, Size *psizMap)
|
||||
// Load the edges
|
||||
|
||||
m_aptbm[15] = NULL;
|
||||
m_aptbm[14] = LoadTBitmap("fog0001.tbm");
|
||||
m_aptbm[13] = LoadTBitmap("fog0010.tbm");
|
||||
m_aptbm[12] = LoadTBitmap("fog0011.tbm");
|
||||
m_aptbm[11] = LoadTBitmap("fog0100.tbm");
|
||||
m_aptbm[10] = LoadTBitmap("fog0101.tbm");
|
||||
m_aptbm[14] = CreateTBitmap("fog0001.tbm");
|
||||
m_aptbm[13] = CreateTBitmap("fog0010.tbm");
|
||||
m_aptbm[12] = CreateTBitmap("fog0011.tbm");
|
||||
m_aptbm[11] = CreateTBitmap("fog0100.tbm");
|
||||
m_aptbm[10] = CreateTBitmap("fog0101.tbm");
|
||||
m_aptbm[9] = NULL;
|
||||
m_aptbm[8] = LoadTBitmap("fog0111.tbm");
|
||||
m_aptbm[7] = LoadTBitmap("fog1000.tbm");
|
||||
m_aptbm[8] = CreateTBitmap("fog0111.tbm");
|
||||
m_aptbm[7] = CreateTBitmap("fog1000.tbm");
|
||||
m_aptbm[6] = NULL;
|
||||
m_aptbm[5] = LoadTBitmap("fog1010.tbm");
|
||||
m_aptbm[4] = LoadTBitmap("fog1011.tbm");
|
||||
m_aptbm[3] = LoadTBitmap("fog1100.tbm");
|
||||
m_aptbm[2] = LoadTBitmap("fog1101.tbm");
|
||||
m_aptbm[1] = LoadTBitmap("fog1110.tbm");
|
||||
m_aptbm[0] = LoadTBitmap("fog1111.tbm");
|
||||
m_aptbm[5] = CreateTBitmap("fog1010.tbm");
|
||||
m_aptbm[4] = CreateTBitmap("fog1011.tbm");
|
||||
m_aptbm[3] = CreateTBitmap("fog1100.tbm");
|
||||
m_aptbm[2] = CreateTBitmap("fog1101.tbm");
|
||||
m_aptbm[1] = CreateTBitmap("fog1110.tbm");
|
||||
m_aptbm[0] = CreateTBitmap("fog1111.tbm");
|
||||
|
||||
int c = 0;
|
||||
int n;
|
||||
@ -83,15 +83,15 @@ bool FogMap::Init(Size *psizTile, Size *psizMap)
|
||||
if (c != 3)
|
||||
return false;
|
||||
|
||||
m_aptbmGalax[0] = LoadTBitmap("galax1a.tbm");
|
||||
m_aptbmGalax[1] = LoadTBitmap("galax1b.tbm");
|
||||
m_aptbmGalax[2] = LoadTBitmap("galax1c.tbm");
|
||||
m_aptbmGalax[3] = LoadTBitmap("galax2a.tbm");
|
||||
m_aptbmGalax[4] = LoadTBitmap("galax2b.tbm");
|
||||
m_aptbmGalax[5] = LoadTBitmap("galax2c.tbm");
|
||||
m_aptbmGalax[6] = LoadTBitmap("galax3a.tbm");
|
||||
m_aptbmGalax[7] = LoadTBitmap("galax3b.tbm");
|
||||
m_aptbmGalax[8] = LoadTBitmap("galax3c.tbm");
|
||||
m_aptbmGalax[0] = CreateTBitmap("galax1a.tbm");
|
||||
m_aptbmGalax[1] = CreateTBitmap("galax1b.tbm");
|
||||
m_aptbmGalax[2] = CreateTBitmap("galax1c.tbm");
|
||||
m_aptbmGalax[3] = CreateTBitmap("galax2a.tbm");
|
||||
m_aptbmGalax[4] = CreateTBitmap("galax2b.tbm");
|
||||
m_aptbmGalax[5] = CreateTBitmap("galax2c.tbm");
|
||||
m_aptbmGalax[6] = CreateTBitmap("galax3a.tbm");
|
||||
m_aptbmGalax[7] = CreateTBitmap("galax3b.tbm");
|
||||
m_aptbmGalax[8] = CreateTBitmap("galax3c.tbm");
|
||||
|
||||
|
||||
for (n = 0; n < 9; n++) {
|
||||
|
||||
@ -225,7 +225,7 @@ bool Form::InitFromProperties(FormMgr *pfrmm, word idf, IniReader *pini, char *p
|
||||
m_ptbm = NULL;
|
||||
m_rc.Set(x, y, x + cx, y + cy);
|
||||
if (szBitmap[0] != 0) {
|
||||
m_ptbm = LoadTBitmap(szBitmap);
|
||||
m_ptbm = CreateTBitmap(szBitmap);
|
||||
if (m_ptbm == NULL)
|
||||
return false;
|
||||
Size siz;
|
||||
|
||||
@ -1217,7 +1217,7 @@ bool Game::InitMultiFormMgr()
|
||||
// is dynamically sized and repositioned based on knowledge of how the game form is
|
||||
// layed out.
|
||||
|
||||
TBitmap *ptbmMenuButton = LoadTBitmap("menuup.tbm");
|
||||
TBitmap *ptbmMenuButton = CreateTBitmap("menuup.tbm");
|
||||
if (ptbmMenuButton == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -13,12 +13,12 @@ TBitmap *ButtonControl::s_ptbmRightDown;
|
||||
|
||||
bool ButtonControl::InitClass()
|
||||
{
|
||||
s_ptbmLeftUp = GetSharedTBitmap("buttonleftup.tbm");
|
||||
s_ptbmMidUp = GetSharedTBitmap("buttonmidup.tbm");
|
||||
s_ptbmRightUp = GetSharedTBitmap("buttonrightup.tbm");
|
||||
s_ptbmLeftDown = GetSharedTBitmap("buttonleftdown.tbm");
|
||||
s_ptbmMidDown = GetSharedTBitmap("buttonmiddown.tbm");
|
||||
s_ptbmRightDown = GetSharedTBitmap("buttonrightdown.tbm");
|
||||
s_ptbmLeftUp = CreateTBitmap("buttonleftup.tbm");
|
||||
s_ptbmMidUp = CreateTBitmap("buttonmidup.tbm");
|
||||
s_ptbmRightUp = CreateTBitmap("buttonrightup.tbm");
|
||||
s_ptbmLeftDown = CreateTBitmap("buttonleftdown.tbm");
|
||||
s_ptbmMidDown = CreateTBitmap("buttonmiddown.tbm");
|
||||
s_ptbmRightDown = CreateTBitmap("buttonrightdown.tbm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -56,11 +56,11 @@ bool ButtonControl::Init(char *pszLabel, int nfnt, char *szFnUp, char *szFnDown,
|
||||
gmmgr.WritePtr(m_szLabel, 0, pszLabel, strlen(pszLabel) + 1);
|
||||
|
||||
if (szFnUp != NULL)
|
||||
m_ptbmUp = GetSharedTBitmap(szFnUp);
|
||||
m_ptbmUp = CreateTBitmap(szFnUp);
|
||||
if (szFnDown != NULL)
|
||||
m_ptbmDown = GetSharedTBitmap(szFnDown);
|
||||
m_ptbmDown = CreateTBitmap(szFnDown);
|
||||
if (szFnDisabled != NULL)
|
||||
m_ptbmDisabled = GetSharedTBitmap(szFnDisabled);
|
||||
m_ptbmDisabled = CreateTBitmap(szFnDisabled);
|
||||
|
||||
if (m_ptbmUp != NULL && m_ptbmDown != NULL) {
|
||||
Size siz1 = { 0, 0 };
|
||||
@ -277,9 +277,9 @@ void ButtonControl::SetText(char *psz)
|
||||
bool PresetButtonControl::Init(char *pszLabel, int nfnt, char *szFnUp, char *szFnDown, bool fCenter)
|
||||
{
|
||||
if (szFnUp != NULL)
|
||||
m_ptbmUp = GetSharedTBitmap(szFnUp);
|
||||
m_ptbmUp = CreateTBitmap(szFnUp);
|
||||
if (szFnDown != NULL)
|
||||
m_ptbmDown = GetSharedTBitmap(szFnDown);
|
||||
m_ptbmDown = CreateTBitmap(szFnDown);
|
||||
|
||||
if (m_ptbmUp != NULL) {
|
||||
Size siz1 = { 0, 0 };
|
||||
@ -349,10 +349,10 @@ bool CheckBoxControl::Init(Form *pfrm, word idc, int x, int y, char *pszLabel, i
|
||||
|
||||
bool CheckBoxControl::InitClass()
|
||||
{
|
||||
s_ptbmOnUp = GetSharedTBitmap("checkboxonup.tbm");
|
||||
s_ptbmOnDown = GetSharedTBitmap("checkboxondown.tbm");
|
||||
s_ptbmOffUp = GetSharedTBitmap("checkboxoffup.tbm");
|
||||
s_ptbmOffDown = GetSharedTBitmap("checkboxoffdown.tbm");
|
||||
s_ptbmOnUp = CreateTBitmap("checkboxonup.tbm");
|
||||
s_ptbmOnDown = CreateTBitmap("checkboxondown.tbm");
|
||||
s_ptbmOffUp = CreateTBitmap("checkboxoffup.tbm");
|
||||
s_ptbmOffDown = CreateTBitmap("checkboxoffdown.tbm");
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -741,20 +741,8 @@ bool BitmapControl::Init(Form *pfrm, IniReader *pini, FindProp *pfind)
|
||||
if (cArgs != 1)
|
||||
return false;
|
||||
|
||||
// Distinguish between RawBitmaps and TBitmaps
|
||||
// UNDONE: this should probably be handled by an HtBitmap::Init.
|
||||
|
||||
int cch = (int)strlen(szBitmap);
|
||||
if (szBitmap[cch - 3] == 'r') {
|
||||
Assert(szBitmap[cch - 4] == '.' && szBitmap[cch - 2] == 'b' && szBitmap[cch - 1] == 'm');
|
||||
m_phtbm = new RawBitmap();
|
||||
} else {
|
||||
m_phtbm = new TBitmap();
|
||||
}
|
||||
if (m_phtbm == NULL)
|
||||
return false;
|
||||
|
||||
if (!m_phtbm->Init(szBitmap))
|
||||
m_ptbm = CreateTBitmap(szBitmap);
|
||||
if (!m_ptbm)
|
||||
return false;
|
||||
|
||||
Size siz = { 0, 0 };
|
||||
@ -863,10 +851,10 @@ TBitmap *ListControl::s_ptbmScrollDownDown;
|
||||
|
||||
bool ListControl::InitClass()
|
||||
{
|
||||
s_ptbmScrollUpUp = GetSharedTBitmap("scrollupup.tbm");
|
||||
s_ptbmScrollUpDown = GetSharedTBitmap("scrollupdown.tbm");
|
||||
s_ptbmScrollDownUp = GetSharedTBitmap("scrolldownup.tbm");
|
||||
s_ptbmScrollDownDown = GetSharedTBitmap("scrolldowndown.tbm");
|
||||
s_ptbmScrollUpUp = CreateTBitmap("scrollupup.tbm");
|
||||
s_ptbmScrollUpDown = CreateTBitmap("scrollupdown.tbm");
|
||||
s_ptbmScrollDownUp = CreateTBitmap("scrolldownup.tbm");
|
||||
s_ptbmScrollDownDown = CreateTBitmap("scrolldowndown.tbm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1747,7 +1735,7 @@ TBitmap *PipMeterControl::s_ptbmPip;
|
||||
|
||||
bool PipMeterControl::InitClass()
|
||||
{
|
||||
s_ptbmPip = GetSharedTBitmap("pip.tbm");
|
||||
s_ptbmPip = CreateTBitmap("pip.tbm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1777,7 +1765,7 @@ bool PipMeterControl::Init(Form *pfrm, word idc, int x, int y, int cx, int cy,
|
||||
bool PipMeterControl::Init(char *szPip)
|
||||
{
|
||||
if (szPip != NULL)
|
||||
m_ptbmPip = GetSharedTBitmap(szPip);
|
||||
m_ptbmPip = CreateTBitmap(szPip);
|
||||
else
|
||||
m_ptbmPip = s_ptbmPip;
|
||||
|
||||
@ -1843,9 +1831,9 @@ TBitmap *DamageMeterControl::s_ptbmStructure;
|
||||
|
||||
bool DamageMeterControl::InitClass()
|
||||
{
|
||||
s_ptbmInfantry = GetSharedTBitmap("damage_infantry.tbm");
|
||||
s_ptbmVehicle = GetSharedTBitmap("damage_vehicle.tbm");
|
||||
s_ptbmStructure = GetSharedTBitmap("damage_structure.tbm");
|
||||
s_ptbmInfantry = CreateTBitmap("damage_infantry.tbm");
|
||||
s_ptbmVehicle = CreateTBitmap("damage_vehicle.tbm");
|
||||
s_ptbmStructure = CreateTBitmap("damage_structure.tbm");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ void DoTimeTest(DibBitmap *pbm)
|
||||
long lEnd;
|
||||
long n;
|
||||
|
||||
TBitmap *ptbmCode = (TBitmap *)LoadTBitmap("srtest.tbm");
|
||||
TBitmap *ptbmCode = (TBitmap *)CreateTBitmap("srtest.tbm");
|
||||
//ptbmCode->CompileTest(c);
|
||||
//ptbmCode->DrawTest(pbm, c);
|
||||
delete ptbmCode;
|
||||
@ -36,7 +36,7 @@ void DoTimeTest(DibBitmap *pbm)
|
||||
|
||||
#if 0
|
||||
ptbm = ptbmCode;
|
||||
//ptbm = LoadTBitmap("srtest.tbm");
|
||||
//ptbm = CreateTBitmap("srtest.tbm");
|
||||
ptbm->BltTo(pbm, -24, 10);
|
||||
lStart = HostGetTickCount();
|
||||
for (n = 0; n < c; n++)
|
||||
@ -45,7 +45,7 @@ void DoTimeTest(DibBitmap *pbm)
|
||||
HostMessageBox("%ld count %ld ticks", c, lEnd - lStart);
|
||||
delete ptbm;
|
||||
|
||||
ptbm = LoadTBitmap("srtest2.tbm");
|
||||
ptbm = CreateTBitmap("srtest2.tbm");
|
||||
lStart = HostGetTickCount();
|
||||
for (n = 0; n < c; n++)
|
||||
ptbm->BltTo(pbm, 10, 10);
|
||||
@ -53,7 +53,7 @@ void DoTimeTest(DibBitmap *pbm)
|
||||
HostMessageBox("%ld count %ld ticks", c, lEnd - lStart);
|
||||
delete ptbm;
|
||||
|
||||
ptbm = LoadTBitmap("sri_jog_0_0.tbm");
|
||||
ptbm = CreateTBitmap("sri_jog_0_0.tbm");
|
||||
lStart = HostGetTickCount();
|
||||
for (n = 0; n < c; n++)
|
||||
ptbm->BltTo(pbm, 10, 10);
|
||||
@ -104,7 +104,7 @@ void TestTBitmap(DibBitmap *pbm)
|
||||
|
||||
#if 1
|
||||
if (ptbmTest == NULL) {
|
||||
ptbmTest = LoadTBitmap("sri_stand_4_0.tbm");
|
||||
ptbmTest = CreateTBitmap("sri_stand_4_0.tbm");
|
||||
if (ptbmTest == NULL)
|
||||
return;
|
||||
gxTest = 11;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user