mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Changed: #825 Remove all warnings when compiling Ryzom
This commit is contained in:
parent
5c8e161c7a
commit
eaa26434bc
5 changed files with 19 additions and 10 deletions
|
@ -53,7 +53,7 @@ struct TReceivedMessage
|
||||||
void vectorToAddress();
|
void vectorToAddress();
|
||||||
|
|
||||||
/// Set "disconnection" message for the current AddrFrom
|
/// Set "disconnection" message for the current AddrFrom
|
||||||
void setTypeEvent( TEventType t ) { *_Data.begin() = t; }
|
void setTypeEvent( TEventType t ) { *_Data.begin() = (uint8)t; }
|
||||||
|
|
||||||
void setDate() { *(sint64*)&(*(_Data.begin()+1)) = NLMISC::CTime::getLocalTime(); }
|
void setDate() { *(sint64*)&(*(_Data.begin()+1)) = NLMISC::CTime::getLocalTime(); }
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ struct TReceivedMessage
|
||||||
const uint8 *userDataR() const { return &*_Data.begin() + MsgHeaderSize; }
|
const uint8 *userDataR() const { return &*_Data.begin() + MsgHeaderSize; }
|
||||||
|
|
||||||
/// Return the size of user data
|
/// Return the size of user data
|
||||||
uint32 userSize() { return _Data.size() - MsgHeaderSize; }
|
uint32 userSize() { return (uint32)_Data.size() - MsgHeaderSize; }
|
||||||
|
|
||||||
/// Return the data vector (event type header byte + user data)
|
/// Return the data vector (event type header byte + user data)
|
||||||
vector<uint8>& data() { return _Data; }
|
vector<uint8>& data() { return _Data; }
|
||||||
|
|
|
@ -1671,14 +1671,19 @@ void CPatch::getCurrentTileTLIColors(uint ts, uint tt, NLMISC::CRGBA corners[4]
|
||||||
CRGBA tbMiddle;
|
CRGBA tbMiddle;
|
||||||
// left.
|
// left.
|
||||||
tbEdges[0].avg2RGBOnly(tbCorners[0], tbCorners[2]);
|
tbEdges[0].avg2RGBOnly(tbCorners[0], tbCorners[2]);
|
||||||
|
tbEdges[0].A = 255;
|
||||||
// bottom
|
// bottom
|
||||||
tbEdges[1].avg2RGBOnly(tbCorners[2], tbCorners[3]);
|
tbEdges[1].avg2RGBOnly(tbCorners[2], tbCorners[3]);
|
||||||
|
tbEdges[1].A = 255;
|
||||||
// right
|
// right
|
||||||
tbEdges[2].avg2RGBOnly(tbCorners[1], tbCorners[3]);
|
tbEdges[2].avg2RGBOnly(tbCorners[1], tbCorners[3]);
|
||||||
|
tbEdges[2].A = 255;
|
||||||
// up
|
// up
|
||||||
tbEdges[3].avg2RGBOnly(tbCorners[0], tbCorners[1]);
|
tbEdges[3].avg2RGBOnly(tbCorners[0], tbCorners[1]);
|
||||||
|
tbEdges[3].A = 255;
|
||||||
// middle.
|
// middle.
|
||||||
tbMiddle.avg2RGBOnly(tbEdges[0], tbEdges[2]);
|
tbMiddle.avg2RGBOnly(tbEdges[0], tbEdges[2]);
|
||||||
|
tbMiddle.A = 255;
|
||||||
|
|
||||||
// just copy result according to tile pos in tessBlock.
|
// just copy result according to tile pos in tessBlock.
|
||||||
if(tlt==0)
|
if(tlt==0)
|
||||||
|
|
|
@ -106,8 +106,8 @@ void CPatchUVLocator::build(const CPatch *patchCenter, sint edgeCenter, CPatch::
|
||||||
// Find the position.
|
// Find the position.
|
||||||
//=============================
|
//=============================
|
||||||
// Find the uv coord at start of the edge, for 2 patchs.
|
// Find the uv coord at start of the edge, for 2 patchs.
|
||||||
CVector2f uvCenter;
|
CVector2f uvCenter(0.f, 0.f);
|
||||||
CVector2f uvNeighbor;
|
CVector2f uvNeighbor(0.f, 0.f);
|
||||||
float decal;
|
float decal;
|
||||||
|
|
||||||
// find the uv at start of edgeCenter, + decal due to bind 1/X.
|
// find the uv at start of edgeCenter, + decal due to bind 1/X.
|
||||||
|
|
|
@ -1121,6 +1121,8 @@ void CVegetableManager::addInstance(CVegetableInstanceGroup *ig,
|
||||||
CVegetableLightEx &vegetLex= ig->VegetableLightEx;
|
CVegetableLightEx &vegetLex= ig->VegetableLightEx;
|
||||||
// Color of pointLights modulated by diffuse.
|
// Color of pointLights modulated by diffuse.
|
||||||
CRGBA diffusePL[2];
|
CRGBA diffusePL[2];
|
||||||
|
diffusePL[0] = CRGBA::Black;
|
||||||
|
diffusePL[1] = CRGBA::Black;
|
||||||
if(vegetLex.NumLights>=1)
|
if(vegetLex.NumLights>=1)
|
||||||
{
|
{
|
||||||
diffusePL[0].modulateFromColorRGBOnly(diffuseRGBA, vegetLex.Color[0]);
|
diffusePL[0].modulateFromColorRGBOnly(diffuseRGBA, vegetLex.Color[0]);
|
||||||
|
@ -2491,6 +2493,8 @@ uint CVegetableManager::updateInstanceLighting(CVegetableInstanceGroup *ig, uin
|
||||||
CVegetableLightEx &vegetLex= ig->VegetableLightEx;
|
CVegetableLightEx &vegetLex= ig->VegetableLightEx;
|
||||||
// Color of pointLights modulated by diffuse.
|
// Color of pointLights modulated by diffuse.
|
||||||
CRGBA diffusePL[2];
|
CRGBA diffusePL[2];
|
||||||
|
diffusePL[0] = CRGBA::Black;
|
||||||
|
diffusePL[1] = CRGBA::Black;
|
||||||
if(vegetLex.NumLights>=1)
|
if(vegetLex.NumLights>=1)
|
||||||
{
|
{
|
||||||
diffusePL[0].modulateFromColorRGBOnly(vegetLI.MatDiffuse, vegetLex.Color[0]);
|
diffusePL[0].modulateFromColorRGBOnly(vegetLI.MatDiffuse, vegetLex.Color[0]);
|
||||||
|
|
|
@ -1732,8 +1732,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes
|
||||||
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
||||||
|
|
||||||
// UV
|
// UV
|
||||||
float u[3];
|
float u[3] = { 0.f };
|
||||||
float v[3];
|
float v[3] = { 0.f };
|
||||||
for (uint i=0; i<3; i++)
|
for (uint i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
// Get UV coordinates
|
// Get UV coordinates
|
||||||
|
@ -1764,8 +1764,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes
|
||||||
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
||||||
|
|
||||||
// UV
|
// UV
|
||||||
float u[3];
|
float u[3] = { 0.f };
|
||||||
float v[3];
|
float v[3] = { 0.f };
|
||||||
for (uint i=0; i<3; i++)
|
for (uint i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
// Get UV coordinates
|
// Get UV coordinates
|
||||||
|
@ -1898,8 +1898,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshMRMGeom &
|
||||||
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2]));
|
||||||
|
|
||||||
// UV
|
// UV
|
||||||
float u[3];
|
float u[3] = { 0.f };
|
||||||
float v[3];
|
float v[3] = { 0.f };
|
||||||
for (uint i=0; i<3; i++)
|
for (uint i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
// Get UV coordinates
|
// Get UV coordinates
|
||||||
|
|
Loading…
Reference in a new issue