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
|
void
|
||||||
BoxUnion (PRECT pr1, PRECT pr2, PRECT punion)
|
BoxUnion (PRECT pr1, PRECT pr2, PRECT punion)
|
||||||
{
|
{
|
||||||
|
#if NEVER // Part of lower FIXME.
|
||||||
COORD x2, y2, w2, h2;
|
COORD x2, y2, w2, h2;
|
||||||
|
#endif // NEVER
|
||||||
|
|
||||||
// Union is A AND B, put together, correct? Returns a bigger box that
|
// Union is A AND B, put together, correct? Returns a bigger box that
|
||||||
// encompasses the two.
|
// encompasses the two.
|
||||||
punion->corner.x = MIN(pr1->corner.x, pr2->corner.x);
|
punion->corner.x = MIN(pr1->corner.x, pr2->corner.x);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gfxintrn.h"
|
#include "gfxintrn.h"
|
||||||
|
#include "tfb_prim.h"
|
||||||
|
|
||||||
extern FRAME Build_Font_Effect (FRAME FramePtr, DWORD from, DWORD to, BYTE type);
|
extern FRAME Build_Font_Effect (FRAME FramePtr, DWORD from, DWORD to, BYTE type);
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ static struct {
|
|||||||
DWORD from;
|
DWORD from;
|
||||||
DWORD to;
|
DWORD to;
|
||||||
BYTE type;
|
BYTE type;
|
||||||
} FontEffect = {0,0,0};
|
} FontEffect = {0,0,0,0};
|
||||||
|
|
||||||
void SetContextFontEffect (BYTE type, DWORD from, DWORD to)
|
void SetContextFontEffect (BYTE type, DWORD from, DWORD to)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ void
|
|||||||
SetGraphicUseOtherExtra (int other) //Could this possibly be more cryptic?!? :)
|
SetGraphicUseOtherExtra (int other) //Could this possibly be more cryptic?!? :)
|
||||||
{
|
{
|
||||||
//fprintf(stderr, "SetGraphicUseOtherExtra %d\n", other);
|
//fprintf(stderr, "SetGraphicUseOtherExtra %d\n", other);
|
||||||
|
(void)other; /* lint */
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status: Ignored (only used in solarsys.c)
|
// Status: Ignored (only used in solarsys.c)
|
||||||
@@ -46,6 +47,7 @@ void
|
|||||||
SetGraphicGrabOther (int grab_other)
|
SetGraphicGrabOther (int grab_other)
|
||||||
{
|
{
|
||||||
//fprintf(stderr, "SetGraphicGrabOther %d\n", grab_other);
|
//fprintf(stderr, "SetGraphicGrabOther %d\n", grab_other);
|
||||||
|
(void)grab_other; /* lint */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void LoadIntoExtraScreen (PRECT r);
|
|||||||
void DrawFromExtraScreen (PRECT r);
|
void DrawFromExtraScreen (PRECT r);
|
||||||
void SetGraphicGrabOther (int grab_other);
|
void SetGraphicGrabOther (int grab_other);
|
||||||
void SetGraphicScale (int scale);
|
void SetGraphicScale (int scale);
|
||||||
int GetGraphicScale ();
|
int GetGraphicScale (void);
|
||||||
void SetGraphicUseOtherExtra (int other);
|
void SetGraphicUseOtherExtra (int other);
|
||||||
void ScreenTransition (int transition, PRECT pRect);
|
void ScreenTransition (int transition, PRECT pRect);
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,11 @@ static DRAWABLE
|
|||||||
alloc_image (COUNT NumFrames, DRAWABLE_TYPE DrawableType, CREATE_FLAGS
|
alloc_image (COUNT NumFrames, DRAWABLE_TYPE DrawableType, CREATE_FLAGS
|
||||||
flags, SIZE width, SIZE height)
|
flags, SIZE width, SIZE height)
|
||||||
{
|
{
|
||||||
|
/* dodge compiler warnings */
|
||||||
|
(void)DrawableType;
|
||||||
|
(void)flags;
|
||||||
|
(void)width;
|
||||||
|
(void)height;
|
||||||
return AllocDrawable (NumFrames, 0);
|
return AllocDrawable (NumFrames, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ InitGraphics (int argc, char* argv[], COUNT KbytesRequired)
|
|||||||
LoadDisplay (&_pCurDisplay);
|
LoadDisplay (&_pCurDisplay);
|
||||||
ActivateDisplay ();
|
ActivateDisplay ();
|
||||||
|
|
||||||
|
(void) argc; /* lint */
|
||||||
|
(void) argv; /* lint */
|
||||||
|
(void) KbytesRequired; /* lint */
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
@@ -117,6 +121,7 @@ ScreenTransition (int TransType, PRECT pRect)
|
|||||||
Task transition_task;
|
Task transition_task;
|
||||||
|
|
||||||
//fprintf(stderr, "ScreenTransition %d\n", TransType);
|
//fprintf(stderr, "ScreenTransition %d\n", TransType);
|
||||||
|
(void) TransType; /* dodge compiler warning */
|
||||||
|
|
||||||
if (TransitionAmount != 255)
|
if (TransitionAmount != 255)
|
||||||
return;
|
return;
|
||||||
@@ -164,6 +169,8 @@ InitVideo (BOOLEAN useCDROM) //useCDROM doesn't really apply to us...
|
|||||||
{
|
{
|
||||||
BOOLEAN ret;
|
BOOLEAN ret;
|
||||||
|
|
||||||
|
(void)useCDROM; /* dodge compiler warning */
|
||||||
|
|
||||||
// fprintf (stderr, "Unimplemented function activated: InitVideo()\n");
|
// fprintf (stderr, "Unimplemented function activated: InitVideo()\n");
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
return (ret);
|
return (ret);
|
||||||
@@ -202,6 +209,10 @@ VidPlay (VIDEO_REF VidRef, char *loopname, BOOLEAN uninit)
|
|||||||
VIDEO_TYPE ret;
|
VIDEO_TYPE ret;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
/* dodge compiler warnings */
|
||||||
|
(void) VidRef;
|
||||||
|
(void) loopname;
|
||||||
|
(void) uninit;
|
||||||
// fprintf (stderr, "Unimplemented function activated: VidPlay()\n");
|
// fprintf (stderr, "Unimplemented function activated: VidPlay()\n");
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
@@ -212,11 +223,13 @@ _init_video_file(PVOID pStr)
|
|||||||
VIDEO_REF ret;
|
VIDEO_REF ret;
|
||||||
|
|
||||||
fprintf (stderr, "Unimplemented function activated: _init_video_file()\n");
|
fprintf (stderr, "Unimplemented function activated: _init_video_file()\n");
|
||||||
|
|
||||||
|
/* dodge compiler warning */
|
||||||
|
(void) pStr;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status: Implemented
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
_image_intersect (PIMAGE_BOX box1, PIMAGE_BOX box2, PRECT rect)
|
_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)
|
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;
|
TFB_Image *srcImg, *dstImg;
|
||||||
SDL_Surface *src, *dst;
|
SDL_Surface *src, *dst;
|
||||||
SDL_Rect srcRect, dstRect, *srp = NULL, *drp = NULL;
|
SDL_Rect srcRect, dstRect, *srp = NULL, *drp = NULL;
|
||||||
|
|||||||
@@ -409,6 +409,9 @@ TFB_GL_SwapBuffers (int force_full_redraw)
|
|||||||
TFB_GL_ScanLines ();
|
TFB_GL_ScanLines ();
|
||||||
|
|
||||||
SDL_GL_SwapBuffers ();
|
SDL_GL_SwapBuffers ();
|
||||||
|
|
||||||
|
/* remove compiler warning */
|
||||||
|
(void) force_full_redraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface*
|
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
|
// 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
|
static int
|
||||||
compute_code (float x, float y, float xmin, float ymin, float xmax, float ymax)
|
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)];
|
Uint16 *p = (Uint16 *) &pixels[y * dst->pitch + (rx << 1)];
|
||||||
for (x = 0; x < rw; ++x)
|
for (x = 0; x < rw; ++x)
|
||||||
{
|
{
|
||||||
*p++ = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
*p = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
||||||
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
||||||
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
||||||
|
++p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -211,9 +212,10 @@ static void ScanLines (SDL_Surface *dst, SDL_Rect *r)
|
|||||||
Uint32 *p = (Uint32 *) &pixels[y * dst->pitch + (rx << 2)];
|
Uint32 *p = (Uint32 *) &pixels[y * dst->pitch + (rx << 2)];
|
||||||
for (x = 0; x < rw; ++x)
|
for (x = 0; x < rw; ++x)
|
||||||
{
|
{
|
||||||
*p++ = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
*p = ((((*p & fmt->Rmask) * 3) >> 2) & fmt->Rmask) |
|
||||||
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
((((*p & fmt->Gmask) * 3) >> 2) & fmt->Gmask) |
|
||||||
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
((((*p & fmt->Bmask) * 3) >> 2) & fmt->Bmask);
|
||||||
|
++p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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);
|
TFB_Palette *TFB_DrawCanvas_ExtractPalette (TFB_Canvas canvas);
|
||||||
void TFB_DrawCanvas_SetPalette (TFB_Canvas target, TFB_Palette *palette);
|
void TFB_DrawCanvas_SetPalette (TFB_Canvas target, TFB_Palette *palette);
|
||||||
int TFB_DrawCanvas_GetTransparentIndex (TFB_Canvas canvas);
|
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
|
#endif
|
||||||
|
|||||||
@@ -22,8 +22,10 @@
|
|||||||
* worry about this. */
|
* worry about this. */
|
||||||
|
|
||||||
#include "gfxintrn.h"
|
#include "gfxintrn.h"
|
||||||
|
#include "gfx_common.h"
|
||||||
#include "tfb_draw.h"
|
#include "tfb_draw.h"
|
||||||
#include "tfb_prim.h"
|
#include "tfb_prim.h"
|
||||||
|
#include "cmap.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
TFB_Prim_Point (PPOINT p, TFB_Palette *color)
|
TFB_Prim_Point (PPOINT p, TFB_Palette *color)
|
||||||
|
|||||||
Reference in New Issue
Block a user