diff --git a/doomsday/engine/api/doomsday.h b/doomsday/engine/api/doomsday.h index 1324c1e0eb..bb21258993 100644 --- a/doomsday/engine/api/doomsday.h +++ b/doomsday/engine/api/doomsday.h @@ -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); diff --git a/doomsday/engine/portable/include/r_draw.h b/doomsday/engine/portable/include/r_draw.h index 346e605809..2d1a607e80 100644 --- a/doomsday/engine/portable/include/r_draw.h +++ b/doomsday/engine/portable/include/r_draw.h @@ -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); diff --git a/doomsday/engine/portable/src/filedirectory.c b/doomsday/engine/portable/src/filedirectory.c index c731f4eb87..3e911c07c2 100644 --- a/doomsday/engine/portable/src/filedirectory.c +++ b/doomsday/engine/portable/src/filedirectory.c @@ -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); }} } @@ -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; @@ -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); } diff --git a/doomsday/engine/portable/src/gl_texmanager.c b/doomsday/engine/portable/src/gl_texmanager.c index 4936fddecb..8b19f8b956 100644 --- a/doomsday/engine/portable/src/gl_texmanager.c +++ b/doomsday/engine/portable/src/gl_texmanager.c @@ -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[] = { diff --git a/doomsday/engine/portable/src/p_materialmanager.c b/doomsday/engine/portable/src/p_materialmanager.c index c1bbedd5fe..e589718966 100644 --- a/doomsday/engine/portable/src/p_materialmanager.c +++ b/doomsday/engine/portable/src/p_materialmanager.c @@ -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]; diff --git a/doomsday/engine/portable/src/r_draw.c b/doomsday/engine/portable/src/r_draw.c index 04de714e96..aeb1b70056 100644 --- a/doomsday/engine/portable/src/r_draw.c +++ b/doomsday/engine/portable/src/r_draw.c @@ -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); { diff --git a/doomsday/engine/portable/src/sys_reslocator.c b/doomsday/engine/portable/src/sys_reslocator.c index eb67637922..8d6d03a64d 100644 --- a/doomsday/engine/portable/src/sys_reslocator.c +++ b/doomsday/engine/portable/src/sys_reslocator.c @@ -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]); @@ -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]); @@ -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; diff --git a/doomsday/plugins/common/src/g_game.c b/doomsday/plugins/common/src/g_game.c index 9e73753ed1..ec4a144dcc 100644 --- a/doomsday/plugins/common/src/g_game.c +++ b/doomsday/plugins/common/src/g_game.c @@ -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]); diff --git a/doomsday/plugins/common/src/hu_menu.c b/doomsday/plugins/common/src/hu_menu.c index 4b403b67a5..f0384980a9 100644 --- a/doomsday/plugins/common/src/hu_menu.c +++ b/doomsday/plugins/common/src/hu_menu.c @@ -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) { @@ -2082,7 +2079,6 @@ void Hu_MenuTicker(timespan_t ticLength) { mnAlpha = mnTargetAlpha; } - #undef MENUALPHA_FADE_STEP } diff --git a/doomsday/plugins/dehread/src/dehmain.c b/doomsday/plugins/dehread/src/dehmain.c index 399a72e8af..3ebe9d2ba2 100644 --- a/doomsday/plugins/dehread/src/dehmain.c +++ b/doomsday/plugins/dehread/src/dehmain.c @@ -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 diff --git a/doomsday/plugins/jdoom64/src/st_stuff.c b/doomsday/plugins/jdoom64/src/st_stuff.c index afdf2b1712..d9dbd58c94 100644 --- a/doomsday/plugins/jdoom64/src/st_stuff.c +++ b/doomsday/plugins/jdoom64/src/st_stuff.c @@ -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); diff --git a/doomsday/plugins/wadmapconverter/src/load.c b/doomsday/plugins/wadmapconverter/src/load.c index 6bdeb5859b..0e2f45276e 100644 --- a/doomsday/plugins/wadmapconverter/src/load.c +++ b/doomsday/plugins/wadmapconverter/src/load.c @@ -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); }