Removed about 50 warnings in VC7

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@992 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-06-22 21:54:06 +00:00
parent 366f3eab36
commit b95c4cf857
12 changed files with 54 additions and 54 deletions
+1 -1
View File
@@ -831,7 +831,7 @@ Intro (void)
if (!GET_GAME_STATE (MET_ORZ_BEFORE))
{
COUNT N;
BYTE N;
SET_GAME_STATE (MET_ORZ_BEFORE, 1);
+3 -3
View File
@@ -230,9 +230,9 @@ _text_blt (PRECT pClipRect, PRIMITIVEPTR PrimPtr)
else
SetPrimType (&locPrim, STAMPFILL_PRIM);
c32k = _get_context_fg_color () >> 8;
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TextPtr = &PrimPtr->Object.Text;
locPrim.Object.Stamp.origin.x = _save_stamp.origin.x;
+33 -33
View File
@@ -90,9 +90,9 @@ ClearBackGround (PRECT pClipRect)
DWORD c32k;
c32k = _get_context_bg_color () >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_FillRect (pClipRect, &color);
}
@@ -156,9 +156,9 @@ DrawBatch (PPRIMITIVE lpBasePrim, PRIM_LINKS PrimLinks, register
{
case POINT_PRIM:
c32k = GetPrimColor (lpWorkPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_Point (&lpWorkPrim->Object.Point, &color);
break;
@@ -167,16 +167,16 @@ DrawBatch (PPRIMITIVE lpBasePrim, PRIM_LINKS PrimLinks, register
break;
case STAMPFILL_PRIM:
c32k = GetPrimColor (lpWorkPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_StampFill (&lpWorkPrim->Object.Stamp, &color);
break;
case LINE_PRIM:
c32k = GetPrimColor (lpWorkPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_Line (&lpWorkPrim->Object.Line, &color);
break;
@@ -191,15 +191,15 @@ DrawBatch (PPRIMITIVE lpBasePrim, PRIM_LINKS PrimLinks, register
break;
case RECT_PRIM:
c32k = GetPrimColor (lpWorkPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_Rect (&lpWorkPrim->Object.Rect, &color);
case RECTFILL_PRIM:
c32k = GetPrimColor (lpWorkPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_FillRect (&lpWorkPrim->Object.Rect, &color);
break;
}
@@ -245,9 +245,9 @@ DrawPoint (PPOINT lpPoint)
DWORD c32k;
c32k = GetPrimColor (&_locPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_Point (lpPoint, &color);
_CurFramePtr->HotSpot = OldHot;
@@ -266,9 +266,9 @@ DrawRectangle (PRECT lpRect)
DWORD c32k;
c32k = GetPrimColor (&_locPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_Rect (lpRect, &color);
_CurFramePtr->HotSpot = OldHot;
@@ -287,9 +287,9 @@ DrawFilledRectangle (PRECT lpRect)
DWORD c32k;
c32k = GetPrimColor (&_locPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_FillRect (lpRect, &color);
_CurFramePtr->HotSpot = OldHot;
@@ -308,9 +308,9 @@ DrawLine (PLINE lpLine)
DWORD c32k;
c32k = GetPrimColor (&_locPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_Line (lpLine, &color);
_CurFramePtr->HotSpot = OldHot;
@@ -342,9 +342,9 @@ DrawFilledStamp (PSTAMP stmp)
DWORD c32k;
c32k = GetPrimColor (&_locPrim) >> 8; //shift out color index
color.r = (c32k >> (10 - (8 - 5))) & 0xF8;
color.g = (c32k >> (5 - (8 - 5))) & 0xF8;
color.b = (c32k << (8 - 5)) & 0xF8;
color.r = (UBYTE)((c32k >> (10 - (8 - 5))) & 0xF8);
color.g = (UBYTE)((c32k >> (5 - (8 - 5))) & 0xF8);
color.b = (UBYTE)((c32k << (8 - 5)) & 0xF8);
TFB_Prim_StampFill (stmp, &color);
_CurFramePtr->HotSpot = OldHot;
}
+3 -3
View File
@@ -85,7 +85,7 @@ GetFrameIndex (FRAMEPTR FramePtr)
if (FramePtr == 0)
return (0);
return (INDEX_GET (FramePtr->TypeIndexAndFlags));
return ((UWORD)INDEX_GET (FramePtr->TypeIndexAndFlags));
}
FRAME
@@ -121,7 +121,7 @@ SetRelFrameIndex (FRAMEPTR FramePtr, SIZE FrameOffs)
;
}
FrameOffs = (INDEX_GET (FramePtr->TypeIndexAndFlags) + FrameOffs) % num_frames;
FrameOffs = ((SWORD)INDEX_GET (FramePtr->TypeIndexAndFlags) + FrameOffs) % num_frames;
FramePtr = (FRAMEPTR)&DrawablePtr->Frame[FrameOffs];
}
@@ -150,7 +150,7 @@ IncFrameIndex (FRAMEPTR FramePtr)
return (0);
DrawablePtr = GetFrameParentDrawable (FramePtr);
if (INDEX_GET (FramePtr->TypeIndexAndFlags) < INDEX_GET (DrawablePtr->FlagsAndIndex))
if (INDEX_GET (FramePtr->TypeIndexAndFlags) < (DWORD)INDEX_GET (DrawablePtr->FlagsAndIndex))
return ((FRAME)++FramePtr);
else
return ((FRAME)DrawablePtr->Frame);
+3 -3
View File
@@ -422,11 +422,11 @@ DrawStarMap (COUNT race_update, PRECT pClipRect)
COLOR c32k;
c32k = COLOR_32k (c);
r = (c32k >> (5 * 2)) & 0x1F;
r = (BYTE)((c32k >> (5 * 2)) & 0x1F);
if ((r += 0x03) > 0x1F) r = 0x1F;
g = (c32k >> (5 * 1)) & 0x1F;
g = (BYTE)((c32k >> (5 * 1)) & 0x1F);
if ((g += 0x03) > 0x1F) g = 0x1F;
b = (c32k >> (5 * 0)) & 0x1F;
b = (BYTE)((c32k >> (5 * 0)) & 0x1F);
if ((b += 0x03) > 0x1F) b = 0x1F;
SetContextForeGroundColor (
+1 -1
View File
@@ -108,7 +108,7 @@ blazer_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT ElementPtr1, PPOIN
{
#define BLAZER_OFFSET 10
BYTE old_offs;
SIZE old_crew_level;
BYTE old_crew_level;
COUNT old_life;
old_crew_level = ElementPtr0->crew_level;
+1 -1
View File
@@ -539,7 +539,7 @@ initialize_test_pump_up (PELEMENT ShipPtr, HELEMENT PumpUpArray[])
static void
melnorme_intelligence (PELEMENT ShipPtr, PEVALUATE_DESC ObjectsOfConcern, COUNT ConcernCounter)
{
COUNT old_count;
BYTE old_count;
STARSHIPPTR StarShipPtr;
PEVALUATE_DESC lpEvalDesc;
+2 -2
View File
@@ -333,9 +333,9 @@ ion_preprocess (PELEMENT ElementPtr)
else if (Color == 0x7E)
Color = 0x7F;
if (Color <= 0x2f && Color >= 0x2a)
color_index = Color - 0x2a;
color_index = (COUNT)Color - 0x2a;
else /* color is between 0x7a and 0x7f */
color_index = (Color - 0x7a) + (NUM_TAB_COLORS >> 1);
color_index = (COUNT)(Color - 0x7a) + (NUM_TAB_COLORS >> 1);
SetPrimColor (&(GLOBAL (DisplayArray))[
ElementPtr->PrimIndex
], color_tab[color_index]);
+2 -2
View File
@@ -340,9 +340,9 @@ spawn_phoenix_trail (PELEMENT
if (Color > 0x7F)
Color = 0x2A;
if (Color <= 0x2f && Color >= 0x2a)
color_index = Color - 0x2a;
color_index = (COUNT)Color - 0x2a;
else /* color is between 0x7a and 0x7f */
color_index = (Color - 0x7a) + (NUM_TAB_COLORS >> 1);
color_index = (COUNT)(Color - 0x7a) + (NUM_TAB_COLORS >> 1);
SetPrimColor (
&(GLOBAL (DisplayArray))[ElementPtr->PrimIndex],
color_tab[color_index]
+2 -2
View File
@@ -338,9 +338,9 @@ utwig_preprocess (PELEMENT ElementPtr)
else
c = 0x7a;
if (c <= 0x2f && c >= 0x2a)
color_index = c - 0x2a;
color_index = (COUNT)c - 0x2a;
else /* color is between 0x7a and 0x7f */
color_index = (c - 0x7a) + (NUM_TAB_COLORS >> 1);
color_index = (COUNT)(c - 0x7a) + (NUM_TAB_COLORS >> 1);
SetPrimColor (lpPrim, color_tab[color_index]);
ElementPtr->life_span = NORMAL_LIFE + 1;
+1 -1
View File
@@ -620,7 +620,7 @@ DrawStorageBays (BOOLEAN Refresh)
r.extent.width = 2;
}
i = CountSISPieces (STORAGE_BAY);
i = (BYTE)CountSISPieces (STORAGE_BAY);
if (i)
{
COUNT j;
+2 -2
View File
@@ -388,9 +388,9 @@ spawn_ion_trail (PELEMENT ElementPtr)
if (Color > 0x7F)
Color = 0x2A;
if (Color <= 0x2f && Color >= 0x2a)
color_index = Color - 0x2a;
color_index = (COUNT)Color - 0x2a;
else /* color is between 0x7a and 0x7f */
color_index = (Color - 0x7a) + (NUM_TAB_COLORS >> 1);
color_index = (COUNT)(Color - 0x7a) + (NUM_TAB_COLORS >> 1);
SetPrimColor (
&DisplayArray[ElementPtr->PrimIndex], color_tab[color_index]
);