mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-13 02:39:37 +00:00
Changed: #825 Remove all warnings when compiling Ryzom
This commit is contained in:
parent
6833c978d3
commit
37d85c1922
38 changed files with 158 additions and 126 deletions
|
@ -313,7 +313,7 @@ void CBotChatPageTrade::update()
|
|||
// ***************************************************************************************
|
||||
uint32 CBotChatPageTrade::getCurrItemQuantity() const
|
||||
{
|
||||
if (!_CurrItemSheet) return ~0;
|
||||
if (!_CurrItemSheet) return std::numeric_limits<uint32>::max();
|
||||
if(!_QuantityEdit) return 1;
|
||||
if (_CurrItemSheet->getType() == CCtrlSheetInfo::SheetType_Item)
|
||||
{
|
||||
|
@ -323,10 +323,10 @@ uint32 CBotChatPageTrade::getCurrItemQuantity() const
|
|||
{
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||
if (!ig) return ~0;
|
||||
if (!ig) return std::numeric_limits<uint32>::max();
|
||||
// TODO: edit box in faction points?
|
||||
CGroupEditBox *ed = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:standard_price:quantity:edit:eb"));
|
||||
if (!ed) return ~0;
|
||||
if (!ed) return std::numeric_limits<uint32>::max();
|
||||
uint32 intQuantity;
|
||||
if (fromString(ed->getInputString().toString(), intQuantity))
|
||||
{
|
||||
|
@ -334,14 +334,14 @@ uint32 CBotChatPageTrade::getCurrItemQuantity() const
|
|||
}
|
||||
else
|
||||
{
|
||||
return ~0;
|
||||
return std::numeric_limits<uint32>::max();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return ~0;
|
||||
return std::numeric_limits<uint32>::max();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ void CBotChatPageTrade::updateTradeModal()
|
|||
// get price (with fame)
|
||||
uint64 priceWithFame = getCurrItemPrice(true);
|
||||
// update resale price from quantity
|
||||
sint32 resalePrice = getCurrItemPriceResale();
|
||||
uint32 resalePrice = getCurrItemPriceResale();
|
||||
|
||||
// get faction points and type from current item
|
||||
PVP_CLAN::TPVPClan fpType;
|
||||
|
@ -624,7 +624,7 @@ void CBotChatPageTrade::updateTradeModal()
|
|||
|
||||
|
||||
// if price/quantity is valid
|
||||
bool validSetup= priceWithoutFame != ~0 && quantity != ~0 && quantity != 0;
|
||||
bool validSetup= priceWithoutFame != std::numeric_limits<uint64>::max() && quantity != std::numeric_limits<uint32>::max() && quantity != 0;
|
||||
if(validSetup && _BuyMean==MoneyFactionPoints)
|
||||
{
|
||||
// valid if at least one price type is not 0
|
||||
|
|
|
@ -138,7 +138,7 @@ void SCharacter3DSetup::setupDefault (EGSPD::CPeople::TPeople eRace, bool bMale)
|
|||
sint32 cpIndex = convert_VisualSlot_To_Char3DPart ((SLOTTYPE::EVisualSlot)i);
|
||||
if (cpIndex != Char3DPart_INVALID)
|
||||
{
|
||||
Parts[i].Quality = pIS->MapVariant;
|
||||
Parts[cpIndex].Quality = pIS->MapVariant;
|
||||
if (Male)
|
||||
Parts[cpIndex].Name = pIS->getShape();
|
||||
else
|
||||
|
@ -498,7 +498,7 @@ void DEBUG_DumpClothes()
|
|||
SLOTTYPE::EVisualSlot vs = SCharacter3DSetup::convert_Char3DPart_To_VisualSlot((TChar3DPart)cp);
|
||||
string sTmp = SCharacter3DSetup::convert_VisualSlot_To_String(vs);
|
||||
nlinfo("*** PART *** : %s", sTmp.c_str());
|
||||
uint nNbItems;
|
||||
uint nNbItems = 0;
|
||||
if (cp == Char3DPart_HandRightItem)
|
||||
nNbItems = 1<<11;
|
||||
if ((cp == Char3DPart_Chest) || (cp == Char3DPart_Hands) || (cp == Char3DPart_Feet))
|
||||
|
@ -699,7 +699,7 @@ void CCharacter3D::disableFaceMorphAndBlinks()
|
|||
if(_FacePlayList && _AnimationSet)
|
||||
{
|
||||
// disable eye blink animation (handled by ourselves)
|
||||
sint id= _AnimationSet->getChannelIdByName("visage_100MorphFactor");
|
||||
uint id= _AnimationSet->getChannelIdByName("visage_100MorphFactor");
|
||||
if(id!=UAnimationSet::NotFound)
|
||||
_FacePlayList->enableChannel(id, false);
|
||||
// disable morph target (handled by ourselves)
|
||||
|
@ -729,7 +729,7 @@ void CCharacter3D::setup (const SCharacter3DSetup &c3ds)
|
|||
{
|
||||
_PlayList->registerTransform (_Skeleton);
|
||||
// disable pos animation
|
||||
sint id= _AnimationSet->getChannelIdByName("pos");
|
||||
uint id= _AnimationSet->getChannelIdByName("pos");
|
||||
if(id!=UAnimationSet::NotFound)
|
||||
_PlayList->enableChannel(id, false);
|
||||
}
|
||||
|
|
|
@ -239,8 +239,7 @@ void CChatInputFilter::clearMessages()
|
|||
|
||||
|
||||
//=============================================================================================================
|
||||
CChatTargetFilter::CChatTargetFilter() : _TargetPartyChat(NULL),
|
||||
_Chat(NULL)
|
||||
CChatTargetFilter::CChatTargetFilter() : _Chat(NULL), _TargetPartyChat(NULL)
|
||||
{
|
||||
_TargetGroup= CChatGroup::say;
|
||||
_TargetDynamicChannelDbIndex= 0;
|
||||
|
|
|
@ -912,6 +912,8 @@ void CDBCtrlSheet::initSheetSize()
|
|||
_DispSlotBmpId = rVR.getTextureIdFromName ("w_slot_blason.tga");
|
||||
_DispSelSlotId = rVR.getTextureIdFromName ("w_slot_blason_over.tga");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
rVR.getTextureSizeFromId (_DispSlotBmpId, _W, _H);
|
||||
|
@ -1855,7 +1857,7 @@ void CDBCtrlSheet::draw()
|
|||
else
|
||||
{
|
||||
float animProgress = 1.f - float(_NotifyAnimEndTime - T1) / float(NOTIFY_ANIM_MS_DURATION);
|
||||
uint32 texId = rVR.getSystemTextureId(CViewRenderer::GlowStarTexture);
|
||||
sint32 texId = rVR.getSystemTextureId(CViewRenderer::GlowStarTexture);
|
||||
if (texId != -1)
|
||||
{
|
||||
sint32 texWidth, texHeight;
|
||||
|
@ -1865,8 +1867,8 @@ void CDBCtrlSheet::draw()
|
|||
const float freq1 = -1.f;
|
||||
const float phase1 = 0.f;
|
||||
float scale = sqrtf(1.f - animProgress);
|
||||
drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq0 + phase0, scale, _RenderLayer + 3, texId, texWidth, texHeight);
|
||||
drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq1 + phase1, scale, _RenderLayer + 3, texId, texWidth, texHeight);
|
||||
drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq0 + phase0, scale, _RenderLayer + 3, (uint32)texId, texWidth, texHeight);
|
||||
drawRotatedQuad(rVR, float(NLMISC::Pi) * animProgress * freq1 + phase1, scale, _RenderLayer + 3, (uint32)texId, texWidth, texHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2417,6 +2419,8 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
|
|||
rVR.draw11RotFlipBitmap (_RenderLayer, x, y, 0, false, _DispOverBmpId, curSheetColor);
|
||||
displayCharBitmaps(_RenderLayer+2, x, y, curSheetColor);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (showSelectionBorder)
|
||||
|
|
|
@ -808,7 +808,7 @@ public:
|
|||
std::vector<CParamTreeNode*> Sons;
|
||||
|
||||
public:
|
||||
CParamTreeNode(CParamTreeNode *parent) : Brick(NULL), Parent(parent), Valid(true) {}
|
||||
CParamTreeNode(CParamTreeNode *parent) : Brick(NULL), Valid(true), Parent(parent) {}
|
||||
~CParamTreeNode()
|
||||
{
|
||||
Parent= NULL;
|
||||
|
|
|
@ -142,7 +142,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
|
||||
// get item size.
|
||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||
sint32 dispSlotBmpId;
|
||||
sint32 dispSlotBmpId = 0;
|
||||
switch(_CtrlInfo._Type)
|
||||
{
|
||||
case CCtrlSheetInfo::SheetType_Auto:
|
||||
|
@ -157,6 +157,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|||
dispSlotBmpId = rVR.getTextureIdFromName ("w_slot_brick.tga");
|
||||
break;
|
||||
case CCtrlSheetInfo::SheetType_Macro: dispSlotBmpId = rVR.getTextureIdFromName ("w_slot_brick.tga"); break;
|
||||
default: break;
|
||||
}
|
||||
rVR.getTextureSizeFromId (dispSlotBmpId, _WSlot, _HSlot);
|
||||
|
||||
|
|
|
@ -548,6 +548,8 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex
|
|||
case TrainerCarac:
|
||||
return isCaracPhrase(*phraseSheet);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1348,13 +1348,17 @@ bool CGroupContainer::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|||
|
||||
ptr = xmlGetProp (cur, (xmlChar*)"title_opened");
|
||||
if (ptr)
|
||||
{
|
||||
if (_Localize) _TitleTextOpened = CI18N::get(string((const char*)ptr));
|
||||
else _TitleTextOpened = string((const char*)ptr);
|
||||
}
|
||||
|
||||
ptr = xmlGetProp (cur, (xmlChar*)"title_closed");
|
||||
if (ptr)
|
||||
{
|
||||
if (_Localize) _TitleTextClosed = CI18N::get(string((const char*)ptr));
|
||||
else _TitleTextClosed = string((const char*)ptr);
|
||||
}
|
||||
|
||||
ptr = xmlGetProp (cur, (xmlChar*)"header_active");
|
||||
if (ptr)
|
||||
|
|
|
@ -48,44 +48,45 @@ NLMISC_REGISTER_OBJECT(CViewBase, CGroupEditBox, std::string, "edit_box");
|
|||
|
||||
CGroupEditBox::CGroupEditBox(const TCtorParam ¶m) :
|
||||
CInterfaceGroup(param),
|
||||
_BlinkTime(0.f),
|
||||
_CursorPos(0),
|
||||
_BlinkTime(0.f),
|
||||
_BlinkState(false),
|
||||
_ViewText(NULL),
|
||||
_Setupped(false),
|
||||
_EntryType(Text),
|
||||
_MaxNumChar(std::numeric_limits<uint32>::max()),
|
||||
_MaxNumReturn(std::numeric_limits<uint32>::max()),
|
||||
_MaxFloatPrec(20),
|
||||
_MaxCharsSize(32768),
|
||||
_CursorAtPreviousLineEnd(false),
|
||||
_BackupFatherContainerPos(false),
|
||||
_WantReturn(false),
|
||||
_CanRedo(false),
|
||||
_CanUndo(false)
|
||||
_MaxNumChar(std::numeric_limits<uint32>::max()),
|
||||
_MaxNumReturn(std::numeric_limits<uint32>::max()),
|
||||
_MaxFloatPrec(20),
|
||||
_MaxCharsSize(32768),
|
||||
_FirstVisibleChar(0),
|
||||
_LastVisibleChar(0),
|
||||
_ViewText(NULL),
|
||||
_MaxHistoric(0),
|
||||
_CurrentHistoricIndex(-1),
|
||||
_PrevNumLine(1),
|
||||
_EntryType(Text),
|
||||
_Setupped(false),
|
||||
_BypassNextKey(false),
|
||||
_BlinkState(false),
|
||||
_CursorAtPreviousLineEnd(false),
|
||||
_LooseFocusOnEnter(true),
|
||||
_RecoverFocusOnEnter(true),
|
||||
_ResetFocusOnHide(false),
|
||||
_BackupFatherContainerPos(false),
|
||||
_WantReturn(false),
|
||||
_Savable(true),
|
||||
_DefaultInputString(false),
|
||||
_Frozen(false),
|
||||
_CanRedo(false),
|
||||
_CanUndo(false),
|
||||
_CursorTexID(-1),
|
||||
_CursorWidth(0),
|
||||
_IntegerMinValue(INT_MIN),
|
||||
_IntegerMaxValue(INT_MAX),
|
||||
_PositiveIntegerMinValue(0),
|
||||
_PositiveIntegerMaxValue(UINT_MAX),
|
||||
_ViewTextDeltaX(0)
|
||||
|
||||
{
|
||||
_FirstVisibleChar = 0;
|
||||
_LastVisibleChar = 0;
|
||||
_Prompt = ">";
|
||||
_LooseFocusOnEnter= true;
|
||||
_RecoverFocusOnEnter= true;
|
||||
_ResetFocusOnHide = false;
|
||||
_BackSelectColor= CRGBA::White;
|
||||
_TextSelectColor= CRGBA::Black;
|
||||
_MaxHistoric= 0;
|
||||
_CurrentHistoricIndex= -1;
|
||||
_BypassNextKey = false;
|
||||
_PrevNumLine = 1;
|
||||
_Savable = true;
|
||||
_CursorTexID = -1;
|
||||
_CursorWidth = 0;
|
||||
_IntegerMinValue= INT_MIN;
|
||||
_IntegerMaxValue= INT_MAX;
|
||||
_PositiveIntegerMinValue= 0;
|
||||
_PositiveIntegerMaxValue= UINT_MAX;
|
||||
_ViewTextDeltaX= 0;
|
||||
_DefaultInputString= false;
|
||||
_Frozen= false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
@ -205,7 +205,6 @@ public:
|
|||
protected:
|
||||
|
||||
// Cursor infos
|
||||
float _BlinkSpeed;
|
||||
float _BlinkTime;
|
||||
sint32 _CursorPos;
|
||||
uint32 _MaxNumChar;
|
||||
|
|
|
@ -574,10 +574,12 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
|||
{
|
||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpAlly(i)) ||
|
||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) )
|
||||
{
|
||||
if ( civToDisplay == i)
|
||||
break;
|
||||
else
|
||||
civToDisplay = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -586,17 +588,21 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
|||
{
|
||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpEnnemy(i)) ||
|
||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) )
|
||||
{
|
||||
if ( cultToDisplay == i)
|
||||
break;
|
||||
else
|
||||
cultToDisplay = i;
|
||||
}
|
||||
|
||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpAlly(i)) ||
|
||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) )
|
||||
{
|
||||
if ( cultToDisplay == i)
|
||||
break;
|
||||
else
|
||||
cultToDisplay = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -606,34 +612,46 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
|||
if( pvpCivLogoBmp )
|
||||
{
|
||||
if (pPlayer->isPvpAlly(civToDisplay))
|
||||
{
|
||||
if (pPlayer->isPvpRanger())
|
||||
pvpCivLogoBmp->setTexture("pvp_ally_ranger.tga");
|
||||
else
|
||||
pvpCivLogoBmp->setTexture("pvp_ally_"+toString(civToDisplay)+".tga");
|
||||
}
|
||||
else if (pPlayer->isPvpEnnemy(civToDisplay))
|
||||
{
|
||||
if (pPlayer->isPvpMarauder())
|
||||
pvpCivLogoBmp->setTexture("pvp_enemy_marauder.tga");
|
||||
else
|
||||
pvpCivLogoBmp->setTexture("pvp_enemy_"+toString(civToDisplay)+".tga");
|
||||
}
|
||||
else
|
||||
{
|
||||
needCivPvpLogo = false;
|
||||
}
|
||||
}
|
||||
|
||||
CViewBitmap * pvpCultLogoBmp = dynamic_cast<CViewBitmap *>(pvpCultLogo);
|
||||
if( pvpCultLogoBmp )
|
||||
{
|
||||
if (pPlayer->isPvpAlly(cultToDisplay))
|
||||
{
|
||||
if (pPlayer->isPvpPrimas())
|
||||
pvpCultLogoBmp->setTexture("pvp_ally_primas.tga");
|
||||
else
|
||||
pvpCultLogoBmp->setTexture("pvp_ally_"+toString(cultToDisplay)+".tga");
|
||||
}
|
||||
else if (pPlayer->isPvpEnnemy(cultToDisplay))
|
||||
{
|
||||
if (pPlayer->isPvpTrytonist())
|
||||
pvpCultLogoBmp->setTexture("pvp_enemy_trytonist.tga");
|
||||
else
|
||||
pvpCultLogoBmp->setTexture("pvp_enemy_"+toString(cultToDisplay)+".tga");
|
||||
}
|
||||
else
|
||||
{
|
||||
needCultPvpLogo = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -892,10 +910,12 @@ void CGroupInSceneUserInfo::updateDynamicData ()
|
|||
// Set state fx
|
||||
CPlayerCL *pPlayer = dynamic_cast<CPlayerCL*>(_Entity);
|
||||
if (pPlayer != NULL)
|
||||
{
|
||||
if (pPlayer->isAFK())
|
||||
pPlayer->setStateFx("sp_medit.ps");
|
||||
else if (pPlayer->getStateFx() == "sp_medit.ps")
|
||||
pPlayer->removeStateFx();
|
||||
}
|
||||
|
||||
if (_Entity->isDead())
|
||||
_Entity->setStateFx("misc_dead.ps");
|
||||
|
|
|
@ -1563,7 +1563,7 @@ void CGroupMap::draw()
|
|||
CQuad fruQuad;
|
||||
CTriangle fruTri;
|
||||
|
||||
CRGBA fruColor;
|
||||
CRGBA fruColor(0, 0, 0);
|
||||
|
||||
if (_FrustumView)
|
||||
{
|
||||
|
@ -2674,9 +2674,9 @@ void CGroupMap::fitWindow()
|
|||
{
|
||||
//sint32 diffHReal = parentCont->getHReal() - _HReal;
|
||||
float mapHeightOnScreen = floorf(_MapTexH * _Scale);
|
||||
/*parentCont->setPopupMaxH((sint32) mapHeightOnScreen + diffHReal);
|
||||
parentCont->setPopupMinH((sint32) std::min(_MinH, (sint32) mapHeightOnScreen) + diffHReal);*/
|
||||
/*
|
||||
// parentCont->setPopupMaxH((sint32) mapHeightOnScreen + diffHReal);
|
||||
// parentCont->setPopupMinH((sint32) std::min(_MinH, (sint32) mapHeightOnScreen) + diffHReal);
|
||||
|
||||
if ((float)_HReal >= mapHeightOnScreen)
|
||||
{
|
||||
_Offset.y = - _PlayerPos.y;
|
||||
|
@ -3204,7 +3204,7 @@ class CAHValidateUserLandMarkName : public IActionHandler
|
|||
ig->setActive(false);
|
||||
|
||||
|
||||
CUserLandMark::EUserLandMarkType landMarkType;
|
||||
CUserLandMark::EUserLandMarkType landMarkType = CUserLandMark::Misc;
|
||||
sint8 nLandMarkType = im->getDbProp( "UI:TEMP:LANDMARKTYPE" )->getValue8();
|
||||
if (nLandMarkType>=0 && nLandMarkType<=CUserLandMark::UserLandMarkTypeCount)
|
||||
{
|
||||
|
|
|
@ -1805,7 +1805,7 @@ int CGroupSubMenu::luaSetUserGroupRight(CLuaState &ls)
|
|||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
if (!(CLuaIHM::isUIOnStack(ls, 2) || ls.isNil(2)))
|
||||
{
|
||||
CLuaIHM::fails(ls, toString("%s : Group required as argument 2", funcName));
|
||||
CLuaIHM::fails(ls, "%s : Group required as argument 2", funcName);
|
||||
}
|
||||
CInterfaceElement *el = CLuaIHM::getUIOnStack(ls, 2);
|
||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup *>(el);
|
||||
|
|
|
@ -37,17 +37,16 @@ CGroupScrollText::CGroupScrollText(const TCtorParam ¶m) :
|
|||
CInterfaceGroup(param),
|
||||
_List(NULL),
|
||||
_ScrollBar(NULL),
|
||||
_ButtonAdd(NULL),
|
||||
_ButtonSub(NULL),
|
||||
_Settuped(false),
|
||||
_InvertScrollBar(true),
|
||||
_ListHeight(0),
|
||||
_ButtonAdd(NULL),
|
||||
_ButtonSub(NULL),
|
||||
_StartHeight(0),
|
||||
_EllapsedTime(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
CGroupScrollText::~CGroupScrollText()
|
||||
{
|
||||
|
|
|
@ -628,7 +628,7 @@ void CInterfaceConfig::CDesktopImage::toCurrentDesktop()
|
|||
{
|
||||
std::string elemID;
|
||||
f.serial(elemID);
|
||||
uint32 chunkSize;
|
||||
uint32 chunkSize = 0;
|
||||
f.serial(chunkSize);
|
||||
uint startPos = f.getPos();
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
|
|
|
@ -524,6 +524,7 @@ bool CInterfaceExprValue::toBool()
|
|||
case Integer: setBool(_IntegerValue != 0); return true;
|
||||
case Double: setBool(_DoubleValue != 0); return true;
|
||||
case String: return evalBoolean(_StringValue.toString().c_str()) != NULL;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
|
||||
|
@ -541,8 +542,7 @@ bool CInterfaceExprValue::toInteger()
|
|||
if (evalNumber(_StringValue.toString().c_str())) return toInteger();
|
||||
return false;
|
||||
case RGBA: setInteger((sint64) _RGBAValue); return true;
|
||||
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ bool CInterfaceExprValue::toDouble()
|
|||
if (evalNumber(_StringValue.toString().c_str())) return toBool();
|
||||
return false;
|
||||
case RGBA: setDouble((double) _RGBAValue); return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -583,6 +583,7 @@ bool CInterfaceExprValue::toString()
|
|||
setString(NLMISC::toString("%d %d %d %d", r, g, b, a));
|
||||
return true;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -597,7 +598,7 @@ bool CInterfaceExprValue::toRGBA()
|
|||
(uint8)((_IntegerValue>>16)&0xff), (uint8)((_IntegerValue>>24)&0xff))); return true;
|
||||
case String:
|
||||
setRGBA(stringToRGBA(_StringValue.toString().c_str())); return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -788,6 +789,7 @@ void CInterfaceExprValue::clean()
|
|||
{
|
||||
case String: _StringValue.clear(); break;
|
||||
case UserType: delete _UserTypeValue; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctAdd)
|
|||
{
|
||||
case CIEV::Integer: result.setInteger(args[0].getInteger() + args[1].getInteger()); return true;
|
||||
case CIEV::Double: result.setDouble(args[0].getDouble() + args[1].getDouble()); return true;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -115,6 +116,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctSub)
|
|||
{
|
||||
case CIEV::Integer: result.setInteger(args[0].getInteger() - args[1].getInteger()); return true;
|
||||
case CIEV::Double: result.setDouble(args[0].getDouble() - args[1].getDouble()); return true;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -135,6 +137,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctMul)
|
|||
{
|
||||
case CIEV::Integer: result.setInteger(args[0].getInteger() * args[1].getInteger()); return true;
|
||||
case CIEV::Double: result.setDouble(args[0].getDouble() * args[1].getDouble()); return true;
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -6360,7 +6360,7 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr)
|
|||
// Get everything between the two "$"
|
||||
size_t token_start_pos = start_pos + start_token.length();
|
||||
size_t token_end_pos = end_pos - end_token.length();
|
||||
if ((token_start_pos - token_end_pos) < 0)
|
||||
if (token_start_pos < token_end_pos)
|
||||
{
|
||||
// Wrong formatting; give up on this one.
|
||||
start_pos = end_pos;
|
||||
|
|
|
@ -665,7 +665,7 @@ static void grayItem (const std::string &listname, sint32 bagEntryIndex, bool gr
|
|||
{
|
||||
pList->invalidateCoords();
|
||||
|
||||
for(sint32 i = 0; i < MAX_BAGINV_ENTRIES; ++i)
|
||||
for(uint i = 0; i < MAX_BAGINV_ENTRIES; ++i)
|
||||
{
|
||||
CDBCtrlSheet *pCS = pList->getSheet(i);
|
||||
string sTmp = pCS->getSheet();
|
||||
|
@ -681,7 +681,7 @@ static void grayItem (const std::string &listname, sint32 bagEntryIndex, bool gr
|
|||
// ***************************************************************************
|
||||
void CInventoryManager::wearBagItem(sint32 bagEntryIndex)
|
||||
{
|
||||
if(bagEntryIndex>=0 && bagEntryIndex<MAX_BAGINV_ENTRIES)
|
||||
if(bagEntryIndex>=0 && bagEntryIndex<(sint32)MAX_BAGINV_ENTRIES)
|
||||
{
|
||||
BagItemEquipped[bagEntryIndex]= true;
|
||||
grayItem (LIST_BAG_TEXT, bagEntryIndex, true);
|
||||
|
@ -693,7 +693,7 @@ void CInventoryManager::wearBagItem(sint32 bagEntryIndex)
|
|||
// ***************************************************************************
|
||||
void CInventoryManager::unwearBagItem(sint32 bagEntryIndex)
|
||||
{
|
||||
if(bagEntryIndex>=0 && bagEntryIndex<MAX_BAGINV_ENTRIES)
|
||||
if(bagEntryIndex>=0 && bagEntryIndex<(sint32)MAX_BAGINV_ENTRIES)
|
||||
{
|
||||
BagItemEquipped[bagEntryIndex]= false;
|
||||
grayItem (LIST_BAG_TEXT, bagEntryIndex, false);
|
||||
|
@ -705,7 +705,7 @@ void CInventoryManager::unwearBagItem(sint32 bagEntryIndex)
|
|||
// ***************************************************************************
|
||||
bool CInventoryManager::isBagItemWeared(sint32 bagEntryIndex)
|
||||
{
|
||||
if(bagEntryIndex>=0 && bagEntryIndex<MAX_BAGINV_ENTRIES)
|
||||
if(bagEntryIndex>=0 && bagEntryIndex<(sint32)MAX_BAGINV_ENTRIES)
|
||||
{
|
||||
return BagItemEquipped[bagEntryIndex];
|
||||
}
|
||||
|
@ -1808,7 +1808,7 @@ void CTempInvManager::updateForageQQ( uint whichOne )
|
|||
bool disableTake = (pIM->getDbProp("LOCAL:INVENTORY:TEMP:ENABLE_TAKE")->getValue32() == 0);
|
||||
if ( disableTake )
|
||||
{
|
||||
float qt, ql;
|
||||
float qt = 0.f, ql = 0.f;
|
||||
switch ( whichOne )
|
||||
{
|
||||
case 0:
|
||||
|
|
|
@ -129,7 +129,7 @@ PUBLIC int HTLoadNeLFile (SOCKET soc, HTRequest * request)
|
|||
HTTRACE(PROT_TRACE, "HTLoadFile.. Looking for `%s\'\n" _
|
||||
HTAnchor_physical(anchor));
|
||||
if ((file = (file_info *) HT_CALLOC(1, sizeof(file_info))) == NULL)
|
||||
HT_OUTOFMEM("HTLoadFILE");
|
||||
HT_OUTOFMEM((char*)"HTLoadFILE");
|
||||
file->state = FS_BEGIN;
|
||||
file->net = net;
|
||||
HTNet_setContext(net, file);
|
||||
|
@ -143,7 +143,7 @@ PRIVATE int ReturnEvent (HTTimer * timer, void * param, HTEventType /* type */)
|
|||
{
|
||||
file_info * file = (file_info *) param;
|
||||
if (timer != file->timer)
|
||||
HTDEBUGBREAK("File timer %p not in sync\n" _ timer);
|
||||
HTDEBUGBREAK((char*)"File timer %p not in sync\n" _ timer);
|
||||
HTTRACE(PROT_TRACE, "HTLoadFile.. Continuing %p with timer %p\n" _ file _ timer);
|
||||
|
||||
/*
|
||||
|
@ -166,7 +166,7 @@ PUBLIC int HTNeLFileOpen (HTNet * net, char * local, HTLocalMode /* mode */)
|
|||
|
||||
if (!fp->open (local))
|
||||
{
|
||||
HTRequest_addSystemError(request, ERR_FATAL, errno, NO, "CIFile::open");
|
||||
HTRequest_addSystemError(request, ERR_FATAL, errno, NO, (char*)"CIFile::open");
|
||||
return HT_ERROR;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
{
|
||||
/* Interrupted */
|
||||
HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED,
|
||||
NULL, 0, "HTLoadFile");
|
||||
NULL, 0, (char*)"HTLoadFile");
|
||||
FileCleanup(request, HT_INTERRUPTED);
|
||||
return HT_OK;
|
||||
}
|
||||
|
@ -419,6 +419,9 @@ PRIVATE int FileEvent (SOCKET /* soc */, void * pVoid, HTEventType type)
|
|||
FileCleanup(request, HT_ERROR);
|
||||
return HT_OK;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} /* End of while(1) */
|
||||
}
|
||||
|
@ -576,7 +579,7 @@ PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch,
|
|||
HTInputStream * me = HTChannel_input(ch);
|
||||
if (me == NULL) {
|
||||
if ((me=(HTInputStream *) HT_CALLOC(1, sizeof(HTInputStream))) == NULL)
|
||||
HT_OUTOFMEM("HTNeLReader_new");
|
||||
HT_OUTOFMEM((char*)"HTNeLReader_new");
|
||||
me->isa = &HTNeLReader;
|
||||
me->ch = ch;
|
||||
me->host = host;
|
||||
|
|
|
@ -221,7 +221,7 @@ CLuaState::CLuaState()
|
|||
|
||||
|
||||
// ***************************************************************************
|
||||
CLuaStackRestorer::CLuaStackRestorer(CLuaState *state, int finalSize) : _State(state), _FinalSize(finalSize)
|
||||
CLuaStackRestorer::CLuaStackRestorer(CLuaState *state, int finalSize) : _FinalSize(finalSize), _State(state)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -509,7 +509,7 @@ void CLuaState::push(TLuaWrappedFunction function)
|
|||
nlassert(func);
|
||||
nlassert(state);
|
||||
// get real function pointer from the values in the closure
|
||||
int numResults;
|
||||
int numResults = 0;
|
||||
int initialStackSize = state->getTop();
|
||||
try
|
||||
{
|
||||
|
|
|
@ -3028,16 +3028,6 @@ void CLuaIHM::fails(CLuaState &ls, const char *format, ...)
|
|||
throw ELuaIHMException("%s. Lua stack = \n %s", reason.c_str(), stack.c_str());
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CLuaIHM::fails(CLuaState &ls, const std::string &format,...)
|
||||
{
|
||||
//H_AUTO(Lua_CLuaIHM_fails)
|
||||
std::string reason;
|
||||
const char *formatPtr = format.c_str();
|
||||
NLMISC_CONVERT_VARGS (reason, formatPtr, NLMISC::MaxCStringSize);
|
||||
fails(ls, reason.c_str());
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CLuaIHM::checkArgCount(CLuaState &ls, const char* funcName, uint nArgs)
|
||||
{
|
||||
|
@ -3074,7 +3064,7 @@ void CLuaIHM::check(CLuaState &ls, bool ok, const std::string &failReason)
|
|||
//H_AUTO(Lua_CLuaIHM_check)
|
||||
if(!ok)
|
||||
{
|
||||
fails(ls, failReason);
|
||||
fails(ls, failReason.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3085,11 +3075,11 @@ void CLuaIHM::checkArgType(CLuaState &ls, const char *funcName, uint index,
|
|||
nlassert(index > 0);
|
||||
if (ls.getTop() < (int) index)
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type %s was not defined", funcName, index, ls.getTypename(argType)));
|
||||
fails(ls, "%s : argument %d of expected type %s was not defined", funcName, index, ls.getTypename(argType));
|
||||
}
|
||||
if (ls.type(index) != argType)
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type %s has bad type : %s", funcName, index, ls.getTypename(argType), ls.getTypename(ls.type(index)), ls.type(index)));
|
||||
fails(ls, "%s : argument %d of expected type %s has bad type : %s", funcName, index, ls.getTypename(argType), ls.getTypename(ls.type(index)), ls.type(index));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3100,13 +3090,13 @@ void CLuaIHM::checkArgTypeRGBA(CLuaState &ls, const char *funcName, uint index)
|
|||
nlassert(index > 0);
|
||||
if (ls.getTop() < (int) index)
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type RGBA was not defined", funcName, index));
|
||||
fails(ls, "%s : argument %d of expected type RGBA was not defined", funcName, index);
|
||||
}
|
||||
ls.pushValue(index);
|
||||
CRGBA dummy;
|
||||
if (!pop(ls, dummy))
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type RGBA has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index)));
|
||||
fails(ls, "%s : argument %d of expected type RGBA has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3117,11 +3107,11 @@ void CLuaIHM::checkArgTypeUIElement(CLuaState &ls, const char *funcName, uint in
|
|||
nlassert(index > 0);
|
||||
if (ls.getTop() < (int) index)
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type ui element was not defined", funcName, index));
|
||||
fails(ls, "%s : argument %d of expected type ui element was not defined", funcName, index);
|
||||
}
|
||||
if (!isUIOnStack(ls, index))
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type ui element has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index)));
|
||||
fails(ls, "%s : argument %d of expected type ui element has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3132,13 +3122,13 @@ void CLuaIHM::checkArgTypeUCString(CLuaState &ls, const char *funcName, uint ind
|
|||
nlassert(index > 0);
|
||||
if (ls.getTop() < (int) index)
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type ucstring was not defined", funcName, index));
|
||||
fails(ls, "%s : argument %d of expected type ucstring was not defined", funcName, index);
|
||||
}
|
||||
ls.pushValue(index);
|
||||
ucstring dummy;
|
||||
if (!pop(ls, dummy))
|
||||
{
|
||||
fails(ls, toString("%s : argument %d of expected type ucstring has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index)));
|
||||
fails(ls, "%s : argument %d of expected type ucstring has bad type : %s", funcName, index, ls.getTypename(ls.type(index)), ls.type(index));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,6 @@ public:
|
|||
* The various check... function call this function when their test fails
|
||||
*/
|
||||
static void fails(CLuaState &ls, const char *format, ...);
|
||||
static void fails(CLuaState &ls, const std::string &format, ...);
|
||||
|
||||
/** execute function that is currently on the stack, possibly outputing error messages to the log
|
||||
* \return true if execution succeeded
|
||||
|
|
|
@ -1784,7 +1784,7 @@ void CPeopleInterraction::refreshActiveUserChats()
|
|||
//=================================================================================================================
|
||||
void CPeopleInterraction::talkInDynamicChannel(uint32 channelNb,ucstring sentence)
|
||||
{
|
||||
if(channelNb>=0&& channelNb<CChatGroup::MaxDynChanPerPlayer)
|
||||
if(channelNb<CChatGroup::MaxDynChanPerPlayer)
|
||||
{
|
||||
DynamicChatEntryHandler[channelNb].msgEntered(sentence,DynamicChat[channelNb]);
|
||||
}
|
||||
|
@ -2485,7 +2485,9 @@ public:
|
|||
|
||||
// Remove existing dynamic chats
|
||||
while (pMenu->getNumLine() > 5)
|
||||
{
|
||||
pMenu->deleteLine(pMenu->getNumLine()-1);
|
||||
}
|
||||
|
||||
// Add dynamic chats
|
||||
uint insertion_index = 0;
|
||||
|
|
|
@ -46,8 +46,8 @@ extern CClientChatManager ChatMngr;
|
|||
|
||||
//==================================================================
|
||||
CPeopleList::CPeopleList() : _ChatWindow(NULL),
|
||||
_CurrPeopleID(0),
|
||||
_ContactType(CPeopleListDesc::Unknown),
|
||||
_CurrPeopleID(0),
|
||||
_Savable(false)
|
||||
|
||||
{
|
||||
|
|
|
@ -974,13 +974,13 @@ void CSkillManager::tryToUnblockTitleFromItems()
|
|||
// check items present in bag
|
||||
for (uint itemSlot = 0; itemSlot < numItems; ++itemSlot)
|
||||
{
|
||||
sint32 sheetItem = 0;
|
||||
uint32 sheetItem = 0;
|
||||
sint32 qualityItem = 0;
|
||||
|
||||
// get sheetid
|
||||
CCDBNodeLeaf *node = pIM->getDbProp(branch + ":" + toString(itemSlot) + ":SHEET", false);
|
||||
if (node)
|
||||
sheetItem = node->getValue32();
|
||||
sheetItem = (uint32)node->getValue32();
|
||||
|
||||
// slot empty
|
||||
if (!sheetItem)
|
||||
|
|
|
@ -102,7 +102,7 @@ void CViewPolygon::draw()
|
|||
for(uint k = 0; k < numTris; ++k)
|
||||
{
|
||||
winTris[k].getMinCorner(minCorner);
|
||||
winTris[k].getMaxCorner(minCorner);
|
||||
winTris[k].getMaxCorner(maxCorner);
|
||||
if (totallyOutside(minCorner, maxCorner, cx, cy, cw, ch)) continue;
|
||||
if (totallyInside(minCorner, maxCorner, cx, cy, cw, ch))
|
||||
{
|
||||
|
|
|
@ -529,7 +529,7 @@ void CViewText::draw ()
|
|||
|
||||
// skip spaces before current word
|
||||
float firstSpace = currWord.NumSpaces * currLine.getSpaceWidth();
|
||||
sint line_width;
|
||||
sint line_width = 0;
|
||||
if (_Underlined)
|
||||
{
|
||||
line_width = (sint)floorf(currLine.getWidthWithoutSpaces() + currLine.getSpaceWidth());
|
||||
|
@ -1452,7 +1452,7 @@ sint CViewText::getLineFromIndex(uint index, bool cursorDisplayedAtEndOfPrevious
|
|||
{
|
||||
CLine &currLine = *_Lines[i];
|
||||
uint newCharIndex = charIndex + currLine.getNumChars() + currLine.getEndSpaces() + (currLine.getLF() ? 1 : 0);
|
||||
if ((sint) newCharIndex > index)
|
||||
if (newCharIndex > index)
|
||||
{
|
||||
if (i != 0 && cursorDisplayedAtEndOfPreviousLine && charIndex == index)
|
||||
{
|
||||
|
@ -1611,7 +1611,7 @@ void CViewText::getCharacterPositionFromIndex(sint index, bool cursorAtPreviousL
|
|||
{
|
||||
// character is in currWord or the in spaces preceding it
|
||||
// check if the character is in the word
|
||||
if ((sint) (index - charIndex) > currWord.NumSpaces)
|
||||
if ((uint) (index - charIndex) > currWord.NumSpaces)
|
||||
{
|
||||
// get the x position
|
||||
ucstring subStr = currWord.Text.substr(0, index - charIndex - currWord.NumSpaces);
|
||||
|
@ -2255,6 +2255,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
|
|||
uint textSize= (uint)text.size();
|
||||
// Must herit all the props from old tags.
|
||||
CViewText::CFormatTag precTag; // set default.
|
||||
precTag.Index = 0;
|
||||
for (uint i = 0; i < textSize;)
|
||||
{
|
||||
if(isColorTag(text, i, textSize))
|
||||
|
|
|
@ -211,13 +211,11 @@ void CDisplayerVisual::onAttrModified(const std::string &attrName, sint32 /* at
|
|||
TDisplayMode newDisplayMode = (TDisplayMode) value;
|
||||
if (newDisplayMode != _DisplayMode)
|
||||
{
|
||||
/*
|
||||
if (newDisplayMode == DisplayModeFrozen && getEditor().getSelectedInstance() == getDisplayedInstance())
|
||||
{
|
||||
getEditor().setSelectedInstance(NULL);
|
||||
}
|
||||
*/
|
||||
/* _DisplayMode = newDisplayMode;
|
||||
//if (newDisplayMode == DisplayModeFrozen && getEditor().getSelectedInstance() == getDisplayedInstance())
|
||||
//{
|
||||
// getEditor().setSelectedInstance(NULL);
|
||||
//}
|
||||
//_DisplayMode = newDisplayMode;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -182,7 +182,7 @@ void CDisplayerVisualActivitySequence::update()
|
|||
nextDV->getSonsWorldPos2f(r1);
|
||||
if (!r0.empty() && !r1.empty())
|
||||
{
|
||||
CVector2f p0, p1;
|
||||
CVector2f p0(0.f, 0.f), p1(0.f, 0.f);
|
||||
float bestDist = FLT_MAX;
|
||||
for(uint k = 0; k < r0.size(); ++k)
|
||||
{
|
||||
|
@ -416,6 +416,8 @@ void CDisplayerVisualActivitySequence::onPostRender()
|
|||
_DecalColor = CV_FootStepDecalFocusedColor.get();
|
||||
mapColor = CV_FootStepMapFocusedColor.get();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
for(uint k = 0; k < _WPCache.size(); ++k)
|
||||
{
|
||||
|
|
|
@ -689,10 +689,10 @@ void CDisplayerVisualGroup::onPreRender()
|
|||
baseColor = CV_UnselectedRegionColor.get();
|
||||
break;
|
||||
case DisplayModeFrozen:
|
||||
baseColor = baseColor = CV_FrozenRegionColor.get();
|
||||
baseColor = CV_FrozenRegionColor.get();
|
||||
break;
|
||||
case DisplayModeLocked:
|
||||
baseColor = baseColor = CV_LockedRegionColor.get();
|
||||
baseColor = CV_LockedRegionColor.get();
|
||||
break;
|
||||
default:
|
||||
baseColor = CV_UnselectedRegionColor.get();
|
||||
|
|
|
@ -366,7 +366,7 @@ void CActionHistoric::requestMoveNode(const std::string& instanceId, const std::
|
|||
|
||||
|
||||
//====================================================================================
|
||||
CActionHistoric::CAction::CAction(const ucstring &name) : _Name(name), _Completed(false), _FlushedCount(0), _Flushing(false)
|
||||
CActionHistoric::CAction::CAction(const ucstring &name) : _Name(name), _FlushedCount(0), _Completed(false), _Flushing(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1506,7 +1506,10 @@ bool CClientEditionModule::loadUserComponent(const std::string& filename, bool m
|
|||
return false;
|
||||
}
|
||||
|
||||
fread((void*)&uncompressedFileLength, sizeof(uncompressedFileLength), 1, file);
|
||||
if (fread((void*)&uncompressedFileLength, sizeof(uncompressedFileLength), 1, file) != 1)
|
||||
{
|
||||
nlwarning("Error while reading %s", filename.c_str());
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
|
||||
|
|
|
@ -2485,7 +2485,7 @@ sint CComLuaModule::luaGetCharIdMd5(lua_State* state)
|
|||
uint32 v = value % 16;
|
||||
value /= 16;
|
||||
char & c = ret[7-i];
|
||||
if (0 <= v && v <= 9)
|
||||
if (v <= 9)
|
||||
{
|
||||
c = '0' + static_cast<char>(v);
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ void CEntitySorter::updateVisibleList()
|
|||
void CEntitySorter::clipEntitiesByDist()
|
||||
{
|
||||
CHECK_INTEGRITY
|
||||
sint64 startTime;
|
||||
sint64 startTime = 0;
|
||||
static volatile bool bench = false;
|
||||
if (bench)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ private:
|
|||
float BlendValue; // current transparency (0.f hidden -> 1.f visible)
|
||||
CDisplayerVisualEntity *Displayer;
|
||||
public:
|
||||
CVisibleEntity(CDisplayerVisualEntity *displayer = NULL) : Displayer(displayer), State(Appear), BlendValue(0.f) {}
|
||||
CVisibleEntity(CDisplayerVisualEntity *displayer = NULL) : State(Appear), BlendValue(0.f), Displayer(displayer) {}
|
||||
};
|
||||
//
|
||||
std::vector<CSortedEntity> _SortTable; // *Table temporarily used for the sort (avoid reallocation of a new vector each time)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define R2_PALETTE_NODE_H
|
||||
|
||||
|
||||
/*
|
||||
#if 0
|
||||
//#include "interface_user_data.h"
|
||||
#include "group_tree.h"
|
||||
#include "lua_object.h"
|
||||
|
@ -32,7 +32,7 @@ namespace R2
|
|||
/**
|
||||
* A palette node, to be attached to a CInterfaceElement. Makes a reference to a lua table describing the instance to be copied
|
||||
*/
|
||||
/*
|
||||
|
||||
class CPaletteNode : public NLMISC::CRefCount
|
||||
{
|
||||
public:
|
||||
|
@ -52,6 +52,6 @@ private:
|
|||
|
||||
|
||||
} // R2
|
||||
*/
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
for (i=(uint)strlen(msg); i<79; i++)
|
||||
msg[i]=' ';
|
||||
msg[i]=0;
|
||||
printf (msg);
|
||||
printf ("%s", msg);
|
||||
printf ("\r");
|
||||
|
||||
time = currentTime;
|
||||
|
|
Loading…
Reference in a new issue