mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Merged ryzom/ryzomcore into default
This commit is contained in:
commit
fec561914d
12 changed files with 75 additions and 115 deletions
|
@ -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)
|
|
|
@ -43,10 +43,13 @@ FOREACH(_VERSION ${WINSDK_VERSIONS})
|
||||||
DETECT_WINSDK_VERSION(${_VERSION})
|
DETECT_WINSDK_VERSION(${_VERSION})
|
||||||
ENDFOREACH(_VERSION)
|
ENDFOREACH(_VERSION)
|
||||||
|
|
||||||
|
SET(WINSDK_SUFFIX)
|
||||||
|
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
SET(WINSDK8_SUFFIX "arm")
|
SET(WINSDK8_SUFFIX "arm")
|
||||||
ELSEIF(TARGET_X64)
|
ELSEIF(TARGET_X64)
|
||||||
SET(WINSDK8_SUFFIX "x64")
|
SET(WINSDK8_SUFFIX "x64")
|
||||||
|
SET(WINSDK_SUFFIX "x64")
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
SET(WINSDK8_SUFFIX "x86")
|
SET(WINSDK8_SUFFIX "x86")
|
||||||
ENDIF(TARGET_ARM)
|
ENDIF(TARGET_ARM)
|
||||||
|
@ -133,7 +136,7 @@ FIND_PATH(WINSDK_SHARED_INCLUDE_DIR d3d9.h
|
||||||
FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
|
FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
|
||||||
HINTS
|
HINTS
|
||||||
${WINSDK_DIR}/Lib/win8/um/${WINSDK8_SUFFIX}
|
${WINSDK_DIR}/Lib/win8/um/${WINSDK8_SUFFIX}
|
||||||
${WINSDK_DIR}/Lib
|
${WINSDK_DIR}/Lib/${WINSDK_SUFFIX}
|
||||||
)
|
)
|
||||||
|
|
||||||
# signtool is used to sign executables
|
# signtool is used to sign executables
|
||||||
|
|
|
@ -6,7 +6,7 @@ GraphicsDriver = "OpenGL";
|
||||||
SoundDriver = "OpenAL";
|
SoundDriver = "OpenAL";
|
||||||
SoundDevice = "";
|
SoundDevice = "";
|
||||||
LanguageCode = "en";
|
LanguageCode = "en";
|
||||||
QtStyle = "Cleanlooks";
|
QtStyle = "";
|
||||||
FontName = "andbasr.ttf";
|
FontName = "andbasr.ttf";
|
||||||
FontShadow = 1;
|
FontShadow = 1;
|
||||||
BackgroundColor = {
|
BackgroundColor = {
|
||||||
|
|
|
@ -37,14 +37,13 @@ namespace NLMISC
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint i;
|
uint i, j;
|
||||||
CSString result;
|
CSString result;
|
||||||
|
|
||||||
// skip leading junk
|
// skip leading junk
|
||||||
for (i=0;i<size();++i)
|
for (i=0;i<size();++i)
|
||||||
{
|
{
|
||||||
// look for the next character in the 'separator' character list supplied
|
// look for the next character in the 'separator' character list supplied
|
||||||
uint j;
|
|
||||||
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
|
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
|
||||||
{}
|
{}
|
||||||
// if not found then we're at end of leading junk
|
// if not found then we're at end of leading junk
|
||||||
|
@ -56,7 +55,6 @@ namespace NLMISC
|
||||||
for (;i<size();++i)
|
for (;i<size();++i)
|
||||||
{
|
{
|
||||||
// look for the next character in the 'separator' character list supplied
|
// look for the next character in the 'separator' character list supplied
|
||||||
uint j;
|
|
||||||
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
|
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
|
||||||
{}
|
{}
|
||||||
// if not found then we're at end of text chunk
|
// if not found then we're at end of text chunk
|
||||||
|
@ -69,7 +67,6 @@ namespace NLMISC
|
||||||
for (;i<size();++i)
|
for (;i<size();++i)
|
||||||
{
|
{
|
||||||
// look for the next character in the 'separator' character list supplied
|
// look for the next character in the 'separator' character list supplied
|
||||||
uint j;
|
|
||||||
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
|
for (j=0;separators[j] && (*this)[i]!=separators[j];++j)
|
||||||
{}
|
{}
|
||||||
// if not found then we're at end of leading junk
|
// if not found then we're at end of leading junk
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#ifndef NL_STDMISC_H
|
#ifndef NL_STDMISC_H
|
||||||
#define NL_STDMISC_H
|
#define NL_STDMISC_H
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
|
@ -44,16 +42,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "nel/misc/debug.h"
|
#ifdef _WIN32
|
||||||
#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
|
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
@ -217,7 +217,7 @@ LRESULT APIENTRY colorSwatchSubclassWndProc(
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
case WM_LBUTTONDBLCLK: {
|
case WM_LBUTTONDBLCLK: {
|
||||||
HWND hPanel = GetParent(hwnd);
|
HWND hPanel = GetParent(hwnd);
|
||||||
LONG mod = GetWindowLongPtr(hPanel,GWLP_USERDATA);
|
LONG_PTR mod = GetWindowLongPtr(hPanel,GWLP_USERDATA);
|
||||||
if (mod) {
|
if (mod) {
|
||||||
((VertexPaint*)mod)->PaletteButton(hwnd);
|
((VertexPaint*)mod)->PaletteButton(hwnd);
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,8 @@ void VertexPaint::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
|
||||||
|
|
||||||
SendMessage(hParams, WM_POSTINIT, 0, 0);
|
SendMessage(hParams, WM_POSTINIT, 0, 0);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
SetWindowLongPtr(hParams,GWLP_USERDATA,(LONG_PTR)this);
|
SetWindowLongPtr(hParams,GWLP_USERDATA,(LONG_PTR)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +441,7 @@ void VertexPaint::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
|
||||||
|
|
||||||
// Force an eval to update caches.
|
// Force an eval to update caches.
|
||||||
NotifyDependents(FOREVER, PART_VERTCOLOR, REFMSG_CHANGE);
|
NotifyDependents(FOREVER, PART_VERTCOLOR, REFMSG_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VertexPaint::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next)
|
void VertexPaint::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,12 @@ function getDbPropU(dbEntry)
|
||||||
return value
|
return value
|
||||||
end
|
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.
|
-- create the game namespace without reseting if already created in an other file.
|
||||||
if (game==nil) then
|
if (game==nil) then
|
||||||
|
|
|
@ -925,32 +925,27 @@ void CChatGroupWindow::saveFreeTeller(NLMISC::IStream &f)
|
||||||
{
|
{
|
||||||
f.serialVersion(2);
|
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);
|
f.serial(nNbFreeTellerSaved);
|
||||||
|
|
||||||
// Don't save the free tellers
|
for (i = 0; i < _FreeTellers.size(); ++i)
|
||||||
//// 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
|
CGroupContainer *pGC = _FreeTellers[i];
|
||||||
//// 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);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
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;
|
ucstring sTitle;
|
||||||
f.serial(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".
|
// With version 1 all tells are active because windows information have "title based" ids and no "sID based".
|
||||||
//if ((ver == 1) && (pGC != NULL))
|
if ((ver == 1) && (pGC != NULL))
|
||||||
// pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 (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())
|
if (!session->getChan()->getDontBroadcastPlayerInputs())
|
||||||
{
|
{
|
||||||
// add msg to the historic
|
// add msg to the historic
|
||||||
|
|
|
@ -490,6 +490,8 @@ void COutputFile::generateOutput() const
|
||||||
outbuff+="/*\n";
|
outbuff+="/*\n";
|
||||||
outbuff+="\tFILE: ";
|
outbuff+="\tFILE: ";
|
||||||
outbuff+=_FileName+"\n\n";
|
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+="\tWARNING: This file is autogenerated - any modifications will be lost at next regeneration\n\n";
|
||||||
outbuff+="*/\n\n";
|
outbuff+="*/\n\n";
|
||||||
|
|
||||||
|
@ -505,6 +507,8 @@ void COutputFile::generateOutput() const
|
||||||
_Structures[i].generateOutput(outbuff);
|
_Structures[i].generateOutput(outbuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outbuff+="#endif\n\n";
|
||||||
|
|
||||||
// read in the previous version of the output file
|
// read in the previous version of the output file
|
||||||
char *inbuff=NULL;
|
char *inbuff=NULL;
|
||||||
FILE *inf=fopen(_FileName.c_str(),"rb");
|
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)
|
for (i=0;i<_Params.size();++i)
|
||||||
{
|
{
|
||||||
outbuff+="\t\t";
|
outbuff+="\t\t";
|
||||||
outbuff+=_Params[i]._Name+"=";
|
outbuff+="NLMISC::fromString(args[";
|
||||||
if (_Params[i]._Type==COutputFile::INT) outbuff+="atoi(";
|
|
||||||
if (_Params[i]._Type==COutputFile::FLOAT) outbuff+="(float)atof(";
|
|
||||||
outbuff+="args[";
|
|
||||||
if (i>100) outbuff+=('0'+((i/100)%10));
|
if (i>100) outbuff+=('0'+((i/100)%10));
|
||||||
if (i>10) outbuff+=('0'+((i/10)%10));
|
if (i>10) outbuff+=('0'+((i/10)%10));
|
||||||
outbuff+=('0'+(i%10));
|
outbuff+=('0'+(i%10));
|
||||||
if (_Params[i]._Type==COutputFile::INT || _Params[i]._Type==COutputFile::FLOAT)
|
outbuff+="], "+_Params[i]._Name+");\n";
|
||||||
outbuff+="].c_str());\n";
|
|
||||||
else
|
|
||||||
outbuff+="].c_str();\n";
|
|
||||||
}
|
}
|
||||||
outbuff+="\n";
|
outbuff+="\n";
|
||||||
outbuff+="\t\treturn *this;\n";
|
outbuff+="\t\treturn *this;\n";
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include <nel/misc/mem_stream.h>
|
#include <nel/misc/mem_stream.h>
|
||||||
#include <nel/misc/sheet_id.h>
|
#include <nel/misc/sheet_id.h>
|
||||||
|
|
||||||
//#include <nel/3d/u_driver.h>
|
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
|
|
Loading…
Reference in a new issue