1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-11 11:31:52 +02:00

Merge branch 'develop' into SpellsRefactoring8

This commit is contained in:
AlexVinS 2016-09-05 05:22:50 +03:00
commit 4cd264ef86
9 changed files with 86 additions and 308 deletions

View File

@ -1,30 +1,28 @@
sudo: required
dist: trusty
language: cpp
before_install:
#new boost
- sudo add-apt-repository --yes ppa:boost-latest/ppa
#new GCC
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
#new Clang
- sudo add-apt-repository --yes ppa:h-rayflood/llvm
#new SDL2
- sudo add-apt-repository --yes ppa:zoogie/sdl2-snapshots
#new Qt
- sudo add-apt-repository --yes ppa:beineri/opt-qt532
- sudo add-apt-repository --yes ppa:beineri/opt-qt57-trusty
#new CMake
- sudo add-apt-repository --yes ppa:andykimpe/cmake
- sudo add-apt-repository --yes ppa:george-edison55/cmake-3.x
- sudo apt-get update -qq
- sudo apt-get install -qq $SUPPORT
- sudo apt-get install -qq $PACKAGE
- sudo apt-get install -qq cmake libboost1.55-all-dev zlib1g-dev
- sudo apt-get install -qq cmake libboost1.54-all-dev zlib1g-dev
- sudo apt-get install -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
- sudo apt-get install -qq libavformat-dev libswscale-dev
- sudo apt-get install -qq qt53declarative
- sudo apt-get install -qq qt57declarative
#setup compiler
- source /opt/qt53/bin/qt53-env.sh
- source /opt/qt57/bin/qt57-env.sh
- export CC=${REAL_CC} CXX=${REAL_CXX}
before_script:
@ -42,16 +40,14 @@ matrix:
exclude:
- env: ignore=this
include:
- compiler: clang # fails all the time - missing packages?
env: REAL_CC=clang-3.2 REAL_CXX=clang++-3.2 PACKAGE=clang-3.2 SUPPORT=g++-4.8
- compiler: clang
env: REAL_CC=clang-3.3 REAL_CXX=clang++-3.3 PACKAGE=clang-3.3 SUPPORT=g++-4.8
env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=libstdc++-4.8-dev
- compiler: clang
env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=g++-4.8
#- compiler: gcc # fails due to running out of memory - vcmi need too much of it for successfull compilation
# env: REAL_CC=gcc-4.7 REAL_CXX=g++-4.7 PACKAGE=g++-4.7 SUPPORT=
#- compiler: gcc # same as 4.7
# env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT=
env: REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PACKAGE=clang-3.5 SUPPORT=libstdc++-4.8-dev
- compiler: clang
env: REAL_CC=clang-3.6 REAL_CXX=clang++-3.6 PACKAGE=clang-3.6 SUPPORT=libstdc++-4.8-dev
- compiler: gcc
env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT=
notifications:
email:

View File

@ -398,6 +398,16 @@ void VCAI::objectRemoved(const CGObjectInstance *obj)
for (auto h : cb->getHeroesInfo())
unreserveObject(h, obj);
//TODO: Find better way to handle hero boat removal
if(auto hero = dynamic_cast<const CGHeroInstance *>(obj))
{
if(hero->boat)
{
vstd::erase_if_present(visitableObjs, hero->boat);
vstd::erase_if_present(alreadyVisited, hero->boat);
}
}
cachedSectorMaps.clear(); //invalidate all paths
//TODO

View File

@ -1,239 +0,0 @@
{
"Coldshadow's Fantasy":
{
"minSize" : "xl+u", "maxSize" : "xl+u",
"players" : "4-8", "cpu" : "3-6",
"zones":
{
"1":
{
"type" : "playerStart", "size" : 30, "owner" : 1,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "normal",
"mines" : {"wood" : 2, "ore" : 2, "gems" : 1, "crystal" : 1, "sulfur" : 1, "mercury" : 1, "gold" : 1},
"treasure" : [
{"min" : 7500, "max": 25000, "density": 4},
{"min" : 3000, "max": 9000, "density": 6},
{"min" : 300, "max": 3000, "density": 8}
]
},
"2":
{
"type" : "cpuStart", "size" : 30, "owner" : 2,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "weak",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"3":
{
"type" : "cpuStart", "size" : 30, "owner" : 3,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "weak",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"4":
{
"type" : "cpuStart", "size" : 30, "owner" : 4,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "weak",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"5":
{
"type" : "playerStart", "size" : 30, "owner" : 5,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "normal",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"6":
{
"type" : "cpuStart", "size" : 30, "owner" : 6,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "weak",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"7":
{
"type" : "cpuStart", "size" : 30, "owner" : 7,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "weak",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"8":
{
"type" : "cpuStart", "size" : 30, "owner" : 8,
"playerTowns" : { "castles" : 1 },
"neutralTowns" : { "towns" : 1 },
"monsters" : "weak",
"minesLikeZone" : 1,
"treasureLikeZone" : 1
},
"9":
{
"type" : "treasure", "size" : 15,
"terrainTypes" : ["subterra"], "matchTerrainToTown" : false,
"neutralTowns" : { "castles" : 1 },
"monsters" : "strong",
"mines" : {"gems" : 1, "sulfur" : 1, "mercury" : 1, "crystal" : 1},
"treasure" : [
{"min" : 45000, "max": 75000, "density": 3},
{"min" : 15000, "max": 50000, "density": 3},
{"min" : 3080, "max": 12500, "density": 4}
]
},
"10":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "normal",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"11":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "normal",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"12":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "normal",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"13":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "strong",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"14":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "normal",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"15":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "normal",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"16":
{
"type" : "treasure", "size" : 15,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "normal",
"minesLikeZone" : 9,
"treasureLikeZone" : 9
},
"17":
{
"type" : "junction", "size" : 30,
"terrainTypeLikeZone" : 9,
"allowedTowns" : ["neutral"],
"monsters" : "strong",
"mines" : {"gold" : 1},
"treasure" : [
{"min" : 65000, "max": 100000, "density": 3},
{"min" : 50000, "max": 100000, "density": 3},
{"min" : 10000, "max": 15000, "density": 3}
]
},
"18":
{
"type" : "junction", "size" : 30,
"terrainTypeLikeZone" : 9,
"allowedTowns" : ["neutral"],
"monsters" : "strong",
"minesLikeZone" : 17,
"treasureLikeZone" : 17
},
"19":
{
"type" : "junction", "size" : 30,
"terrainTypeLikeZone" : 9,
"allowedTowns" : ["neutral"],
"monsters" : "strong",
"minesLikeZone" : 17,
"treasureLikeZone" : 17
},
"20":
{
"type" : "junction", "size" : 30,
"terrainTypeLikeZone" : 9,
"allowedTowns" : ["neutral"],
"monsters" : "strong",
"minesLikeZone" : 17,
"treasureLikeZone" : 17
},
"21":
{
"type" : "treasure", "size" : 20,
"terrainTypeLikeZone" : 9,
"neutralTowns" : { "castles" : 1 },
"monsters" : "strong",
"treasure" : [
{"min" : 100000, "max": 130000, "density": 3},
{"min" : 100000, "max": 150000, "density": 3},
{"min" : 20000, "max": 60000, "density": 3}
]
}
},
"connections" :
[
{ "a" : "1", "b" : "9", "guard" : 36000 },
{ "a" : "2", "b" : "10", "guard" : 12000 },
{ "a" : "3", "b" : "11", "guard" : 12000 },
{ "a" : "4", "b" : "12", "guard" : 12000 },
{ "a" : "5", "b" : "13", "guard" : 36000 },
{ "a" : "6", "b" : "14", "guard" : 12000 },
{ "a" : "7", "b" : "15", "guard" : 12000 },
{ "a" : "8", "b" : "16", "guard" : 12000 },
{ "a" : "9", "b" : "17", "guard" : 75000 },
{ "a" : "10", "b" : "17", "guard" : 25000 },
{ "a" : "11", "b" : "18", "guard" : 25000 },
{ "a" : "12", "b" : "18", "guard" : 25000 },
{ "a" : "13", "b" : "19", "guard" : 75000 },
{ "a" : "14", "b" : "19", "guard" : 25000 },
{ "a" : "15", "b" : "20", "guard" : 25000 },
{ "a" : "16", "b" : "20", "guard" : 25000 },
{ "a" : "17", "b" : "18", "guard" : 50000 },
{ "a" : "19", "b" : "20", "guard" : 50000 },
{ "a" : "17", "b" : "21", "guard" : 60000 },
{ "a" : "18", "b" : "21", "guard" : 60000 },
{ "a" : "19", "b" : "21", "guard" : 60000 },
{ "a" : "20", "b" : "21", "guard" : 60000 }
]
}
}

View File

@ -1,12 +0,0 @@
{
"name" : "Coldshadow's Fantasy",
"description" : "Random map template, 4-8p XL+U",
"version" : "0.99",
"author" : "Coldshadow, ported by VCMI Team",
"contact" : "http://forum.vcmi.eu/index.php",
"modType" : "Templates",
"templates" : [
"config/defaultTemplates/coldshadowsFantasy"
],
}

View File

@ -40,6 +40,9 @@
}
}
},
"absoluteImmunity":{
"SIEGE_WEAPON": true
},
"flags" : {
"indifferent": true
}
@ -74,6 +77,9 @@
}
}
},
"absoluteImmunity":{
"SIEGE_WEAPON": true
},
"immunity" : {
"UNDEAD": true,
"NON_LIVING": true
@ -139,6 +145,9 @@
}
}
},
"absoluteImmunity":{
"SIEGE_WEAPON": true
},
"immunity" : {
"UNDEAD": true,
"NON_LIVING": true
@ -179,6 +188,9 @@
}
}
},
"absoluteImmunity":{
"SIEGE_WEAPON": true
},
"flags" : {
"negative": true
}
@ -207,6 +219,9 @@
}
}
},
"absoluteImmunity":{
"SIEGE_WEAPON": true
},
"immunity" : {
"UNDEAD": true,
"NON_LIVING": true
@ -230,6 +245,9 @@
"range" : "0-1"
}
},
"absoluteImmunity":{
"SIEGE_WEAPON": true
},
"immunity" : {
"UNDEAD": true,
"NON_LIVING": true
@ -296,6 +314,7 @@
},
"absoluteImmunity" : {
"UNDEAD": true,
"SIEGE_WEAPON": true,
"NON_LIVING": true
},
"flags" : {

View File

@ -2,7 +2,7 @@
"quicksand" : {
"index" : 10,
"targetType" : "NO_TARGET",
"sounds": {
"cast": "QUIKSAND"
},
@ -18,7 +18,7 @@
"landMine" : {
"index" : 11,
"targetType" : "NO_TARGET",
"sounds": {
"cast": ""
},
@ -38,7 +38,7 @@
"forceField" : {
"index" : 12,
"targetType" : "LOCATION",
"sounds": {
"cast": "FORCEFLD"
},
@ -56,8 +56,8 @@
},
"fireWall" : {
"index" : 13,
"targetType" : "LOCATION",
"targetType" : "LOCATION",
"sounds": {
"cast": "FIREWALL"
},
@ -66,7 +66,7 @@
"range" : "0",
"targetModifier":{
"clearAffected": true
}
}
}
},
"flags" : {
@ -79,8 +79,8 @@
},
"earthquake" : {
"index" : 14,
"targetType" : "NO_TARGET",
"targetType" : "NO_TARGET",
"sounds": {
"cast": "ERTHQUAK"
},
@ -94,27 +94,27 @@
"indifferent": true
}
},
"dispel" : {
"index" : 35,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"animation":{
"affect":["C05SPW"] //C05SPW0
},
},
"sounds": {
"cast": "DISPELL"
},
"levels" : {
"base":{
"targetModifier":{"smart":true},
"targetModifier":{"smart":true},
"range" : "0"
},
"advanced":{
"targetModifier":{"smart":false}
"targetModifier":{"smart":false}
},
"expert":{
"targetModifier":{"smart":false},
"targetModifier":{"smart":false},
"range" : "X"
}
},
@ -124,11 +124,11 @@
},
"cure" : {
"index" : 37,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"animation":{
"affect":["C03SPW"]//C03SPW0
},
"sounds": {
"cast": "CURE"
},
@ -147,8 +147,8 @@
},
"resurrection" : {
"index" : 38,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"animation":{
"affect":["C01SPE0"]
},
@ -167,16 +167,17 @@
},
"absoluteImmunity" : {
"UNDEAD": true,
"SIEGE_WEAPON": true,
"NON_LIVING": true
}
},
"animateDead" : {
"index" : 39,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"animation":{
"affect":["C01SPE0"]
},
},
"sounds": {
"cast": "ANIMDEAD"
},
@ -196,11 +197,11 @@
},
"sacrifice" : {
"index" : 40,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"animation":{
"affect":["C01SPE0"]
},
},
"sounds": {
"cast": "SACRIF1"
},
@ -215,14 +216,15 @@
"positive": true
},
"absoluteImmunity" : {
"SIEGE_WEAPON": true,
"UNDEAD": true,
"NON_LIVING": true
}
},
"teleport" : {
"index" : 63,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"sounds": {
"cast": "TELPTOUT"
},
@ -241,10 +243,10 @@
},
"removeObstacle" : {
"index" : 64,
"targetType" : "OBSTACLE",
"targetType" : "OBSTACLE",
"animation":{
"cast":[2]
},
},
"sounds": {
"cast": "REMOVEOB"
},
@ -259,10 +261,10 @@
},
"clone" : {
"index" : 65,
"targetType" : "CREATURE",
"targetType" : "CREATURE",
"animation":{
"cast":[2]
},
},
"sounds": {
"cast": "CLONE"
},
@ -281,10 +283,10 @@
},
"fireElemental" : {
"index" : 66,
"targetType" : "NO_TARGET",
"targetType" : "NO_TARGET",
"animation":{
"cast":[2]
},
},
"sounds": {
"cast": "SUMNELM"
},
@ -299,10 +301,10 @@
},
"earthElemental" : {
"index" : 67,
"targetType" : "NO_TARGET",
"targetType" : "NO_TARGET",
"animation":{
"cast":[2]
},
},
"sounds": {
"cast": "SUMNELM"
},
@ -317,10 +319,10 @@
},
"waterElemental" : {
"index" : 68,
"targetType" : "NO_TARGET",
"targetType" : "NO_TARGET",
"animation":{
"cast":[2]
},
},
"sounds": {
"cast": "SUMNELM"
},
@ -335,10 +337,10 @@
},
"airElemental" : {
"index" : 69,
"targetType" : "NO_TARGET",
"targetType" : "NO_TARGET",
"animation":{
"cast":[2]
},
},
"sounds": {
"cast": "SUMNELM"
},

View File

@ -310,6 +310,7 @@
"spell.curse": true
},
"absoluteImmunity" : {
"SIEGE_WEAPON": true,
"UNDEAD": true
},
"flags" : {

View File

@ -77,7 +77,7 @@
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>VCMI_lib.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5Network.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>VCMI_lib.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5Network.lib;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\..\libs;..</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>

View File

@ -1,3 +1,4 @@
#include "StdInc.h"
#include "sdldisplayquery.h"
#include <QString>