1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* CHexField renamed to CBattleHex

* CHexFieldControl renamed to CClickableHex
* CCreatureAnimation.cpp/.h moved to BattleInterface/CCreatureAnimation.cpp/.h
* Removed unused project files
* Added VCMI_client filters file for VS 2010
* Gathered common parts of StdInc.h in Global.h
* Boost.Spirit has been included in PCH for ERM project
* StopWatch renamed to CStopWatch
* GuiBase.cpp split up in UIFramework/...
This commit is contained in:
beegee1
2011-12-17 18:59:59 +00:00
parent 6ea88593db
commit 2f5d6f2684
176 changed files with 3257 additions and 9059 deletions

View File

@@ -682,7 +682,7 @@ void CGameHandler::handleConnection(std::set<int> players, CConnection &c)
tlog1 << "Ended handling connection\n";
}
int CGameHandler::moveStack(int stack, SHexField dest)
int CGameHandler::moveStack(int stack, SBattleHex dest)
{
int ret = 0;
@@ -699,7 +699,7 @@ int CGameHandler::moveStack(int stack, SHexField dest)
//initing necessary tables
bool accessibility[GameConstants::BFIELD_SIZE];
std::vector<SHexField> accessible = gs->curB->getAccessibility(curStack, false);
std::vector<SBattleHex> accessible = gs->curB->getAccessibility(curStack, false);
for(int b=0; b<GameConstants::BFIELD_SIZE; ++b)
{
accessibility[b] = false;
@@ -715,12 +715,12 @@ int CGameHandler::moveStack(int stack, SHexField dest)
if(curStack->attackerOwned)
{
if(accessibility[dest+1])
dest += SHexField::RIGHT;
dest += SBattleHex::RIGHT;
}
else
{
if(accessibility[dest-1])
dest += SHexField::LEFT;
dest += SBattleHex::LEFT;
}
}
@@ -728,7 +728,7 @@ int CGameHandler::moveStack(int stack, SHexField dest)
return 0;
bool accessibilityWithOccupyable[GameConstants::BFIELD_SIZE];
std::vector<SHexField> accOc = gs->curB->getAccessibility(curStack, true);
std::vector<SBattleHex> accOc = gs->curB->getAccessibility(curStack, true);
for(int b=0; b<GameConstants::BFIELD_SIZE; ++b)
{
accessibilityWithOccupyable[b] = false;
@@ -741,7 +741,7 @@ int CGameHandler::moveStack(int stack, SHexField dest)
//if(dists[dest] > curStack->creature->speed && !(stackAtEnd && dists[dest] == curStack->creature->speed+1)) //we can attack a stack if we can go to adjacent hex
// return false;
std::pair< std::vector<SHexField>, int > path = gs->curB->getPath(curStack->position, dest, accessibilityWithOccupyable, curStack->hasBonusOfType(Bonus::FLYING), curStack->doubleWide(), curStack->attackerOwned);
std::pair< std::vector<SBattleHex>, int > path = gs->curB->getPath(curStack->position, dest, accessibilityWithOccupyable, curStack->hasBonusOfType(Bonus::FLYING), curStack->doubleWide(), curStack->attackerOwned);
ret = path.second;
@@ -754,7 +754,7 @@ int CGameHandler::moveStack(int stack, SHexField dest)
//inform clients about move
BattleStackMoved sm;
sm.stack = curStack->ID;
std::vector<SHexField> tiles;
std::vector<SBattleHex> tiles;
tiles.push_back(path.first[0]);
sm.tilesToMove = tiles;
sm.distance = path.second;
@@ -765,7 +765,7 @@ int CGameHandler::moveStack(int stack, SHexField dest)
else //for non-flying creatures
{
// send one package with the creature path information
std::vector<SHexField> tiles;
std::vector<SBattleHex> tiles;
int tilesToMove = std::max((int)(path.first.size() - creSpeed), 0);
for(int v=path.first.size()-1; v>=tilesToMove; --v)
{
@@ -3330,7 +3330,7 @@ bool CGameHandler::makeBattleAction( BattleAction &ba )
CStack * stack = gs->curB->getStack(ba.stackNumber);
int spellID = ba.additionalInfo;
SHexField destination(ba.destinationTile);
SBattleHex destination(ba.destinationTile);
int spellLvl = 0;
Bonus * bonus = stack->getBonus(Selector::typeSubtype(Bonus::SPELLCASTER, spellID));
@@ -3486,7 +3486,7 @@ void CGameHandler::playerMessage( ui8 player, const std::string &message )
}
}
void CGameHandler::handleSpellCasting( int spellID, int spellLvl, SHexField destination, ui8 casterSide, ui8 casterColor, const CGHeroInstance * caster, const CGHeroInstance * secHero, int usedSpellPower, ECastingMode::ECastingMode mode, const CStack * stack)
void CGameHandler::handleSpellCasting( int spellID, int spellLvl, SBattleHex destination, ui8 casterSide, ui8 casterColor, const CGHeroInstance * caster, const CGHeroInstance * secHero, int usedSpellPower, ECastingMode::ECastingMode mode, const CStack * stack)
{
const CSpell *spell = VLC->spellh->spells[spellID];
@@ -3737,7 +3737,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, SHexField dest
BattleStackMoved bsm;
bsm.distance = -1;
bsm.stack = gs->curB->activeStack;
std::vector<SHexField> tiles;
std::vector<SBattleHex> tiles;
tiles.push_back(destination);
bsm.tilesToMove = tiles;
bsm.teleporting = true;
@@ -3826,7 +3826,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, SHexField dest
ObstaclesRemoved obr;
for(int g=0; g<gs->curB->obstacles.size(); ++g)
{
std::vector<SHexField> blockedHexes = VLC->heroh->obstacles[gs->curB->obstacles[g].ID].getBlocked(gs->curB->obstacles[g].pos);
std::vector<SBattleHex> blockedHexes = VLC->heroh->obstacles[gs->curB->obstacles[g].ID].getBlocked(gs->curB->obstacles[g].pos);
if(vstd::contains(blockedHexes, destination)) //this obstacle covers given hex
{

View File

@@ -101,7 +101,7 @@ public:
bool isAllowedExchange(int id1, int id2);
bool isAllowedArrangePack(const ArrangeStacks *pack);
void giveSpells(const CGTownInstance *t, const CGHeroInstance *h);
int moveStack(int stack, SHexField dest); //returned value - travelled distance
int moveStack(int stack, SBattleHex dest); //returned value - travelled distance
void startBattle(const CArmedInstance *armies[2], int3 tile, const CGHeroInstance *heroes[2], bool creatureBank, boost::function<void(BattleResult*)> cb, const CGTownInstance *town = NULL); //use hero=NULL for no hero
void runBattle();
void checkLossVictory(ui8 player);
@@ -192,7 +192,7 @@ public:
void playerMessage( ui8 player, const std::string &message);
bool makeBattleAction(BattleAction &ba);
void handleSpellCasting(int spellID, int spellLvl, SHexField destination, ui8 casterSide, ui8 casterColor, const CGHeroInstance * caster, const CGHeroInstance * secHero, int usedSpellPower, ECastingMode::ECastingMode mode, const CStack * stack);
void handleSpellCasting(int spellID, int spellLvl, SBattleHex destination, ui8 casterSide, ui8 casterColor, const CGHeroInstance * caster, const CGHeroInstance * secHero, int usedSpellPower, ECastingMode::ECastingMode mode, const CStack * stack);
bool makeCustomAction(BattleAction &ba);
void stackTurnTrigger(const CStack * stack);
bool queryReply( ui32 qid, ui32 answer, ui8 player );

View File

@@ -1,325 +1,7 @@
#pragma once
// Standard include file
// Should be treated as a precompiled header file in the compiler settings
// We generate a .PCH file for every project due to simplicity and some annoying bugs in VisualStudio
// This file shouldn't be changed, except if there is a important header file which is missing.
#include "../Global.h"
/*
* StdInc.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
// This header should be treated as a pre compiled header file(PCH) in the compiler building settings.
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <cstdio>
#include <stdio.h>
#ifdef _WIN32
#include <tchar.h>
#else
#include "../tchar_amigaos4.h"
#endif
#include <cmath>
#include <cassert>
#include <assert.h>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <numeric>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <memory>
#include <cstdlib>
//filesystem version 3 causes problems (and it's default as of boost 1.46)
#define BOOST_FILESYSTEM_VERSION 2
#include <boost/algorithm/string.hpp>
#include <boost/assert.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/cstdint.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/logic/tribool.hpp>
#include <boost/program_options.hpp>
#include <boost/thread.hpp>
#include <boost/unordered_set.hpp>
#ifdef ANDROID
#include <android/log.h>
#endif
// Integral data types
typedef boost::uint64_t ui64; //unsigned int 64 bits (8 bytes)
typedef boost::uint32_t ui32; //unsigned int 32 bits (4 bytes)
typedef boost::uint16_t ui16; //unsigned int 16 bits (2 bytes)
typedef boost::uint8_t ui8; //unsigned int 8 bits (1 byte)
typedef boost::int64_t si64; //signed int 64 bits (8 bytes)
typedef boost::int32_t si32; //signed int 32 bits (4 bytes)
typedef boost::int16_t si16; //signed int 16 bits (2 bytes)
typedef boost::int8_t si8; //signed int 8 bits (1 byte)
// Import + Export macro declarations
#ifdef _WIN32
#define DLL_EXPORT __declspec(dllexport)
#else
#if defined(__GNUC__) && __GNUC__ >= 4
#define DLL_EXPORT __attribute__ ((visibility("default")))
#else
#define DLL_EXPORT
#endif
#endif
#ifdef _WIN32
#define DLL_IMPORT __declspec(dllimport)
#else
#if defined(__GNUC__) && __GNUC__ >= 4
#define DLL_IMPORT __attribute__ ((visibility("default")))
#else
#define DLL_IMPORT
#endif
#endif
#ifdef VCMI_DLL
#define DLL_LINKAGE DLL_EXPORT
#else
#define DLL_LINKAGE DLL_IMPORT
#endif
//a normal std::map with a const operator[] for sanity
template<typename KeyT, typename ValT>
class bmap : public std::map<KeyT, ValT>
{
public:
const ValT & operator[](KeyT key) const
{
return find(key)->second;
}
ValT & operator[](KeyT key)
{
return static_cast<std::map<KeyT, ValT> &>(*this)[key];
}
template <typename Handler> void serialize(Handler &h, const int version)
{
h & static_cast<std::map<KeyT, ValT> &>(*this);
}
};
namespace vstd
{
//returns true if container c contains item i
template <typename Container, typename Item>
bool contains(const Container & c, const Item &i)
{
return std::find(c.begin(),c.end(),i) != c.end();
}
//returns true if map c contains item i
template <typename V, typename Item, typename Item2>
bool contains(const std::map<Item,V> & c, const Item2 &i)
{
return c.find(i)!=c.end();
}
//returns true if bmap c contains item i
template <typename V, typename Item, typename Item2>
bool contains(const bmap<Item,V> & c, const Item2 &i)
{
return c.find(i)!=c.end();
}
//returns true if unordered set c contains item i
template <typename Item>
bool contains(const boost::unordered_set<Item> & c, const Item &i)
{
return c.find(i)!=c.end();
}
//returns position of first element in vector c equal to s, if there is no such element, -1 is returned
template <typename T1, typename T2>
int find_pos(const std::vector<T1> & c, const T2 &s)
{
for(size_t i=0; i < c.size(); ++i)
if(c[i] == s)
return i;
return -1;
}
//Func(T1,T2) must say if these elements matches
template <typename T1, typename T2, typename Func>
int find_pos(const std::vector<T1> & c, const T2 &s, const Func &f)
{
for(size_t i=0; i < c.size(); ++i)
if(f(c[i],s))
return i;
return -1;
}
//returns iterator to the given element if present in container, end() if not
template <typename Container, typename Item>
typename Container::iterator find(Container & c, const Item &i)
{
return std::find(c.begin(),c.end(),i);
}
//returns const iterator to the given element if present in container, end() if not
template <typename Container, typename Item>
typename Container::const_iterator find(const Container & c, const Item &i)
{
return std::find(c.begin(),c.end(),i);
}
//removes element i from container c, returns false if c does not contain i
template <typename Container, typename Item>
typename Container::size_type operator-=(Container &c, const Item &i)
{
typename Container::iterator itr = find(c,i);
if(itr == c.end())
return false;
c.erase(itr);
return true;
}
//assigns greater of (a, b) to a and returns maximum of (a, b)
template <typename t1, typename t2>
t1 &amax(t1 &a, const t2 &b)
{
if(a >= b)
return a;
else
{
a = b;
return a;
}
}
//assigns smaller of (a, b) to a and returns minimum of (a, b)
template <typename t1, typename t2>
t1 &amin(t1 &a, const t2 &b)
{
if(a <= b)
return a;
else
{
a = b;
return a;
}
}
//makes a to fit the range <b, c>
template <typename t1, typename t2, typename t3>
t1 &abetween(t1 &a, const t2 &b, const t3 &c)
{
amax(a,b);
amin(a,c);
return a;
}
//checks if a is between b and c
template <typename t1, typename t2, typename t3>
bool isbetween(const t1 &a, const t2 &b, const t3 &c)
{
return a > b && a < c;
}
//checks if a is within b and c
template <typename t1, typename t2, typename t3>
bool iswithin(const t1 &a, const t2 &b, const t3 &c)
{
return a >= b && a <= c;
}
template <typename t1, typename t2>
struct assigner
{
public:
t1 &op1;
t2 op2;
assigner(t1 &a1, const t2 & a2)
:op1(a1), op2(a2)
{}
void operator()()
{
op1 = op2;
}
};
// Assigns value a2 to a1. The point of time of the real operation can be controlled
// with the () operator.
template <typename t1, typename t2>
assigner<t1,t2> assigno(t1 &a1, const t2 &a2)
{
return assigner<t1,t2>(a1,a2);
}
//deleted pointer and sets it to NULL
template <typename T>
void clear_pointer(T* &ptr)
{
delete ptr;
ptr = NULL;
}
}
using vstd::operator-=;
// can be used for counting arrays
template<typename T, size_t N> char (&_ArrayCountObj(const T (&)[N]))[N];
#define ARRAY_COUNT(arr) (sizeof(_ArrayCountObj(arr)))
//for explicit overrides
#ifdef _MSC_VER
#define OVERRIDE override
#else
#define OVERRIDE //is there any working counterpart?
#endif
//XXX pls dont - 'debug macros' are usually more trouble than it's worth
#define HANDLE_EXCEPTION \
catch (const std::exception& e) { \
tlog1 << e.what() << std::endl; \
throw; \
} \
catch (const std::exception * e) \
{ \
tlog1 << e->what()<< std::endl; \
throw; \
} \
catch (const std::string& e) { \
tlog1 << e << std::endl; \
throw; \
}
#define HANDLE_EXCEPTIONC(COMMAND) \
catch (const std::exception& e) { \
COMMAND; \
tlog1 << e.what() << std::endl; \
throw; \
} \
catch (const std::string &e) \
{ \
COMMAND; \
tlog1 << e << std::endl; \
throw; \
}
#include "../lib/CLogger.h"
// Here you can add specific libraries and macros which are specific to this project.

View File

@@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Server" />
<Option platforms="Windows;" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug Win32">
<Option platforms="Windows;" />
<Option output="bin\Debug\VCMI_server" prefix_auto="1" extension_auto="1" />
<Option working_dir="bin\Debug\" />
<Option object_output="obj\Debug\" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add library="..\..\lib\bin\Debug\libVCMI_lib.a" />
</Linker>
</Target>
<Target title="Release Win32">
<Option platforms="Windows;" />
<Option output="bin\Release\VCMI_server" prefix_auto="1" extension_auto="1" />
<Option working_dir="bin\Release\" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-Os" />
<Add option="-O3" />
<Add option="-O2" />
<Add option="-O1" />
<Add option="-O" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="..\..\lib\bin\Release\libVCMI_lib.a" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-D_WIN32" />
<Add directory="$(#zlib.include)" />
<Add directory="$(#boost.include)" />
</Compiler>
<Linker>
<Add option="-llibboost_thread-mgw43-mt-1_37" />
<Add option="-llibboost_system-mgw43-mt-1_37" />
<Add option="-llibboost_filesystem-mgw43-mt-1_37" />
<Add option="-lwsock32" />
<Add option="-lws2_32" />
<Add directory="$(#zlib.lib)" />
<Add directory="$(#boost.lib)" />
</Linker>
<Unit filename="CGameHandler.cpp" />
<Unit filename="CGameHandler.h" />
<Unit filename="CVCMIServer.cpp" />
<Unit filename="CVCMIServer.h" />
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@@ -204,6 +204,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Global.h" />
<ClInclude Include="CGameHandler.h" />
<ClInclude Include="CVCMIServer.h" />
<ClInclude Include="StdInc.h" />

View File

@@ -1,92 +0,0 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# NOCDDL
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
.clean-post: .clean-impl
# Add your post 'clean' code here...
# clobber
clobber: .clobber-post
.clobber-pre:
# Add your pre 'clobber' code here...
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
# all
all: .all-post
.all-pre:
# Add your pre 'all' code here...
.all-post: .all-impl
# Add your post 'all' code here...
# help
help: .help-post
.help-pre:
# Add your pre 'help' code here...
.help-post: .help-impl
# Add your post 'help' code here...
# include project implementation makefile
include nbproject/Makefile-impl.mk

View File

@@ -1,81 +0,0 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
CC=gcc
CCC=g++
CXX=g++
FC=gfortran
# Macros
PLATFORM=GNU-Linux-x86
# Include project Makefile
include Makefile
# Object Directory
OBJECTDIR=build/Debug/${PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CVCMIServer.o \
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch/CLodHandler.o \
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CGameHandler.o
# C Compiler Flags
CFLAGS=
# CC Compiler Flags
CCFLAGS=
CXXFLAGS=
# Fortran Compiler Flags
FFLAGS=
# Link Libraries and Options
LDLIBSOPTIONS=-L../../../../boost/lib -Wl,-rpath ../../lib/vcmi_lib/dist/Debug/GNU-Linux-x86 -L../../lib/vcmi_lib/dist/Debug/GNU-Linux-x86 -lvcmi_lib
# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
${MAKE} -f nbproject/Makefile-Debug.mk dist/Debug/${PLATFORM}/vcmi_server
dist/Debug/${PLATFORM}/vcmi_server: ../../lib/vcmi_lib/dist/Debug/GNU-Linux-x86/libvcmi_lib.so
dist/Debug/${PLATFORM}/vcmi_server: ${OBJECTFILES}
${MKDIR} -p dist/Debug/${PLATFORM}
${LINK.cc} -lboost_system-mt -lboost_thread-mt -lboost_filesystem-mt -lz -o dist/Debug/${PLATFORM}/vcmi_server ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CVCMIServer.o: ../CVCMIServer.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/..
$(COMPILE.cc) -g -I../../../../boost/include/boost-1_37 -I../.. -o ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CVCMIServer.o ../CVCMIServer.cpp
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch/CLodHandler.o: ../../hch/CLodHandler.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch
$(COMPILE.cc) -g -I../../../../boost/include/boost-1_37 -I../.. -o ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch/CLodHandler.o ../../hch/CLodHandler.cpp
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CGameHandler.o: ../CGameHandler.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/..
$(COMPILE.cc) -g -I../../../../boost/include/boost-1_37 -I../.. -o ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CGameHandler.o ../CGameHandler.cpp
# Subprojects
.build-subprojects:
cd ../../lib/vcmi_lib && ${MAKE} -f Makefile-nb CONF=Debug
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r build/Debug
${RM} dist/Debug/${PLATFORM}/vcmi_server
# Subprojects
.clean-subprojects:
cd ../../lib/vcmi_lib && ${MAKE} -f Makefile-nb CONF=Debug clean

View File

@@ -1,77 +0,0 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
CC=gcc
CCC=g++
CXX=g++
FC=gfortran
# Macros
PLATFORM=GNU-Linux-x86
# Include project Makefile
include Makefile
# Object Directory
OBJECTDIR=build/Release/${PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CVCMIServer.o \
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch/CLodHandler.o \
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CGameHandler.o
# C Compiler Flags
CFLAGS=
# CC Compiler Flags
CCFLAGS=
CXXFLAGS=
# Fortran Compiler Flags
FFLAGS=
# Link Libraries and Options
LDLIBSOPTIONS=
# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
${MAKE} -f nbproject/Makefile-Release.mk dist/Release/${PLATFORM}/vcmi_server
dist/Release/${PLATFORM}/vcmi_server: ${OBJECTFILES}
${MKDIR} -p dist/Release/${PLATFORM}
${LINK.cc} -o dist/Release/${PLATFORM}/vcmi_server ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CVCMIServer.o: ../CVCMIServer.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/..
$(COMPILE.cc) -O2 -o ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CVCMIServer.o ../CVCMIServer.cpp
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch/CLodHandler.o: ../../hch/CLodHandler.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch
$(COMPILE.cc) -O2 -o ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../../hch/CLodHandler.o ../../hch/CLodHandler.cpp
${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CGameHandler.o: ../CGameHandler.cpp
${MKDIR} -p ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/..
$(COMPILE.cc) -O2 -o ${OBJECTDIR}/_ext/home/t0/vcmi/trunk/server/vcmi_server/../CGameHandler.o ../CGameHandler.cpp
# Subprojects
.build-subprojects:
# Clean Targets
.clean-conf:
${RM} -r build/Release
${RM} dist/Release/${PLATFORM}/vcmi_server
# Subprojects
.clean-subprojects:

View File

@@ -1,123 +0,0 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a pre- and a post- target defined where you can add customization code.
#
# This makefile implements macros and targets common to all configurations.
#
# NOCDDL
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
# and .clean-reqprojects-conf unless SUB has the value 'no'
SUB_no=NO
SUBPROJECTS=${SUB_${SUB}}
BUILD_SUBPROJECTS_=.build-subprojects
BUILD_SUBPROJECTS_NO=
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
CLEAN_SUBPROJECTS_=.clean-subprojects
CLEAN_SUBPROJECTS_NO=
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
# Project Name
PROJECTNAME=vcmi_server
# Active Configuration
DEFAULTCONF=Debug
CONF=${DEFAULTCONF}
# All Configurations
ALLCONFS=Debug Release
# build
.build-impl: .build-pre .validate-impl .depcheck-impl
@#echo "=> Running $@... Configuration=$(CONF)"
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
# clean
.clean-impl: .clean-pre .validate-impl .depcheck-impl
@#echo "=> Running $@... Configuration=$(CONF)"
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
# clobber
.clobber-impl: .clobber-pre .depcheck-impl
@#echo "=> Running $@..."
for CONF in ${ALLCONFS}; \
do \
${MAKE} -f nbproject/Makefile-$${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
done
# all
.all-impl: .all-pre .depcheck-impl
@#echo "=> Running $@..."
for CONF in ${ALLCONFS}; \
do \
${MAKE} -f nbproject/Makefile-$${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf; \
done
# dependency checking support
.depcheck-impl:
@echo "# This code depends on make tool being used" >.dep.inc
@if [ -n "${MAKE_VERSION}" ]; then \
echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
echo "include \$${DEPFILES}" >>.dep.inc; \
echo "endif" >>.dep.inc; \
else \
echo ".KEEP_STATE:" >>.dep.inc; \
echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
fi
# configuration validation
.validate-impl:
@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
then \
echo ""; \
echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
echo "See 'make help' for details."; \
echo "Current directory: " `pwd`; \
echo ""; \
fi
@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
then \
exit 1; \
fi
# help
.help-impl: .help-pre
@echo "This makefile supports the following configurations:"
@echo " ${ALLCONFS}"
@echo ""
@echo "and the following targets:"
@echo " build (default target)"
@echo " clean"
@echo " clobber"
@echo " all"
@echo " help"
@echo ""
@echo "Makefile Usage:"
@echo " make [CONF=<CONFIGURATION>] [SUB=no] build"
@echo " make [CONF=<CONFIGURATION>] [SUB=no] clean"
@echo " make [SUB=no] clobber"
@echo " make [SUB=no] all"
@echo " make help"
@echo ""
@echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
@echo " also build subprojects."
@echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
@echo " also clean subprojects."
@echo "Target 'clobber' will remove all built files from all configurations and,"
@echo " unless 'SUB=no', also from subprojects."
@echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
@echo " also build subprojects."
@echo "Target 'help' prints this message."
@echo ""

View File

@@ -1,72 +0,0 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
PLATFORM=GNU-Linux-x86
TMPDIR=build/Debug/${PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/Debug/${PLATFORM}/vcmi_server
OUTPUT_BASENAME=vcmi_server
PACKAGE_TOP_DIR=vcmiserver/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p dist/Debug/${PLATFORM}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/vcmiserver/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f dist/Debug/${PLATFORM}/package/vcmiserver.tar
cd ${TMPDIR}
tar -vcf ../../../../dist/Debug/${PLATFORM}/package/vcmiserver.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}

View File

@@ -1,72 +0,0 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
PLATFORM=GNU-Linux-x86
TMPDIR=build/Release/${PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/Release/${PLATFORM}/vcmi_server
OUTPUT_BASENAME=vcmi_server
PACKAGE_TOP_DIR=vcmiserver/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p dist/Release/${PLATFORM}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/vcmiserver/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f dist/Release/${PLATFORM}/package/vcmiserver.tar
cd ${TMPDIR}
tar -vcf ../../../../dist/Release/${PLATFORM}/package/vcmiserver.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}

View File

@@ -1,127 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="51">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
<itemPath>../CGameHandler.h</itemPath>
<itemPath>../../hch/CLodHandler.h</itemPath>
<itemPath>../CVCMIServer.h</itemPath>
</logicalFolder>
<logicalFolder name="ResourceFiles"
displayName="Resource Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>../CGameHandler.cpp</itemPath>
<itemPath>../../hch/CLodHandler.cpp</itemPath>
<itemPath>../CVCMIServer.cpp</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<sourceRootList>
<Elem>..</Elem>
</sourceRootList>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="Debug" type="1">
<toolsSet>
<developmentServer>localhost</developmentServer>
<compilerSet>GNU|GNU</compilerSet>
<platform>2</platform>
</toolsSet>
<compileType>
<ccCompilerTool>
<includeDirectories>
<directoryPath>../../../../boost/include/boost-1_37</directoryPath>
<directoryPath>../..</directoryPath>
</includeDirectories>
</ccCompilerTool>
<linkerTool>
<linkerAddLib>
<directoryPath>../../../../boost/lib</directoryPath>
</linkerAddLib>
<linkerLibItems>
<linkerLibProjectItem>
<makeArtifact PL="../../lib/vcmi_lib"
CT="2"
CN="Debug"
AC="true"
BL="true"
WD="../../lib/vcmi_lib"
BC="${MAKE} -f Makefile-nb CONF=Debug"
CC="${MAKE} -f Makefile-nb CONF=Debug clean"
OP="dist/Debug/GNU-Linux-x86/libvcmi_lib.so">
</makeArtifact>
</linkerLibProjectItem>
</linkerLibItems>
<commandLine>-lboost_system-mt -lboost_thread-mt -lboost_filesystem-mt -lz</commandLine>
</linkerTool>
</compileType>
<item path="../../hch/CLodHandler.cpp">
<itemTool>1</itemTool>
</item>
<item path="../../hch/CLodHandler.h">
<itemTool>3</itemTool>
</item>
<item path="../CGameHandler.cpp">
<itemTool>1</itemTool>
</item>
<item path="../CGameHandler.h">
<itemTool>3</itemTool>
</item>
<item path="../CVCMIServer.cpp">
<itemTool>1</itemTool>
</item>
<item path="../CVCMIServer.h">
<itemTool>3</itemTool>
</item>
</conf>
<conf name="Release" type="1">
<toolsSet>
<developmentServer>localhost</developmentServer>
<compilerSet>GNU|GNU</compilerSet>
<platform>2</platform>
</toolsSet>
<compileType>
<cCompilerTool>
<developmentMode>5</developmentMode>
</cCompilerTool>
<ccCompilerTool>
<developmentMode>5</developmentMode>
</ccCompilerTool>
<fortranCompilerTool>
<developmentMode>5</developmentMode>
</fortranCompilerTool>
<linkerTool>
<linkerLibItems>
</linkerLibItems>
</linkerTool>
</compileType>
<item path="../../hch/CLodHandler.cpp">
<itemTool>1</itemTool>
</item>
<item path="../../hch/CLodHandler.h">
<itemTool>3</itemTool>
</item>
<item path="../CGameHandler.cpp">
<itemTool>1</itemTool>
</item>
<item path="../CGameHandler.h">
<itemTool>3</itemTool>
</item>
<item path="../CVCMIServer.cpp">
<itemTool>1</itemTool>
</item>
<item path="../CVCMIServer.h">
<itemTool>3</itemTool>
</item>
</conf>
</confs>
</configurationDescriptor>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.cnd.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>vcmi_server</name>
<make-project-type>0</make-project-type>
<c-extensions/>
<cpp-extensions>cpp</cpp-extensions>
<header-extensions>h</header-extensions>
<sourceEncoding>UTF-8</sourceEncoding>
<make-dep-projects>
<make-dep-project>../../lib/vcmi_lib</make-dep-project>
</make-dep-projects>
</data>
</configuration>
</project>