Skip to content

Commit

Permalink
Mac OS X: Fixed all gcc compiler issues
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 20, 2011
1 parent c37761f commit b32f8d2
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 36 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/api/doomsday.h
Expand Up @@ -400,7 +400,7 @@ boolean R_ChooseAlignModeAndScaleFactor(float* scale, int width, int height, int
scalemode_t R_ChooseScaleMode2(int width, int height, int availWidth, int availHeight, scalemode_t overrideMode, float stretchEpsilon);
scalemode_t R_ChooseScaleMode(int width, int height, int availWidth, int availHeight, scalemode_t overrideMode);

void R_SetBorderGfx(const dduri_t* paths[9]);
void R_SetBorderGfx(const dduri_t* const* paths);
boolean R_GetSpriteInfo(int sprite, int frame, spriteinfo_t* sprinfo);
boolean R_GetPatchInfo(patchid_t id, patchinfo_t* info);
const ddstring_t* R_GetPatchName(patchid_t id);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/r_draw.h
Expand Up @@ -32,7 +32,7 @@
void R_InitViewWindow(void);
void R_ShutdownViewWindow(void);

void R_SetBorderGfx(const dduri_t* paths[9]);
void R_SetBorderGfx(const dduri_t* const* paths);
void R_DrawViewBorder(void);

void R_DrawPatch(patchtex_t* p, int x, int y);
Expand Down
6 changes: 3 additions & 3 deletions doomsday/engine/portable/src/filedirectory.c
Expand Up @@ -187,7 +187,7 @@ static void resolveAndAddSearchPathsToDirectory(filedirectory_t* fd,
if(Str_RAt(searchPath, 0) != FILEDIRECTORY_DELIMITER)
Str_AppendChar(searchPath, FILEDIRECTORY_DELIMITER);

addPaths(fd, &searchPath, 1, callback, paramaters);
addPaths(fd, (const ddstring_t**)&searchPath, 1, callback, paramaters);
Str_Delete(searchPath);
}}
}
Expand Down Expand Up @@ -226,7 +226,7 @@ filedirectory_t* FileDirectory_ConstructStr(const ddstring_t* pathList)
{
size_t count;
dduri_t** uris = F_CreateUriListStr2(RC_NULL, pathList, &count);
resolveAndAddSearchPathsToDirectory(fd, uris, (uint)count, 0, 0);
resolveAndAddSearchPathsToDirectory(fd, (const dduri_t**)uris, (uint)count, 0, 0);
F_DestroyUriList(uris);
}
return fd;
Expand Down Expand Up @@ -332,7 +332,7 @@ void FileDirectory_AddPathList3(filedirectory_t* fd, const char* pathList,
size_t pathsCount = 0;
if(NULL != pathList && pathList[0])
paths = F_CreateUriList2(RC_UNKNOWN, pathList, &pathsCount);
FileDirectory_AddPaths3(fd, paths, (uint)pathsCount, callback, paramaters);
FileDirectory_AddPaths3(fd, (const dduri_t**)paths, (uint)pathsCount, callback, paramaters);
if(NULL != paths)
F_DestroyUriList(paths);
}
Expand Down
28 changes: 14 additions & 14 deletions doomsday/engine/portable/src/gl_texmanager.c
Expand Up @@ -1411,22 +1411,22 @@ int GL_CompareTextureVariantSpecifications(const texturevariantspecification_t*
void GL_PrintTextureVariantSpecification(const texturevariantspecification_t* baseSpec)
{
static const char* textureUsageContextNames[1+TEXTUREVARIANTUSAGECONTEXT_COUNT] = {
/* TC_UNKNOWN */ { "unknown" },
/* TC_UI */ { "ui" },
/* TC_MAPSURFACE_DIFFUSE */ { "mapsurface_diffuse" },
/* TC_MAPSURFACE_REFLECTION */ { "mapsurface_reflection" },
/* TC_MAPSURFACE_REFLECTIONMASK */ { "mapsurface_reflectionmask" },
/* TC_MAPSURFACE_LIGHTMAP */ { "mapsurface_lightmap" },
/* TC_SPRITE_DIFFUSE */ { "sprite_diffuse" },
/* TC_MODELSKIN_DIFFUSE */ { "modelskin_diffuse" },
/* TC_MODELSKIN_REFLECTION */ { "modelskin_reflection" },
/* TC_HALO_LUMINANCE */ { "halo_luminance" },
/* TC_PSPRITE_DIFFUSE */ { "psprite_diffuse" },
/* TC_SKYSPHERE_DIFFUSE */ { "skysphere_diffuse" }
/* TC_UNKNOWN */ "unknown",
/* TC_UI */ "ui",
/* TC_MAPSURFACE_DIFFUSE */ "mapsurface_diffuse",
/* TC_MAPSURFACE_REFLECTION */ "mapsurface_reflection",
/* TC_MAPSURFACE_REFLECTIONMASK */ "mapsurface_reflectionmask",
/* TC_MAPSURFACE_LIGHTMAP */ "mapsurface_lightmap",
/* TC_SPRITE_DIFFUSE */ "sprite_diffuse",
/* TC_MODELSKIN_DIFFUSE */ "modelskin_diffuse",
/* TC_MODELSKIN_REFLECTION */ "modelskin_reflection",
/* TC_HALO_LUMINANCE */ "halo_luminance",
/* TC_PSPRITE_DIFFUSE */ "psprite_diffuse",
/* TC_SKYSPHERE_DIFFUSE */ "skysphere_diffuse"
};
static const char* textureSpecificationTypeNames[TEXTUREVARIANTSPECIFICATIONTYPE_COUNT] = {
/* TST_GENERAL */ { "general" },
/* TST_DETAIL */ { "detail" }
/* TST_GENERAL */ "general",
/* TST_DETAIL */ "detail"
};
static const char* filterModeNames[] = { "sprite", "noclass", "const" };
static const char* glFilterNames[] = {
Expand Down
10 changes: 5 additions & 5 deletions doomsday/engine/portable/src/p_materialmanager.c
Expand Up @@ -215,11 +215,11 @@ static const ddstring_t* nameForMaterialNamespaceId(materialnamespaceid_t id)
static materialnamespaceid_t materialNamespaceIdForTextureNamespaceId(texturenamespaceid_t id)
{
static const materialnamespaceid_t namespaceIds[TEXTURENAMESPACE_COUNT] = {
/* TN_SYSTEM */ { MN_SYSTEM },
/* TN_FLATS */ { MN_FLATS },
/* TN_TEXTURES */ { MN_TEXTURES },
/* TN_SPRITES */ { MN_SPRITES },
/* TN_PATCHES */ { MN_ANY } // No materials for these yet.
/* TN_SYSTEM */ MN_SYSTEM,
/* TN_FLATS */ MN_FLATS,
/* TN_TEXTURES */ MN_TEXTURES,
/* TN_SPRITES */ MN_SPRITES,
/* TN_PATCHES */ MN_ANY // No materials for these yet.
};
if(VALID_TEXTURENAMESPACE(id))
return namespaceIds[id-TEXTURENAMESPACE_FIRST];
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/r_draw.c
Expand Up @@ -98,7 +98,7 @@ static void loadViewBorderPatches(void)
bwidth = info.height;
}

void R_SetBorderGfx(const dduri_t* paths[9])
void R_SetBorderGfx(const dduri_t* const* paths)
{
assert(inited);
{
Expand Down
6 changes: 3 additions & 3 deletions doomsday/engine/portable/src/sys_reslocator.c
Expand Up @@ -514,7 +514,7 @@ static void createPackagesResourceNamespace(void)
}

createResourceNamespace(PACKAGES_RESOURCE_NAMESPACE_NAME, composeHashNameForFilePath,
hashVarLengthNameIgnoreCase, searchPaths, searchPathsCount, 0, 0, 0);
hashVarLengthNameIgnoreCase, (const dduri_t**)searchPaths, searchPathsCount, 0, 0, 0);

for(idx = 0; idx < searchPathsCount; ++idx)
Uri_Destruct(searchPaths[idx]);
Expand Down Expand Up @@ -568,7 +568,7 @@ static void createResourceNamespaces(void)
searchPaths[j] = Uri_Construct2(def->searchPaths[j], RC_NULL);

createResourceNamespace(def->name, composeHashNameForFilePath, hashVarLengthNameIgnoreCase,
searchPaths, searchPathsCount, def->flags, def->overrideName, def->overrideName2);
(const dduri_t**)searchPaths, searchPathsCount, def->flags, def->overrideName, def->overrideName2);

for(j = 0; j < searchPathsCount; ++j)
Uri_Destruct(searchPaths[j]);
Expand Down Expand Up @@ -844,7 +844,7 @@ uint F_FindResourceStr3(resourceclass_t rclass, const ddstring_t* searchPaths,

if((list = F_CreateUriListStr(rclass, searchPaths)) != 0)
{
result = findResource(rclass, list, optionalSuffix, foundPath);
result = findResource(rclass, (const dduri_t**)list, optionalSuffix, foundPath);
F_DestroyUriList(list);
}
return result;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/g_game.c
Expand Up @@ -821,7 +821,7 @@ void R_InitRefresh(void)
uint i;
for(i = 0; i < 9; ++i)
paths[i] = ((borderGraphics[i] && borderGraphics[i][0])? Uri_Construct2(borderGraphics[i], RC_NULL) : 0);
R_SetBorderGfx(paths);
R_SetBorderGfx((const dduri_t**)paths);
for(i = 0; i < 9; ++i)
if(paths[i])
Uri_Destruct(paths[i]);
Expand Down
6 changes: 1 addition & 5 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -2066,13 +2066,10 @@ float Hu_MenuAlpha(void)
*/
void Hu_MenuTicker(timespan_t ticLength)
{
#define MENUALPHA_FADE_STEP (.07f)

// Move towards the target alpha level for the entire menu.
if(mnAlpha != mnTargetAlpha)
{
#define MENUALPHA_FADE_STEP (.07)

#define MENUALPHA_FADE_STEP (.07f)
float diff = mnTargetAlpha - mnAlpha;
if(fabs(diff) > MENUALPHA_FADE_STEP)
{
Expand All @@ -2082,7 +2079,6 @@ void Hu_MenuTicker(timespan_t ticLength)
{
mnAlpha = mnTargetAlpha;
}

#undef MENUALPHA_FADE_STEP
}

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/dehread/src/dehmain.c
Expand Up @@ -58,6 +58,7 @@
// should be removed entirely, either by making the plugin modify the
// definitions via an API or by integrating the plugin into the engine.
#include "../../../engine/portable/include/def_data.h"
#include "../../../engine/portable/include/font.h"

#define __INTERNAL_MAP_DATA_ACCESS__
#include <doomsday.h>
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom64/src/st_stuff.c
Expand Up @@ -575,7 +575,7 @@ Draw_EndZoom();
if(!weaponInfo[plr->readyWeapon][plr->class_].mode[0].ammoType[ammotype])
continue;

sprintf(buf, "%i", plr->ammo[ammotype]);
sprintf(buf, "%i", plr->ammo[ammotype].owned);
pos = h_width/2;

DGL_Enable(DGL_TEXTURE_2D);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/wadmapconverter/src/load.c
Expand Up @@ -177,7 +177,7 @@ static const materialref_t* getMaterial(const char* regName,

const materialref_t* GetMaterial(const char* name, boolean isFlat)
{
return getMaterial(name, (materialref_t* const**)(isFlat? &map->flats : &map->textures),
return getMaterial(name, (isFlat? &map->flats : &map->textures),
isFlat? map->numFlats : map->numTextures);
}

Expand Down

0 comments on commit b32f8d2

Please sign in to comment.