mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 02:20:54 +00:00
Merged default
This commit is contained in:
parent
2c021b0018
commit
59a4f6e677
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>
|
#include <malloc.h>
|
||||||
inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); }
|
inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); }
|
||||||
inline void aligned_free(void *ptr) { _aligned_free(ptr); }
|
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
|
#else
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
inline void *aligned_malloc(size_t size, size_t alignment) { return memalign(alignment, size); }
|
inline void *aligned_malloc(size_t size, size_t alignment) { return memalign(alignment, size); }
|
||||||
|
|
|
@ -450,14 +450,14 @@ PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV;
|
||||||
PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV;
|
PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV;
|
||||||
|
|
||||||
// ARB_occlusion_query
|
// ARB_occlusion_query
|
||||||
PFNGLGENQUERIESPROC nglGenQueriesARB;
|
PFNGLGENQUERIESARBPROC nglGenQueriesARB;
|
||||||
PFNGLDELETEQUERIESPROC nglDeleteQueriesARB;
|
PFNGLDELETEQUERIESARBPROC nglDeleteQueriesARB;
|
||||||
PFNGLISQUERYPROC nglIsQueryARB;
|
PFNGLISQUERYARBPROC nglIsQueryARB;
|
||||||
PFNGLBEGINQUERYPROC nglBeginQueryARB;
|
PFNGLBEGINQUERYARBPROC nglBeginQueryARB;
|
||||||
PFNGLENDQUERYPROC nglEndQueryARB;
|
PFNGLENDQUERYARBPROC nglEndQueryARB;
|
||||||
PFNGLGETQUERYIVPROC nglGetQueryivARB;
|
PFNGLGETQUERYIVARBPROC nglGetQueryivARB;
|
||||||
PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB;
|
PFNGLGETQUERYOBJECTIVARBPROC nglGetQueryObjectivARB;
|
||||||
PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB;
|
PFNGLGETQUERYOBJECTUIVARBPROC nglGetQueryObjectuivARB;
|
||||||
|
|
||||||
// GL_EXT_framebuffer_object
|
// GL_EXT_framebuffer_object
|
||||||
PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT;
|
PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT;
|
||||||
|
@ -1397,14 +1397,14 @@ static bool setupARBOcclusionQuery(const char *glext)
|
||||||
CHECK_EXT("ARB_occlusion_query");
|
CHECK_EXT("ARB_occlusion_query");
|
||||||
|
|
||||||
#ifndef USE_OPENGLES
|
#ifndef USE_OPENGLES
|
||||||
CHECK_ADDRESS(PFNGLGENQUERIESPROC, glGenQueriesARB);
|
CHECK_ADDRESS(PFNGLGENQUERIESARBPROC, glGenQueriesARB);
|
||||||
CHECK_ADDRESS(PFNGLDELETEQUERIESPROC, glDeleteQueriesARB);
|
CHECK_ADDRESS(PFNGLDELETEQUERIESARBPROC, glDeleteQueriesARB);
|
||||||
CHECK_ADDRESS(PFNGLISQUERYPROC, glIsQueryARB);
|
CHECK_ADDRESS(PFNGLISQUERYARBPROC, glIsQueryARB);
|
||||||
CHECK_ADDRESS(PFNGLBEGINQUERYPROC, glBeginQueryARB);
|
CHECK_ADDRESS(PFNGLBEGINQUERYARBPROC, glBeginQueryARB);
|
||||||
CHECK_ADDRESS(PFNGLENDQUERYPROC, glEndQueryARB);
|
CHECK_ADDRESS(PFNGLENDQUERYARBPROC, glEndQueryARB);
|
||||||
CHECK_ADDRESS(PFNGLGETQUERYIVPROC, glGetQueryivARB);
|
CHECK_ADDRESS(PFNGLGETQUERYIVARBPROC, glGetQueryivARB);
|
||||||
CHECK_ADDRESS(PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectivARB);
|
CHECK_ADDRESS(PFNGLGETQUERYOBJECTIVARBPROC, glGetQueryObjectivARB);
|
||||||
CHECK_ADDRESS(PFNGLGETQUERYOBJECTUIVPROC, glGetQueryObjectuivARB);
|
CHECK_ADDRESS(PFNGLGETQUERYOBJECTUIVARBPROC, glGetQueryObjectuivARB);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -744,14 +744,14 @@ extern PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV;
|
||||||
|
|
||||||
// ARB_occlusion_query
|
// ARB_occlusion_query
|
||||||
//==================================
|
//==================================
|
||||||
extern PFNGLGENQUERIESPROC nglGenQueriesARB;
|
extern PFNGLGENQUERIESARBPROC nglGenQueriesARB;
|
||||||
extern PFNGLDELETEQUERIESPROC nglDeleteQueriesARB;
|
extern PFNGLDELETEQUERIESARBPROC nglDeleteQueriesARB;
|
||||||
extern PFNGLISQUERYPROC nglIsQueryARB;
|
extern PFNGLISQUERYARBPROC nglIsQueryARB;
|
||||||
extern PFNGLBEGINQUERYPROC nglBeginQueryARB;
|
extern PFNGLBEGINQUERYARBPROC nglBeginQueryARB;
|
||||||
extern PFNGLENDQUERYPROC nglEndQueryARB;
|
extern PFNGLENDQUERYARBPROC nglEndQueryARB;
|
||||||
extern PFNGLGETQUERYIVPROC nglGetQueryivARB;
|
extern PFNGLGETQUERYIVARBPROC nglGetQueryivARB;
|
||||||
extern PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB;
|
extern PFNGLGETQUERYOBJECTIVARBPROC nglGetQueryObjectivARB;
|
||||||
extern PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB;
|
extern PFNGLGETQUERYOBJECTUIVARBPROC nglGetQueryObjectuivARB;
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ NLMISC_REGISTER_OBJECT(CViewBase, CInterfaceGroupWheel, std::string, "group_whee
|
||||||
namespace NLGUI
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
|
|
||||||
|
void force_link_group_wheel_cpp() { }
|
||||||
|
|
||||||
// *****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
CInterfaceGroupWheel::CInterfaceGroupWheel(const TCtorParam ¶m) : CInterfaceGroup(param)
|
CInterfaceGroupWheel::CInterfaceGroupWheel(const TCtorParam ¶m) : CInterfaceGroup(param)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,6 +26,7 @@ namespace NLGUI
|
||||||
void ifexprufct_forcelink();
|
void ifexprufct_forcelink();
|
||||||
void force_link_dbgroup_select_number_cpp();
|
void force_link_dbgroup_select_number_cpp();
|
||||||
void force_link_dbgroup_combo_box_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
|
/// Necessary so the linker doesn't drop the code of these classes from the library
|
||||||
void LinkHack()
|
void LinkHack()
|
||||||
|
@ -37,5 +38,6 @@ namespace NLGUI
|
||||||
ifexprufct_forcelink();
|
ifexprufct_forcelink();
|
||||||
force_link_dbgroup_select_number_cpp();
|
force_link_dbgroup_select_number_cpp();
|
||||||
force_link_dbgroup_combo_box_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 OUTPUT_NAME ${MACOSX_BUNDLE_BUNDLE_NAME})
|
||||||
SET_TARGET_PROPERTIES(ryzom_client PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${MAC_RESOURCES_DIR}/Info.plist)
|
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 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 -p ${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 -p ${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 ${CMAKE_SOURCE_DIR}/ryzom/client/client_default.cfg ${RYZOM_RESOURCES_DIR})
|
||||||
|
|
||||||
IF(RYZOM_DATA_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(RYZOM_DATA_DIR)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
|
|
@ -2747,8 +2747,8 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
||||||
impulse.serial( slotIndex, CInventoryCategoryTemplate::SlotBitSize );
|
impulse.serial( slotIndex, CInventoryCategoryTemplate::SlotBitSize );
|
||||||
|
|
||||||
// Access the database leaf
|
// Access the database leaf
|
||||||
CCDBNodeBranch *slotNode = static_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)slotIndex ));
|
CCDBNodeBranch *slotNode = safe_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)slotIndex ));
|
||||||
ICDBNode *leafNode = slotNode->find( INVENTORIES::InfoVersionStr );
|
CCDBNodeLeaf *leafNode = type_cast<CCDBNodeLeaf*>(slotNode->find( INVENTORIES::InfoVersionStr ));
|
||||||
BOMB_IF( !leafNode, "Inventory slot property missing in database", continue );
|
BOMB_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||||
|
|
||||||
// Apply or increment Info Version in database
|
// Apply or increment Info Version in database
|
||||||
|
@ -2756,13 +2756,13 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory
|
||||||
{
|
{
|
||||||
uint32 infoVersion;
|
uint32 infoVersion;
|
||||||
impulse.serial( infoVersion, INVENTORIES::InfoVersionBitSize );
|
impulse.serial( infoVersion, INVENTORIES::InfoVersionBitSize );
|
||||||
((CCDBNodeLeaf*)leafNode)->setPropCheckGC( serverTick, infoVersion );
|
leafNode->setPropCheckGC( serverTick, infoVersion );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// NB: don't need to check GC on a info version upgrade, since this is always a delta of +1
|
// 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
|
// 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() );
|
//nldebug( "Inv %s Update %u", CInventoryCategoryTemplate::InventoryStr[invId], itemSlot.getSlotIndex() );
|
||||||
|
|
||||||
// Apply all properties to database
|
// 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 )
|
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 );
|
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||||
leafNode->setPropCheckGC( serverTick, (sint64)itemSlot.getItemProp( ( INVENTORIES::TItemPropId)i ) );
|
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] );
|
//nldebug( "Inv %s Prop %u %s", CInventoryCategoryTemplate::InventoryStr[invId], itemSlot.getSlotIndex(), INVENTORIES::CItemSlot::ItemPropStr[itemSlot.getOneProp().ItemPropId] );
|
||||||
|
|
||||||
// Apply property to database
|
// Apply property to database
|
||||||
CCDBNodeBranch *slotNode = static_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)itemSlot.getSlotIndex() ));
|
CCDBNodeBranch *slotNode = safe_cast<CCDBNodeBranch*>(inventoryNode->getNode( (uint16)itemSlot.getSlotIndex() ));
|
||||||
CCDBNodeLeaf *leafNode = safe_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[itemSlot.getOneProp().ItemPropId]) ));
|
CCDBNodeLeaf *leafNode = type_cast<CCDBNodeLeaf*>(slotNode->find( string(INVENTORIES::CItemSlot::ItemPropStr[itemSlot.getOneProp().ItemPropId]) ));
|
||||||
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||||
leafNode->setPropCheckGC( serverTick, (sint64)itemSlot.getOneProp().ItemPropValue );
|
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 );
|
//nldebug( "Inv %s Reset %u", CInventoryCategoryTemplate::InventoryStr[invId], slotIndex );
|
||||||
|
|
||||||
// Reset all properties in database
|
// 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 )
|
for ( uint i=0; i!=INVENTORIES::NbItemPropId; ++i )
|
||||||
{
|
{
|
||||||
// Instead of clearing all leaves (by index), we must find and clear only the
|
// Instead of clearing all leaves (by index), we must find and clear only the
|
||||||
// properties in TItemPropId, because the actual database leaves may have
|
// properties in TItemPropId, because the actual database leaves may have
|
||||||
// less properties, and because we must not clear the leaf INFO_VERSION.
|
// 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 );
|
SKIP_IF( !leafNode, "Inventory slot property missing in database", continue );
|
||||||
leafNode->setPropCheckGC( serverTick, 0 );
|
leafNode->setPropCheckGC( serverTick, 0 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,3 +103,5 @@ namespace GeorgesQt
|
||||||
} /* namespace GeorgesQt */
|
} /* namespace GeorgesQt */
|
||||||
|
|
||||||
#endif // GEORGESFORM_MODEL_H
|
#endif // GEORGESFORM_MODEL_H
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue