Removed some compiler warnings.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@841 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -104,7 +104,10 @@ BoxIntersect (PRECT pr1, PRECT pr2, PRECT pinter)
|
||||
void
|
||||
BoxUnion (PRECT pr1, PRECT pr2, PRECT punion)
|
||||
{
|
||||
#if NEVER // Part of lower FIXME.
|
||||
COORD x2, y2, w2, h2;
|
||||
#endif // NEVER
|
||||
|
||||
// Union is A AND B, put together, correct? Returns a bigger box that
|
||||
// encompasses the two.
|
||||
punion->corner.x = MIN(pr1->corner.x, pr2->corner.x);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "gfxintrn.h"
|
||||
#include "tfb_prim.h"
|
||||
|
||||
extern FRAME Build_Font_Effect (FRAME FramePtr, DWORD from, DWORD to, BYTE type);
|
||||
|
||||
@@ -26,7 +27,7 @@ static struct {
|
||||
DWORD from;
|
||||
DWORD to;
|
||||
BYTE type;
|
||||
} FontEffect = {0,0,0};
|
||||
} FontEffect = {0,0,0,0};
|
||||
|
||||
void SetContextFontEffect (BYTE type, DWORD from, DWORD to)
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@ void
|
||||
SetGraphicUseOtherExtra (int other) //Could this possibly be more cryptic?!? :)
|
||||
{
|
||||
//fprintf(stderr, "SetGraphicUseOtherExtra %d\n", other);
|
||||
(void)other; /* lint */
|
||||
}
|
||||
|
||||
// Status: Ignored (only used in solarsys.c)
|
||||
@@ -46,6 +47,7 @@ void
|
||||
SetGraphicGrabOther (int grab_other)
|
||||
{
|
||||
//fprintf(stderr, "SetGraphicGrabOther %d\n", grab_other);
|
||||
(void)grab_other; /* lint */
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -52,7 +52,7 @@ void LoadIntoExtraScreen (PRECT r);
|
||||
void DrawFromExtraScreen (PRECT r);
|
||||
void SetGraphicGrabOther (int grab_other);
|
||||
void SetGraphicScale (int scale);
|
||||
int GetGraphicScale ();
|
||||
int GetGraphicScale (void);
|
||||
void SetGraphicUseOtherExtra (int other);
|
||||
void ScreenTransition (int transition, PRECT pRect);
|
||||
|
||||
|
||||
@@ -58,6 +58,11 @@ static DRAWABLE
|
||||
alloc_image (COUNT NumFrames, DRAWABLE_TYPE DrawableType, CREATE_FLAGS
|
||||
flags, SIZE width, SIZE height)
|
||||
{
|
||||
/* dodge compiler warnings */
|
||||
(void)DrawableType;
|
||||
(void)flags;
|
||||
(void)width;
|
||||
(void)height;
|
||||
return AllocDrawable (NumFrames, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@ InitGraphics (int argc, char* argv[], COUNT KbytesRequired)
|
||||
LoadDisplay (&_pCurDisplay);
|
||||
ActivateDisplay ();
|
||||
|
||||
(void) argc; /* lint */
|
||||
(void) argv; /* lint */
|
||||
(void) KbytesRequired; /* lint */
|
||||
|
||||
ret = TRUE;
|
||||
return (ret);
|
||||
}
|
||||
@@ -117,6 +121,7 @@ ScreenTransition (int TransType, PRECT pRect)
|
||||
Task transition_task;
|
||||
|
||||
//fprintf(stderr, "ScreenTransition %d\n", TransType);
|
||||
(void) TransType; /* dodge compiler warning */
|
||||
|
||||
if (TransitionAmount != 255)
|
||||
return;
|
||||
@@ -164,6 +169,8 @@ InitVideo (BOOLEAN useCDROM) //useCDROM doesn't really apply to us...
|
||||
{
|
||||
BOOLEAN ret;
|
||||
|
||||
(void)useCDROM; /* dodge compiler warning */
|
||||
|
||||
// fprintf (stderr, "Unimplemented function activated: InitVideo()\n");
|
||||
ret = TRUE;
|
||||
return (ret);
|
||||
@@ -202,6 +209,10 @@ VidPlay (VIDEO_REF VidRef, char *loopname, BOOLEAN uninit)
|
||||
VIDEO_TYPE ret;
|
||||
ret = 0;
|
||||
|
||||
/* dodge compiler warnings */
|
||||
(void) VidRef;
|
||||
(void) loopname;
|
||||
(void) uninit;
|
||||
// fprintf (stderr, "Unimplemented function activated: VidPlay()\n");
|
||||
return (ret);
|
||||
}
|
||||
@@ -212,11 +223,13 @@ _init_video_file(PVOID pStr)
|
||||
VIDEO_REF ret;
|
||||
|
||||
fprintf (stderr, "Unimplemented function activated: _init_video_file()\n");
|
||||
|
||||
/* dodge compiler warning */
|
||||
(void) pStr;
|
||||
ret = 0;
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// Status: Implemented
|
||||
BOOLEAN
|
||||
_image_intersect (PIMAGE_BOX box1, PIMAGE_BOX box2, PRECT rect)
|
||||
{
|
||||
|
||||
@@ -212,7 +212,6 @@ void fill_frame_rgb (FRAMEPTR FramePtr, Uint32 color, int x0, int y0, int x, int
|
||||
|
||||
void arith_frame_blit (FRAMEPTR srcFrame, RECT *rsrc, FRAMEPTR dstFrame, RECT *rdst, int num,int denom)
|
||||
{
|
||||
int add = 0, sub = 0;
|
||||
TFB_Image *srcImg, *dstImg;
|
||||
SDL_Surface *src, *dst;
|
||||
SDL_Rect srcRect, dstRect, *srp = NULL, *drp = NULL;
|
||||
|
||||
@@ -409,6 +409,9 @@ TFB_GL_SwapBuffers (int force_full_redraw)
|
||||
TFB_GL_ScanLines ();
|
||||
|
||||
SDL_GL_SwapBuffers ();
|
||||
|
||||
/* remove compiler warning */
|
||||
(void) force_full_redraw;
|
||||
}
|
||||
|
||||
SDL_Surface*
|
||||
|
||||
@@ -200,7 +200,7 @@ void line(int x1, int y1, int x2, int y2, Uint32 color, PutPixelFn plot, SDL_Sur
|
||||
|
||||
// Clips line against rectangle using Cohen-Sutherland algorithm
|
||||
|
||||
static enum {C_TOP = 0x1, C_BOTTOM = 0x2, C_RIGHT = 0x4, C_LEFT = 0x8};
|
||||
enum {C_TOP = 0x1, C_BOTTOM = 0x2, C_RIGHT = 0x4, C_LEFT = 0x8};
|
||||
|
||||
static int
|
||||
compute_code (float x, float y, float xmin, float ymin, float xmax, float ymax)
|
||||
|
||||
@@ -163,9 +163,10 @@ static void ScanLines (SDL_Surface *dst, SDL_Rect *r)
|
||||
Uint16 *p = (Uint16 *) &pixels[y * dst->pitch + (rx << 1)];
|
||||
for (x = 0; x < rw; ++x)
|
||||
{
|
||||
*p++ = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
||||
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
||||
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
||||
*p = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
||||
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
||||
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -211,9 +212,10 @@ static void ScanLines (SDL_Surface *dst, SDL_Rect *r)
|
||||
Uint32 *p = (Uint32 *) &pixels[y * dst->pitch + (rx << 2)];
|
||||
for (x = 0; x < rw; ++x)
|
||||
{
|
||||
*p++ = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
||||
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
||||
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
||||
*p = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
||||
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
||||
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -88,6 +88,6 @@ void TFB_DrawCanvas_FilledImage (TFB_Image *img, int x, int y, int scale, int r,
|
||||
TFB_Palette *TFB_DrawCanvas_ExtractPalette (TFB_Canvas canvas);
|
||||
void TFB_DrawCanvas_SetPalette (TFB_Canvas target, TFB_Palette *palette);
|
||||
int TFB_DrawCanvas_GetTransparentIndex (TFB_Canvas canvas);
|
||||
void TFB_DrawCanvas_SetTransparentIndex (TFB_Canvas canvas, int index);
|
||||
void TFB_DrawCanvas_SetTransparentIndex (TFB_Canvas canvas, int i);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
* worry about this. */
|
||||
|
||||
#include "gfxintrn.h"
|
||||
#include "gfx_common.h"
|
||||
#include "tfb_draw.h"
|
||||
#include "tfb_prim.h"
|
||||
#include "cmap.h"
|
||||
|
||||
void
|
||||
TFB_Prim_Point (PPOINT p, TFB_Palette *color)
|
||||
|
||||
Reference in New Issue
Block a user