mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-19 13:36:13 +00:00
Fixed: Some warnings
This commit is contained in:
parent
a80a4d47b8
commit
4711d266f8
23 changed files with 30 additions and 34 deletions
|
@ -885,7 +885,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
// it is not allowed to write to an adress register except for ARL
|
// it is not allowed to write to an adress register except for ARL
|
||||||
if (instrStr != 'ARL ')
|
if (instrStr != NELID("ARL"))
|
||||||
{
|
{
|
||||||
if (instr.Dest.Type == CVPOperand::AddressRegister)
|
if (instr.Dest.Type == CVPOperand::AddressRegister)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include "stdpacs.h"
|
#include "stdpacs.h"
|
||||||
#include "nel/misc/i_xml.h"
|
#include "nel/misc/i_xml.h"
|
||||||
|
#include "nel/misc/stream.h"
|
||||||
#include "nel/pacs/primitive_block.h"
|
#include "nel/pacs/primitive_block.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -253,10 +253,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>horizontalLayoutWidget</zorder>
|
|
||||||
<zorder>dataDirLabel</zorder>
|
<zorder>dataDirLabel</zorder>
|
||||||
<zorder>horizontalLayoutWidget</zorder>
|
|
||||||
<zorder></zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -50,8 +50,8 @@ void CSchemeManager::getSchemes(const std::string &type, std::vector<TSchemeInfo
|
||||||
void CSchemeManager::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
void CSchemeManager::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
{
|
{
|
||||||
|
|
||||||
f.serialCheck((uint32) '_GNM');
|
f.serialCheck(NELID("_GNM"));
|
||||||
f.serialCheck((uint32) 'MHCS');
|
f.serialCheck(NELID("MHCS"));
|
||||||
f.serialVersion(1);
|
f.serialVersion(1);
|
||||||
if (!f.isReading())
|
if (!f.isReading())
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,15 +42,15 @@ static void compressMipMap(uint8 *pixSrc, sint width, sint height, vector<uint8
|
||||||
case DXT1:
|
case DXT1:
|
||||||
case DXT1A:
|
case DXT1A:
|
||||||
flags |= squish::kDxt1;
|
flags |= squish::kDxt1;
|
||||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '1');
|
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '1');
|
||||||
break;
|
break;
|
||||||
case DXT3:
|
case DXT3:
|
||||||
flags |= squish::kDxt3;
|
flags |= squish::kDxt3;
|
||||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '3');
|
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '3');
|
||||||
break;
|
break;
|
||||||
case DXT5:
|
case DXT5:
|
||||||
flags |= squish::kDxt5;
|
flags |= squish::kDxt5;
|
||||||
dest.ddpf.dwFourCC = MAKEFOURCC('D','X', 'T', '5');
|
dest.ddpf.dwFourCC = MAKEFOURCC('D', 'X', 'T', '5');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ private:
|
||||||
/// Serializes
|
/// Serializes
|
||||||
void serial(NLMISC::IStream &f)
|
void serial(NLMISC::IStream &f)
|
||||||
{
|
{
|
||||||
f.serialCheck((uint32)('PCHK'));
|
f.serialCheck(NELID("PCHK"));
|
||||||
f.serialVersion(0);
|
f.serialVersion(0);
|
||||||
|
|
||||||
if (f.isReading())
|
if (f.isReading())
|
||||||
|
|
|
@ -591,7 +591,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||||
if( prop != NULL )
|
if (prop)
|
||||||
setDraggable( CInterfaceElement::convertBool(prop) );
|
setDraggable( CInterfaceElement::convertBool(prop) );
|
||||||
else
|
else
|
||||||
setDraggable( false );
|
setDraggable( false );
|
||||||
|
|
|
@ -2277,7 +2277,7 @@ public:
|
||||||
sint32 xmax = (sint32) max.x();
|
sint32 xmax = (sint32) max.x();
|
||||||
sint32 ymin = (sint32) (sint16) min.y();
|
sint32 ymin = (sint32) (sint16) min.y();
|
||||||
sint32 ymax = (sint32) (sint16) max.y();
|
sint32 ymax = (sint32) (sint16) max.y();
|
||||||
output.serialCheck((uint32) 'OBSI');
|
output.serialCheck(NELID("OBSI"));
|
||||||
output.serial(xmin);
|
output.serial(xmin);
|
||||||
output.serial(xmax);
|
output.serial(xmax);
|
||||||
output.serial(ymin);
|
output.serial(ymin);
|
||||||
|
|
|
@ -1700,7 +1700,7 @@ NLMISC_COMMAND(scriptHex,"execute a hex-encoded script for a group in the given
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char* hexEncoderTcl =
|
static const char* hexEncoderTcl =
|
||||||
"proc copy_encoded {} {"
|
"proc copy_encoded {} {"
|
||||||
" # Get the args from the text fields"
|
" # Get the args from the text fields"
|
||||||
" set group [ .group.name get 1.0 end ]"
|
" set group [ .group.name get 1.0 end ]"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
namespace EGSPD
|
namespace EGSPD
|
||||||
{
|
{
|
||||||
|
|
||||||
static const struct { char* Name; CFameTrend::TFameTrend Value; } TFameTrendConvert[] =
|
static const struct { const char* Name; CFameTrend::TFameTrend Value; } TFameTrendConvert[] =
|
||||||
{
|
{
|
||||||
{ "FameUpward", CFameTrend::FameUpward },
|
{ "FameUpward", CFameTrend::FameUpward },
|
||||||
{ "FameDownward", CFameTrend::FameDownward },
|
{ "FameDownward", CFameTrend::FameDownward },
|
||||||
|
|
|
@ -494,7 +494,7 @@ bool CGuildMemberModule::canAffectGrade(EGSPD::CGuildGrade::TGuildGrade)const
|
||||||
CMissionGuild * CGuildMemberModule::pickMission( TAIAlias alias )
|
CMissionGuild * CGuildMemberModule::pickMission( TAIAlias alias )
|
||||||
{
|
{
|
||||||
/// todo guild mission
|
/// todo guild mission
|
||||||
return false;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -349,13 +349,13 @@ static std::string getActiveOutputPath()
|
||||||
if (TheCharScanScriptFile==NULL)
|
if (TheCharScanScriptFile==NULL)
|
||||||
{
|
{
|
||||||
nlwarning("There is no active script file right now from which to extract output directory");
|
nlwarning("There is no active script file right now from which to extract output directory");
|
||||||
return false;
|
return "";
|
||||||
}
|
}
|
||||||
bool isOK=true;
|
bool isOK=true;
|
||||||
|
|
||||||
// write the current script file to a tmp file
|
// write the current script file to a tmp file
|
||||||
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
||||||
if (!isOK) return false;
|
if (!isOK) return "";
|
||||||
|
|
||||||
// create a new script object and assign the tmp file to it
|
// create a new script object and assign the tmp file to it
|
||||||
CCharScanScript script;
|
CCharScanScript script;
|
||||||
|
|
|
@ -336,7 +336,7 @@ void cbImpulsionFilter( CMessage& msgin, const string &serviceName, TServiceId s
|
||||||
} // impulsionFilter //
|
} // impulsionFilter //
|
||||||
|
|
||||||
|
|
||||||
static char*DebugChatModeName[] =
|
static const char* DebugChatModeName[] =
|
||||||
{
|
{
|
||||||
"say",
|
"say",
|
||||||
"shout",
|
"shout",
|
||||||
|
|
|
@ -42,7 +42,7 @@ extern CVariable<bool> VerboseStringManager;
|
||||||
#define LOG if (!VerboseStringManager) {} else nlinfo
|
#define LOG if (!VerboseStringManager) {} else nlinfo
|
||||||
|
|
||||||
|
|
||||||
char *OperatorNames[] =
|
const char *OperatorNames[] =
|
||||||
{
|
{
|
||||||
"equal",
|
"equal",
|
||||||
"notEqual",
|
"notEqual",
|
||||||
|
|
|
@ -521,9 +521,7 @@ public:
|
||||||
BsiGlobal);
|
BsiGlobal);
|
||||||
saveFile.FileName = threadResult.OutputFilename;
|
saveFile.FileName = threadResult.OutputFilename;
|
||||||
|
|
||||||
char *newLine="\n";
|
const char *newLine="\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
list<string>::const_iterator first(threadResult.Lines->begin()), last(threadResult.Lines->end());
|
list<string>::const_iterator first(threadResult.Lines->begin()), last(threadResult.Lines->end());
|
||||||
for (uint32 localCounter = 0; first != last; ++first, ++localCounter)
|
for (uint32 localCounter = 0; first != last; ++first, ++localCounter)
|
||||||
|
|
|
@ -104,7 +104,7 @@ public:
|
||||||
FILE* fileHandle= fopen(DailyActivityLogFileName,"ab");
|
FILE* fileHandle= fopen(DailyActivityLogFileName,"ab");
|
||||||
nlassert(fileHandle!=NULL);
|
nlassert(fileHandle!=NULL);
|
||||||
fprintf(fileHandle,"%02u/%02u/%u CDailyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n",
|
fprintf(fileHandle,"%02u/%02u/%u CDailyTaskScheduler: Started: %02u:%02u, Finished: %02u:%02u, Executed %u commands Started %u Jobs\n",
|
||||||
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, startTime/3600%24, startTime/60%60, endTime/3600%24, endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );
|
ptm->tm_mday, ptm->tm_mon+1, ptm->tm_year+1900, (uint)startTime/3600%24, (uint)startTime/60%60, (uint)endTime/3600%24, (uint)endTime/60%60, commandsVar==NULL?0:commandsVar->size(), jobsRemaining );
|
||||||
nlinfo("JobManager state: %s",CJobManager::getInstance()->getStatus().c_str());
|
nlinfo("JobManager state: %s",CJobManager::getInstance()->getStatus().c_str());
|
||||||
fclose(fileHandle);
|
fclose(fileHandle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -518,13 +518,13 @@ static std::string getActiveOutputPath()
|
||||||
if (TheCharScanScriptFile==NULL)
|
if (TheCharScanScriptFile==NULL)
|
||||||
{
|
{
|
||||||
nlwarning("There is no active script file right now from which to extract output directory");
|
nlwarning("There is no active script file right now from which to extract output directory");
|
||||||
return false;
|
return "";
|
||||||
}
|
}
|
||||||
bool isOK=true;
|
bool isOK=true;
|
||||||
|
|
||||||
// write the current script file to a tmp file
|
// write the current script file to a tmp file
|
||||||
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
isOK=TheCharScanScriptFile->writeToFile(TmpScriptFileName);
|
||||||
if (!isOK) return false;
|
if (!isOK) return "";
|
||||||
|
|
||||||
// create a new script object and assign the tmp file to it
|
// create a new script object and assign the tmp file to it
|
||||||
CCharScanScriptFile script;
|
CCharScanScriptFile script;
|
||||||
|
|
|
@ -176,7 +176,7 @@ CTimestamp CDbManager::_LastUpdateTime;
|
||||||
*/
|
*/
|
||||||
CDatabase* CDbManager::createDatabase(TDatabaseId id, CLog* log)
|
CDatabase* CDbManager::createDatabase(TDatabaseId id, CLog* log)
|
||||||
{
|
{
|
||||||
CHECK_DB_MGR_INIT(createDatabase, false);
|
CHECK_DB_MGR_INIT(createDatabase, NULL);
|
||||||
|
|
||||||
// check db doesn't exist yet
|
// check db doesn't exist yet
|
||||||
CDatabase* db = getDatabase(id);
|
CDatabase* db = getDatabase(id);
|
||||||
|
@ -229,7 +229,7 @@ bool CDbManager::deleteDatabase(TDatabaseId id, CLog* log)
|
||||||
*/
|
*/
|
||||||
CDatabase* CDbManager::loadDatabase(TDatabaseId id, const string& description, CLog* log)
|
CDatabase* CDbManager::loadDatabase(TDatabaseId id, const string& description, CLog* log)
|
||||||
{
|
{
|
||||||
CHECK_DB_MGR_INIT(loadDatabase, false);
|
CHECK_DB_MGR_INIT(loadDatabase, NULL);
|
||||||
|
|
||||||
nlinfo("CDbManager::loadDatabase(): load/setup database '%d'", id);
|
nlinfo("CDbManager::loadDatabase(): load/setup database '%d'", id);
|
||||||
|
|
||||||
|
|
|
@ -1195,7 +1195,7 @@ CDatabase* CDatabase::adapt(const string& description)
|
||||||
if (!buildReference())
|
if (!buildReference())
|
||||||
{
|
{
|
||||||
PDS_WARNING("adapt(): failed to buildReference()");
|
PDS_WARNING("adapt(): failed to buildReference()");
|
||||||
return false;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ string CType::getIndexName(TEnumValue value, bool verbose) const
|
||||||
if (!isIndex())
|
if (!isIndex())
|
||||||
{
|
{
|
||||||
PDS_WARNING("getIndexName(): type is not an index");
|
PDS_WARNING("getIndexName(): type is not an index");
|
||||||
return false;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isEnum())
|
if (isEnum())
|
||||||
|
|
|
@ -276,7 +276,7 @@ int main(int argc, char* argv[])
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CIFile f(builderConfig.CWMapCachePath + "/" + shortname + ".cw_height");
|
CIFile f(builderConfig.CWMapCachePath + "/" + shortname + ".cw_height");
|
||||||
f.serialCheck((uint32) 'OBSI');
|
f.serialCheck(NELID("OBSI"));
|
||||||
f.serial(xmin);
|
f.serial(xmin);
|
||||||
f.serial(xmax);
|
f.serial(xmax);
|
||||||
f.serial(ymin);
|
f.serial(ymin);
|
||||||
|
@ -322,7 +322,7 @@ int main(int argc, char* argv[])
|
||||||
// now extract each island height
|
// now extract each island height
|
||||||
// read back coordinates
|
// read back coordinates
|
||||||
CIFile f(builderConfig.CWMapCachePath + "/" + shortname + ".cw_height");
|
CIFile f(builderConfig.CWMapCachePath + "/" + shortname + ".cw_height");
|
||||||
f.serialCheck((uint32) 'OBSI');
|
f.serialCheck(NELID("OBSI"));
|
||||||
f.serial(xmin);
|
f.serial(xmin);
|
||||||
f.serial(xmax);
|
f.serial(xmax);
|
||||||
f.serial(ymin);
|
f.serial(ymin);
|
||||||
|
@ -349,7 +349,7 @@ int main(int argc, char* argv[])
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
COFile f(builderConfig.OutputPath + "/" + completeIslands[l]->Island + ".island_hm");
|
COFile f(builderConfig.OutputPath + "/" + completeIslands[l]->Island + ".island_hm");
|
||||||
f.serialCheck((uint32) 'MHSI');
|
f.serialCheck(NELID("MHSI"));
|
||||||
f.serial(island);
|
f.serial(island);
|
||||||
// export tga for check
|
// export tga for check
|
||||||
if (builderConfig.HeightMapsAsTga)
|
if (builderConfig.HeightMapsAsTga)
|
||||||
|
|
|
@ -401,7 +401,7 @@ void CPackedWorldBuilder::fly(std::vector<CIslandInfo> &islands, float camSpeed
|
||||||
// fly into scene
|
// fly into scene
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CNELU::init(1024, 768, CViewport(), 32, true, NULL, false, true);
|
CNELU::init(1024, 768, CViewport(), 32, true, EmptyWindow, false, true);
|
||||||
}
|
}
|
||||||
catch(const Exception &e)
|
catch(const Exception &e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -607,7 +607,7 @@ int main(int argc, char* argv[])
|
||||||
// fly into scene
|
// fly into scene
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CNELU::init(1024, 768, CViewport(), 32, true, NULL, false, true);
|
CNELU::init(1024, 768, CViewport(), 32, true, EmptyWindow, false, true);
|
||||||
}
|
}
|
||||||
catch(const Exception &e)
|
catch(const Exception &e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue