Moved call to SetPlanetMusic() out of GeneratePlanetMask().
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1837 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -30,6 +30,7 @@ DrawPlanet(int x, int y, int dy, unsigned int rgb);
|
||||
|
||||
//End Added by Chris
|
||||
|
||||
extern void SetPlanetMusic (BYTE planet_type);
|
||||
extern int rotate_planet_task (PVOID Blah);
|
||||
|
||||
void
|
||||
@@ -98,6 +99,7 @@ LoadPlanet (BOOLEAN IsDefined)
|
||||
|
||||
GeneratePlanetMask (pPlanetDesc, IsDefined);
|
||||
}
|
||||
SetPlanetMusic ((UBYTE)(pPlanetDesc->data_index & ~PLANET_SHIELDED));
|
||||
|
||||
if (pPlanetDesc->pPrevDesc != &pSolarSysState->SunDesc[0])
|
||||
pPlanetDesc = pPlanetDesc->pPrevDesc;
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
extern void DeltaTopography (COUNT num_iterations, PSBYTE DepthArray,
|
||||
PRECT pRect, SIZE depth_delta);
|
||||
|
||||
void SetPlanetMusic (BYTE planet_type);
|
||||
|
||||
void SetPlanetTilt (int da);
|
||||
|
||||
void RepairBackRect (PRECT pRect);
|
||||
@@ -1231,10 +1229,10 @@ void planet_orbit_init ()
|
||||
Orbit->TopoZoomFrame = CaptureDrawable (
|
||||
CreateDrawable (WANT_PIXMAP, (COUNT)(MAP_WIDTH << 2),
|
||||
(COUNT)(MAP_HEIGHT << 2), 1));
|
||||
Orbit->lpTopoMap=(DWORD *)HMalloc (sizeof(DWORD)
|
||||
* (MAP_HEIGHT * (MAP_WIDTH + MAP_HEIGHT)));
|
||||
Orbit->ScratchArray = (DWORD *)HMalloc (sizeof (DWORD *)
|
||||
* (SHIELD_DIAM) * (SHIELD_DIAM));
|
||||
Orbit->lpTopoMap=(DWORD *)HMalloc (
|
||||
sizeof(DWORD) * (MAP_HEIGHT * (MAP_WIDTH + MAP_HEIGHT)));
|
||||
Orbit->ScratchArray = (DWORD *)HMalloc (
|
||||
sizeof (DWORD *) * (SHIELD_DIAM) * (SHIELD_DIAM));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1256,17 +1254,13 @@ GeneratePlanetMask (PPLANET_DESC pPlanetDesc, BOOLEAN IsEarth)
|
||||
{
|
||||
//Earth uses a pixmap for the topography
|
||||
pSolarSysState->TopoFrame = CaptureDrawable (
|
||||
LoadGraphic (EARTH_MASK_ANIM)
|
||||
);
|
||||
LoadGraphic (EARTH_MASK_ANIM));
|
||||
pSolarSysState->TopoFrame = stretch_frame (
|
||||
pSolarSysState->TopoFrame, MAP_WIDTH, MAP_HEIGHT, 1
|
||||
);
|
||||
pSolarSysState->TopoFrame, MAP_WIDTH, MAP_HEIGHT, 1);
|
||||
|
||||
} else {
|
||||
|
||||
PlanDataPtr = &PlanData[
|
||||
pPlanetDesc->data_index & ~PLANET_SHIELDED
|
||||
];
|
||||
PlanDataPtr = &PlanData[pPlanetDesc->data_index & ~PLANET_SHIELDED];
|
||||
r.corner.x = r.corner.y = 0;
|
||||
r.extent.width = MAP_WIDTH;
|
||||
r.extent.height = MAP_HEIGHT;
|
||||
@@ -1389,8 +1383,6 @@ GeneratePlanetMask (PPLANET_DESC pPlanetDesc, BOOLEAN IsEarth)
|
||||
SetContext (OldContext);
|
||||
|
||||
TFB_SeedRandom (old_seed);
|
||||
|
||||
SetPlanetMusic ((UBYTE)(pPlanetDesc->data_index & ~PLANET_SHIELDED));
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user