1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

1653 Commits

Author SHA1 Message Date
beegee1
3e4407593f - Refactoring for checking victory/loss conditions (use enum class instead of magic numbers)
- Improved showing player lost message for one special case
2013-11-17 17:57:04 +00:00
Ivan Savenko
2b6cdd5f41 - (linux) launcher will be available in OS start menu/launchers as
"VCMI" and client will be present as "VCMI Client"
2013-11-16 18:13:30 +00:00
Ivan Savenko
3560bbb7f3 two patches/pull requests from janisozaur
- replace our custom bmap with std::map::at()
- compile fixes for editor
2013-11-12 10:45:42 +00:00
beegee1
237e4272da Fixed mantis #1485 2013-11-10 15:04:29 +00:00
beegee1
e01ef8e36a - Fixed mantis #1576 (doesn't hang game)
- Implemented output stream operator<< for various classes(BattleAction, BattleHex,...) to improve debugging and logging
2013-11-09 16:25:20 +00:00
Ivan Savenko
55577d0ac4 - fixed missing DLL_LINKAGE
- use precalculated checksum for zip files
- UNUSED macro to silence some warnings
2013-11-09 13:49:36 +00:00
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Ivan Savenko
71d6b0fea9 - Fixed some warnings from cppcheck
- Minor improvements to JSON validation
- Cleanup in SDL_Extensions.cpp
- Implemented new propery for creature format: idle animation duration
- Disabled idle animation of some of conflux creatures (was clearly
broken)
2013-11-06 13:42:58 +00:00
beegee1
86b7feeab3 - Fixed mantis #1248
- Fixed spellbook page save positions for hotseat mode
2013-11-03 18:16:25 +00:00
beegee1
94bee3fd1b - Changed visibility of curInt member of BattleInterface from public to private and provided a getter method 2013-11-03 16:44:47 +00:00
Ivan Savenko
0e3eae3095 patch from KroArtem 2013-11-03 12:51:25 +00:00
Ivan Savenko
c4716d0a9a - reordered files in cmake so files with long compile times will be
compiled first.
- changed format of modSettings.json, VCMI should properly update file
on the first run.
- implemented property "defaultTavern" that acts as default value for
"tavern" entry in hero class and town formats.
2013-11-03 12:07:23 +00:00
beegee1
aa1c193b88 Fixed mantis #1582 2013-11-02 20:07:45 +00:00
Ivan Savenko
6cb3cb006d Several minor fixes/features
- moved all traslatable strings into one json file, removed threats.txt file
- implemented "spellbook animation" option
- fixed missing central tower when attacking fort
2013-10-27 13:05:01 +00:00
Ivan Savenko
9237e6d97d Improved json validation
- split JsonNode.cpp into JsonNode and JsonDetail files
- validation should be notably faster (at least 10% faster loading)
- support for "format" field, allows checking existance of files.
- minor fixes in schemas
- msk/msg files are now optional
2013-10-26 19:33:34 +00:00
Ivan Savenko
e2c037402c Unicode support.
- boost-locale library is now required (boost 1.48 or higher)
- Unicode namespace that contains UTF-8 handling
- All non-ASCII strings from H3 data will be converted to UTF-8 during loading
- All JSON files MUST use UTF-8. 
- H3 data encoding can be selected via launcher or directly in config file
2013-10-25 21:45:14 +00:00
Ivan Savenko
f6a3d6770f - chinese fonts now use fallback to H3 fonts for ASCII characters
- proper messages for not implemented main menu entries
- some cleanup of CMessage::breakText()
2013-10-20 21:53:27 +00:00
Ivan Savenko
f838cceddd - fixes Inferno Castle Gate 2013-10-17 13:54:12 +00:00
Michał W. Urbańczyk
d5263d75f8 Fixed #1490. 2013-10-13 17:37:59 +00:00
stopiccot
cbc8cde10a some OS X fixes 2013-10-07 01:19:02 +00:00
Ivan Savenko
d09294e40a compile fix, fixes blit order of heroes in siege 2013-09-30 08:45:26 +00:00
Ivan Savenko
84dea676f2 compile fix, fixes missing end-of-line #1483 2013-09-28 13:32:49 +00:00
Michał W. Urbańczyk
0abbe71b25 Merged fixes from the branch. 2013-09-28 00:58:33 +00:00
Michał W. Urbańczyk
c6c53a5b1e Few more freeze-related fixes. 2013-09-28 00:30:12 +00:00
Michał W. Urbańczyk
d1807585ad Fixed at least two #1428 freezes, likely more.
They were occurring when AI hero visited bank that was also guarded by neutral creature nearby,
2013-09-27 23:46:58 +00:00
Michał W. Urbańczyk
4f29b526ca The battle callback method battleGetAllStacks will by default omit the arrow turrets. Fixes #1453, #1455 and related. 2013-09-27 19:42:17 +00:00
Ivan Savenko
eb6ff6b114 fixes #1482, add one pixel spacing for Chinese fonts 2013-09-25 21:15:15 +00:00
DjWarmonger
1ea9dab30d Creature abilities without any name (but with graphics) will display in creature window. 2013-09-25 10:41:32 +00:00
Ivan Savenko
208df34fc2 bigfixing & new file: launcher/jsonutils.cpp
- launcher uses json parser from vcmi lib instead of one from Qt #1469
- fixed abilities overrides for some creatures #1476
- fixed hero portraits in seer huts #1402
- ttf fonts will render text in utf-8 mode. Not really useful at this point
- new settings entry, available in launcher: encoding. Unused for now.
2013-09-21 18:29:26 +00:00
DjWarmonger
d06b02638b Partially implemented #481 2013-09-17 12:02:33 +00:00
Michał W. Urbańczyk
d4a8e90460 Fixed #1448, #1470 2013-09-14 19:09:35 +00:00
Michał W. Urbańczyk
291da5e893 Fixed #1442, likely a few others as well. 2013-09-12 22:33:08 +00:00
Michał W. Urbańczyk
b62bb096a7 Fixed #1430, work-around to make #1435 non-crashing.
Fixed at least one of the #1428 infinite turns cases.
2013-09-11 21:57:08 +00:00
Ivan Savenko
6331995afd minors:
- fixes missing line of pixels with Chinese fonts
- disabling a mod won't disable all its requirements as well
2013-09-08 18:35:09 +00:00
Ivan Savenko
e13dc872e0 - support for Chinese fonts (GBK 2-byte encoding)
- fixes #1446
2013-09-08 16:49:23 +00:00
Ivan Savenko
42879225f0 minor fixes:
- don't crash if image can't be player-colored (no palette)
- fixes #1447
- compile fix
2013-09-08 13:02:34 +00:00
Ivan Savenko
76c77d58f6 const-ified CTown. May fix #1444 2013-09-06 21:57:16 +00:00
Michał W. Urbańczyk
385f4ab7f5 #1153 and #1395 should be fixed. Terrible, terrible, terrible.
Fixed crash in battles, when attempted to access <0 screen coordinates.
2013-09-01 22:55:57 +00:00
Ivan Savenko
708b0c6f47 - fixes #1424 - added missing override and CLabel::visibleText() 2013-09-01 17:34:46 +00:00
Ivan Savenko
7f43150bb9 - fixes #1423 - convert values to int before using 2013-08-31 00:21:29 +00:00
Ivan Savenko
fba4c2cf9e - fixes #874 2013-08-30 13:19:08 +00:00
Ivan Savenko
8ac6a1fcf4 - fixes 1394 2013-08-29 20:35:24 +00:00
Ivan Savenko
83440f1149 A bit more text-related work:
- credits screen will use multi-line label instead of hackish usage of text box
- campaign intro movie player now plays voiced intro
- minor fixes to last commit
2013-08-29 16:41:14 +00:00
Ivan Savenko
6bee105d7d Some refactoring of text display widgets:
- renamed some methods/classes with better names + some consistency (no more print, setTxt and setText that do exactly same thing)
- TextBox now contains label widget instead of inheriting it
- smooth scrolling support (up/down buttons still scroll one line)
2013-08-29 13:46:27 +00:00
Ivan Savenko
db1dc1dcc6 - fixed terrain music restarting every tile
- field "contact" for mod.json schema
2013-08-20 10:47:40 +00:00
Michał W. Urbańczyk
3b42cff3ec #1409 should not crash anymore.
Fixed crash on serializing empty path. [How did it got there...?]
operator<< for boost::optional.
2013-08-18 15:46:28 +00:00
Ivan Savenko
45c2bd7511 hopefully fixes #1397. Still too much magic in this code :( 2013-08-09 17:37:41 +00:00
Ivan Savenko
8beee29482 - corrected "isToReverse" check, partially fixes 1397
- ballistics fix
- minor
2013-08-06 15:25:51 +00:00
Ivan Savenko
c81a31c74a - catapult attacks should be identical to H3
- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
2013-08-06 11:20:28 +00:00
Michał W. Urbańczyk
58ccaa2e93 The cmath "fix" was not needed after all, the includes order decides. 2013-08-02 08:28:52 +00:00
Michał W. Urbańczyk
c57b159fc9 Missed one call. 2013-08-01 22:36:49 +00:00
Michał W. Urbańczyk
f897333b2c Don't crash when music file cannot be found. 2013-08-01 13:52:01 +00:00
Michał W. Urbańczyk
7a90ead051 VS-2013 issue. 2013-08-01 11:58:30 +00:00
Ivan Savenko
b57b14b752 - fixed several bugs with siege graphics, including #1389
- removed "shooterHeight" property - seems to be same in all towns.
2013-07-31 22:24:44 +00:00
Ivan Savenko
ee09c5301e minor fixes:
- vcmi can play music files from archives
- converted resource_reward fields in bank_config into json object, fixes 3000 gems reward in shipwreck
- some compile fixes for minizip
2013-07-31 11:36:42 +00:00
Ivan Savenko
1d9139303a introduced zip support into vcmi
- minizip library is now part of sources, located at lib/minizip
- cmakefiles will compile minizip as dynamic library (Note: only 2 files used by vcmi are included in minizip.so)
- zip files can be loaded similar to other archives via filesystem.json
- mods can use Content.zip instead of Content/ directory. Files in directory will replace files in archive.
2013-07-30 15:02:55 +00:00
DjWarmonger
d8594576e2 One more compile fix, works now fine on Windows. 2013-07-29 12:15:50 +00:00
Ivan Savenko
77496bcea9 - fixed several cases of accessing full path to files in archives 2013-07-29 11:38:18 +00:00
DjWarmonger
a314a81fd5 Compile fixes. Game doesn't even launch, however. 2013-07-28 18:57:07 +00:00
Ivan Savenko
b87897096c Filesystem handling is now more flexible
- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
2013-07-28 14:49:50 +00:00
DjWarmonger
5f310aa20f Fixed all issues with Resurrection: #123, #1358 2013-07-27 19:01:31 +00:00
DjWarmonger
b36be10e30 2013-07-25 11:53:36 +00:00
DjWarmonger
66d6aebe32 Fixed all the issues with Quests, #828 and #1223.
Upgrade cost will never be negative.
2013-07-23 15:03:01 +00:00
Ivan Savenko
a719e03b30 - fixed #1375
- damage done by turrets is properly increased by built buldings
2013-07-22 16:23:23 +00:00
DjWarmonger
4fd9bcfedc Fixed #1345 2013-07-22 10:39:11 +00:00
Michał W. Urbańczyk
d8a27d8f3c Refactored player-specific data into single struct BattleState. 2013-07-21 22:01:29 +00:00
Ivan Savenko
491bd557ef fixed several bugs reported on forum:
- necromancy issues
- fix for lookout tower
- Sir Mullich is unavailable
- first hero is awakened on next turn
- give 500 XP on defeating hero
2013-07-21 18:27:33 +00:00
Ivan Savenko
a148c39e0a more battles animations:
- UI will be correctly greyed-out during opponent turn
- fixed remaining issues with blit order
- a bit better handling of catapult attack
- fixes #1362
2013-07-21 10:10:38 +00:00
Michał W. Urbańczyk
e9d51a2670 Fixed issue that allowed to build multiple boats in town. Renamed state() to sth more sensible. 2013-07-21 10:08:32 +00:00
Michał W. Urbańczyk
e45d174ba5 Fixed crashes on Land Mines / Fire Wall casting. 2013-07-20 21:35:12 +00:00
Ivan Savenko
096d6ebf9c refactoring of CBattleInterface::show() and all related code
fixes most of blit order-related bugs in battles (#1200, #1238, #226)

known issues, will fix soon:
- there are still some minor blitting issues during movement
- destruction of walls in siege is out of sync with catapult projectile movement
2013-07-19 16:35:16 +00:00
DjWarmonger
b925a75ecc Tweaked Frenzy spell which now ends at the beginning of stacks turn, not at the end of turn (#1332). 2013-07-17 10:54:07 +00:00
Ivan Savenko
43db5587a1 - minor fixes to battle animations
- fixes crash on siege start
2013-07-16 22:59:39 +00:00
Ivan Savenko
1a77fee7f7 more improvements for battle animations
- synchronized attack/defence animation
- spell animation speed uses game settings
- added logging domain for battle animations

- fixed disrupting ray duration
2013-07-16 18:12:47 +00:00
DjWarmonger
4f7c6b8d34 Fixed #688 2013-07-15 08:51:48 +00:00
Ivan Savenko
91cd88ba97 - compile fix for OSX 2013-07-11 20:10:17 +00:00
Michał W. Urbańczyk
d4ce091d2b A patch from Gernsworth related to #1204 — spell effects will be layered along with the creatures. 2013-07-10 10:45:51 +00:00
Ivan Savenko
4ac2a6e8b6 minor refactoring of VCMIDirs, bugfixing
- VCMIDirs represent XDG specification more closely (partial #1310)
- Minor bugfixing, including #1327 #1328 and #1306
2013-07-08 20:55:22 +00:00
Ivan Savenko
410ec92668 Minor fixes:
- removed unused functionality from CCreatureAnimation
- simplified postioning of units in battle, should fix remaining issues with unit positioning
- fixed unit tests compilation
2013-07-07 19:44:08 +00:00
Michał W. Urbańczyk
516684aaab Visual 2012 compile fixes.
Unfortunately no C99 math nor uniform initialization till VS 2013.
2013-07-07 08:27:27 +00:00
Ivan Savenko
146a5e5ef8 Made speed of most of battle animations time-based
- speed of creature-related animation no longer depends on framerate
- most of values from cranim.txt are now used correctly
- removed BMPPalette struct in favor of SDL_Color
- animation group "DEAD" that is used to display dead stacks, by default consists from last frame of "DEATH" group

Notes:
- animation speed may still need some adjustments
- range of config property "battle/animationSpeed" has been changed. This may result in extremely fast animation. To fix - change animation speed via options.
2013-07-06 16:10:20 +00:00
Michał W. Urbańczyk
a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00
Michał W. Urbańczyk
4576719abe Visual Studio 2013 Preview compile fixes:
* 0 is not convertible to std::function, nullptr should be used
* std::ref(rand) is not convertible to function<int()>, used lambdas (why we dont just pass "rand" ? )
* CFunctionList needs to be constructible from nullptr
* move constructor for CMapInfo (Visual cannot generate them :( )
* #ifdefed some stuff that is not needed anymore since cmath is updated with C99 stuff
* using std::make_unique instead of our vstd implementation

CSelector: 
* introduced a class in place of typedef
* Having an overloaded && || operators over sth that is convertible to bool… Wasn't a good idea after all. Purged the operators, replaced  with And/Or methods (chaining-style).
* constructor that is present only when constructing from class or function (SFINAE). std::function has an implicit converting constructor from T causing ambiguities (even if the overload would cause compile error in the body)
2013-07-02 12:08:30 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
Michał W. Urbańczyk
1a2c8de6ad Minor improvements. 2013-06-24 14:35:27 +00:00
Ivan Savenko
dd808ef5cc bugfixing:
- support for one more Russian localisation, fixes #1321
 - fixed icon for level 1 town hall, #1294
 - correct portraits for first heroes from mods, #1297 and probably #1298
And a lot of gcc compile fixes
2013-06-23 19:35:54 +00:00
Michał W. Urbańczyk
17403b544c Various fixes for quick combat.
Replaced several boost::bind usages with lambdas.
2013-06-23 16:09:15 +00:00
Michał W. Urbańczyk
06f0a29b31 Compile fixes for gcc, as per http://forum.vcmi.eu/viewtopic.php?p=9638#9638 2013-06-23 12:36:18 +00:00
Michał W. Urbańczyk
04d11519ef Quick Combat system setting works… if user doesn't click in the meantime. 2013-06-23 11:25:48 +00:00
Michał W. Urbańczyk
2a471eeb1a Addec quick combat to system options window.
Compile fixes [I don't know why it has compiled for me before].
2013-06-23 07:54:33 +00:00
Michał W. Urbańczyk
4a0587d500 More work on auto-fight.
Dynamic libraries return smart-pointers to what they create.
2013-06-22 21:47:51 +00:00
Michał W. Urbańczyk
2be2143844 Game interfaces can register another interfaces to receive info on game events. 2013-06-22 18:22:44 +00:00
Michał W. Urbańczyk
254f194220 Some very early work towards autofight feature.
Added EmptyAI to the solution.
Passing callbacks by shared_ptr.
2013-06-22 14:47:20 +00:00
Michał W. Urbańczyk
06dbdd234f Further changes for duel mode. It is possible to pass names of AIs to be used by command line. Moved things in battle AI. 2013-06-21 20:59:32 +00:00
Ivan Savenko
6737c270c9 gcc 4.5 compatibility fixes. Mostly due to lack of fully finctional nullptr class 2013-06-19 21:26:27 +00:00
Michał W. Urbańczyk
6a88604937 * fixed crash related to cammander's SPELL_AFTER_ATTACK spell id not initialized properly (text id was resolved on copy of bonus)
* fixed duels, added no-GUI mode for automatic AI testing
* minor things
2013-06-17 15:45:55 +00:00
Michał W. Urbańczyk
30fb552fb4 Patch from Gernsworth fixing #1283. 2013-06-15 22:09:15 +00:00
Ivan Savenko
08b2af3ccb - fixed "get txt" console command
- command "extract" to extract file by name
- command "def2bmp" to convert def into set of frames.
2013-06-10 17:02:37 +00:00
Ivan Savenko
870399c7be - updated link to repo in readme
- image loader will report last SDL error if loading failed
- fixed parsing of floats from H3 txt's
2013-06-09 10:09:28 +00:00