From 515c30247b545482ca748da63df5cc749240e765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Sat, 2 Feb 2008 00:41:00 +0000 Subject: [PATCH] * added Conflux * minor fixes --- CCastleInterface.cpp | 13 +++++++++---- config/buildings.txt | 44 ++++++++++++++++++++++++++++++++++++++++++- config/buildings2.txt | 34 ++++++++++++++++++++++++++++++--- config/buildings3.txt | 39 +++++++++++++++++++++++++++++++++++++- config/buildings4.txt | 6 ++++++ hch/CAmbarCendamo.cpp | 15 +++++++++------ hch/CTownHandler.cpp | 3 ++- 7 files changed, 138 insertions(+), 16 deletions(-) diff --git a/CCastleInterface.cpp b/CCastleInterface.cpp index ab694defd..8af9d937f 100644 --- a/CCastleInterface.cpp +++ b/CCastleInterface.cpp @@ -12,6 +12,15 @@ CBuildingRect::CBuildingRect(Structure *Str) :str(Str) { def = CGI->spriteh->giveDef(Str->defName); + pos.x = str->pos.x; + pos.y = str->pos.y; + pos.w = def->ourImages[0].bitmap->w; + pos.h = def->ourImages[0].bitmap->h; + if(Str->ID<0 || (Str->ID>=27 && Str->ID<=29)) + { + area = border = NULL; + return; + } if (border = CGI->bitmaph->loadBitmap(str->borderName)) SDL_SetColorKey(border,SDL_SRCCOLORKEY,SDL_MapRGB(border->format,0,255,255)); else @@ -20,10 +29,6 @@ CBuildingRect::CBuildingRect(Structure *Str) ;//SDL_SetColorKey(area,SDL_SRCCOLORKEY,SDL_MapRGB(area->format,0,255,255)); else std::cout << "Warning: no area for "<ID<pos.x; - pos.y = str->pos.y; - pos.w = def->ourImages[0].bitmap->w; - pos.h = def->ourImages[0].bitmap->h; } CBuildingRect::~CBuildingRect() diff --git a/config/buildings.txt b/config/buildings.txt index 9df21446e..f4b594480 100644 --- a/config/buildings.txt +++ b/config/buildings.txt @@ -304,4 +304,46 @@ 7 42 TBFRUP_5.def 0 4 7 43 TBFRUP_6.def 587 263 7 29 TBFRWTRW.def 320 141 -7 20 TBFRBOAT.def 197 294 \ No newline at end of file +7 20 TBFRBOAT.def 197 294 +8 16 TBELBLAK.def 449 151 +8 8 TBELCAS2.def 349 101 +8 9 TBELCAS3.def 349 101 +8 7 TBELCSTL.def 349 101 +8 6 TBELDOCK.def 239 215 +8 30 TBELDW_0.def 689 250 +8 31 TBELDW_1.def 630 50 +8 32 TBELDW_2.def 709 210 +8 33 TBELDW_3.def 108 131 +8 34 TBELDW_4.def 264 168 +8 35 TBELDW_5.def 394 283 +8 36 TBELDW_6.def 43 16 +8 -1 TBELEXT1.def 23 218 +8 27 TBELEXT2.def 232 205 +8 28 TBELEXT3.def 516 223 +8 29 TBELEXT4.def 0 252 +8 -2 TBELEXT5.def 682 183 +8 21 TBELEXT6.def 104 170 +8 11 TBELHAL2.def 0 165 +8 12 TBELHAL3.def 0 165 +8 13 TBELHAL4.def 0 164 +8 10 TBELHALL.def -1 164 +8 26 TBELHOLY.def 307 2 +8 18 TBELHRD1.def 689 250 +8 19 TBELHRD2.def 689 250 +8 1 TBELMAG2.def 206 58 +8 2 TBELMAG3.def 206 58 +8 3 TBELMAG4.def 206 58 +8 4 TBELMAG5.def 206 58 +8 0 TBELMAGE.def 206 58 +8 14 TBELMARK.def 347 216 +8 15 TBELSILO.def 372 171 +8 17 TBELSPEC.def 284 246 +8 5 TBELTVRN.def 553 203 +8 37 TBELUP_0.def 689 250 +8 38 TBELUP_1.def 630 50 +8 39 TBELUP_2.def 709 210 +8 40 TBELUP_3.def 108 131 +8 41 TBELUP_4.def 264 168 +8 42 TBELUP_5.def 394 283 +8 43 TBELUP_6.def 43 0 +8 20 TBELBOAT.def 239 215 \ No newline at end of file diff --git a/config/buildings2.txt b/config/buildings2.txt index 9b296014f..96da3c079 100644 --- a/config/buildings2.txt +++ b/config/buildings2.txt @@ -4,7 +4,6 @@ CASTLE 0 1 2 3 -4 10 11 12 @@ -21,10 +20,10 @@ CASTLE 0 41 END CASTLE 1 -35 -42 33 40 +35 +42 16 32 39 @@ -208,6 +207,35 @@ CASTLE 7 43 26 END +CASTLE 8 +34 +41 +6 +20 +33 +40 +36 +43 +21 +0 +1 +2 +3 +4 +5 +14 +17 +35 +42 +30 +18 +37 +19 +10 +11 +12 +13 +END EOD ------------------------------------------------------------------ diff --git a/config/buildings3.txt b/config/buildings3.txt index 9c7faeec7..310013e08 100644 --- a/config/buildings3.txt +++ b/config/buildings3.txt @@ -293,4 +293,41 @@ 7 40 TBFRUP_4.def TOFBAS2.bmp TZFBAS2.bmp 7 42 TBFRUP_5.def TOFWYV2.bmp TZFWYV2.bmp 7 43 TBFRUP_6.def TOFHYD2A.bmp TZFHYD2A.bmp -7 20 TBFRBOAT.def TOFDCK1.bmp TZFDCK1.bmp \ No newline at end of file +7 20 TBFRBOAT.def TOFDCK1.bmp TZFDCK1.bmp +8 16 TBELBLAK.def TOELBLAK.bmp TZELBLAK.bmp +8 20 TBELBOAT.def TOELBOAT.bmp TZELBOAT.bmp +8 8 TBELCAS2.def TOELCAS2.bmp TZELCAS2.bmp +8 9 TBELCAS3.def TOELCAS3.bmp TZELCAS3.bmp +8 7 TBELCSTL.def TOELCSTL.bmp TZELCSTL.bmp +8 6 TBELDOCK.def TOELDOCK.bmp TZELDOCK.bmp +8 30 TBELDW0_.def TOELDW_0.bmp TZELDW_0.bmp +8 31 TBELDW_1.def TOELDW_1.bmp TZELDW_1.bmp +8 32 TBELDW_2.def TOELDW_2.bmp TZELDW_2.bmp +8 33 TBELDW_3.def TOELDW_3.bmp TZELDW_3.bmp +8 34 TBELDW_4.def TOELDW_4.bmp TZELDW_4.bmp +8 35 TBELDW_5.def TOELDW_5.bmp TZELDW_5.bmp +8 36 TBELDW_6.def TOELDW_6.bmp TZELDW_6.bmp +8 21 TBELEXT6.def TOELEXT6.bmp TZELEXT6.bmp +8 11 TBELHAL2.def TOELHAL2.bmp TZELHAL2.bmp +8 12 TBELHAL3.def TOELHAL3.bmp TZELHAL3.bmp +8 13 TBELHAL4.def TOELHAL4.bmp TZELHAL4.bmp +8 10 TBELHALL.def TOELHALL.bmp TZELHALL.bmp +8 26 TBELHOLY.def TOELHOLY.bmp TZELHOLY.bmp +8 18 TBELHRD1.def TOELHRD1.bmp TZELHRD1.bmp +8 19 TBELHRD2.def TOELHRD2.bmp TZELHRD2.bmp +8 1 TBELMAG2.def TOELMAG2.bmp TZELMAG2.bmp +8 2 TBELMAG3.def TOELMAG3.bmp TZELMAG3.bmp +8 3 TBELMAG4.def TOELMAG4.bmp TZELMAG4.bmp +8 4 TBELMAG5.def TOELMAG5.bmp TZELMAG5.bmp +8 0 TBELMAGE.def TOELMAGE.bmp TZELMAGE.bmp +8 14 TBELMARK.def TOELMARK.bmp TZELMARK.bmp +8 15 TBELSILO.def TOELSILO.bmp TZELSILO.bmp +8 17 TBELSPEC.def TOELSPEC.bmp TZELSPEC.bmp +8 5 TBELTVRN.def TOELTVRN.bmp TZELTVRN.bmp +8 37 TBELUP0_.def TOELUP_0.bmp TZELUP_0.bmp +8 38 TBELUP_1.def TOELUP_1.bmp TZELUP_1.bmp +8 39 TBELUP_2.def TOELUP_2.bmp TZELUP_2.bmp +8 40 TBELUP_3.def TOELUP_3.bmp TZELUP_3.bmp +8 41 TBELUP_4.def TOELUP_4.bmp TZELUP_4.bmp +8 42 TBELUP_5.def TOELUP_5.bmp TZELUP_5.bmp +8 43 TBELUP_6.def TOELUP_6.bmp TZELUP_6.bmp \ No newline at end of file diff --git a/config/buildings4.txt b/config/buildings4.txt index 3fb6e4858..3b76528bd 100644 --- a/config/buildings4.txt +++ b/config/buildings4.txt @@ -89,4 +89,10 @@ GROUP 37 18 19 +CASTLE 8 +GROUP +30 +37 +18 +19 EOD \ No newline at end of file diff --git a/hch/CAmbarCendamo.cpp b/hch/CAmbarCendamo.cpp index f8cb0d4bb..51b0db90b 100644 --- a/hch/CAmbarCendamo.cpp +++ b/hch/CAmbarCendamo.cpp @@ -79,6 +79,8 @@ std::set convertBuildings(const std::set h3m, int castleID) { int a, b; b5 >> a >> b; + if(castleID==8 && b==17) //magic university ID 17 (h3m) => 21 (vcmi) + b=21; mapa[a]=b; } @@ -111,7 +113,8 @@ std::set convertBuildings(const std::set h3m, int castleID) } ret.insert(10); //village hall is always present - ret.insert(-1); //houses near v.hall + ret.insert(-1); //houses near v.hall / eyecandies + ret.insert(-2); //terrain eyecandy, if -1 is used if(ret.find(11)!=ret.end()) ret.insert(27); @@ -2362,11 +2365,11 @@ void CAmbarCendamo::deh3m() } } - for(int ww=0; wwobjh->objInstances.size(); ++ww) - { - if (CGI->objh->objInstances[ww]->defObjInfoNumber==-1) - std::cout<objh->objInstances[ww]->ID<<"\t" << CGI->objh->objInstances[ww]->subID<<"\t"<objh->objInstances[ww]->defInfo->name<objh->objInstances.size(); ++ww) + //{ + // if (CGI->objh->objInstances[ww]->defObjInfoNumber==-1) + // std::cout<objh->objInstances[ww]->ID<<"\t" << CGI->objh->objInstances[ww]->subID<<"\t"<objh->objInstances[ww]->defInfo->name<