Warning fixes
This commit is contained in:
parent
7c1a967a02
commit
697131a39b
@ -971,9 +971,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
{
|
{
|
||||||
createNewCatchable();
|
createNewCatchable();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
case(osgGA::GUIEventAdapter::KEYDOWN):
|
case(osgGA::GUIEventAdapter::KEYDOWN):
|
||||||
{
|
{
|
||||||
@ -987,6 +985,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
_rightKeyPressed=true;
|
_rightKeyPressed=true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case(osgGA::GUIEventAdapter::KEYUP):
|
case(osgGA::GUIEventAdapter::KEYUP):
|
||||||
{
|
{
|
||||||
@ -1000,6 +999,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
_rightKeyPressed=false;
|
_rightKeyPressed=false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case(osgGA::GUIEventAdapter::DRAG):
|
case(osgGA::GUIEventAdapter::DRAG):
|
||||||
case(osgGA::GUIEventAdapter::MOVE):
|
case(osgGA::GUIEventAdapter::MOVE):
|
||||||
|
@ -12,11 +12,6 @@
|
|||||||
|
|
||||||
void textInfo(osgText::Text* text)
|
void textInfo(osgText::Text* text)
|
||||||
{
|
{
|
||||||
const osgText::Text::TextureGlyphQuadMap& tgqm = text->getTextureGlyphQuadMap();
|
|
||||||
|
|
||||||
const osgText::Text::TextureGlyphQuadMap::const_iterator tgqmi = tgqm.begin();
|
|
||||||
|
|
||||||
|
|
||||||
osgText::String& s = text->getText();
|
osgText::String& s = text->getText();
|
||||||
|
|
||||||
for(unsigned int i = 0; i < s.size(); i++)
|
for(unsigned int i = 0; i < s.size(); i++)
|
||||||
|
@ -109,8 +109,9 @@ bool PickHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapte
|
|||||||
user_event->setName("osc_test_1");
|
user_event->setName("osc_test_1");
|
||||||
|
|
||||||
_device->sendEvent(*user_event);
|
_device->sendEvent(*user_event);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -644,6 +644,7 @@ bool SlideEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
_album->setVisibility();
|
_album->setVisibility();
|
||||||
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ SET(TARGET_SRC ReaderWriterEXR.cpp )
|
|||||||
|
|
||||||
SET(TARGET_LIBRARIES_VARS ${OPENEXR_LIBRARIES_VARS} ${ILMBASE_LIBRARIES_VARS} ZLIB_LIBRARIES)
|
SET(TARGET_LIBRARIES_VARS ${OPENEXR_LIBRARIES_VARS} ${ILMBASE_LIBRARIES_VARS} ZLIB_LIBRARIES)
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
# Remove -Wshadow flag as it barfs on ffmoeg headers
|
REMOVE_CXX_FLAG(-Wshadow)
|
||||||
STRING(REGEX REPLACE "-Wshadow" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
#### end var setup ###
|
#### end var setup ###
|
||||||
|
@ -12,5 +12,11 @@ SET(TARGET_H
|
|||||||
SET(TARGET_LIBRARIES_VARS GDAL_LIBRARY )
|
SET(TARGET_LIBRARIES_VARS GDAL_LIBRARY )
|
||||||
SET(TARGET_ADDED_LIBRARIES osgTerrain )
|
SET(TARGET_ADDED_LIBRARIES osgTerrain )
|
||||||
|
|
||||||
|
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
REMOVE_CXX_FLAG(-Wunused-result)
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
#### end var setup ###
|
#### end var setup ###
|
||||||
SETUP_PLUGIN(gdal)
|
SETUP_PLUGIN(gdal)
|
||||||
|
@ -239,7 +239,8 @@ void Surface::generate_stateset(unsigned int max_tex_units, bool force_arb_compr
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Block::SUBTRACTIVE:
|
case Block::SUBTRACTIVE:
|
||||||
OSG_WARN << "Warning: lwosg::Surface: 'Subtractive' blending mode is not supported, falling back to 'Difference' mode" << std::endl;
|
OSG_WARN << "Warning: lwosg::Surface: 'Subtractive' blending mode is not supported." << std::endl;
|
||||||
|
break;
|
||||||
case Block::DIFFERENCE:
|
case Block::DIFFERENCE:
|
||||||
tec->setCombine_RGB(osg::TexEnvCombine::SUBTRACT);
|
tec->setCombine_RGB(osg::TexEnvCombine::SUBTRACT);
|
||||||
break;
|
break;
|
||||||
|
@ -276,7 +276,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterTXP::local_readNode(const std::strin
|
|||||||
std::string childInfoStr;
|
std::string childInfoStr;
|
||||||
createChildrenLocationString(childrenChildLoc, childInfoStr);
|
createChildrenLocationString(childrenChildLoc, childInfoStr);
|
||||||
|
|
||||||
char pagedLODfile[1024];
|
char pagedLODfile[1084];
|
||||||
sprintf(pagedLODfile,"%s\\subtiles%d_%dx%d_%d%s.txp",
|
sprintf(pagedLODfile,"%s\\subtiles%d_%dx%d_%d%s.txp",
|
||||||
archive->getDir(),
|
archive->getDir(),
|
||||||
loc.lod,
|
loc.lod,
|
||||||
@ -380,7 +380,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterTXP::local_readNode(const std::strin
|
|||||||
|
|
||||||
if (tileLOD < (numLods-1))
|
if (tileLOD < (numLods-1))
|
||||||
{
|
{
|
||||||
char pagedLODfile[1024];
|
char pagedLODfile[1094];
|
||||||
sprintf(pagedLODfile,"%s\\subtiles%d_%dx%d_%d.txp",
|
sprintf(pagedLODfile,"%s\\subtiles%d_%dx%d_%d.txp",
|
||||||
archive->getDir(),
|
archive->getDir(),
|
||||||
tileLOD,
|
tileLOD,
|
||||||
|
@ -294,7 +294,7 @@ osg::Node* TXPNode::addPagedLODTile(int x, int y)
|
|||||||
// If you look at the code that calls it, it is effectively called only when
|
// If you look at the code that calls it, it is effectively called only when
|
||||||
// lod = 0. So all is OK
|
// lod = 0. So all is OK
|
||||||
int lod = 0;
|
int lod = 0;
|
||||||
char pagedLODfile[1024];
|
char pagedLODfile[1070];
|
||||||
sprintf(pagedLODfile,"%s\\tile%d_%dx%d_%d.txp",_archive->getDir(),lod,x,y,_archive->getId());
|
sprintf(pagedLODfile,"%s\\tile%d_%dx%d_%d.txp",_archive->getDir(),lod,x,y,_archive->getId());
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void trpgr_Archive::SetDirectory(const char *in_dir)
|
|||||||
// Open the given file and look for the file specific info
|
// Open the given file and look for the file specific info
|
||||||
bool trpgr_Archive::OpenFile(const char *name)
|
bool trpgr_Archive::OpenFile(const char *name)
|
||||||
{
|
{
|
||||||
char file[1024];
|
char file[1025];
|
||||||
sprintf(file,"%s" PATHSEPERATOR "%s",dir,name);
|
sprintf(file,"%s" PATHSEPERATOR "%s",dir,name);
|
||||||
|
|
||||||
CloseFile();
|
CloseFile();
|
||||||
@ -138,7 +138,7 @@ bool trpgr_Archive::ReadSubArchive(int row, int col, trpgEndian cpuNess)
|
|||||||
trpgHeader blockHeader;
|
trpgHeader blockHeader;
|
||||||
trpgr_Parser bparser;
|
trpgr_Parser bparser;
|
||||||
|
|
||||||
char blockpath[1024];
|
char blockpath[1060];
|
||||||
//open the block archive
|
//open the block archive
|
||||||
// the block archive will be in the base dir + \\cols\\row\\archive.txp
|
// the block archive will be in the base dir + \\cols\\row\\archive.txp
|
||||||
sprintf(blockpath,"%s%s%d%s%d%sarchive.txp",dir,PATHSEPERATOR,col,PATHSEPERATOR,row,PATHSEPERATOR);
|
sprintf(blockpath,"%s%s%d%s%d%sarchive.txp",dir,PATHSEPERATOR,col,PATHSEPERATOR,row,PATHSEPERATOR);
|
||||||
@ -325,7 +325,7 @@ bool trpgr_Archive::ReadHeader(bool readAllBlocks)
|
|||||||
tileTable.GetMode(tileMode);
|
tileTable.GetMode(tileMode);
|
||||||
if (tileMode == trpgTileTable::Local) {
|
if (tileMode == trpgTileTable::Local) {
|
||||||
if (tileCache) delete tileCache;
|
if (tileCache) delete tileCache;
|
||||||
char fullBase[1024];
|
char fullBase[1060];
|
||||||
sprintf(fullBase,"%s" PATHSEPERATOR "tileFile",dir);
|
sprintf(fullBase,"%s" PATHSEPERATOR "tileFile",dir);
|
||||||
tileCache = GetNewRAppFileCache(fullBase,"tpf");
|
tileCache = GetNewRAppFileCache(fullBase,"tpf");
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ bool trpgr_Archive::ReadTile(uint32 x,uint32 y,uint32 lod,trpgMemReadBuffer &buf
|
|||||||
bool trpgr_Archive::ReadExternalTile(uint32 x,uint32 y,uint32 lod,trpgMemReadBuffer &buf)
|
bool trpgr_Archive::ReadExternalTile(uint32 x,uint32 y,uint32 lod,trpgMemReadBuffer &buf)
|
||||||
{
|
{
|
||||||
// Figure out the file name
|
// Figure out the file name
|
||||||
char filename[1024];
|
char filename[1069];
|
||||||
int majorVer,minorVer;
|
int majorVer,minorVer;
|
||||||
header.GetVersion(majorVer,minorVer);
|
header.GetVersion(majorVer,minorVer);
|
||||||
if((majorVer >= TRPG_NOMERGE_VERSION_MAJOR) && (minorVer >= TRPG_NOMERGE_VERSION_MINOR)) {
|
if((majorVer >= TRPG_NOMERGE_VERSION_MAJOR) && (minorVer >= TRPG_NOMERGE_VERSION_MINOR)) {
|
||||||
@ -554,7 +554,7 @@ void trpgrImageHelper::Init(trpgEndian inNess,char *inDir,
|
|||||||
|
|
||||||
// Set up the texture cache
|
// Set up the texture cache
|
||||||
// It doesn't do anything until it's called anyway
|
// It doesn't do anything until it's called anyway
|
||||||
char fullBase[1024];
|
char fullBase[1035];
|
||||||
sprintf(fullBase,"%s" PATHSEPERATOR "texFile",dir);
|
sprintf(fullBase,"%s" PATHSEPERATOR "texFile",dir);
|
||||||
texCache = GetNewRAppFileCache(fullBase,"txf");
|
texCache = GetNewRAppFileCache(fullBase,"txf");
|
||||||
if(sepGeoTyp) {
|
if(sepGeoTyp) {
|
||||||
|
@ -681,7 +681,7 @@ trpgrAppFile *trpgrAppFileCache::GetFile(trpgEndian ness,int id,int col,int row)
|
|||||||
OpenFile &of = files[oldID];
|
OpenFile &of = files[oldID];
|
||||||
if (of.afile)
|
if (of.afile)
|
||||||
delete of.afile;
|
delete of.afile;
|
||||||
char fileName[1024];
|
char fileName[1056];
|
||||||
if(col==-1) {
|
if(col==-1) {
|
||||||
sprintf(fileName,"%s_%d.%s",baseName,id,ext);
|
sprintf(fileName,"%s_%d.%s",baseName,id,ext);
|
||||||
}
|
}
|
||||||
|
@ -408,7 +408,7 @@ trpgLabelPropertyTable *trpgwArchive::GetLabelPropertyTable()
|
|||||||
// Same as above, only gets a basename as well
|
// Same as above, only gets a basename as well
|
||||||
bool trpgwArchive::OpenFile(const char *in_dir,const char *name)
|
bool trpgwArchive::OpenFile(const char *in_dir,const char *name)
|
||||||
{
|
{
|
||||||
char filename[1024];
|
char filename[1025];
|
||||||
|
|
||||||
strncpy(dir,in_dir,1023);
|
strncpy(dir,in_dir,1023);
|
||||||
|
|
||||||
@ -773,7 +773,7 @@ bool trpgwArchive::IncrementTileFile()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Open the next one
|
// Open the next one
|
||||||
char filename[1024];
|
char filename[1049];
|
||||||
sprintf(filename,"%s" PATHSEPERATOR "tileFile_%d.tpf",dir,tileFileCount++);
|
sprintf(filename,"%s" PATHSEPERATOR "tileFile_%d.tpf",dir,tileFileCount++);
|
||||||
tileFile = GetNewWAppFile(ness,filename,true);
|
tileFile = GetNewWAppFile(ness,filename,true);
|
||||||
if (!tileFile->isValid())
|
if (!tileFile->isValid())
|
||||||
@ -802,7 +802,7 @@ bool trpgwArchive::DesignateTileFile(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Open a named on
|
// Open a named on
|
||||||
char filename[1024];
|
char filename[1049];
|
||||||
sprintf(filename,"%s" PATHSEPERATOR "tileFile_%d.tpf",dir,id);
|
sprintf(filename,"%s" PATHSEPERATOR "tileFile_%d.tpf",dir,id);
|
||||||
tileFile = GetNewWAppFile(ness,filename);
|
tileFile = GetNewWAppFile(ness,filename);
|
||||||
if (!tileFile->isValid())
|
if (!tileFile->isValid())
|
||||||
@ -834,7 +834,7 @@ bool trpgwArchive::WriteTile(unsigned int x,unsigned int y,unsigned int lod, flo
|
|||||||
// External tiles get their own individual files
|
// External tiles get their own individual files
|
||||||
if (tileMode == TileExternal || tileMode == TileExternalSaved) {
|
if (tileMode == TileExternal || tileMode == TileExternalSaved) {
|
||||||
// Make a new filename
|
// Make a new filename
|
||||||
char filename[1024];
|
char filename[1069];
|
||||||
// Note: Windows specific
|
// Note: Windows specific
|
||||||
sprintf(filename,"%s" PATHSEPERATOR "tile_%d_%d_%d.tpt",dir,x,y,lod);
|
sprintf(filename,"%s" PATHSEPERATOR "tile_%d_%d_%d.tpt",dir,x,y,lod);
|
||||||
if (!(tfp = osgDB::fopen(filename,"wb")))
|
if (!(tfp = osgDB::fopen(filename,"wb")))
|
||||||
@ -1502,7 +1502,7 @@ trpgwAppFile* trpgwImageHelper::GetNewWAppFile(trpgEndian inNess,const char *fil
|
|||||||
*/
|
*/
|
||||||
trpgwAppFile * trpgwImageHelper::IncrementTextureFile(bool geotyp)
|
trpgwAppFile * trpgwImageHelper::IncrementTextureFile(bool geotyp)
|
||||||
{
|
{
|
||||||
char filename[1024];
|
char filename[1049];
|
||||||
trpgwAppFile *thefile = texFile;
|
trpgwAppFile *thefile = texFile;
|
||||||
|
|
||||||
if(geotyp && separateGeoTypical) {
|
if(geotyp && separateGeoTypical) {
|
||||||
@ -1553,7 +1553,7 @@ bool trpgwImageHelper::DesignateTextureFile(int id)
|
|||||||
texFile = NULL;
|
texFile = NULL;
|
||||||
|
|
||||||
// Open one with the given base name
|
// Open one with the given base name
|
||||||
char filename[1024];
|
char filename[1044];
|
||||||
sprintf(filename,"%s" PATHSEPERATOR "texFile_%d.txf",dir,id);
|
sprintf(filename,"%s" PATHSEPERATOR "texFile_%d.txf",dir,id);
|
||||||
texFile = GetNewWAppFile(ness,filename);
|
texFile = GetNewWAppFile(ness,filename);
|
||||||
if (!texFile->isValid())
|
if (!texFile->isValid())
|
||||||
|
@ -11,4 +11,8 @@ SET(TARGET_H
|
|||||||
|
|
||||||
ADD_DEFINITIONS(-DZIP_STD)
|
ADD_DEFINITIONS(-DZIP_STD)
|
||||||
|
|
||||||
|
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-fallthrough")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SETUP_PLUGIN(zip)
|
SETUP_PLUGIN(zip)
|
||||||
|
Loading…
Reference in New Issue
Block a user