fheroes2-devel Mailing List for free heroes2 engine (Page 4)
Status: Beta
Brought to you by:
afletdinov
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(45) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(3) |
Feb
(6) |
Mar
(3) |
Apr
(8) |
May
(5) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Josh M. <jo...@jo...> - 2008-12-06 07:48:52
|
I've used 82m2wav on all of the 82m files, but they don't play in any media player I've tried. Does the converter actually work? Cheers, Josh |
From: Afletdinov A. <afl...@dc...> - 2008-12-06 07:36:39
|
> What's the new font code going to be used for? For drawing of the text, various languages. |
From: Josh M. <jo...@jo...> - 2008-12-06 07:12:01
|
What's the new font code going to be used for? Also, by including SDL.h in surface.h, you completely undid all of my work to hide SDL dependency away. I'm planning to fix that small change and make SWSURFACE an extern const int again. Cheers, Josh |
From: Josh M. <jo...@jo...> - 2008-11-24 02:54:52
|
The reason for this change is that a class can't inherit from another class that's only forward defined. This way the header file can work with Palette without knowing anything about SDL_Palette. Cheers, Josh On Sun, Nov 23, 2008 at 7:19 PM, Afletdinov A. <afl...@dc...>wrote: > Yes. It looks well. > One question, What reason of change: > <code> > --- src/engine/palette.h 2008-11-23 09:38:14 +0000 > +++ src/engine/palette.h 2008-11-23 15:53:21 +0000 > @@ -24,7 +24,9 @@ > #include <vector> > #include "types.h" > > -class Palette : protected SDL_Palette > +struct SDL_Palette; > + > +class Palette > { > public: > Palette(); > @@ -45,6 +47,7 @@ > > private: > std::vector<u32> pal; > + SDL_Palette *sdlpal; > }; > > #endif > </code> > > Andrey. > > > Alright, here is my proposed SDL wrapper. Is this ok to check in? > > > > Cheers, > > Josh > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > |
From: Josh M. <jo...@jo...> - 2008-11-24 02:52:52
|
Alright, here's the proper fixed patch. The problem was that I forgot to change the SDL_BYTEORDER check in types.h, so fheroes2 thought it was supposed to use big endian swapping and loading. I've moved all of that into util.cpp, but I did notice that LOAD32 looked wrong for big endian. It used to do *(p + 3) << 8 | *(p + 2) << 8 | *(p + 1) << 8 | *p, which is obviously wrong. I fixed it, so fheroes2 should actually work on macs now :) Cheers, Josh On Sun, Nov 23, 2008 at 7:47 PM, Afletdinov A. <afl...@dc...>wrote: > Only your variant does not work. > > valgrind ./fheroes2 > ==18023== Memcheck, a memory error detector. > ==18023== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. > ==18023== Using LibVEX rev 1658, a library for dynamic binary translation. > ==18023== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. > ==18023== Using valgrind-3.2.1, a dynamic binary instrumentation framework. > ==18023== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. > ==18023== For more details, rerun with: -v > ==18023== > Free Heroes II, version: 0.1, build: 20081124 > config: fheroes2.cfg load > Dir::open: /opt/h2/igra/data (.agg) > AGG::File: load: /opt/h2/igra/data/heroes2.agg > AGG::File: count items: 39429 > # fheroes2 dump config, version 0.1, build 20081124 > data = /opt/h2/igra/data > maps = /opt/h2/igra/maps > translation = english.str > videomode = 640x480 > sound = off > music = off > sound volume = 6 > music volume = 6 > animation = 7 > fullscreen = off > evilinterface = off > shadow = on > original = off > debug = on > battle grid = off > battle movement shadow = off > battle mouse shadow = off > > AGG::Cache::LoadPAL: KB.PAL > ==18023== Warning: set address range perms: large range 976828730 > (undefined) > > delay(......) > > **18023** new/new[] failed and should throw an exception, but Valgrind > cannot throw exceptions and so is aborting instead. Sorry. > ==18023== at 0x40055E1: VALGRIND_PRINTF_BACKTRACE (valgrind.h:2366) > ==18023== by 0x4005B99: operator new(unsigned) (vg_replace_malloc.c:163) > ==18023== by 0x817E1FD: > __gnu_cxx::new_allocator<unsigned>::allocate(unsigned, void const*) > (new_allocator.h:88) > ==18023== by 0x817E221: std::_Vector_base<unsigned, > std::allocator<unsigned> >::_M_allocate(unsigned) (stl_vector.h:127) > ==18023== by 0x81BCB2E: std::vector<unsigned, std::allocator<unsigned> > >::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned*, > std::vector<unsigned, std::allocator<unsigned> > >, unsigned, unsigned > const&) (vector.tcc:357) > ==18023== by 0x81BCD5D: std::vector<unsigned, std::allocator<unsigned> > >::insert(__gnu_cxx::__normal_iterator<unsigned*, std::vector<unsigned, > std::allocator<unsigned> > >, unsigned, unsigned const&) (stl_vector.h:658) > ==18023== by 0x81BCE3C: std::vector<unsigned, std::allocator<unsigned> > >::resize(unsigned, unsigned) (stl_vector.h:426) > ==18023== by 0x81BB3D5: Palette::Load(std::vector<char, > std::allocator<char> > const&) (palette.cpp:112) > ==18023== by 0x804E1D3: AGG::Cache::LoadPAL() (agg.cpp:458) > ==18023== by 0x8104CB2: main (fheroes2.cpp:190) > ==18023== > ==18023== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 66 from 2) > ==18023== malloc/free: in use at exit: 979,109,898 bytes in 72,624 blocks. > ==18023== malloc/free: 81,856 allocs, 9,231 frees, 979,521,926 bytes > allocated. > ==18023== For counts of detected errors, rerun with: -v > ==18023== searching for pointers to 72,624 not-freed blocks. > ==18023== checked 979,691,184 bytes. > ==18023== > ==18023== LEAK SUMMARY: > ==18023== definitely lost: 32 bytes in 1 blocks. > ==18023== possibly lost: 1,010,292 bytes in 36,469 blocks. > ==18023== still reachable: 978,099,574 bytes in 36,154 blocks. > ==18023== suppressed: 0 bytes in 0 blocks. > ==18023== Use --leak-check=full to see details of leaked memory. > > > Alright, here is my proposed SDL wrapper. Is this ok to check in? > > > > Cheers, > > Josh > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > > |
From: Afletdinov A. <afl...@dc...> - 2008-11-24 00:47:32
|
Only your variant does not work. valgrind ./fheroes2 ==18023== Memcheck, a memory error detector. ==18023== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==18023== Using LibVEX rev 1658, a library for dynamic binary translation. ==18023== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==18023== Using valgrind-3.2.1, a dynamic binary instrumentation framework. ==18023== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==18023== For more details, rerun with: -v ==18023== Free Heroes II, version: 0.1, build: 20081124 config: fheroes2.cfg load Dir::open: /opt/h2/igra/data (.agg) AGG::File: load: /opt/h2/igra/data/heroes2.agg AGG::File: count items: 39429 # fheroes2 dump config, version 0.1, build 20081124 data = /opt/h2/igra/data maps = /opt/h2/igra/maps translation = english.str videomode = 640x480 sound = off music = off sound volume = 6 music volume = 6 animation = 7 fullscreen = off evilinterface = off shadow = on original = off debug = on battle grid = off battle movement shadow = off battle mouse shadow = off AGG::Cache::LoadPAL: KB.PAL ==18023== Warning: set address range perms: large range 976828730 (undefined) delay(......) **18023** new/new[] failed and should throw an exception, but Valgrind cannot throw exceptions and so is aborting instead. Sorry. ==18023== at 0x40055E1: VALGRIND_PRINTF_BACKTRACE (valgrind.h:2366) ==18023== by 0x4005B99: operator new(unsigned) (vg_replace_malloc.c:163) ==18023== by 0x817E1FD: __gnu_cxx::new_allocator<unsigned>::allocate(unsigned, void const*) (new_allocator.h:88) ==18023== by 0x817E221: std::_Vector_base<unsigned, std::allocator<unsigned> >::_M_allocate(unsigned) (stl_vector.h:127) ==18023== by 0x81BCB2E: std::vector<unsigned, std::allocator<unsigned> >::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned*, std::vector<unsigned, std::allocator<unsigned> > >, unsigned, unsigned const&) (vector.tcc:357) ==18023== by 0x81BCD5D: std::vector<unsigned, std::allocator<unsigned> >::insert(__gnu_cxx::__normal_iterator<unsigned*, std::vector<unsigned, std::allocator<unsigned> > >, unsigned, unsigned const&) (stl_vector.h:658) ==18023== by 0x81BCE3C: std::vector<unsigned, std::allocator<unsigned> >::resize(unsigned, unsigned) (stl_vector.h:426) ==18023== by 0x81BB3D5: Palette::Load(std::vector<char, std::allocator<char> > const&) (palette.cpp:112) ==18023== by 0x804E1D3: AGG::Cache::LoadPAL() (agg.cpp:458) ==18023== by 0x8104CB2: main (fheroes2.cpp:190) ==18023== ==18023== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 66 from 2) ==18023== malloc/free: in use at exit: 979,109,898 bytes in 72,624 blocks. ==18023== malloc/free: 81,856 allocs, 9,231 frees, 979,521,926 bytes allocated. ==18023== For counts of detected errors, rerun with: -v ==18023== searching for pointers to 72,624 not-freed blocks. ==18023== checked 979,691,184 bytes. ==18023== ==18023== LEAK SUMMARY: ==18023== definitely lost: 32 bytes in 1 blocks. ==18023== possibly lost: 1,010,292 bytes in 36,469 blocks. ==18023== still reachable: 978,099,574 bytes in 36,154 blocks. ==18023== suppressed: 0 bytes in 0 blocks. ==18023== Use --leak-check=full to see details of leaked memory. > Alright, here is my proposed SDL wrapper. Is this ok to check in? > > Cheers, > Josh |
From: Afletdinov A. <afl...@dc...> - 2008-11-24 00:20:05
|
Yes. It looks well. One question, What reason of change: <code> --- src/engine/palette.h 2008-11-23 09:38:14 +0000 +++ src/engine/palette.h 2008-11-23 15:53:21 +0000 @@ -24,7 +24,9 @@ #include <vector> #include "types.h" -class Palette : protected SDL_Palette +struct SDL_Palette; + +class Palette { public: Palette(); @@ -45,6 +47,7 @@ private: std::vector<u32> pal; + SDL_Palette *sdlpal; }; #endif </code> Andrey. > Alright, here is my proposed SDL wrapper. Is this ok to check in? > > Cheers, > Josh |
From: Josh M. <jo...@jo...> - 2008-11-23 17:14:20
|
Alright, here is my proposed SDL wrapper. Is this ok to check in? Cheers, Josh |
From: Josh M. <jo...@jo...> - 2008-11-22 22:46:20
|
I've started putting together a list of all the ICN files and what they contain, because I'm tired of looking through all of those folders :) http://fheroes2.wiki.sourceforge.net/ICN_reference |
From: Josh M. <jo...@jo...> - 2008-11-22 16:57:40
|
The music I am looking into. I've just committed a fix that should fix the problem you and stevenaus was getting, and the reasons I took SDL out of the engine includes were these: 1) It was being included in a lot of files that didn't need it, which slowed down compiling 2) The fact that it needs to be included in so many files shows that we're not decoupled enough. I plan to write a thin wrapper around SDL keys and surface flags so that we only have to include SDL in the engine, and everywhere else doesn't have to know about it. Think of it as a work in progress. Cheers, Josh On Sat, Nov 22, 2008 at 7:22 AM, Afletdinov A. <afl...@dc...>wrote: > Also: > Sender: stevenaus > I haven't been able to build 595/6 - I'm getting Error 1 and Error 2 with > cygwin on WinXP SP3, but build 584 successfully compiles. :) > > > I have not understood last changes in include files. > > I have specially taken out SDL in engine. That then it is easy to change > > it. For example the sound now does not work. :) > > And I receive an error when I use army.h > > That Army::BattleTroop uses that vector<Spell::spell_t>, it should be > > resolved in army.h > > > > Andrey. > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge Build the coolest Linux based applications with Moblin SDK & > win > > great prizes Grand prize is a trip for two to an Open Source event > anywhere > > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Fheroes2-devel mailing list > > Fhe...@li... > > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > |
From: Afletdinov A. <afl...@dc...> - 2008-11-22 12:22:47
|
Also: Sender: stevenaus I haven't been able to build 595/6 - I'm getting Error 1 and Error 2 with cygwin on WinXP SP3, but build 584 successfully compiles. :) > I have not understood last changes in include files. > I have specially taken out SDL in engine. That then it is easy to change > it. For example the sound now does not work. :) > And I receive an error when I use army.h > That Army::BattleTroop uses that vector<Spell::spell_t>, it should be > resolved in army.h > > Andrey. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & win > great prizes Grand prize is a trip for two to an Open Source event anywhere > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel |
From: Afletdinov A. <afl...@dc...> - 2008-11-22 11:38:42
|
I have not understood last changes in include files. I have specially taken out SDL in engine. That then it is easy to change it. For example the sound now does not work. :) And I receive an error when I use army.h That Army::BattleTroop uses that vector<Spell::spell_t>, it should be resolved in army.h Andrey. |
From: Afletdinov A. <afl...@dc...> - 2008-11-21 08:18:25
|
Thanks for good work! Andrey. > I just commit a large change that brought a full build time down from ~20 > seconds to ~10 seconds for me :) I think I've fixed most of the biggest > dependency chains (before, if you modified army.h, about 40 files would be > rebuilt, and now only 6 are), and I've removed some of the biggest header > wastes (SDL.h in types.h means SDL was included in every single file!). > Let's try to keep it this way :) |
From: Josh M. <jo...@jo...> - 2008-11-21 07:37:41
|
I just commit a large change that brought a full build time down from ~20 seconds to ~10 seconds for me :) I think I've fixed most of the biggest dependency chains (before, if you modified army.h, about 40 files would be rebuilt, and now only 6 are), and I've removed some of the biggest header wastes (SDL.h in types.h means SDL was included in every single file!). Let's try to keep it this way :) Cheers, Josh |
From: Josh M. <jo...@jo...> - 2008-11-20 06:04:18
|
Perfect :) I'm also going to create a changelog file in the repo that we can keep track of changes in. I'd like to keep it formatted like this: DEVELOPMENT: + Added message in a bottle action + Added support for hotseat + Fixed CD audio off-by-one error November 20, 2008 - Build 555 + Stuff we did + More stuff we did + A bug we fixed etc. If we keep a log of the medium to large changes we make (fixed bugs that were present in last release, new features, etc) then I won't have to read through 200 svn log entries to make the next news item :) Cheers, Josh On Thu, Nov 20, 2008 at 12:57 AM, Afletdinov A. <afl...@dc...>wrote: > Ok. Check now. > > I've submitted a news item with the changes for this new release, but I > > don't see the news anywhere on the project page. Is there some setting > you > > can change to make it show up? > > > > Cheers, > > Josh > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > |
From: Afletdinov A. <afl...@dc...> - 2008-11-20 05:57:20
|
Ok. Check now. > I've submitted a news item with the changes for this new release, but I > don't see the news anywhere on the project page. Is there some setting you > can change to make it show up? > > Cheers, > Josh |
From: Josh M. <jo...@jo...> - 2008-11-20 05:42:03
|
I've submitted a news item with the changes for this new release, but I don't see the news anywhere on the project page. Is there some setting you can change to make it show up? Cheers, Josh |
From: Josh M. <jo...@jo...> - 2008-11-20 05:40:14
|
I'm in the middle of doing that right now, and it's a pretty large change. Can you wait until I check it in in the next couple days? On Thu, Nov 20, 2008 at 12:34 AM, Afletdinov A. <afl...@dc...>wrote: > I now wish to remake class Castle. > Probably I will add simple code for AI (only building). > A lot of a superfluous code it is possible to remove. > And simple class Army is necessary to me. > > > pair and vector it as an example only. > > The most part of the functions, defined as > > Heroes::Get{Slowest,Highest,Stronges,Weakest}Army and other, should be in > a > > class Army. > > Or it is necessary to repeat again them for a class Castle. > > The most part of values in Troops is necessary only for battle. > > It is necessary to remake class Army::SelectBar and move to gui. > > And more other. > > > > > I really don't like inheriting from pair and vector. However, I don't > > > think the overall idea is bad. Why do you want this? > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > |
From: Afletdinov A. <afl...@dc...> - 2008-11-20 05:36:08
|
it is commit. svn 575. > I have found the table: > ┌────────────┬──────────┬──────┬───────┬───────┬───────┬────────┐ > │Skill │ Barbarian│Knight│Necrom.│Sorcer.│Warlock│ Wizard │ > ├────────────┼──────────┼──────┼───────┼───────┼───────┼────────┤ > │Archery │ 3 │ 2 │ 1 │ 3 │ 1 │ 1 │ > │Ballistics │ 3 │ 4 │ 3 │ 3 │ 3 │ 3 │ > │Diplomacy │ 2 │ 3 │ 2 │ 2 │ 2 │ 2 │ > │Eagle Eye │ 1 │ 1 │ 3 │ 2 │ 3 │ 3 │ > │Estates │ 2 │ 3 │ 2 │ 2 │ 2 │ 2 │ > │Leadership │ 3 │ 5 │ 0 │ 1 │ 1 │ 2 │ > │Logistics │ 3 │ 3 │ 2 │ 2 │ 2 │ 2 │ > │Luck │ 2 │ 1 │ 1 │ 3 │ 1 │ 2 │ > │Mysticism │ 1 │ 1 │ 3 │ 3 │ 3 │ 4 │ > │Navigation │ 3 │ 2 │ 2 │ 4 │ 2 │ 2 │ > │Necromancy │ 0 │ 0 │ 5 │ 0 │ 1 │ 0 │ > │Pathfinding │ 4 │ 3 │ 3 │ 2 │ 2 │ 2 │ > │Scouting │ 4 │ 2 │ 1 │ 1 │ 4 │ 2 │ > │Wisdom │ 1 │ 2 │ 4 │ 4 │ 5 │ 5 │ > └────────────┴──────────┴──────┴───────┴───────┴───────┴────────┘ > > > Whether there are restrictions for acquisition secondary skill depending > > on race? > > example - sorceress and necromancy skill? > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge Build the coolest Linux based applications with Moblin SDK & > > win great prizes Grand prize is a trip for two to an Open Source event > > anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Fheroes2-devel mailing list > > Fhe...@li... > > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & win > great prizes Grand prize is a trip for two to an Open Source event anywhere > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel |
From: Afletdinov A. <afl...@dc...> - 2008-11-20 05:34:46
|
I now wish to remake class Castle. Probably I will add simple code for AI (only building). A lot of a superfluous code it is possible to remove. And simple class Army is necessary to me. > pair and vector it as an example only. > The most part of the functions, defined as > Heroes::Get{Slowest,Highest,Stronges,Weakest}Army and other, should be in a > class Army. > Or it is necessary to repeat again them for a class Castle. > The most part of values in Troops is necessary only for battle. > It is necessary to remake class Army::SelectBar and move to gui. > And more other. > > > I really don't like inheriting from pair and vector. However, I don't > > think the overall idea is bad. Why do you want this? > > |
From: Afletdinov A. <afl...@dc...> - 2008-11-20 03:28:55
|
I have found the table: ┌────────────┬──────────┬──────┬───────┬───────┬───────┬────────┐ │Skill │ Barbarian│Knight│Necrom.│Sorcer.│Warlock│ Wizard │ ├────────────┼──────────┼──────┼───────┼───────┼───────┼────────┤ │Archery │ 3 │ 2 │ 1 │ 3 │ 1 │ 1 │ │Ballistics │ 3 │ 4 │ 3 │ 3 │ 3 │ 3 │ │Diplomacy │ 2 │ 3 │ 2 │ 2 │ 2 │ 2 │ │Eagle Eye │ 1 │ 1 │ 3 │ 2 │ 3 │ 3 │ │Estates │ 2 │ 3 │ 2 │ 2 │ 2 │ 2 │ │Leadership │ 3 │ 5 │ 0 │ 1 │ 1 │ 2 │ │Logistics │ 3 │ 3 │ 2 │ 2 │ 2 │ 2 │ │Luck │ 2 │ 1 │ 1 │ 3 │ 1 │ 2 │ │Mysticism │ 1 │ 1 │ 3 │ 3 │ 3 │ 4 │ │Navigation │ 3 │ 2 │ 2 │ 4 │ 2 │ 2 │ │Necromancy │ 0 │ 0 │ 5 │ 0 │ 1 │ 0 │ │Pathfinding │ 4 │ 3 │ 3 │ 2 │ 2 │ 2 │ │Scouting │ 4 │ 2 │ 1 │ 1 │ 4 │ 2 │ │Wisdom │ 1 │ 2 │ 4 │ 4 │ 5 │ 5 │ └────────────┴──────────┴──────┴───────┴───────┴───────┴────────┘ > Whether there are restrictions for acquisition secondary skill depending on > race? > example - sorceress and necromancy skill? > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & win > great prizes Grand prize is a trip for two to an Open Source event anywhere > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel |
From: Afletdinov A. <afl...@dc...> - 2008-11-20 02:52:55
|
Whether there are restrictions for acquisition secondary skill depending on race? example - sorceress and necromancy skill? |
From: Afletdinov A. <afl...@dc...> - 2008-11-18 03:59:28
|
pair and vector it as an example only. The most part of the functions, defined as Heroes::Get{Slowest,Highest,Stronges,Weakest}Army and other, should be in a class Army. Or it is necessary to repeat again them for a class Castle. The most part of values in Troops is necessary only for battle. It is necessary to remake class Army::SelectBar and move to gui. And more other. > I really don't like inheriting from pair and vector. However, I don't > think the overall idea is bad. Why do you want this? > > > > I think, it is probably necessary to alter class Army. > > > > Example: > > > > class Troops : public std::pair<u16, u16> > > { > > Troops() : std::pair<u16, u16>(Monster::UNKNOWN, 0), monster(first), > > count(second){}; > > > > u16 & monster; > > u16 & count; > > }; > > > > class BattleTroops : public Troops > > { > > public: > > BattleTroops() > > /* > > Monster::animstate_t astate; > > u16 aframe; > > bool attackRanged; > > u8 shots; > > u16 hp; > > u16 oldcount; > > > > That that still is necessary for animation or other > > */ > > }; > > > > class Army : protected std::vector<Troops> > > { > > public: > > Army : std::vector<Troops>(MAXARMY) > > /* > > . > > . > > . > > */ > > }; > > |
From: Josh M. <jo...@jo...> - 2008-11-18 02:31:06
|
I really don't like inheriting from pair and vector. However, I don't think the overall idea is bad. Why do you want this? On Mon, Nov 17, 2008 at 9:22 PM, Afletdinov A. <afl...@dc...>wrote: > I think, it is probably necessary to alter class Army. > > Example: > > class Troops : public std::pair<u16, u16> > { > Troops() : std::pair<u16, u16>(Monster::UNKNOWN, 0), monster(first), > count(second){}; > > u16 & monster; > u16 & count; > }; > > class BattleTroops : public Troops > { > public: > BattleTroops() > /* > Monster::animstate_t astate; > u16 aframe; > bool attackRanged; > u8 shots; > u16 hp; > u16 oldcount; > > That that still is necessary for animation or other > */ > }; > > class Army : protected std::vector<Troops> > { > public: > Army : std::vector<Troops>(MAXARMY) > /* > . > . > . > */ > }; > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fheroes2-devel mailing list > Fhe...@li... > https://lists.sourceforge.net/lists/listinfo/fheroes2-devel > |
From: Afletdinov A. <afl...@dc...> - 2008-11-18 02:22:16
|
I think, it is probably necessary to alter class Army. Example: class Troops : public std::pair<u16, u16> { Troops() : std::pair<u16, u16>(Monster::UNKNOWN, 0), monster(first), count(second){}; u16 & monster; u16 & count; }; class BattleTroops : public Troops { public: BattleTroops() /* Monster::animstate_t astate; u16 aframe; bool attackRanged; u8 shots; u16 hp; u16 oldcount; That that still is necessary for animation or other */ }; class Army : protected std::vector<Troops> { public: Army : std::vector<Troops>(MAXARMY) /* . . . */ }; |