Merged ryzom/ryzomcore into default

This commit is contained in:
StudioEtrange 2013-09-07 01:39:45 +02:00
commit fec561914d
12 changed files with 75 additions and 115 deletions
code
CMakeModules
nel
samples/3d/nel_qt
src/misc
tools/3d/plugin_max/nel_vertex_tree_paint
ryzom
client
data/gamedev/interfaces_v3
src/interface_v3
server/src/input_output_service
tools
server/brick_param_extractor
sheets_packer

View file

@ -1,38 +0,0 @@
# - Find DirectInput
# Find the DirectSound includes and libraries
#
# DINPUT_INCLUDE_DIR - where to find dinput.h
# DINPUT_LIBRARIES - List of libraries when using DirectInput.
# DINPUT_FOUND - True if DirectInput found.
if(DINPUT_INCLUDE_DIR)
# Already in cache, be silent
set(DINPUT_FIND_QUIETLY TRUE)
endif(DINPUT_INCLUDE_DIR)
find_path(DINPUT_INCLUDE_DIR dinput.h
"$ENV{DXSDK_DIR}"
"$ENV{DXSDK_DIR}/Include"
)
find_library(DINPUT_LIBRARY
NAMES dinput dinput8
PATHS
"$ENV{DXSDK_DIR}"
"$ENV{DXSDK_DIR}/Lib"
"$ENV{DXSDK_DIR}/Lib/x86"
)
# Handle the QUIETLY and REQUIRED arguments and set DINPUT_FOUND to TRUE if
# all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DINPUT DEFAULT_MSG
DINPUT_INCLUDE_DIR DINPUT_LIBRARY)
if(DINPUT_FOUND)
set(DINPUT_LIBRARIES ${DINPUT_LIBRARY})
else(DINPUT_FOUND)
set(DINPUT_LIBRARIES)
endif(DINPUT_FOUND)
mark_as_advanced(DINPUT_INCLUDE_DIR DINPUT_LIBRARY)

View file

@ -43,10 +43,13 @@ FOREACH(_VERSION ${WINSDK_VERSIONS})
DETECT_WINSDK_VERSION(${_VERSION})
ENDFOREACH(_VERSION)
SET(WINSDK_SUFFIX)
IF(TARGET_ARM)
SET(WINSDK8_SUFFIX "arm")
ELSEIF(TARGET_X64)
SET(WINSDK8_SUFFIX "x64")
SET(WINSDK_SUFFIX "x64")
ELSEIF(TARGET_X86)
SET(WINSDK8_SUFFIX "x86")
ENDIF(TARGET_ARM)
@ -133,7 +136,7 @@ FIND_PATH(WINSDK_SHARED_INCLUDE_DIR d3d9.h
FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
HINTS
${WINSDK_DIR}/Lib/win8/um/${WINSDK8_SUFFIX}
${WINSDK_DIR}/Lib
${WINSDK_DIR}/Lib/${WINSDK_SUFFIX}
)
# signtool is used to sign executables

View file

@ -6,7 +6,7 @@ GraphicsDriver = "OpenGL";
SoundDriver = "OpenAL";
SoundDevice = "";
LanguageCode = "en";
QtStyle = "Cleanlooks";
QtStyle = "";
FontName = "andbasr.ttf";
FontShadow = 1;
BackgroundColor = {

View file

@ -37,14 +37,13 @@ namespace NLMISC
return token;
}
uint i;
uint i, j;
CSString result;
// skip leading junk
for (i=0;i<size();++i)
{
// look for the next character in the 'separator' character list supplied
uint j;
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
{}
// if not found then we're at end of leading junk
@ -56,7 +55,6 @@ namespace NLMISC
for (;i<size();++i)
{
// look for the next character in the 'separator' character list supplied
uint j;
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
{}
// if not found then we're at end of text chunk
@ -69,7 +67,6 @@ namespace NLMISC
for (;i<size();++i)
{
// look for the next character in the 'separator' character list supplied
uint j;
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
{}
// if not found then we're at end of leading junk

View file

@ -17,8 +17,6 @@
#ifndef NL_STDMISC_H
#define NL_STDMISC_H
#include "nel/misc/types_nl.h"
#include <algorithm>
#include <cmath>
#include <csignal>
@ -44,16 +42,7 @@
#include <utility>
#include <vector>
#include "nel/misc/debug.h"
#include "nel/misc/common.h"
#include "nel/misc/fast_mem.h"
#include "nel/misc/system_info.h"
#include "nel/misc/mem_displayer.h"
#include "nel/misc/stream.h"
#include "nel/misc/path.h"
#include "nel/misc/string_common.h"
#ifdef NL_OS_WINDOWS
#ifdef _WIN32
#define NOMINMAX
#include <WinSock2.h>
#include <windows.h>

View file

@ -217,7 +217,7 @@ LRESULT APIENTRY colorSwatchSubclassWndProc(
case WM_LBUTTONUP:
case WM_LBUTTONDBLCLK: {
HWND hPanel = GetParent(hwnd);
LONG mod = GetWindowLongPtr(hPanel,GWLP_USERDATA);
LONG_PTR mod = GetWindowLongPtr(hPanel,GWLP_USERDATA);
if (mod) {
((VertexPaint*)mod)->PaletteButton(hwnd);
}
@ -424,7 +424,8 @@ void VertexPaint::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
SendMessage(hParams, WM_POSTINIT, 0, 0);
}
else {
else
{
SetWindowLongPtr(hParams,GWLP_USERDATA,(LONG_PTR)this);
}

View file

@ -8,6 +8,12 @@ function getDbPropU(dbEntry)
return value
end
if string.find(_VERSION, "Lua 5.0") then
function math.fmod(a, b)
return math.mod(a, b)
end
end
------------------------------------------------------------------------------------------------------------
-- create the game namespace without reseting if already created in an other file.
if (game==nil) then

View file

@ -925,32 +925,27 @@ void CChatGroupWindow::saveFreeTeller(NLMISC::IStream &f)
{
f.serialVersion(2);
uint32 nNbFreeTellerSaved = 0;
// Save the free teller only if it is present in the friend list to avoid the only-growing situation
// because free tellers are never deleted in game if we save/load all the free tellers, we just create more
// and more container.
uint32 i, nNbFreeTellerSaved = 0;
for (i = 0; i < _FreeTellers.size(); ++i)
if (PeopleInterraction.FriendList.getIndexFromName(_FreeTellers[i]->getUCTitle()) != -1)
nNbFreeTellerSaved++;
f.serial(nNbFreeTellerSaved);
// Don't save the free tellers
//// Save the free teller only if it is present in the friend list to avoid the only-growing situation
//// because free tellers are never deleted in game if we save/load all the free tellers, we just create more
//// and more container.
//uint32 i, nNbFreeTellerSaved = 0;
//for (i = 0; i < _FreeTellers.size(); ++i)
// if (PeopleInterraction.FriendList.getIndexFromName(_FreeTellers[i]->getUCTitle()) != -1)
// nNbFreeTellerSaved++;
//f.serial(nNbFreeTellerSaved);
//for (i = 0; i < _FreeTellers.size(); ++i)
//{
// CGroupContainer *pGC = _FreeTellers[i];
// if (PeopleInterraction.FriendList.getIndexFromName(pGC->getUCTitle()) != -1)
// {
// ucstring sTitle = pGC->getUCTitle();
// f.serial(sTitle);
// }
//}
for (i = 0; i < _FreeTellers.size(); ++i)
{
CGroupContainer *pGC = _FreeTellers[i];
if (PeopleInterraction.FriendList.getIndexFromName(pGC->getUCTitle()) != -1)
{
ucstring sTitle = pGC->getUCTitle();
f.serial(sTitle);
}
}
}
//=================================================================================
@ -979,12 +974,11 @@ void CChatGroupWindow::loadFreeTeller(NLMISC::IStream &f)
ucstring sTitle;
f.serial(sTitle);
// Don't actually create the free teller
//CGroupContainer *pGC = createFreeTeller(sTitle, "");
CGroupContainer *pGC = createFreeTeller(sTitle, "");
//// With version 1 all tells are active because windows information have "title based" ids and no "sID based".
//if ((ver == 1) && (pGC != NULL))
// pGC->setActive(false);
// With version 1 all tells are active because windows information have "title based" ids and no "sID based".
if ((ver == 1) && (pGC != NULL))
pGC->setActive(false);
}
}

View file

@ -636,6 +636,18 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
{
if (session->WriteRight) // player must have the right to speak in the channel
{
// If universal channel check if player muted
if (session->getChan()->UniversalChannel)
{
if(_MutedUsers.find( eid ) != _MutedUsers.end())
{
nldebug("IOSCM: chat The player %s:%x is muted",
TheDataset.getEntityId(sender).toString().c_str(),
sender.getIndex());
return;
}
}
if (!session->getChan()->getDontBroadcastPlayerInputs())
{
// add msg to the historic

View file

@ -490,6 +490,8 @@ void COutputFile::generateOutput() const
outbuff+="/*\n";
outbuff+="\tFILE: ";
outbuff+=_FileName+"\n\n";
outbuff+="#ifndef RY_EGS_STATIC_BRICK_CPP_H\n";
outbuff+="#define RY_EGS_STATIC_BRICK_CPP_H\n\n";
outbuff+="\tWARNING: This file is autogenerated - any modifications will be lost at next regeneration\n\n";
outbuff+="*/\n\n";
@ -505,6 +507,8 @@ void COutputFile::generateOutput() const
_Structures[i].generateOutput(outbuff);
}
outbuff+="#endif\n\n";
// read in the previous version of the output file
char *inbuff=NULL;
FILE *inf=fopen(_FileName.c_str(),"rb");
@ -631,17 +635,11 @@ void COutputFile::CStruct::generateOutput(std::string &outbuff) const
for (i=0;i<_Params.size();++i)
{
outbuff+="\t\t";
outbuff+=_Params[i]._Name+"=";
if (_Params[i]._Type==COutputFile::INT) outbuff+="atoi(";
if (_Params[i]._Type==COutputFile::FLOAT) outbuff+="(float)atof(";
outbuff+="args[";
outbuff+="NLMISC::fromString(args[";
if (i>100) outbuff+=('0'+((i/100)%10));
if (i>10) outbuff+=('0'+((i/10)%10));
outbuff+=('0'+(i%10));
if (_Params[i]._Type==COutputFile::INT || _Params[i]._Type==COutputFile::FLOAT)
outbuff+="].c_str());\n";
else
outbuff+="].c_str();\n";
outbuff+="], "+_Params[i]._Name+");\n";
}
outbuff+="\n";
outbuff+="\t\treturn *this;\n";

View file

@ -32,8 +32,6 @@
#include <nel/misc/mem_stream.h>
#include <nel/misc/sheet_id.h>
//#include <nel/3d/u_driver.h>
#ifdef NL_OS_WINDOWS
#define NOMINMAX
#include <WinSock2.h>