Merged default
--HG-- branch : dfighter-tools
This commit is contained in:
commit
d232939294
12 changed files with 526 additions and 515 deletions
|
@ -364,6 +364,10 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
|
|||
#include <malloc.h>
|
||||
inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); }
|
||||
inline void aligned_free(void *ptr) { _aligned_free(ptr); }
|
||||
#elif defined(NL_OS_MAC)
|
||||
// under Mac OS X, malloc is already aligned for SSE and Altivec (16 bytes alignment)
|
||||
inline void *aligned_malloc(size_t size, size_t alignment) { return malloc(size); }
|
||||
inline void aligned_free(void *ptr) { free(ptr); }
|
||||
#else
|
||||
#include <malloc.h>
|
||||
inline void *aligned_malloc(size_t size, size_t alignment) { return memalign(alignment, size); }
|
||||
|
|
|
@ -450,14 +450,14 @@ PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV;
|
|||
PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV;
|
||||
|
||||
// ARB_occlusion_query
|
||||
PFNGLGENQUERIESPROC nglGenQueriesARB;
|
||||
PFNGLDELETEQUERIESPROC nglDeleteQueriesARB;
|
||||
PFNGLISQUERYPROC nglIsQueryARB;
|
||||
PFNGLBEGINQUERYPROC nglBeginQueryARB;
|
||||
PFNGLENDQUERYPROC nglEndQueryARB;
|
||||
PFNGLGETQUERYIVPROC nglGetQueryivARB;
|
||||
PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB;
|
||||
PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB;
|
||||
PFNGLGENQUERIESARBPROC nglGenQueriesARB;
|
||||
PFNGLDELETEQUERIESARBPROC nglDeleteQueriesARB;
|
||||
PFNGLISQUERYARBPROC nglIsQueryARB;
|
||||
PFNGLBEGINQUERYARBPROC nglBeginQueryARB;
|
||||
PFNGLENDQUERYARBPROC nglEndQueryARB;
|
||||
PFNGLGETQUERYIVARBPROC nglGetQueryivARB;
|
||||
PFNGLGETQUERYOBJECTIVARBPROC nglGetQueryObjectivARB;
|
||||
PFNGLGETQUERYOBJECTUIVARBPROC nglGetQueryObjectuivARB;
|
||||
|
||||
// GL_EXT_framebuffer_object
|
||||
PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT;
|
||||
|
@ -1397,14 +1397,14 @@ static bool setupARBOcclusionQuery(const char *glext)
|
|||
CHECK_EXT("ARB_occlusion_query");
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
CHECK_ADDRESS(PFNGLGENQUERIESPROC, glGenQueriesARB);
|
||||
CHECK_ADDRESS(PFNGLDELETEQUERIESPROC, glDeleteQueriesARB);
|
||||
CHECK_ADDRESS(PFNGLISQUERYPROC, glIsQueryARB);
|
||||
CHECK_ADDRESS(PFNGLBEGINQUERYPROC, glBeginQueryARB);
|
||||
CHECK_ADDRESS(PFNGLENDQUERYPROC, glEndQueryARB);
|
||||
CHECK_ADDRESS(PFNGLGETQUERYIVPROC, glGetQueryivARB);
|
||||
CHECK_ADDRESS(PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectivARB);
|
||||
CHECK_ADDRESS(PFNGLGETQUERYOBJECTUIVPROC, glGetQueryObjectuivARB);
|
||||
CHECK_ADDRESS(PFNGLGENQUERIESARBPROC, glGenQueriesARB);
|
||||
CHECK_ADDRESS(PFNGLDELETEQUERIESARBPROC, glDeleteQueriesARB);
|
||||
CHECK_ADDRESS(PFNGLISQUERYARBPROC, glIsQueryARB);
|
||||
CHECK_ADDRESS(PFNGLBEGINQUERYARBPROC, glBeginQueryARB);
|
||||
CHECK_ADDRESS(PFNGLENDQUERYARBPROC, glEndQueryARB);
|
||||
CHECK_ADDRESS(PFNGLGETQUERYIVARBPROC, glGetQueryivARB);
|
||||
CHECK_ADDRESS(PFNGLGETQUERYOBJECTIVARBPROC, glGetQueryObjectivARB);
|
||||
CHECK_ADDRESS(PFNGLGETQUERYOBJECTUIVARBPROC, glGetQueryObjectuivARB);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
|
@ -744,14 +744,14 @@ extern PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV;
|
|||
|
||||
// ARB_occlusion_query
|
||||
//==================================
|
||||
extern PFNGLGENQUERIESPROC nglGenQueriesARB;
|
||||
extern PFNGLDELETEQUERIESPROC nglDeleteQueriesARB;
|
||||
extern PFNGLISQUERYPROC nglIsQueryARB;
|
||||
extern PFNGLBEGINQUERYPROC nglBeginQueryARB;
|
||||
extern PFNGLENDQUERYPROC nglEndQueryARB;
|
||||
extern PFNGLGETQUERYIVPROC nglGetQueryivARB;
|
||||
extern PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB;
|
||||
extern PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB;
|
||||
extern PFNGLGENQUERIESARBPROC nglGenQueriesARB;
|
||||
extern PFNGLDELETEQUERIESARBPROC nglDeleteQueriesARB;
|
||||
extern PFNGLISQUERYARBPROC nglIsQueryARB;
|
||||
extern PFNGLBEGINQUERYARBPROC nglBeginQueryARB;
|
||||
extern PFNGLENDQUERYARBPROC nglEndQueryARB;
|
||||
extern PFNGLGETQUERYIVARBPROC nglGetQueryivARB;
|
||||
extern PFNGLGETQUERYOBJECTIVARBPROC nglGetQueryObjectivARB;
|
||||
extern PFNGLGETQUERYOBJECTUIVARBPROC nglGetQueryObjectuivARB;
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ NLMISC_REGISTER_OBJECT(CViewBase, CInterfaceGroupWheel, std::string, "group_whee
|
|||
namespace NLGUI
|
||||
{
|
||||
|
||||
void force_link_group_wheel_cpp() { }
|
||||
|
||||
// *****************************************************************************************************************
|
||||
CInterfaceGroupWheel::CInterfaceGroupWheel(const TCtorParam ¶m) : CInterfaceGroup(param)
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace NLGUI
|
|||
void ifexprufct_forcelink();
|
||||
void force_link_dbgroup_select_number_cpp();
|
||||
void force_link_dbgroup_combo_box_cpp();
|
||||
void force_link_group_wheel_cpp();
|
||||
|
||||
/// Necessary so the linker doesn't drop the code of these classes from the library
|
||||
void LinkHack()
|
||||
|
@ -37,5 +38,6 @@ namespace NLGUI
|
|||
ifexprufct_forcelink();
|
||||
force_link_dbgroup_select_number_cpp();
|
||||
force_link_dbgroup_combo_box_cpp();
|
||||
force_link_group_wheel_cpp();
|
||||
}
|
||||
}
|
|
@ -68,12 +68,12 @@ IF(APPLE)
|
|||
SET_TARGET_PROPERTIES(ryzom_client PROPERTIES OUTPUT_NAME ${MACOSX_BUNDLE_BUNDLE_NAME})
|
||||
SET_TARGET_PROPERTIES(ryzom_client PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${MAC_RESOURCES_DIR}/Info.plist)
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client PRE_BUILD COMMAND mkdir -p ${RYZOM_RESOURCES_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS ${MAC_RESOURCES_DIR}/PkgInfo ${RYZOM_CONTENTS_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS ${MAC_RESOURCES_DIR}/ryzom.icns ${RYZOM_RESOURCES_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS ${CMAKE_SOURCE_DIR}/ryzom/client/client_default.cfg ${RYZOM_RESOURCES_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/PkgInfo ${RYZOM_CONTENTS_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/ryzom.icns ${RYZOM_RESOURCES_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${CMAKE_SOURCE_DIR}/ryzom/client/client_default.cfg ${RYZOM_RESOURCES_DIR})
|
||||
|
||||
IF(RYZOM_DATA_DIR)
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp -R ARGS ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR})
|
||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR})
|
||||
ENDIF(RYZOM_DATA_DIR)
|
||||
ENDIF(APPLE)
|
||||
|
||||
|
|
|
@ -2747,8 +2747,8 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
|||
impulse.serial( slotIndex, CInventoryCategoryTemplate::SlotBitSize );
|
||||
|
||||
// Access the database leaf
|
||||
CCDBNodeBranch *slotNode = static_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)slotIndex ));
|
||||
ICDBNode *leafNode = slotNode->find( INVENTORIES::InfoVersionStr );
|
||||
CCDBNodeBranch *slotNode = safe_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)slotIndex ));
|
||||
CCDBNodeLeaf *leafNode = type_cast<CCDBNodeLeaf*>(slotNode->find( INVENTORIES::InfoVersionStr ));
|
||||
BOMB_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||
|
||||
// Apply or increment Info Version in database
|
||||
|
@ -2756,13 +2756,13 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
|||
{
|
||||
uint32 infoVersion;
|
||||
impulse.serial( infoVersion, INVENTORIES::InfoVersionBitSize );
|
||||
((CCDBNodeLeaf*)leafNode)->setPropCheckGC( serverTick, infoVersion );
|
||||
leafNode->setPropCheckGC( serverTick, infoVersion );
|
||||
}
|
||||
else
|
||||
{
|
||||
// NB: don't need to check GC on a info version upgrade, since this is always a delta of +1
|
||||
// the order of received of this impulse is not important
|
||||
((CCDBNodeLeaf*)leafNode)->setValue64( ((CCDBNodeLeaf*)leafNode)->getValue64() + 1 );
|
||||
leafNode->setValue64( leafNode->getValue64() + 1 );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2777,10 +2777,10 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
|||
//nldebug( "Inv %s Update %u", CInventoryCategoryTemplate::InventoryStr[invId], itemSlot.getSlotIndex() );
|
||||
|
||||
// Apply all properties to database
|
||||
CCDBNodeBranch *slotNode = static_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)itemSlot.getSlotIndex() ));
|
||||
CCDBNodeBranch *slotNode = safe_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)itemSlot.getSlotIndex() ));
|
||||
for ( uint i=0; i!=INVENTORIES::NbItemPropId; ++i )
|
||||
{
|
||||
CCDBNodeLeaf *leafNode = static_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[i]) ));
|
||||
CCDBNodeLeaf *leafNode = type_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[i]) ));
|
||||
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||
leafNode->setPropCheckGC( serverTick, (sint64)itemSlot.getItemProp( ( INVENTORIES::TItemPropId)i ) );
|
||||
}
|
||||
|
@ -2796,8 +2796,8 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
|||
//nldebug( "Inv %s Prop %u %s", CInventoryCategoryTemplate::InventoryStr[invId], itemSlot.getSlotIndex(), INVENTORIES::CItemSlot::ItemPropStr[itemSlot.getOneProp().ItemPropId] );
|
||||
|
||||
// Apply property to database
|
||||
CCDBNodeBranch *slotNode = static_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)itemSlot.getSlotIndex() ));
|
||||
CCDBNodeLeaf *leafNode = safe_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[itemSlot.getOneProp().ItemPropId]) ));
|
||||
CCDBNodeBranch *slotNode = safe_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)itemSlot.getSlotIndex() ));
|
||||
CCDBNodeLeaf *leafNode = type_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[itemSlot.getOneProp().ItemPropId]) ));
|
||||
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||
leafNode->setPropCheckGC( serverTick, (sint64)itemSlot.getOneProp().ItemPropValue );
|
||||
|
||||
|
@ -2809,13 +2809,14 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
|||
//nldebug( "Inv %s Reset %u", CInventoryCategoryTemplate::InventoryStr[invId], slotIndex );
|
||||
|
||||
// Reset all properties in database
|
||||
CCDBNodeBranch *slotNode = static_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)slotIndex ));
|
||||
CCDBNodeBranch *slotNode = safe_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)slotIndex ));
|
||||
for ( uint i=0; i!=INVENTORIES::NbItemPropId; ++i )
|
||||
{
|
||||
// Instead of clearing all leaves (by index), we must find and clear only the
|
||||
// properties in TItemPropId, because the actual database leaves may have
|
||||
// less properties, and because we must not clear the leaf INFO_VERSION.
|
||||
CCDBNodeLeaf *leafNode = safe_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[i]) ));
|
||||
// NOTE: For example, only player BAG inventory has WORNED leaf.
|
||||
CCDBNodeLeaf *leafNode = type_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[i]) ));
|
||||
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||
leafNode->setPropCheckGC( serverTick, 0 );
|
||||
}
|
||||
|
|
|
@ -103,3 +103,5 @@ namespace GeorgesQt
|
|||
} /* namespace GeorgesQt */
|
||||
|
||||
#endif // GEORGESFORM_MODEL_H
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue