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
|
//End Added by Chris
|
||||||
|
|
||||||
|
extern void SetPlanetMusic (BYTE planet_type);
|
||||||
extern int rotate_planet_task (PVOID Blah);
|
extern int rotate_planet_task (PVOID Blah);
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -98,6 +99,7 @@ LoadPlanet (BOOLEAN IsDefined)
|
|||||||
|
|
||||||
GeneratePlanetMask (pPlanetDesc, IsDefined);
|
GeneratePlanetMask (pPlanetDesc, IsDefined);
|
||||||
}
|
}
|
||||||
|
SetPlanetMusic ((UBYTE)(pPlanetDesc->data_index & ~PLANET_SHIELDED));
|
||||||
|
|
||||||
if (pPlanetDesc->pPrevDesc != &pSolarSysState->SunDesc[0])
|
if (pPlanetDesc->pPrevDesc != &pSolarSysState->SunDesc[0])
|
||||||
pPlanetDesc = pPlanetDesc->pPrevDesc;
|
pPlanetDesc = pPlanetDesc->pPrevDesc;
|
||||||
|
|||||||
@@ -40,8 +40,6 @@
|
|||||||
extern void DeltaTopography (COUNT num_iterations, PSBYTE DepthArray,
|
extern void DeltaTopography (COUNT num_iterations, PSBYTE DepthArray,
|
||||||
PRECT pRect, SIZE depth_delta);
|
PRECT pRect, SIZE depth_delta);
|
||||||
|
|
||||||
void SetPlanetMusic (BYTE planet_type);
|
|
||||||
|
|
||||||
void SetPlanetTilt (int da);
|
void SetPlanetTilt (int da);
|
||||||
|
|
||||||
void RepairBackRect (PRECT pRect);
|
void RepairBackRect (PRECT pRect);
|
||||||
@@ -1229,12 +1227,12 @@ void planet_orbit_init ()
|
|||||||
|
|
||||||
Orbit->lpTopoData = HMalloc (MAP_WIDTH * MAP_HEIGHT);
|
Orbit->lpTopoData = HMalloc (MAP_WIDTH * MAP_HEIGHT);
|
||||||
Orbit->TopoZoomFrame = CaptureDrawable (
|
Orbit->TopoZoomFrame = CaptureDrawable (
|
||||||
CreateDrawable (WANT_PIXMAP, (COUNT)(MAP_WIDTH << 2),
|
CreateDrawable (WANT_PIXMAP, (COUNT)(MAP_WIDTH << 2),
|
||||||
(COUNT)(MAP_HEIGHT << 2), 1));
|
(COUNT)(MAP_HEIGHT << 2), 1));
|
||||||
Orbit->lpTopoMap=(DWORD *)HMalloc (sizeof(DWORD)
|
Orbit->lpTopoMap=(DWORD *)HMalloc (
|
||||||
* (MAP_HEIGHT * (MAP_WIDTH + MAP_HEIGHT)));
|
sizeof(DWORD) * (MAP_HEIGHT * (MAP_WIDTH + MAP_HEIGHT)));
|
||||||
Orbit->ScratchArray = (DWORD *)HMalloc (sizeof (DWORD *)
|
Orbit->ScratchArray = (DWORD *)HMalloc (
|
||||||
* (SHIELD_DIAM) * (SHIELD_DIAM));
|
sizeof (DWORD *) * (SHIELD_DIAM) * (SHIELD_DIAM));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1256,17 +1254,13 @@ GeneratePlanetMask (PPLANET_DESC pPlanetDesc, BOOLEAN IsEarth)
|
|||||||
{
|
{
|
||||||
//Earth uses a pixmap for the topography
|
//Earth uses a pixmap for the topography
|
||||||
pSolarSysState->TopoFrame = CaptureDrawable (
|
pSolarSysState->TopoFrame = CaptureDrawable (
|
||||||
LoadGraphic (EARTH_MASK_ANIM)
|
LoadGraphic (EARTH_MASK_ANIM));
|
||||||
);
|
|
||||||
pSolarSysState->TopoFrame = stretch_frame (
|
pSolarSysState->TopoFrame = stretch_frame (
|
||||||
pSolarSysState->TopoFrame, MAP_WIDTH, MAP_HEIGHT, 1
|
pSolarSysState->TopoFrame, MAP_WIDTH, MAP_HEIGHT, 1);
|
||||||
);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
PlanDataPtr = &PlanData[
|
PlanDataPtr = &PlanData[pPlanetDesc->data_index & ~PLANET_SHIELDED];
|
||||||
pPlanetDesc->data_index & ~PLANET_SHIELDED
|
|
||||||
];
|
|
||||||
r.corner.x = r.corner.y = 0;
|
r.corner.x = r.corner.y = 0;
|
||||||
r.extent.width = MAP_WIDTH;
|
r.extent.width = MAP_WIDTH;
|
||||||
r.extent.height = MAP_HEIGHT;
|
r.extent.height = MAP_HEIGHT;
|
||||||
@@ -1389,8 +1383,6 @@ GeneratePlanetMask (PPLANET_DESC pPlanetDesc, BOOLEAN IsEarth)
|
|||||||
SetContext (OldContext);
|
SetContext (OldContext);
|
||||||
|
|
||||||
TFB_SeedRandom (old_seed);
|
TFB_SeedRandom (old_seed);
|
||||||
|
|
||||||
SetPlanetMusic ((UBYTE)(pPlanetDesc->data_index & ~PLANET_SHIELDED));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user