mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- More GCC warning removal, the most egregious of which was the potential
vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. SVN r1373 (trunk)
This commit is contained in:
parent
9346b5d686
commit
a3b11af15a
10 changed files with 67 additions and 18 deletions
|
@ -1,3 +1,11 @@
|
|||
January 27, 2009
|
||||
- More GCC warning removal, the most egregious of which was the security
|
||||
vulnerability "format not a string literal and no format arguments".
|
||||
- Changed the CMake script to search for fmod libraries by full name instead
|
||||
of assuming a symbolic link has been placed for the latest version. It can
|
||||
also find a non-installed copy of FMOD if it is placed local to the ZDoom
|
||||
source tree.
|
||||
|
||||
January 26, 2009
|
||||
- Fixed: Some OPL state needs to be restored before calculating rhythm. Also,
|
||||
since only the rhythm section uses the RNG, it doesn't need to be advanced
|
||||
|
|
|
@ -16,6 +16,34 @@ if( CMAKE_SIZEOF_VOID_P MATCHES "8" )
|
|||
set( X64 64 )
|
||||
endif( CMAKE_SIZEOF_VOID_P MATCHES "8" )
|
||||
|
||||
# You can either use "make install" on the FMOD distribution to put it
|
||||
# in standard system locations, or you can unpack the FMOD distribution
|
||||
# in the root of the zdoom tree. e.g.:
|
||||
# zdoom
|
||||
# docs
|
||||
# fmodapi<version>linux[64] -or simply- fmod
|
||||
# jpeg-6b
|
||||
# ...
|
||||
|
||||
# Construct version numbers for searching for the FMOD library on Linux.
|
||||
set( MINOR_VERSIONS "50" "49" "48" "47" "46" "45" "44" "43" "42" "41"
|
||||
"40" "39" "38" "37" "36" "35" "34" "33" "32" "31" "30" "29" "28"
|
||||
"27" "26" "25" "24" "23" "22" "21" "20" "21" "19" "18" "17" "16"
|
||||
"15" "14" "13" "12" "11" "10" "09" "08" "07" "06" "05" "04" "03"
|
||||
"02" "01" "00" )
|
||||
set( MAJOR_VERSIONS "22" "20" )
|
||||
set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "../fmod" )
|
||||
foreach( majver ${MAJOR_VERSIONS} )
|
||||
foreach( minver ${MINOR_VERSIONS} )
|
||||
set( FMOD_VERSIONS ${FMOD_VERSIONS} "fmodex${X64}-4.${majver}.${minver}" )
|
||||
set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "${CMAKE_HOME_DIRECTORY}/fmodapi4${majver}${minver}linux${X64}" )
|
||||
endforeach( minver ${MINOR_VERSIONS} )
|
||||
foreach( dir ${FMOD_DIR_VERSIONS} )
|
||||
set( FMOD_LOCAL_INC_DIRS ${FMOD_LOCAL_INC_DIRS} "${dir}/api/inc" )
|
||||
set( FMOD_LOCAL_LIB_DIRS ${FMOD_LOCAL_LIB_DIRS} "${dir}/api/lib" )
|
||||
endforeach( dir ${FMOD_DIR_VERSIONS} )
|
||||
endforeach( majver ${MAJER_VERSIONS} )
|
||||
|
||||
if( WIN32 )
|
||||
if( X64 )
|
||||
set( WIN_TYPE Win64 )
|
||||
|
@ -142,9 +170,16 @@ endif( NOT FMOD_LIB_NAME )
|
|||
|
||||
# Search for FMOD include files
|
||||
|
||||
if( NOT WIN32 )
|
||||
find_path( FMOD_INCLUDE_DIR fmod.hpp
|
||||
PATHS ${FMOD_LOCAL_INC_DIRS} )
|
||||
endif( NOT WIN32 )
|
||||
|
||||
if( NOT FMOD_INCLUDE_DIR )
|
||||
find_path( FMOD_INCLUDE_DIR fmod.hpp
|
||||
PATHS ${FMOD_SEARCH_PATHS}
|
||||
${FMOD_INC_PATH_SUFFIXES} )
|
||||
endif( NOT FMOD_INCLUDE_DIR )
|
||||
|
||||
if( FMOD_INCLUDE_DIR )
|
||||
message( STATUS "FMOD include files found at ${FMOD_INCLUDE_DIR}" )
|
||||
|
@ -155,9 +190,15 @@ endif( FMOD_INCLUDE_DIR )
|
|||
|
||||
# Search for FMOD library
|
||||
|
||||
if( WIN32 )
|
||||
find_library( FMOD_LIBRARY ${FMOD_LIB_NAME}
|
||||
PATHS ${FMOD_SEARCH_PATHS}
|
||||
${FMOD_LIB_PATH_SUFFIXES} )
|
||||
else( WIN32 )
|
||||
find_library( FMOD_LIBRARY
|
||||
NAMES ${FMOD_VERSIONS}
|
||||
PATHS ${FMOD_LOCAL_LIB_DIRS} )
|
||||
endif( WIN32 )
|
||||
|
||||
if( FMOD_LIBRARY )
|
||||
message( STATUS "FMOD library found at ${FMOD_LIBRARY}" )
|
||||
|
|
|
@ -482,7 +482,7 @@ CCMD (error)
|
|||
if (argv.argc() > 1)
|
||||
{
|
||||
char *textcopy = copystring (argv[1]);
|
||||
I_Error (textcopy);
|
||||
I_Error ("%s", textcopy);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -495,7 +495,7 @@ CCMD (error_fatal)
|
|||
if (argv.argc() > 1)
|
||||
{
|
||||
char *textcopy = copystring (argv[1]);
|
||||
I_FatalError (textcopy);
|
||||
I_FatalError ("%s", textcopy);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2447,7 +2447,7 @@ void D_DoomMain (void)
|
|||
}
|
||||
if (devparm)
|
||||
{
|
||||
Printf (GStrings("D_DEVSTR"));
|
||||
Printf ("%s", GStrings("D_DEVSTR"));
|
||||
}
|
||||
|
||||
#ifndef unix
|
||||
|
@ -2456,7 +2456,7 @@ void D_DoomMain (void)
|
|||
// the user's home directory.
|
||||
if (Args->CheckParm("-cdrom"))
|
||||
{
|
||||
Printf (GStrings("D_CDROM"));
|
||||
Printf ("%s", GStrings("D_CDROM"));
|
||||
mkdir (CDROM_DIR, 0);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1997,7 +1997,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
|
||||
case DEM_PRINT:
|
||||
s = ReadString (stream);
|
||||
Printf (s);
|
||||
Printf ("%s", s);
|
||||
break;
|
||||
|
||||
case DEM_CENTERPRINT:
|
||||
|
|
|
@ -253,7 +253,7 @@ PClass *PClass::CreateDerivedClass (FName name, unsigned int size)
|
|||
const PClass *existclass = FindClass(name);
|
||||
|
||||
// This is a placeholder so fill it in
|
||||
if (existclass != NULL && existclass->Size == -1)
|
||||
if (existclass != NULL && existclass->Size == (unsigned)-1)
|
||||
{
|
||||
type = const_cast<PClass*>(existclass);
|
||||
if (!IsDescendantOf(type->ParentClass))
|
||||
|
|
|
@ -2506,11 +2506,11 @@ void G_DoPlayDemo (void)
|
|||
demo_p = demobuffer = NULL;
|
||||
if (singledemo)
|
||||
{
|
||||
I_Error (eek);
|
||||
I_Error ("%s", eek);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf (PRINT_BOLD, eek);
|
||||
Printf (PRINT_BOLD, "%s", eek);
|
||||
gameaction = ga_nothing;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -928,7 +928,7 @@ void DumpStateHelper(FStateLabels *StateList, const FString &prefix)
|
|||
else
|
||||
{
|
||||
Printf(PRINT_LOG, "%s%s: %s.%d\n", prefix.GetChars(), StateList->Labels[i].Label.GetChars(),
|
||||
owner->TypeName.GetChars(), StateList->Labels[i].State - owner->ActorInfo->OwnedStates);
|
||||
owner->TypeName.GetChars(), int(StateList->Labels[i].State - owner->ActorInfo->OwnedStates));
|
||||
}
|
||||
}
|
||||
if (StateList->Labels[i].Children != NULL)
|
||||
|
|
|
@ -268,7 +268,7 @@ static void FinishThingdef()
|
|||
// Skip non-actors
|
||||
if (!ti->IsDescendantOf(RUNTIME_CLASS(AActor))) continue;
|
||||
|
||||
if (ti->Size == -1)
|
||||
if (ti->Size == (unsigned)-1)
|
||||
{
|
||||
Printf("Class %s referenced but not defined\n", ti->TypeName.GetChars());
|
||||
errorcount++;
|
||||
|
|
|
@ -124,7 +124,7 @@ public:
|
|||
void Copy(int dest, int src, int cnt);
|
||||
int ResolveAll();
|
||||
FxExpression *Get(int no);
|
||||
int Size() { return expressions.Size(); }
|
||||
unsigned int Size() { return expressions.Size(); }
|
||||
};
|
||||
|
||||
extern FStateExpressions StateParams;
|
||||
|
|
Loading…
Reference in a new issue