mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Fixed warning: multi-character character constant [-Wmultichar]
This commit is contained in:
parent
4f16007da6
commit
f57637baf6
19 changed files with 80 additions and 80 deletions
|
@ -109,7 +109,7 @@ struct TLoadFormDicoEntry
|
|||
}
|
||||
};
|
||||
*/
|
||||
const uint32 PACKED_SHEET_HEADER = 'PKSH';
|
||||
const uint32 PACKED_SHEET_HEADER = "PKSH";
|
||||
const uint32 PACKED_SHEET_VERSION = 5;
|
||||
// This Version may be used if you want to use the serialVersion() system in loadForm()
|
||||
const uint32 PACKED_SHEET_VERSION_COMPATIBLE = 0;
|
||||
|
|
|
@ -89,8 +89,8 @@ void CAnimation::serial (NLMISC::IStream& f)
|
|||
nlassert(_IdByChannelId.empty());
|
||||
|
||||
// Serial a header
|
||||
f.serialCheck ((uint32)'_LEN');
|
||||
f.serialCheck ((uint32)'MINA');
|
||||
f.serialCheck ((uint32)"_LEN");
|
||||
f.serialCheck ((uint32)"MINA");
|
||||
|
||||
// Serial a version
|
||||
sint version=f.serialVersion (2);
|
||||
|
|
|
@ -185,9 +185,9 @@ void CAnimationSet::serial (NLMISC::IStream& f)
|
|||
nlassert(!_AnimHeaderOptimisation);
|
||||
|
||||
// Serial an header
|
||||
f.serialCheck ((uint32)'_LEN');
|
||||
f.serialCheck ((uint32)'MINA');
|
||||
f.serialCheck ((uint32)'TES_');
|
||||
f.serialCheck ((uint32)"_LEN");
|
||||
f.serialCheck ((uint32)"MINA");
|
||||
f.serialCheck ((uint32)"TES_");
|
||||
|
||||
// Serial a version
|
||||
uint ver= f.serialVersion (1);
|
||||
|
|
|
@ -264,9 +264,9 @@ void CLodCharacterShapeBuild::compile(const std::vector<bool> &triangleSelection
|
|||
void CLodCharacterShapeBuild::serial(NLMISC::IStream &f)
|
||||
{
|
||||
// NEL_CLODBULD
|
||||
f.serialCheck((uint32)'_LEN');
|
||||
f.serialCheck((uint32)'DOLC');
|
||||
f.serialCheck((uint32)'DLUB');
|
||||
f.serialCheck((uint32)"_LEN");
|
||||
f.serialCheck((uint32)"DOLC");
|
||||
f.serialCheck((uint32)"DLUB");
|
||||
|
||||
/*
|
||||
Version 1:
|
||||
|
@ -525,9 +525,9 @@ void CLodCharacterShape::CBoneInfluence::serial(NLMISC::IStream &f)
|
|||
void CLodCharacterShape::serial(NLMISC::IStream &f)
|
||||
{
|
||||
// NEL_CLODSHAP
|
||||
f.serialCheck((uint32)'_LEN');
|
||||
f.serialCheck((uint32)'DOLC');
|
||||
f.serialCheck((uint32)'PAHS');
|
||||
f.serialCheck((uint32)"_LEN");
|
||||
f.serialCheck((uint32)"DOLC");
|
||||
f.serialCheck((uint32)"PAHS");
|
||||
|
||||
/*
|
||||
Version 1:
|
||||
|
|
|
@ -152,7 +152,7 @@ void CPackedWorld::getZones(std::vector<TPackedZoneBaseSPtr> &zones)
|
|||
void CPackedWorld::serialZoneNames(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
f.serialVersion(1);
|
||||
f.serialCheck((uint32) 'OWPA');
|
||||
f.serialCheck((uint32) "OWPA");
|
||||
f.serialCont(ZoneNames);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ CPSLocated::CPSLocated() : /*_MaxNumFaces(0),*/
|
|||
_ParametricMotion(false),
|
||||
_TriggerOnDeath(false),
|
||||
_LastForever(true),
|
||||
_TriggerID((uint32) 'NONE'),
|
||||
_TriggerID((uint32) "NONE"),
|
||||
_NonIntegrableForceNbRefs(0),
|
||||
_NumIntegrableForceWithDifferentBasis(0)
|
||||
{
|
||||
|
|
|
@ -405,7 +405,7 @@ void CInstanceGroup::serial (NLMISC::IStream& f)
|
|||
* ***********************************************/
|
||||
|
||||
// Serial a header
|
||||
f.serialCheck ((uint32)'TPRG');
|
||||
f.serialCheck ((uint32)"TPRG");
|
||||
|
||||
/*
|
||||
Version 5:
|
||||
|
|
|
@ -116,7 +116,7 @@ IShape* CShapeStream::getShapePointer () const
|
|||
void CShapeStream::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
// First, serial an header or checking if it is correct
|
||||
f.serialCheck ((uint32)'PAHS');
|
||||
f.serialCheck ((uint32)"PAHS");
|
||||
|
||||
// Then, serial the shape
|
||||
f.serialPolyPtr (_Shape);
|
||||
|
|
|
@ -60,7 +60,7 @@ void CSkeletonWeight::build (const TNodeArray& array)
|
|||
void CSkeletonWeight::serial (NLMISC::IStream& f)
|
||||
{
|
||||
// Serial a header
|
||||
f.serialCheck ((uint32)'TWKS');
|
||||
f.serialCheck ((uint32)"TWKS");
|
||||
|
||||
// Serial a version number
|
||||
(void)f.serialVersion (0);
|
||||
|
|
|
@ -104,8 +104,8 @@ const sint CTileFarBank::_Version=0x0;
|
|||
void CTileFarBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||
{
|
||||
// Write/Check "FAR_BANK" in header of the stream
|
||||
f.serialCheck ((uint32)'_RAF');
|
||||
f.serialCheck ((uint32)'KNAB');
|
||||
f.serialCheck ((uint32)"_RAF");
|
||||
f.serialCheck ((uint32)"KNAB");
|
||||
|
||||
// Serial version
|
||||
(void)f.serialVersion(_Version);
|
||||
|
|
|
@ -192,10 +192,10 @@ void CVegetableShape::serial(NLMISC::IStream &f)
|
|||
- BestSidedPreComputeLighting
|
||||
*/
|
||||
sint ver= f.serialVersion(1);
|
||||
f.serialCheck((uint32)'_LEN');
|
||||
f.serialCheck((uint32)'GEV_');
|
||||
f.serialCheck((uint32)'BATE');
|
||||
f.serialCheck((uint32)'__EL');
|
||||
f.serialCheck((uint32)"_LEN");
|
||||
f.serialCheck((uint32)"GEV_");
|
||||
f.serialCheck((uint32)"BATE");
|
||||
f.serialCheck((uint32)"__EL");
|
||||
|
||||
f.serial(Lighted);
|
||||
f.serial(DoubleSided);
|
||||
|
|
|
@ -258,21 +258,21 @@ bool CVPParser::parseInputRegister(CVPOperand &operand, std::string &errorOutput
|
|||
}
|
||||
switch (strValue)
|
||||
{
|
||||
case 'OPOS': operand.Value.InputRegisterValue = CVPOperand::IPosition; break;
|
||||
case 'WGHT': operand.Value.InputRegisterValue = CVPOperand::IWeight; break;
|
||||
case 'NRML': operand.Value.InputRegisterValue = CVPOperand::INormal; break;
|
||||
case 'COL0': operand.Value.InputRegisterValue = CVPOperand::IPrimaryColor; break;
|
||||
case 'COL1': operand.Value.InputRegisterValue = CVPOperand::ISecondaryColor; break;
|
||||
case 'FOGC': operand.Value.InputRegisterValue = CVPOperand::IFogCoord; break;
|
||||
case "OPOS": operand.Value.InputRegisterValue = CVPOperand::IPosition; break;
|
||||
case "WGHT": operand.Value.InputRegisterValue = CVPOperand::IWeight; break;
|
||||
case "NRML": operand.Value.InputRegisterValue = CVPOperand::INormal; break;
|
||||
case "COL0": operand.Value.InputRegisterValue = CVPOperand::IPrimaryColor; break;
|
||||
case "COL1": operand.Value.InputRegisterValue = CVPOperand::ISecondaryColor; break;
|
||||
case "FOGC": operand.Value.InputRegisterValue = CVPOperand::IFogCoord; break;
|
||||
// texture argument
|
||||
case 'TEX0':
|
||||
case 'TEX1':
|
||||
case 'TEX2':
|
||||
case 'TEX3':
|
||||
case 'TEX4':
|
||||
case 'TEX5':
|
||||
case 'TEX6':
|
||||
case 'TEX7':
|
||||
case "TEX0":
|
||||
case "TEX1":
|
||||
case "TEX2":
|
||||
case "TEX3":
|
||||
case "TEX4":
|
||||
case "TEX5":
|
||||
case "TEX6":
|
||||
case "TEX7":
|
||||
operand.Value.InputRegisterValue = (CVPOperand::EInputRegister) (((CVPOperand::ITex0 + strValue) & 0xff) - '0');
|
||||
break;
|
||||
default:
|
||||
|
@ -386,21 +386,21 @@ bool CVPParser::parseOutputRegister(CVPOperand &operand, std::string &errorOutpu
|
|||
// convert to enum
|
||||
switch(strValue)
|
||||
{
|
||||
case 'HPOS': operand.Value.OutputRegisterValue = CVPOperand::OHPosition; break;
|
||||
case 'COL0': operand.Value.OutputRegisterValue = CVPOperand::OPrimaryColor; break;
|
||||
case 'COL1': operand.Value.OutputRegisterValue = CVPOperand::OSecondaryColor; break;
|
||||
case 'BFC0': operand.Value.OutputRegisterValue = CVPOperand::OBackFacePrimaryColor; break;
|
||||
case 'BFC1': operand.Value.OutputRegisterValue = CVPOperand::OBackFaceSecondaryColor; break;
|
||||
case 'FOGC': operand.Value.OutputRegisterValue = CVPOperand::OFogCoord; break;
|
||||
case 'PSIZ': operand.Value.OutputRegisterValue = CVPOperand::OPointSize; break;
|
||||
case 'TEX0': operand.Value.OutputRegisterValue = CVPOperand::OTex0; break;
|
||||
case 'TEX1': operand.Value.OutputRegisterValue = CVPOperand::OTex1; break;
|
||||
case 'TEX2': operand.Value.OutputRegisterValue = CVPOperand::OTex2; break;
|
||||
case 'TEX3': operand.Value.OutputRegisterValue = CVPOperand::OTex3; break;
|
||||
case 'TEX4': operand.Value.OutputRegisterValue = CVPOperand::OTex4; break;
|
||||
case 'TEX5': operand.Value.OutputRegisterValue = CVPOperand::OTex5; break;
|
||||
case 'TEX6': operand.Value.OutputRegisterValue = CVPOperand::OTex6; break;
|
||||
case 'TEX7': operand.Value.OutputRegisterValue = CVPOperand::OTex7; break;
|
||||
case "HPOS": operand.Value.OutputRegisterValue = CVPOperand::OHPosition; break;
|
||||
case "COL0": operand.Value.OutputRegisterValue = CVPOperand::OPrimaryColor; break;
|
||||
case "COL1": operand.Value.OutputRegisterValue = CVPOperand::OSecondaryColor; break;
|
||||
case "BFC0": operand.Value.OutputRegisterValue = CVPOperand::OBackFacePrimaryColor; break;
|
||||
case "BFC1": operand.Value.OutputRegisterValue = CVPOperand::OBackFaceSecondaryColor; break;
|
||||
case "FOGC": operand.Value.OutputRegisterValue = CVPOperand::OFogCoord; break;
|
||||
case "PSIZ": operand.Value.OutputRegisterValue = CVPOperand::OPointSize; break;
|
||||
case "TEX0": operand.Value.OutputRegisterValue = CVPOperand::OTex0; break;
|
||||
case "TEX1": operand.Value.OutputRegisterValue = CVPOperand::OTex1; break;
|
||||
case "TEX2": operand.Value.OutputRegisterValue = CVPOperand::OTex2; break;
|
||||
case "TEX3": operand.Value.OutputRegisterValue = CVPOperand::OTex3; break;
|
||||
case "TEX4": operand.Value.OutputRegisterValue = CVPOperand::OTex4; break;
|
||||
case "TEX5": operand.Value.OutputRegisterValue = CVPOperand::OTex5; break;
|
||||
case "TEX6": operand.Value.OutputRegisterValue = CVPOperand::OTex6; break;
|
||||
case "TEX7": operand.Value.OutputRegisterValue = CVPOperand::OTex7; break;
|
||||
default:
|
||||
errorOutput = "Can't read index for output register.";
|
||||
return false;
|
||||
|
@ -755,7 +755,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
}
|
||||
switch (instrStr)
|
||||
{
|
||||
case 'ARL ':
|
||||
case "ARL ":
|
||||
instr.Opcode = CVPInstruction::ARL;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
if (!instr.Src1.Swizzle.isScalar())
|
||||
|
@ -764,7 +764,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case 'RSQ ':
|
||||
case "RSQ ":
|
||||
instr.Opcode = CVPInstruction::RSQ;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
if (!instr.Src1.Swizzle.isScalar())
|
||||
|
@ -773,8 +773,8 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case 'EXP ':
|
||||
case 'EXPP':
|
||||
case "EXP ":
|
||||
case "EXPP":
|
||||
instr.Opcode = CVPInstruction::EXPP;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
if (!instr.Src1.Swizzle.isScalar())
|
||||
|
@ -789,7 +789,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
return false;
|
||||
}*/
|
||||
break;
|
||||
case 'LOG ':
|
||||
case "LOG ":
|
||||
instr.Opcode = CVPInstruction::LOG;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
if (!instr.Src1.Swizzle.isScalar())
|
||||
|
@ -805,7 +805,7 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
}
|
||||
*/
|
||||
break;
|
||||
case 'RCP ':
|
||||
case "RCP ":
|
||||
instr.Opcode = CVPInstruction::RCP;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
if (!instr.Src1.Swizzle.isScalar())
|
||||
|
@ -815,60 +815,60 @@ bool CVPParser::parseInstruction(CVPInstruction &instr, std::string &errorOutput
|
|||
}
|
||||
break;
|
||||
/////////////////
|
||||
case 'MOV ':
|
||||
case "MOV ":
|
||||
instr.Opcode = CVPInstruction::MOV;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
|
||||
break;
|
||||
case 'LIT ':
|
||||
case "LIT ":
|
||||
instr.Opcode = CVPInstruction::LIT;
|
||||
if (!parseOp2(instr, errorOutput)) return false;
|
||||
break;
|
||||
/////////////////
|
||||
case 'MAD ':
|
||||
case "MAD ":
|
||||
instr.Opcode = CVPInstruction::MAD;
|
||||
if (!parseOp4(instr, errorOutput)) return false;
|
||||
break;
|
||||
/////////////////
|
||||
case 'ADD ':
|
||||
case "ADD ":
|
||||
instr.Opcode = CVPInstruction::ADD;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
/////////////////
|
||||
case 'MUL ':
|
||||
case "MUL ":
|
||||
instr.Opcode = CVPInstruction::MUL;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'DP3 ':
|
||||
case "DP3 ":
|
||||
instr.Opcode = CVPInstruction::DP3;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'DP4 ':
|
||||
case "DP4 ":
|
||||
instr.Opcode = CVPInstruction::DP4;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'DST ':
|
||||
case "DST ":
|
||||
instr.Opcode = CVPInstruction::DST;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'MIN ':
|
||||
case "MIN ":
|
||||
instr.Opcode = CVPInstruction::MIN;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'MAX ':
|
||||
case "MAX ":
|
||||
instr.Opcode = CVPInstruction::MAX;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'SLT ':
|
||||
case "SLT ":
|
||||
instr.Opcode = CVPInstruction::SLT;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
case 'SGE ':
|
||||
case "SGE ":
|
||||
instr.Opcode = CVPInstruction::SGE;
|
||||
if (!parseOp3(instr, errorOutput)) return false;
|
||||
break;
|
||||
/////////////////
|
||||
case 'END ':
|
||||
case "END ":
|
||||
endEncountered = true;
|
||||
return true;
|
||||
break;
|
||||
|
@ -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
|
||||
if (instrStr != 'ARL ')
|
||||
if (instrStr != "ARL ")
|
||||
{
|
||||
if (instr.Dest.Type == CVPOperand::AddressRegister)
|
||||
{
|
||||
|
|
|
@ -458,7 +458,7 @@ void CZone::serial(NLMISC::IStream &f)
|
|||
throw EOlderStream(f);
|
||||
}
|
||||
|
||||
f.serialCheck((uint32)'ENOZ');
|
||||
f.serialCheck((uint32)"ENOZ");
|
||||
|
||||
f.xmlSerial (ZoneId, "ZONE_ID");
|
||||
f.xmlSerial (ZoneBB, "BB");
|
||||
|
|
|
@ -80,7 +80,7 @@ void CMaterial::serial (NLMISC::IStream &s)
|
|||
s.xmlPush ("LIGO_MATERIAL");
|
||||
|
||||
// Serial the header
|
||||
s.serialCheck ((uint32)'TMOL');
|
||||
s.serialCheck ((uint32)"TMOL");
|
||||
|
||||
// Serial the version
|
||||
/*sint ver =*/ s.serialVersion (0);
|
||||
|
|
|
@ -199,7 +199,7 @@ void CTransition::serial (NLMISC::IStream &s)
|
|||
s.xmlPush ("LIGO_TRANSITION");
|
||||
|
||||
// Serial the header
|
||||
s.serialCheck ((uint32)'STGL');
|
||||
s.serialCheck ((uint32)"STGL");
|
||||
|
||||
// Serial the version
|
||||
/*sint ver =*/ s.serialVersion (0);
|
||||
|
|
|
@ -153,7 +153,7 @@ void CZoneRegion::serial (NLMISC::IStream &f)
|
|||
f.xmlPush ("LAND");
|
||||
|
||||
sint32 version = f.serialVersion (1);
|
||||
f.serialCheck ((uint32)'DNAL');
|
||||
f.serialCheck ((uint32)"DNAL");
|
||||
|
||||
f.xmlSerial (_MinX, "MIN_X");
|
||||
f.xmlSerial (_MinY, "MIN_Y");
|
||||
|
|
|
@ -85,7 +85,7 @@ void CPrimitiveBlock::serial (NLMISC::IStream &s)
|
|||
s.xmlPush ("PRIMITIVE_BLOCK");
|
||||
|
||||
// Serial checks
|
||||
s.serialCheck ((uint32)'KBRP');
|
||||
s.serialCheck ((uint32)"KBRP");
|
||||
|
||||
// Serial the version
|
||||
(void)s.serialVersion (0);
|
||||
|
|
|
@ -488,7 +488,7 @@ void CCharacterCL::stopAttachedFXForCurrrentAnim(bool stopLoopingFX)
|
|||
{
|
||||
if(!(*tmpItAttached)->FX.empty())
|
||||
{
|
||||
if (!(*tmpItAttached)->FX.removeByID('STOP') && !(*tmpItAttached)->FX.removeByID('main'))
|
||||
if (!(*tmpItAttached)->FX.removeByID("STOP") && !(*tmpItAttached)->FX.removeByID("main"))
|
||||
{
|
||||
(*tmpItAttached)->FX.activateEmitters(false);
|
||||
}
|
||||
|
|
|
@ -341,8 +341,8 @@ private:
|
|||
|
||||
void serial(NLMISC::IStream &f)
|
||||
{
|
||||
f.serialCheck((uint32)'_RTS');
|
||||
f.serialCheck((uint32)'KCAP');
|
||||
f.serialCheck((uint32)"_RTS");
|
||||
f.serialCheck((uint32)"KCAP");
|
||||
f.serialVersion(0);
|
||||
f.serial(PackedVersion);
|
||||
f.serial(LanguageCode);
|
||||
|
|
Loading…
Reference in a new issue