Earth topo map is now tinted as should, from PhracturedBlue

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@392 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2002-12-10 18:15:40 +00:00
parent 8596a3d757
commit 4c5d5130d4
3 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
#include "lifeform.h"
#include "libs/graphics/gfx_common.h"
//define SPIN_ON_LAUNCH tolet the planet spin while
//define SPIN_ON_LAUNCH to let the planet spin while
// the lander animation is playing
#undef SPIN_ON_LAUNCH
-6
View File
@@ -138,12 +138,6 @@ DrawPlanet (int x, int y, int dy, unsigned int rgb)
s.origin.x = x;
s.origin.y = y;
s.frame = pSolarSysState->TopoFrame;
if (pSolarSysState->ShieldFrame != 0)
{
rgb = 0x1f << 10;
dy = GetFrameHeight (s.frame);
a = 200;
}
BatchGraphics ();
if (! rgb)
DrawStamp (&s);
+24
View File
@@ -24,6 +24,10 @@
#define PROFILE 1
#define ROTATION_TIME 12
// define USE_ALPHA_SHIELD to use an aloha overlay instead of
// an additive overlay for the shield effect
#undef USE_ALPHA_SHIELD
extern void DeltaTopography (COUNT num_iterations, PSBYTE DepthArray,
PRECT pRect, SIZE depth_delta);
@@ -41,6 +45,10 @@ void process_rgb_bmp (FRAME FramePtr, DWORD *rgba, int maxx, int maxy);
FRAME stretch_frame (FRAME FramePtr, int neww, int newh,int destroy);
void fill_frame_rgb (FRAME FramePtr, DWORD color, int x0, int y0, int x, int y);
void add_sub_frame (FRAME srcFrame, RECT *rsrc, FRAME dstFrame, RECT *rdst, int add_sub);
DWORD **getpixelarray(FRAME FramePtr,int width, int height);
#define NUM_BATCH_POINTS 64
@@ -468,6 +476,22 @@ static void CreateShieldMask ()
SetFrameHot (ShieldFrame, MAKE_HOT_SPOT (SHIELD_RADIUS + 1,SHIELD_RADIUS + 1));
HFree(rgba);
pSolarSysState->ShieldFrame = ShieldFrame;
{
// Applythe shield to the topo data
UBYTE a, blit_type;
FRAME tintFrame = pSolarSysState->TintFrame[0];
#ifdef USE_ALPHA_SHIELD
a = 200;
blit_type = 0;
#else
a = 255;
blit_type = 1;
#endif
p = frame_mapRGBA (tintFrame, 255, 0, 0, a);
fill_frame_rgb (tintFrame, p, 0, 0, 0, 0);
add_sub_frame (tintFrame, NULL, pSolarSysState->TopoFrame, NULL, blit_type);
}
}
// RenderLevelMasks builds a frame for the rotating planet view