Patch by Gerard Krol: warnings changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@801 4a71c877-e1ca-e34f-864e-861f7616d084
master
Roman C 2006-11-02 19:33:46 +00:00
parent 6617c2f400
commit 727ed6641c
3 changed files with 10 additions and 8 deletions

View File

@ -446,7 +446,7 @@ void frameShutDown(void)
If hard_fail is true, we will assert and report on failures.
***************************************************************************/
static BOOL loadFile2(char *pFileName, char **ppFileData, UDWORD *pFileSize,
static BOOL loadFile2(const char *pFileName, char **ppFileData, UDWORD *pFileSize,
BOOL AllocateMem, BOOL hard_fail)
{
PHYSFS_file *pfile;

View File

@ -83,7 +83,7 @@ void keyScanToString(KEY_CODE code, STRING *ascii, UDWORD maxStringSize)
strcpy(ascii,"???");
return;
}
ASSERT( (code >= 0) && (code <= KEY_MAXSCAN), "Invalid key code: %d", code );
ASSERT( (code >= 0) && (keyCodeToSDLKey(code) <= KEY_MAXSCAN), "Invalid key code: %d", code );
#ifndef _MSC_VER
snprintf(ascii, maxStringSize, "%s", SDL_GetKeyName(keyCodeToSDLKey(code)));
#else
@ -399,21 +399,21 @@ void inputNewFrame(void)
/* This returns true if the key is currently depressed */
BOOL keyDown(KEY_CODE code)
{
ASSERT( (code >= 0) && (code < KEY_MAXSCAN), "Invalid key code: %d", code );
ASSERT( (code >= 0) && (keyCodeToSDLKey(code) < KEY_MAXSCAN), "Invalid key code: %d", code );
return (aKeyState[code] != KEY_UP);
}
/* This returns true if the key went from being up to being down this frame */
BOOL keyPressed(KEY_CODE code)
{
ASSERT( (code >= 0) && (code < KEY_MAXSCAN), "Invalid key code: %d", code );
ASSERT( (code >= 0) && (keyCodeToSDLKey(code) < KEY_MAXSCAN), "Invalid key code: %d", code );
return ((aKeyState[code] == KEY_PRESSED) || (aKeyState[code] == KEY_PRESSRELEASE));
}
/* This returns true if the key went from being down to being up this frame */
BOOL keyReleased(KEY_CODE code)
{
ASSERT( (code >= 0) && (code < KEY_MAXSCAN), "Invalid key code: %d", code );
ASSERT( (code >= 0) && (keyCodeToSDLKey(code) < KEY_MAXSCAN), "Invalid key code: %d", code );
return ((aKeyState[code] == KEY_RELEASED) || (aKeyState[code] == KEY_PRESSRELEASE));
}
@ -479,7 +479,7 @@ void SetMousePos(UDWORD nowt,UDWORD x,UDWORD y)
static int mousewarp = -1;
if (mousewarp == -1) {
int val;
DWORD val;
mousewarp = 1;
if (getWarzoneKeyNumeric("nomousewarp", &val)) {
@ -521,3 +521,4 @@ void setMouseUp(MOUSE_KEY_CODE code)

View File

@ -1046,13 +1046,14 @@ static BOOL fpathRouteCloser(MOVE_CONTROL *psMoveCntl, ASTAR_ROUTE *psAStarRoute
}
// create a final route from a gateway route
static SDWORD fpathGatewayRoute(BASE_OBJECT *psObj, SDWORD routeMode, SDWORD GWTerrain,
static FPATH_RETVAL fpathGatewayRoute(BASE_OBJECT *psObj, SDWORD routeMode, SDWORD GWTerrain,
SDWORD sx, SDWORD sy, SDWORD fx, SDWORD fy,
MOVE_CONTROL *psMoveCntl)
{
static SDWORD linkx, linky, gwx, gwy, asret, matchPoints;
static ASTAR_ROUTE sAStarRoute;
SDWORD retval = FPR_OK, gwRet, zone;
FPATH_RETVAL retval = FPR_OK;
SDWORD gwRet, zone;
static GATEWAY *psCurrRoute, *psGWRoute, *psLastGW;
BOOL bRouting, bFinished;
static BOOL bFirstRoute;