This commit is contained in:
rti 2010-07-04 19:49:59 +02:00
parent 929639533b
commit d4947a4ab1
202 changed files with 2313 additions and 4449 deletions

View file

@ -651,7 +651,7 @@ struct CFile
* \param failIfExists If the destination file exists, nothing is done, and it returns false.
* \return true if the copy succeeded
*/
static bool copyFile(const char *dest, const char *src, bool failIfExists = false, class IProgressCallback *progress = NULL);
static bool copyFile(const std::string &dest, const std::string &src, bool failIfExists = false, class IProgressCallback *progress = NULL);
/** Compare 2 files
* \return true if both files exist and the files have same timestamp and size

View file

@ -23,8 +23,6 @@
// global includes
//#define USE_JPEG
#include <nel/misc/types_nl.h>
#include <math.h>

View file

@ -21,10 +21,6 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef NL_OS_WINDOWS
#define USE_JPEG
#endif
#include "globals.h"
#include "resource.h"

View file

@ -16,11 +16,6 @@
#include "std3d.h"
// FIXME: shouldn't this be configured outside?
#ifndef USE_JPEG
#define USE_JPEG
#endif
#include "nel/3d/zone_lighter.h"
#include "nel/3d/landscape.h"
#include "nel/3d/patchuv_locator.h"
@ -32,10 +27,6 @@
#include "nel/3d/water_shape.h"
#include "nel/3d/texture_file.h"
#include "nel/misc/common.h"
#include "nel/misc/thread.h"
#include "nel/misc/path.h"

View file

@ -31,7 +31,6 @@
This file contains code that is specific to NeL (http://www.nevrax.org)
*************************************************************************/
#define USE_JPEG
// NeL Renderer includes
#include <nel/cegui/neltexture.h>

View file

@ -588,7 +588,7 @@ bool COFile::open(const std::string &path, bool append, bool text, bool useTempF
if (append && useTempFile && CFile::fileExists(_FileName))
{
// open fails if can't copy original content
if (!CFile::copyFile(_TempFileName.c_str(), _FileName.c_str()))
if (!CFile::copyFile(_TempFileName, _FileName))
return false;
}

View file

@ -2099,10 +2099,9 @@ void CFile::checkFileChange (TTime frequency)
}
}
static bool CopyMoveFile(const char *dest, const char *src, bool copyFile, bool failIfExists = false, IProgressCallback *progress = NULL)
static bool CopyMoveFile(const std::string &dest, const std::string &src, bool copyFile, bool failIfExists = false, IProgressCallback *progress = NULL)
{
if (!dest || !src) return false;
if (!strlen(dest) || !strlen(src)) return false;
if (dest.empty() || src.empty()) return false;
std::string sdest = CPath::standardizePath(dest,false);
std::string ssrc = CPath::standardizePath(src,false);
@ -2199,7 +2198,7 @@ static bool CopyMoveFile(const char *dest, const char *src, bool copyFile, bool
return true;
}
bool CFile::copyFile(const char *dest, const char *src, bool failIfExists /*=false*/, IProgressCallback *progress)
bool CFile::copyFile(const std::string &dest, const std::string &src, bool failIfExists /*=false*/, IProgressCallback *progress)
{
return CopyMoveFile(dest, src, true, failIfExists, progress);
}

View file

@ -252,7 +252,7 @@ int main(int argc, char *argv[])
// if fail to find a valid filter, just do a copy
if(j==LodFilters.size())
{
CFile::copyFile(pathNameOut.c_str(), pathNameIn.c_str());
CFile::copyFile(pathNameOut, pathNameIn);
NLMISC::InfoLog->displayRaw("Processing %s - Copied\n", fileNameIn.c_str());
}
}

View file

@ -126,7 +126,7 @@ void filterRyzomBug(const char *dirSrc, const char *dirDst, uint patchVersionWan
CFile::createDirectory(dirDest);
// copy near the dmp
CFile::copyFile((dirDest + "/" + fileNoDir).c_str(), fileFullPath.c_str());
CFile::copyFile(dirDest + "/" + fileNoDir, fileFullPath);
// copy all the .dmp in a new dir
@ -136,7 +136,7 @@ void filterRyzomBug(const char *dirSrc, const char *dirDst, uint patchVersionWan
for(uint j=0;j<dmpList.size();j++)
{
string dmpNoDir= CFile::getFilename(dmpList[j]);
CFile::copyFile((dirDest+ "/" + dmpNoDir).c_str(), dmpList[j].c_str());
CFile::copyFile(dirDest+ "/" + dmpNoDir, dmpList[j]);
}
}
}

View file

@ -14,8 +14,6 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USE_JPEG
#include "std_afx.h"
#include "object_viewer.h"

View file

@ -53,8 +53,6 @@
#include <map>
#include <algorithm>
#define USE_JPEG
#include "nel/misc/common.h"
#include "nel/misc/stream.h"
#include "nel/misc/vector.h"

View file

@ -44,7 +44,7 @@ private:
fclose(fp);
fp = NULL;
NLMISC::CFile::copyFile(_DstFile.c_str(), _SrcFile.c_str(), false);
NLMISC::CFile::copyFile(_DstFile, _SrcFile, false);
// verify the resulting file
fp = fopen(_DstFile.c_str(), "rb");

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// http://www.fsck.com/pub/rt/contrib/2.0/rt-addons/enhanced-mailgate.README
@ -13,8 +28,6 @@
#undef min
#undef max
#define USE_JPEG
#include "nel/misc/system_info.h"
#include "nel/misc/debug.h"
#include "nel/misc/config_file.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <nel/misc/types_nl.h>

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CL_ACTION_HANDLER_ITEM_H
#define CL_ACTION_HANDLER_ITEM_H

View file

@ -1307,7 +1307,7 @@ void CPatchManager::downloadFile (const string &source, const string &dest, NLMI
}
else
{
if (!NLMISC::CFile::copyFile(dest.c_str(), source.c_str(), false, progress))
if (!NLMISC::CFile::copyFile(dest, source, false, progress))
{
if (errno == 28)
{

View file

@ -0,0 +1,15 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

View file

@ -1,7 +1,24 @@
/*
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef R2_TOOL_DRAW_ROAD_H
#define R2_TOOL_DRAW_ROAD_H
/*
#include "tool.h"
#include "displayer_visual_road.h"
//

View file

@ -1,4 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "game_share/utils.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef SESSION_BROWSER_H
#define SESSION_BROWSER_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef SESSION_BROWSER_IMPL_H
#define SESSION_BROWSER_IMPL_H

View file

@ -1,2 +1,17 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <nel/misc/types_nl.h>
@ -18,8 +33,6 @@
#include <deque>
#include <fstream>
#define USE_JPEG
#include <nel/misc/common.h>
#include <nel/misc/debug.h>

View file

@ -1,6 +1,19 @@
/** file backup_service_interface.h
* $Id: backup_service_interface.h,v 1.19 2007/05/22 13:42:54 boucher Exp $
*/
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef BACKUP_SERVICE_INTERFACE_H
#define BACKUP_SERVICE_INTERFACE_H

View file

@ -249,7 +249,7 @@ bool CBNPFile::addVersion(const std::string& bnpDirectory, const std::string& /*
// copy the file to create a new reference file...
// NLMISC::CSString refFileName= NLMISC::CSString(refDirectory+_FileName).replace(".",NLMISC::toString("_%05u.",version.getPackageVersionNumber()).c_str());
// NLMISC::CFile::copyFile(refFileName.c_str(),fullFileName.c_str());
// NLMISC::CFile::copyFile(refFileName, fullFileName);
}
else
{

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef MODULE_SECURITY_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,24 +0,0 @@
/** This file declare a pure nel module library */
#include "nel/net/module_manager.h"
#include "nel/net/module.h"
#include "nel/net/module_builder_parts.h"
using namespace std;
using namespace NLMISC;
using namespace NLNET;
extern void as_forceLink();
extern void aes_forceLink();
extern void aesclient_forceLink();
void admin_modules_forceLink()
{
as_forceLink();
aes_forceLink();
aesclient_forceLink();
}
//NLMISC_DECL_PURE_LIB(CNelModuleLibrary);

View file

@ -1,9 +1,5 @@
FILE(GLOB SRC *.cpp *.h)
# Filter out the source files not actually compiled.
LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp)
ADD_LIBRARY(admin_modules STATIC ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,485 +0,0 @@
/** \file actor_manager.cpp
*
* the actor manager for AgS_Test
*
* $Id: actor_manager.cpp,v 1.34 2004/06/14 12:34:17 brigand Exp $
* $Log: actor_manager.cpp,v $
* Revision 1.34 2004/06/14 12:34:17 brigand
* CHANGED : updated to new PDS people enum
*
* Revision 1.33 2004/03/01 19:18:37 lecroart
* REMOVED: bad headers
*
* Revision 1.32 2004/01/13 18:47:07 cado
* ADDED: Mirror tests
*
* Revision 1.31 2003/10/21 08:48:19 legros
* ADDED: multi target commands
*
* Revision 1.30 2003/10/02 16:13:15 legros
* no message
*
* Revision 1.29 2003/10/01 14:29:32 legros
* no message
*
* Revision 1.28 2003/09/30 16:03:15 legros
* CHANGED: ags test is now up to date...
*
* Revision 1.27 2003/07/16 15:51:19 cado
* CHANGED: First-pass to re-adapt to mirror system V1.4
*
* Revision 1.26 2003/07/16 14:34:06 boucher
* no message
*
* Revision 1.25 2003/02/26 10:24:19 cado
* CHANGED: changed all properties to new mirror, no more old mirror
*
* Revision 1.24 2003/02/24 10:44:44 cado
* ADDED: Adapted for new mirror system
*
* Revision 1.23 2003/01/28 20:36:51 miller
* Changed header comments from 'Nel Network Services' to Ryzom
*
* Revision 1.22 2002/11/29 10:17:50 portier
* #ADDED: ia_player.id
*
* Revision 1.21.2.1 2003/01/03 18:18:02 cado
* ADDED: Integration with new mirror system
*
* Revision 1.21 2002/11/15 16:22:42 fleury
* CHANGED : the OPS has been replaced by the EGS
*
* Revision 1.20 2002/08/30 08:47:34 miller
* another quick test (non destructive)
*
* Revision 1.19 2002/08/30 08:46:09 miller
* quick test (non destructive)
*
*/
// Nel
//#include "nel/net/service.h"
// Local headers
#include "position_generator.h"
#include "actor_manager.h"
#include "sheets.h"
#include <nel/net/unified_network.h>
#include "game_share/people.h"
#include "game_share/synchronised_message.h"
#include "nel/misc/variable.h"
#include <set>
using namespace NLMISC;
using namespace NLNET;
using namespace std;
namespace AGS_TEST
{
//-------------------------------------------------------------------------
// Some global variables
extern uint32 GlobalActorCount;
extern uint32 GlobalActorUpdates;
extern uint32 GlobalActorMoves;
CEntityId LastActorId;
NLMISC_DYNVARIABLE(string, LastActorId, "Last created actor")
{
if (get)
*pointer = LastActorId.toString();
else
LastActorId.fromString((*pointer).c_str());
}
//-------------------------------------------------------------------------
// Some function prototypes
static void cbServiceUp( const string& serviceName, uint16 serviceId, void * );
static void cbServiceDown( const string& serviceName, uint16 serviceId, void * );
//------------------------------------------------------------------------
// static data for CActorManager
std::vector<CActor*> CActorManager::_actors;
std::vector<CActorGroup*> CActorManager::_actorGroups;
int CActorManager::_nextActorID=0;
std::set<uint> CActorManager::_visionHandlingServices;
CActorGroup *CActorManager::_defaultActorGroup;
//------------------------------------------------------------------------
// basic functionality for CActorManager singleton
void CActorManager::init()
{
static bool first_time=true;
if (first_time)
{
// Init callback for service up / down
CUnifiedNetwork::getInstance()->setServiceUpCallback ("*", cbServiceUp, NULL);
CUnifiedNetwork::getInstance()->setServiceDownCallback("*", cbServiceDown, NULL);
first_time=false;
}
else
release();
_nextActorID=0;
/*
CPositionGenerator::setPattern(std::string("grid"));
CPositionGenerator::setPosition(17981,-33200);
CPositionGenerator::setSpacing(2000);
*/
_defaultActorGroup = newActorGroup("defaultGroup");
}
void CActorManager::update()
{
set< pair<sint32, sint32> > iaZones;
std::vector<CActorGroup*>::iterator itg;
for (itg=_actorGroups.begin(); itg!=_actorGroups.end(); ++itg)
(*itg)->update();
// iterate through all known actors, calling their update
uint16 positionChangeCount=0;
uint16 updateCount=0;
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
bool updated= (*it)->update();
if (updated)
updateCount++;
/*
if ((*it)->positionChanged())
positionChangeCount++;
sint32 zx = (*it)->getX()/160000;
sint32 zy = -(*it)->getY()/160000;
iaZones.insert(make_pair<sint32,sint32>(zx, zy));
*/
}
// for all entities, request vision zones
/*CMessage msg("AGENT_VISON");
sint64 fakeId = 0;
msg.serial(fakeId);
sint32 pos = msg.getPos();
set< pair<sint32, sint32> >::iterator itz;
for (itz=iaZones.begin(); itz!=iaZones.end(); ++itz)
{
sint32 x = (*itz).first,
y = (*itz).second;
msg.serial(x);
msg.serial(y);
}
if (msg.getPos() > pos)
CUnifiedNetwork::getInstance()->send("GPMS", msg);*/
/*
// build the position changed message and send it to GPMS
if (positionChangeCount>0)
{
NLNET::CMessage gpmPosMsg("UPDATE_ENTITIES_POSITIONS");
gpmPosMsg.serial(positionChangeCount);
for (it=_actors.begin(); it!=_actors.end(); ++it)
(*it)->addPositionChangesToMessage(gpmPosMsg);
sendMessageViaMirror( "GPMS", gpmPosMsg );
}
*/
GlobalActorUpdates=updateCount;
//GlobalActorMoves=positionChangeCount;
}
void CActorManager::release()
{
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
(*it)->removeFromOtherServices();
}
_actors.clear();
}
// Callback called at service connexion
static void cbServiceUp( const string& serviceName, uint16 serviceId, void * )
{
/*if (serviceName==std::string("EGS"))
CActorManager::reconnectEGS((uint8)serviceId);
if (serviceName==std::string("IOS"))
CActorManager::reconnectIOS((uint8)serviceId);
if (serviceName==std::string("GPMS"))
CActorManager::reconnectGPMS((uint8)serviceId);*/
/*CMessage reqVision("ASK_VISION_ZONE");
CUnifiedNetwork::getInstance()->send(serviceId, reqVision);*/
}
//
static void cbServiceDown( const string& serviceName, uint16 serviceId, void * )
{
CActorManager::removeVisionService(serviceId);
}
//---------------------------------------------------------------------------------
// methods for dealing with tardy connection of a key service
/*void CActorManager::reconnectEGS(uint8 serviceId)
{
}
void CActorManager::reconnectIOS(uint8 serviceId)
{
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
(*it)->addToIOS(serviceId);
}
}
void CActorManager::reconnectGPMS(uint8 serviceId)
{
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
(*it)->addToGPMS(serviceId);
}
}*/
//---------------------------------------------------------------------------------
// CActorManager methods for creating and killing actors
// method for adding a new actor to the scene
CActor *CActorManager::newActor(const std::string &type, const std::string &name)
{
LastActorId = CEntityId::Unknown;
if (getActor(name)!=NULL)
{
nlinfo("Actor already exists: %s",name.c_str());
return NULL;
}
CSheetId sheetId(type);
const CSheets::CSheet *sheet=CSheets::lookup(sheetId);
if (!sheet)
{
nlwarning("ERROR: Can't find static type data for '%s'(%d) for entity %s", type.c_str(), sheetId.asInt(), name.c_str());
return NULL;
}
// create a new actor record and COPY it into the actor vector
// EGSPD::CPeople::TPeople p_type = EGSPD::CPeople::fromString( type );
bool success = false;
CActor *aNewActor;
if ( sheet->isNpc /*EGSPD::CPeople::isPlayableRace( p_type )*/ )
aNewActor = new CActor(type,name,CEntityId(RYZOMID::npc,_nextActorID++),success);
else
aNewActor = new CActor(type,name,CEntityId(RYZOMID::creature,_nextActorID++),success);
if ( ! success )
{
if (aNewActor)
delete aNewActor;
return NULL;
}
LastActorId = aNewActor->_id;
int x,y;
CPositionGenerator::next(x,y);
aNewActor->setPos(x, y, 0);
aNewActor->setAngle(0);
_actors.push_back(aNewActor);
// get hold of a pointer of the copy of the actor in the actor vector
CActor *theActor=getActor(name);
// add the actor to the GPMS, the IOS, etc
if (theActor!=0)
theActor->addToOtherServices();
/*
CMessage msgMode("SET_MODE");
TDataSetRow index = CMirrors::DataSet->getDataSetRow(theActor->_id);
msgMode.serial(index);
MBEHAV::TMode mode(MBEHAV::NORMAL, x, y);
msgMode.serial(mode);
sendMessageViaMirror("EGS", msgMode);
*/
CMirrors::initSheet( aNewActor->getSid(), sheetId ); // initialize out the sheet
// Let the position & angle & tick be sent ("UPDATE_ENTITIES_POSITIONS") in update
//aNewActor->initMode();
MBEHAV::TMode mode(MBEHAV::NORMAL, x, y);
theActor->_mode = mode.RawModeAndParam;
aNewActor->display();
theActor->setGroup(_defaultActorGroup);
GlobalActorCount++;
return theActor;
}
// method for retrievng a pointer to a named actor
// returns NULL if the actor doesn't exist
CActor *CActorManager::getActor(const std::string &name)
{
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
if ((*it)->getName()==name)
return (*it);
}
return 0;
}
// method for retrievng a pointer to given actor
CActor *CActorManager::getActor(unsigned index)
{
if (index>=_actors.size())
return NULL;
else
return (_actors[index]);
}
// method for retrievng a pointer to given actor
CActor *CActorManager::getActor(const NLMISC::CEntityId &id)
{
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
if ((*it)->getSid()==id)
return (*it);
}
return NULL;
}
void CActorManager::killActor(const std::string &name)
{
std::vector<CActor*>::iterator it;
for (it=_actors.begin(); it!=_actors.end(); ++it)
{
if ((*it)->getName()==name)
{
// remove from net refferences
(*it)->removeFromOtherServices();
// remove from vision xrefs
std::vector<CActor*>::iterator it2;
for (it2=_actors.begin(); it2!=_actors.end(); ++it2)
{
(*it2)->removeRefs(*it);
}
for (int i=_actorGroups.size();i--;)
_actorGroups[i]->removeActor(*it);
// remove from container
delete *it;
_actors.erase(it);
GlobalActorCount--;
return;
}
}
}
//------------------------------------------------------------------------
// basic functionality for actor group management
// method for adding a new actorGroup to the scene
CActorGroup *CActorManager::newActorGroup(const std::string &name)
{
if (!getActorGroup(name))
{
// create a new actorGroup record and COPY it into the actorGroup vector
CActorGroup *aNewActorGroup = new CActorGroup(name);
_actorGroups.push_back(aNewActorGroup);
aNewActorGroup->display();
}
// get hold of a pointer of the copy of the actorGroup in the actorGroup vector
return getActorGroup(name);
}
// method for retrievng a pointer to a named actorGroup
// returns NULL if the actorGroup doesn't exist
CActorGroup *CActorManager::getActorGroup(const std::string &name)
{
std::vector<CActorGroup*>::iterator it;
for (it=_actorGroups.begin(); it!=_actorGroups.end(); ++it)
{
if ((*it)->getName()==name)
return (*it);
}
return NULL;
}
// method for retrievng a pointer to given actorGroup
CActorGroup *CActorManager::getActorGroup(unsigned index)
{
if (index>=_actorGroups.size())
return NULL;
else
return (_actorGroups[index]);
}
void CActorManager::removeActorGroup(const std::string &name)
{
std::vector<CActorGroup*>::iterator it;
for (it=_actorGroups.begin(); it!=_actorGroups.end(); ++it)
{
if ((*it)->getName()==name)
{
// remove all actors from this group into default group
uint i;
for (i=0; i<(*it)->actorCount(); ++i)
(*(*it))[i]->setGroup(_defaultActorGroup);
// remove from container
delete (*it);
_actorGroups.erase(it);
return;
}
}
}
//
void CActorManager::setActorsToGroup(const std::string &sourceActorGroup, const std::string &destActorGroup)
{
CActorGroup *srcGroup = getActorGroup(sourceActorGroup);
if (srcGroup == NULL)
{
nlwarning("source actor group '%s' is unknown, abort setActorsToGroup(%s, %s)", sourceActorGroup.c_str(), sourceActorGroup.c_str(), destActorGroup.c_str());
return;
}
CActorGroup *destGroup = getActorGroup(destActorGroup);
if (destGroup == NULL)
{
nlwarning("destination actor group '%s' is unknown, abort setActorsToGroup(%s, %s)", destActorGroup.c_str(), sourceActorGroup.c_str(), destActorGroup.c_str());
return;
}
uint i;
for (i=0; i<srcGroup->actorCount(); ++i)
(*srcGroup)[i]->setGroup(destGroup);
}
} // end of namespace AGS_TEST

View file

@ -1,61 +0,0 @@
/** \file actor_manager.cpp
*
* the actor manager for AgS_Test
*
* $Id: ags_timer.cpp,v 1.3 2004/03/01 19:18:37 lecroart Exp $
* $Log: ags_timer.cpp,v $
* Revision 1.3 2004/03/01 19:18:37 lecroart
* REMOVED: bad headers
*
* Revision 1.2 2003/01/28 20:36:51 miller
* Changed header comments from 'Nel Network Services' to Ryzom
*
* Revision 1.1 2002/11/28 14:57:17 portier
* #ADDED: ia_player.id
*
* Revision 1.21 2002/11/15 16:22:42 fleury
* CHANGED : the OPS has been replaced by the EGS
*
* Revision 1.20 2002/08/30 08:47:34 miller
* another quick test (non destructive)
*
* Revision 1.19 2002/08/30 08:46:09 miller
* quick test (non destructive)
*
*/
#include "ags_timer.h"
#include "game_share/tick_event_handler.h"
namespace AGS_TEST
{
CAGSTimer::CAGSTimer(uint32 dt /*= 0*/)
{
_dt = dt;
}
void CAGSTimer::set(uint32 dt)
{
_start = (uint32)CTickEventHandler::getGameCycle();
_dt = dt;
}
void CAGSTimer::add(uint32 dt)
{
_start = (uint32)CTickEventHandler::getGameCycle();
_dt += dt;
}
bool CAGSTimer::test()
{
uint32 curent = (uint32) CTickEventHandler::getGameCycle();
uint32 elapsed = curent - _start;
return ( elapsed >= _dt );
}
}

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
typedef char * TFileName;

View file

@ -1,359 +0,0 @@
/** \file ai_profile_fauna.h
*
* $Id: ai_profile_fauna.h,v 1.8 2005/08/09 12:38:24 vuarand Exp $
*
* This file defines the classes:
* - CPlanteIdleFaunaProfile
* - CStaticPlanteIdleFaunaProfile
* - CAIFaunaActivityBaseSpawnProfile
* - CWanderFaunaProfile
* - CStaticWanderFaunaProfile
* - CGrazeFaunaProfile
* - CStaticGrazeFaunaProfile
* - CRestFaunaProfile
* - CStaticRestFaunaProfile
* - CStaticFightFaunaProfile
* - CCorpseFaunaProfileFactory
* - CEatCorpseFaunaProfile
* - CStaticEatCorpseFaunaProfile
* - CCuriosityFaunaProfile
* - CStaticCuriosityFaunaProfile
*/
#ifndef AI_PROFILE_FAUNA_H
#define AI_PROFILE_FAUNA_H
#include "profile.h" // for CAIBaseProfile
#include "path_behaviors.h" // for CPathPosition
#include "ai_bot_fauna.h" // for CCorpseFaunaProfile
#include "ai_grp_fauna.h"
#include "ai_mgr_fauna.h"
class CSpawnBotFauna;
class CMovementMagnet;
// ---------------------------------------------------------------------------
// Debug defines
// ---------------------------------------------------------------------------
// COMPACT_POS_WARNINGS compress flooding warnings concerning path problems.
// Positions where the problems occures are stored and displayed and cleared
// every minute.
// :TODO: /!\ As it cannot be tested without long-time run with several
// players the following define can be commented to restore previous behavior.
#define COMPACT_POS_WARNINGS 1
class CFaunaProfileFloodLogger
{
public:
typedef std::map<std::string, int> TLogPositions;
public:
CFaunaProfileFloodLogger(int period)
: logLastTick(0)
, logPeriod(period)
{
}
public:
TLogPositions logPositions;
int logLastTick;
int logPeriod;
};
//////////////////////////////////////////////////////////////////////////////
// CPlanteIdleFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CPlanteIdleFaunaProfile
: public CAIBaseProfile
{
public:
CPlanteIdleFaunaProfile(CProfileOwner* owner);
/// @name IAIProfile implementation
//@{
virtual void beginProfile();
virtual void updateProfile(uint ticksSinceLastUpdate);
virtual void endProfile();
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_PLANTIDLE; }
virtual std::string getOneLineInfoString() const;
//@}
protected:
CSpawnBotFauna* _Bot;
};
//////////////////////////////////////////////////////////////////////////////
// CAIFaunaActivityBaseSpawnProfile //
//////////////////////////////////////////////////////////////////////////////
class CAIFaunaActivityBaseSpawnProfile
: public CAIBaseProfile
, public IMouvementMagnetOwner
{
public:
CAIFaunaActivityBaseSpawnProfile(CProfileOwner* owner);
virtual NLMISC::CSmartPtr<CMovementMagnet> const& getMovementMagnet() const;
protected:
NLMISC::CSmartPtr<CMovementMagnet> _MovementMagnet;
CPathPosition _PathPos;
bool _OutOfMagnet;
};
//////////////////////////////////////////////////////////////////////////////
// CWanderFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CWanderFaunaProfile
: public CAIFaunaActivityBaseSpawnProfile
{
public:
CWanderFaunaProfile(CProfileOwner* owner);
/// @name IAIProfile implementation
//@{
virtual void beginProfile();
virtual void updateProfile(uint ticksSinceLastUpdate);
virtual void endProfile();
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_WANDERING; }
virtual std::string getOneLineInfoString() const;
//@}
protected:
RYAI_MAP_CRUNCH::TAStarFlag _DenyFlags;
CSpawnBotFauna* _Bot;
double _magnetDist; ///< distance from bot to his magnet at last move
static CFaunaProfileFloodLogger _FloodLogger;
};
//////////////////////////////////////////////////////////////////////////////
// CGrazeFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CGrazeFaunaProfile
: public CAIFaunaActivityBaseSpawnProfile
{
public:
CGrazeFaunaProfile(CProfileOwner* owner);
/// @name IAIProfile implementation
//@{
virtual void beginProfile();
virtual void updateProfile(uint ticksSinceLastUpdate);
virtual void endProfile();
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_GRAZING; }
virtual std::string getOneLineInfoString() const;
//@}
protected:
CSpawnBotFauna* _Bot;
private:
CAITimer _CycleTimer;
uint _CycleTimerBaseTime;
bool _ArrivedInZone;
double _magnetDist; ///< distance from bot to his magnet at last move
RYAI_MAP_CRUNCH::TAStarFlag _DenyFlags;
static CFaunaProfileFloodLogger _FloodLogger;
};
//////////////////////////////////////////////////////////////////////////////
// CRestFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CRestFaunaProfile
: public CAIFaunaActivityBaseSpawnProfile
{
public:
CRestFaunaProfile(CProfileOwner* owner);
/// @name IAIProfile implementation
//@{
virtual void beginProfile();
virtual void updateProfile(uint ticksSinceLastUpdate);
virtual void endProfile();
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_RESTING; }
virtual std::string getOneLineInfoString() const;
//@}
protected:
CSpawnBotFauna* _Bot;
private:
CAITimer _CycleTimer;
uint _CycleTimerBaseTime;
bool _ArrivedInZone;
double _magnetDist; // distance from bot to his magnet at last move
RYAI_MAP_CRUNCH::TAStarFlag _DenyFlags;
static CFaunaProfileFloodLogger _FloodLogger;
};
//////////////////////////////////////////////////////////////////////////////
// CEatCorpseFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CEatCorpseFaunaProfile
: public CAIBaseProfile
{
public:
CEatCorpseFaunaProfile(CProfileOwner* owner, TDataSetRow const& corpse, RYAI_MAP_CRUNCH::TAStarFlag flag);
/// @name IAIProfile implementation
//@{
virtual void beginProfile();
virtual void updateProfile(uint ticksSinceLastUpdate);
virtual void endProfile();
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_EAT_CORPSE; }
virtual std::string getOneLineInfoString() const;
//@}
TDataSetRow _eated;
protected:
CSpawnBotFauna* _Bot;
private:
bool _atGoodDist;
CAITimer _eatTimer;
CPathPosition _PathPos;
CPathCont _PathCont;
};
//////////////////////////////////////////////////////////////////////////////
// CCuriosityFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CCuriosityFaunaProfile
: public CAIBaseProfile
{
public:
CCuriosityFaunaProfile(CProfileOwner* owner, TDataSetRow const& player, RYAI_MAP_CRUNCH::TAStarFlag flag);
/// @name IAIProfile implementation
//@{
virtual void beginProfile();
virtual void updateProfile(uint ticksSinceLastUpdate);
virtual void endProfile();
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_CURIOSITY; }
virtual std::string getOneLineInfoString() const;
//@}
TDataSetRow _player;
protected:
CSpawnBotFauna* _Bot;
private:
bool _atGoodDist;
CAITimer _curiosityTimer;
CPathPosition _PathPos;
CPathCont _PathCont;
uint32 _addCuriosityTime;
bool _TooFar;
RYAI_MAP_CRUNCH::TAStarFlag _Flag;
};
//////////////////////////////////////////////////////////////////////////////
// CCorpseFaunaProfile //
//////////////////////////////////////////////////////////////////////////////
class CCorpseFaunaProfile
: public CAIBaseProfile
{
public:
CCorpseFaunaProfile(CProfileOwner* owner);
virtual void beginProfile();
virtual void endProfile() { }
virtual void updateProfile(uint ticksSinceLastUpdate) { }
virtual std::string getOneLineInfoString() const { return NLMISC::toString("corpse fauna profile"); }
virtual AITYPES::TProfiles getAIProfileType() const { return AITYPES::ACTIVITY_CORPSE; }
bool eated() const { return _Eated; }
void setEated(bool eated) { _Eated = eated; }
void setEater(bool eater) { _HaveEater = eater; }
bool haveEater() const { return _HaveEater; }
protected:
CSpawnBotFauna* _Bot;
private:
bool _HaveEater;
bool _Eated;
};
/****************************************************************************/
/* Profile factories */
/****************************************************************************/
//- Simple profile factories -------------------------------------------------
// CPlanteIdleFaunaProfileFactory
typedef CAIGenericProfileFactory<CPlanteIdleFaunaProfile> CPlanteIdleFaunaProfileFactory;
// CWanderFaunaProfileFactory
typedef CAIGenericProfileFactory<CWanderFaunaProfile> CWanderFaunaProfileFactory;
// CGrazeFaunaProfileFactory
typedef CAIGenericProfileFactory<CGrazeFaunaProfile> CGrazeFaunaProfileFactory;
// CRestFaunaProfileFactory
typedef CAIGenericProfileFactory<CRestFaunaProfile> CRestFaunaProfileFactory;
// CCorpseFaunaProfileFactory
typedef CAIGenericProfileFactory<CCorpseFaunaProfile> CCorpseFaunaProfileFactory;
//- Complex profile factories ------------------------------------------------
// CStaticFightFaunaProfile
class CFightFaunaProfileFactory
: public IAIProfileFactory
{
public:
NLMISC::CSmartPtr<IAIProfile> createAIProfile(CProfileOwner* owner)
{
return NULL;
}
};
// CStaticEatCorpseFaunaProfile
class CEatCorpseFaunaProfileFactory
: public IAIProfileFactory
{
public:
NLMISC::CSmartPtr<IAIProfile> createAIProfile(CProfileOwner* owner)
{
#ifdef NL_DEBUG
nlassert(false);
#endif
return NULL;
}
};
// CStaticCuriosityFaunaProfile
class CCuriosityFaunaProfileFactory
: public IAIProfileFactory
{
public:
NLMISC::CSmartPtr<IAIProfile> createAIProfile(CProfileOwner* owner)
{
#ifdef NL_DEBUG
nlassert(false);
#endif
return NULL;
}
};
//- Profile factories singletons ---------------------------------------------
extern CPlanteIdleFaunaProfileFactory PlanteIdleFaunaProfileFactory;
extern CWanderFaunaProfileFactory WanderFaunaProfileFactory;
extern CGrazeFaunaProfileFactory GrazeFaunaProfileFactory;
extern CRestFaunaProfileFactory RestFaunaProfileFactory;
extern CFightFaunaProfileFactory FightFaunaProfileFactory;
extern CCorpseFaunaProfileFactory CorpseFaunaProfileFactory;
extern CEatCorpseFaunaProfileFactory EatCorpseFaunaProfileFactory;
extern CCuriosityFaunaProfileFactory CuriosityFaunaProfileFactory;
#endif

View file

@ -1,266 +0,0 @@
/** \file profile.h
*
* $Id: profile.h,v 1.34 2006/10/31 16:09:01 blanchard Exp $
*
* This file defines the classes:
* - CProfileOwner
* - IAIProfileFactory
* - CAIGenericProfileFactory
* - CAIBaseProfile
* - CProfilePtr
*/
#ifndef RYAI_AI_PROFILE_H
#define RYAI_AI_PROFILE_H
//#pragma warning (disable : 4355) // warning C4355: 'this' : used in base member initializer list
// This is the base class for defining NPC behaviour profiles
// The team infrastructure manages the allocation of AI profiles to bots
class CProfilePtr;
class IAIProfile;
//////////////////////////////////////////////////////////////////////////////
// CProfileOwner //
//////////////////////////////////////////////////////////////////////////////
class CProfileOwner
{
public:
virtual ~CProfileOwner() { }
};
//////////////////////////////////////////////////////////////////////////////
// IAIProfileFactory //
//////////////////////////////////////////////////////////////////////////////
class IAIProfileFactory
: public NLMISC::CDbgRefCount<IAIProfileFactory>
{
public:
friend class CProfilePtr;
virtual ~IAIProfileFactory() { }
virtual NLMISC::CSmartPtr<IAIProfile> createAIProfile(CProfileOwner *owner) = 0;
};
#define RYAI_DECLARE_PROFILE_FACTORY(ProfileClass) RYAI_DECLARE_FACTORY(IAIProfileFactory, ProfileClass, std::string);
#define RYAI_REGISTER_PROFILE_FACTORY(ProfileClass, KeyValue) RYAI_REGISTER_FACTORY(IAIProfileFactory, ProfileClass, std::string, std::string(KeyValue));
//////////////////////////////////////////////////////////////////////////////
// CAIGenericProfileFactory //
//////////////////////////////////////////////////////////////////////////////
template <class TProfile>
class CAIGenericProfileFactory
: public IAIProfileFactory
{
public:
NLMISC::CSmartPtr<IAIProfile> createAIProfile(CProfileOwner* owner)
{
return new TProfile(owner);
}
};
//////////////////////////////////////////////////////////////////////////////
// CAIBaseProfile //
//////////////////////////////////////////////////////////////////////////////
class IAIProfile
: public NLMISC::CRefCount
{
public:
virtual ~IAIProfile() { }
/// @name Virtual interface
//@{
// routine called when a profOwner starts to use a given profile
// note that bots have a data member called 'void *aiProfileData' reserved for the use of the profile code
// this data member should be setup here if it is to be used by the profile
virtual void beginProfile() = 0;
// routine called every time the profOwner is updated (frequency depends on player proximity, etc)
virtual void updateProfile(uint ticksSinceLastUpdate) = 0;
// routine called just before profOwner starts to use a new profile or when a profOwner dies
virtual void endProfile() = 0;
virtual AITYPES::TProfiles getAIProfileType() const = 0;
virtual std::string getOneLineInfoString() const = 0;
// routine called every time the profOwner's group changes state but profOwner maintains same ai profile
virtual void stateChangeProfile() = 0;
virtual void resumeProfile() = 0;
//@}
};
//////////////////////////////////////////////////////////////////////////////
// CAIBaseProfile //
//////////////////////////////////////////////////////////////////////////////
class CAIBaseProfile
: public IAIProfile
{
public:
virtual ~CAIBaseProfile() { }
/// @name IAIProfile base implementation
//@{
virtual void stateChangeProfile() { beginProfile(); }
virtual void resumeProfile() { }
//@}
};
//////////////////////////////////////////////////////////////////////////////
// CProfilePtr //
//////////////////////////////////////////////////////////////////////////////
class CProfilePtr
{
public:
enum TStartProfileType
{
START_BEGIN = 0,
START_RESUME
};
public:
CProfilePtr();
virtual ~CProfilePtr();
// std::string buildProfileDebugString() const;
virtual std::string getOneLineInfoString() const;
AITYPES::TProfiles getAIProfileType() const;
template <class T>
void setAIProfile(T* obj, IAIProfileFactory* profile, bool callStateChangedIfSame) const
{
if (profile)
{
setAIProfile(profile->createAIProfile(obj), callStateChangedIfSame);
}
}
void setAIProfile(NLMISC::CSmartPtr<IAIProfile> profile, bool callStateChangedIfSame = false, TStartProfileType startType = START_BEGIN) const;
void updateProfile(uint ticks) const;
void mayUpdateProfile(uint ticks) const;
IAIProfile* getAIProfile() const { return _AiProfile; }
NLMISC::CSmartPtr<IAIProfile> const& getAISpawnProfile() const { return _AiProfile; }
private:
mutable NLMISC::CSmartPtr<IAIProfile> _AiProfile;
mutable NLMISC::CSmartPtr<IAIProfile> _NextAiProfile;
mutable bool _NextAiProfileCallStateChangedIfSame;
mutable TStartProfileType _NextStartType;
mutable bool _IsUpdating;
};
//////////////////////////////////////////////////////////////////////////////
// Global functions //
//////////////////////////////////////////////////////////////////////////////
/// the lookup routine that serves as a kind of repository interface
IAIProfileFactory* lookupAIGrpProfile(char const* name);
/****************************************************************************/
/* Inlined methods */
/****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
// CProfilePtr //
//////////////////////////////////////////////////////////////////////////////
inline
CProfilePtr::CProfilePtr()
: _AiProfile(NULL)
, _NextAiProfile(NULL)
, _NextStartType(START_BEGIN)
, _IsUpdating(false)
{
}
inline
CProfilePtr::~CProfilePtr()
{
_NextAiProfile = NULL;
_AiProfile = NULL;
}
inline
std::string CProfilePtr::getOneLineInfoString() const
{
if (_AiProfile.isNull())
return std::string("No Profile");
return _AiProfile->getOneLineInfoString();
}
inline
AITYPES::TProfiles CProfilePtr::getAIProfileType() const
{
if (!_AiProfile.isNull())
return _AiProfile->getAIProfileType();
return AITYPES::BAD_TYPE; // unknown
}
inline
void CProfilePtr::setAIProfile(NLMISC::CSmartPtr<IAIProfile> profile, bool callStateChangedIfSame, TStartProfileType startType) const
{
// :NOTE: profile can be NULL
if (_IsUpdating)
{
_NextAiProfileCallStateChangedIfSame = callStateChangedIfSame;
_NextAiProfile = profile;
_NextStartType = startType;
return;
}
if (!_AiProfile.isNull())
{
// we may use the == operator because it doesn't take account of parameters (which is bad) :(
if (callStateChangedIfSame==true && _AiProfile->getAIProfileType ()==profile->getAIProfileType ()) // if we already have this profile, then call its stateChangeProfile method
{
_AiProfile->stateChangeProfile();
return;
}
_AiProfile->endProfile();
_AiProfile = NULL;
}
if (!profile.isNull())
{
_AiProfile = profile;
if (startType==START_BEGIN)
_AiProfile->beginProfile();
else
_AiProfile->resumeProfile();
}
}
inline
void CProfilePtr::updateProfile(uint ticks) const
{
BOMB_IF(_AiProfile.isNull(),"Attempting updateProfile() with _AiProfile.isNull()",return);
_IsUpdating = true;
_AiProfile->updateProfile(ticks);
_IsUpdating = false;
if (!_NextAiProfile.isNull())
{
setAIProfile(_NextAiProfile, _NextAiProfileCallStateChangedIfSame, _NextStartType);
_NextAiProfile = NULL;
}
}
inline
void CProfilePtr::mayUpdateProfile(uint ticks) const
{
if (_AiProfile)
updateProfile(ticks);
}
#endif

View file

@ -1,184 +0,0 @@
/** \file stdpch.h
*
*
* This is the ai_srevice executable's precopiled header controler file
*
*
*
*
* $Id: stdpch.h,v 1.41 2006/02/24 17:29:11 guignot Exp $
*/
#ifndef STDPCH_H
#define STDPCH_H
//----------------------------------------------------------------
// external files
//----------------------------------------------------------------
// this is up top because it contains a certain number of #pragmas to
// control compiler warnings with stlport
#include "nel/misc/types_nl.h"
//----------------------------------------------------------------
// std libs
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
//----------------------------------------------------------------
// stl
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <algorithm>
//#include <sstream>
#include <exception>
#include <utility>
#include <deque>
//----------------------------------------------------------------
// nel
#include "nel/misc/common.h"
#include "nel/misc/debug.h"
#include "nel/misc/command.h"
#include "nel/misc/variable.h"
#include "nel/misc/sheet_id.h"
#include "nel/misc/entity_id.h"
#include "nel/misc/file.h"
#include "nel/misc/path.h"
#include "nel/misc/time_nl.h"
#include "nel/misc/random.h"
#include "nel/misc/smart_ptr.h"
#include "nel/misc/vector_2d.h"
#include "nel/misc/vectord.h"
#include "nel/net/message.h"
#include "nel/net/unified_network.h"
// NeL/ligo
#include "nel/ligo/ligo_config.h"
#include "nel/ligo/primitive.h"
#include "nel/ligo/primitive_configuration.h"
//----------------------------------------------------------------
// nel net
#include "nel/net/service.h"
//----------------------------------------------------------------
// service basics
#define FOREACH(__itvar,__conttype,__contvar) \
for (__conttype::iterator __itvar(__contvar.begin()),__itvar##end(__contvar.end()); __itvar!=__itvar##end; ++__itvar)
#define FOREACH_NOINC(__itvar,__conttype,__contvar) \
for (__conttype::iterator __itvar(__contvar.begin()),__itvar##end(__contvar.end()); __itvar!=__itvar##end;)
#define FOREACHC(__itvar,__conttype,__contvar) \
for (__conttype::const_iterator __itvar(__contvar.begin()),__itvar##end(__contvar.end()); __itvar!=__itvar##end; ++__itvar)
#define FOREACHC_NOINC(__itvar,__conttype,__contvar) \
for (__conttype::const_iterator __itvar(__contvar.begin()),__itvar##end(__contvar.end()); __itvar!=__itvar##end; )
class CStringWriter
:public NLMISC::CRefCount
{
public:
CStringWriter()
{}
virtual ~CStringWriter()
{}
virtual void append(const std::string &str) = 0;
};
class CTrashStringWriter
:public CStringWriter
{
public:
CTrashStringWriter(NLMISC::CLog *log=NLMISC::InfoLog)
{}
virtual ~CTrashStringWriter()
{}
void append(const std::string &str)
{}
};
class CLogStringWriter
:public CStringWriter
{
public:
CLogStringWriter(NLMISC::CLog *log=NLMISC::InfoLog)
:_Log(log)
{}
virtual ~CLogStringWriter()
{}
void append(const std::string &str)
{
#if !FINAL_VERSION
nlassert(_Log);
#endif
if (_Log)
_Log->displayNL(str.c_str());
}
NLMISC::CLog *_Log;
};
class CArrayStringWriter
:public CStringWriter
{
public:
CArrayStringWriter(std::vector<std::string> &stringVector)
:_StringVector(stringVector)
{}
virtual ~CArrayStringWriter()
{}
void append(const std::string &str)
{
_StringVector.push_back(str);
}
std::vector<std::string> &_StringVector;
};
namespace MULTI_LINE_FORMATER {
void pushTitle(std::vector<std::string>& container, std::string const& text);
void pushEntry(std::vector<std::string>& container, std::string const& text);
void pushFooter(std::vector<std::string>& container);
}
//----------------------------------------------------------------
// game share
#include "game_share/ryzom_entity_id.h"
#include "game_share/mode_and_behaviour.h"
#include "game_share/player_visual_properties.h"
#include "../ai_share/ai_event.h"
#include "../server_share/msg_ai_service.h"
//----------------------------------------------------------------
// ai share
#include "ai_share/ai_share.h"
#include "ai_share/ai_types.h"
#include "ai_share/ai_alias_description_node.h"
#include "ai_share/ai_event_description.h"
#include "ai_share/ai_coord.h"
#include "ai_share/ai_vector.h"
#include "ai_share/angle.h"
#include "ai_share/world_map.h"
#endif /*STDPCH_H*/

View file

@ -10,10 +10,7 @@ LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/ai_entity_id.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gpms_interface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gpms_interface.h
${CMAKE_CURRENT_SOURCE_DIR}/ios_interface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ios_interface.h
${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ ai_profile_fauna.h
${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ profile.h
${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ stdpch.h)
${CMAKE_CURRENT_SOURCE_DIR}/ios_interface.h)
ADD_EXECUTABLE(ai_service ${SRC})

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "ai_generic_fight.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "ais_user_models.h"

View file

@ -1,3 +1,19 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,

View file

@ -1,3 +1,19 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,

View file

@ -1,2 +1,17 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef AI_SHARE_STDPCH_H
#define AI_SHARE_STDPCH_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "backup_file_access.h"
@ -397,7 +412,7 @@ IFileAccess::TReturnCode CWriteFile::execute(CFileAccessManager& manager)
bool fileBackuped = true;
if (fileExists && BackupFile)
{
if (!NLMISC::CFile::copyFile( (getBackupFileName(Filename)+".backup").c_str(), (getBackupFileName(Filename)).c_str()))
if (!NLMISC::CFile::copyFile( getBackupFileName(Filename)+".backup", getBackupFileName(Filename)))
{
fileBackuped = false;
if (checkFailureMode(MajorFailureIfFileUnbackupable))

View file

@ -1,7 +1,18 @@
/** \file backup_file_access.h
* Stacked backup file commands/accesses
*
*/
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef BACKUP_FILE_ACCESS_H

View file

@ -1,8 +1,18 @@
/** \file backup_service.cpp
* Temporary backup service for player character save file
*
* $Id: backup_service.cpp,v 1.53 2007/05/22 14:44:33 boucher Exp $
*/
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h"
@ -367,7 +377,7 @@ static void cbSaveCheckFile( CMessage& msgin, const std::string &serviceName, NL
try
{
NLMISC::CFile::copyFile( ( msg.FileName + string(".backup") ).c_str(), msg.FileName.c_str() );
NLMISC::CFile::copyFile( msg.FileName + string(".backup"), msg.FileName );
}
catch( Exception &e )
{

View file

@ -1,7 +1,19 @@
/** \file backup_service.h
* Temporary backup service for player character save file
*
*/
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h"
#include "nel/net/module.h"

View file

@ -338,7 +338,7 @@ void cbRestoreSave(CMemStream &msgin, TSockId host)
bool success;
success = CFile::copyFile(outputfile.c_str(), file.c_str(), false);
success = CFile::copyFile(outputfile, file, false);
CMemStream msgout;
uint32 fake = 0;
@ -431,7 +431,7 @@ void cbCopyOverSave(CMemStream &msgin, TSockId host)
strFindReplace(outputfile, string("$charid"), charid);
strFindReplace(outputfile, string("$ext"), extensions[i]);
success = CFile::copyFile(outputfile.c_str(), file.c_str(), false);
success = CFile::copyFile(outputfile, file, false);
if (!success)
result = "Failed to copy "+file+" over "+outputfile+".";

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef INCLUDED_database_GUILD_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef INCLUDED_database_OUTPOST_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef INCLUDED_database_PLR_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "egs_dynamic_sheet_manager.h"

View file

@ -528,8 +528,8 @@ bool loadAndResaveCheckCharacters( const std::vector<string>& files, NLMISC::CLo
{
id.Chars[i].Backup = id.Chars[i].File + ".tmp";
CFile::copyFile(
id.Chars[i].Backup.c_str(),
id.Chars[i].File.c_str());
id.Chars[i].Backup,
id.Chars[i].File);
}
}
@ -596,8 +596,8 @@ bool loadAndResaveCheckCharacters( const std::vector<string>& files, NLMISC::CLo
for (i=0; i<id.Chars.size(); ++i)
{
CFile::copyFile(
id.Chars[i].File.c_str(),
id.Chars[i].Backup.c_str());
id.Chars[i].File,
id.Chars[i].Backup);
CFile::deleteFile(id.Chars[i].Backup);
}
}

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef GUILD_MANAGER_INTERFACE_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CHAR_NAME_MAPPER_CLIENT_H
#define CHAR_NAME_MAPPER_CLIENT_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h"
#include "nel/misc/singleton.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef GUILD_UNIFIER_H
#define GUILD_UNIFIER_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
struct
{

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/entity_id.h"
#include "game_share/r2_types.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "character_name_extraction.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -133,9 +133,9 @@ void CPlayer::checkCrashMarker()
// if (CFile::isExists(fileName+".last_good"))
// {
// nlwarning(" Restoring last good version...");
// CFile::copyFile(fileName.c_str(), (fileName+".last_good").c_str());
// CFile::copyFile(fileName, fileName+".last_good");
// nlwarning(" And copying the backup for comparison with bad file...");
// CFile::copyFile((fileName+".before_wipe").c_str(), (fileName+".last_good").c_str());
// CFile::copyFile(fileName+".before_wipe", fileName+".last_good");
// }
// else
// {
@ -174,9 +174,9 @@ bool wipeAndRestore(const std::string &fileName)
//if (CFile::isExists(fileName+".last_good"))
//{
// nlwarning(" Restoring last good version...");
// CFile::copyFile(fileName.c_str(), (fileName+".last_good").c_str());
// CFile::copyFile(fileName, fileName+".last_good");
// nlwarning(" And copying the backup for comparison with bad file...");
// CFile::copyFile((fileName+".before_wipe").c_str(), (fileName+".last_good").c_str());
// CFile::copyFile(fileName+".before_wipe", fileName+".last_good");
//
// // restore success
// return true;

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef PLAYER_MANAGER_INTERFACE_H
#define PLAYER_MANAGER_INTERFACE_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "game_share/power_types.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <nel/misc/types_nl.h>

View file

@ -1,2 +1,17 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h"

View file

@ -1,8 +1,5 @@
FILE(GLOB SRC *.cpp *.h)
# Filter out the source files not actually compiled.
#LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp)
IF(WIN32)
ADD_LIBRARY(gameplay_module_lib STATIC ${SRC})
ELSE(WIN32)

View file

@ -1,98 +0,0 @@
/** \file stats_job_manager.h
*
* Part of STAT Module for GUS (general utilities service)
*
* This file is the header for a singleton 'job manager'. The job manager manages a list of jobs to be
* executed one after another. Each job is assumed to require one or more calls to its update() method
* in order to perform its work. Each job's finished() method returns true when the job is done
*
* $Id: stat_job_manager.h,v 1.3 2005/03/29 09:25:53 miller Exp $
*/
#ifndef STAT_JOB_MANAGER_H
#define STAT_JOB_MANAGER_H
#include "nel/misc/types_nl.h"
#include "nel/misc/debug.h"
#include "nel/misc/smart_ptr.h"
#include "game_share/singleton_registry.h"
class CJobManager: public IServiceSingleton
{
public:
static CJobManager* getInstance();
public:
class IJob: public NLMISC::CRefCount
{
public:
// virtual dtor
virtual ~IJob() {}
// start a job running (one that isn't in progress)
virtual void start()=0;
// return true if the job is finished -> the job object can be deleted
virtual bool finished()=0;
// return a status string that can be displayed in an update variable
virtual std::string getShortStatus()=0;
// get a detailed status string for display in a job list etc
virtual std::string getStatus()=0;
// display the details of the job... eg the list of files being processed with related info
virtual void display(NLMISC::CLog* log=NLMISC::InfoLog)=0;
// run the job's update to do a bit of work
virtual void update()=0;
};
public:
// add a job to the job vector and assign it a new id
uint32 addJob(NLMISC::CSmartPtr<IJob> job);
// move a job to the front of the queue - treat it as the active job
void promoteJob(uint32 idx);
// the update method used to call job updates
void serviceUpdate();
// do nothing during the service updates until 'resume()'
void pause();
// resume after a 'pause()'
void resume();
// accessors for the number of job updates per call to serviceUpdate()
void setJobUpdatesPerUpdate(uint32 count);
uint32 getJobUpdatesPerUpdate();
// get the 'pause'/'resume' state, the number of jobsUpdatesPerUpdate and the status of the active job
std::string getStatus();
// list the status of all jobs that are not finished
void listJobs(NLMISC::CLog* log=NLMISC::InfoLog);
// list the status of all jobs including those that are finished
void listJobHistory(NLMISC::CLog* log=NLMISC::InfoLog);
// call the currently active job's 'display' method
void displayCurrentJob(NLMISC::CLog* log=NLMISC::InfoLog);
// call the given job's 'display' method
void displayJob(uint32 jobId,NLMISC::CLog* log=NLMISC::InfoLog);
private:
CJobManager();
typedef std::list<uint32> TUnfinishedJobs;
typedef std::vector<NLMISC::CSmartPtr<IJob> > TJobs;
bool _Paused;
uint32 _JobUpdatesPerUpdate;
TJobs _Jobs;
TUnfinishedJobs _UnfinishedJobs;
};
#endif

View file

@ -1,7 +1,6 @@
FILE(GLOB SRC *.cpp *.h)
LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ stat_job_manager.h
${CMAKE_CURRENT_SOURCE_DIR}/ec_event_chat.cpp
LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/ec_event_chat.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gus_mfc_popups.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gus_mfc_popups.h
${CMAKE_CURRENT_SOURCE_DIR}/gus_mfc_select_with_text.cpp

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -1,8 +1,23 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !
/////////////////////////////////////////////////////////////////
1
#include "stdpch.h"
#include "rr_module_itf.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !

View file

@ -289,7 +289,7 @@ void CServerPatchApplier::_patchUpFromLive(uint32 liveVersion, uint32 installReq
if (patchIdx==it->second.size())
{
nlinfo("COPY: %s from %s",(_Directories.installDirectoryName()+it->first).c_str(),(_Directories.liveDirectoryName()+it->first).c_str());
NLMISC::CFile::copyFile((_Directories.installDirectoryName()+it->first).c_str(),(_Directories.liveDirectoryName()+it->first).c_str());
NLMISC::CFile::copyFile(_Directories.installDirectoryName()+it->first,_Directories.liveDirectoryName()+it->first);
untarIfNeeded(_Directories.installDirectoryName()+it->first);
continue;
}
@ -381,7 +381,7 @@ void CServerPatchApplier::_patchDownFromLive(uint32 liveVersion, uint32 installR
if (needBackPatchSet.find(it->first)==needBackPatchSet.end())
{
nlinfo("COPY: %s => %s",(_Directories.installDirectoryName()+it->first).c_str(),(_Directories.liveDirectoryName()+it->first).c_str());
NLMISC::CFile::copyFile((_Directories.installDirectoryName()+it->first).c_str(),(_Directories.liveDirectoryName()+it->first).c_str());
NLMISC::CFile::copyFile(_Directories.installDirectoryName()+it->first,_Directories.liveDirectoryName()+it->first);
continue;
}

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "nel/net/module_builder_parts.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CHAT_UNIFIER_CLIENT_H
#define CHAT_UNIFIER_CLIENT_H

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "nel/net/module_builder_parts.h"

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "nel/misc/variable.h"

Some files were not shown because too many files have changed in this diff Show more