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

184 Commits

Author SHA1 Message Date
Michał W. Urbańczyk
93856dbe98 Quick solution for #1688. 2014-02-27 20:44:20 +00:00
Michał W. Urbańczyk
55271e621b Possibility to switch autoskip in the runtime. 2014-02-02 14:39:32 +00:00
alexvins
a740f7989c [c::b] update projects, disable PHC for now, +few fixes (still wip) 2014-01-05 17:48:50 +00:00
Ivan Savenko
2c4c964a45 Large rewrite of adventure map objects:
- replaced CDefObjInfo with ObjectTemplate class
- ObjectTempate is a direct member of objects instead of pointer with
shared ownership across CMap, handler and game objects
- simplified handling of objects that can change appearance (e.g. towns)
- all object queries regarding object appearance/blockmaps use h3m pos
instead of relative positions
- removed need of modhandler::reload
- cleanup of some old code
2014-01-02 23:48:38 +00:00
Ivan Savenko
29f4a12814 - fixed some evil memory leaks
- fixed recursive dependency of castles
2013-12-19 19:43:16 +00:00
beegee1
d1002f7e8f - Fixed starting another map from campaign bonus selection screen while playing a campaign mission 2013-12-17 12:12:25 +00:00
beegee1
b9b25ef552 - Fixed mantis #1422 (starting another scenario crashes VCMI for now)
- Refactoring
2013-12-16 18:39:56 +00:00
beegee1
f2cc630e2c - Show confirmation dialog when pressing Alt + F4 to quit the game 2013-12-07 18:26:15 +00:00
beegee1
c786a3076a - Refactored victory loss condition checks
- Added toString() method to EVictoryLossCheckResult enum class to improve debugging
- Removed mostly unused CFunctionList2
- Added missing header files for vcmiclient project to CMakeLists
- Tweaked SDL suggests bpp message a bit
- Added showInfoDialogAndWait (info dialog and waits, used from client thread) and showOkDialog (callback to ok click, used from GUI thread) to player interface
- Added showOkDialog method to CInfoWindow (unused for now, but may be used later)
2013-11-30 09:43:31 +00:00
Ivan Savenko
84dea676f2 compile fix, fixes missing end-of-line #1483 2013-09-28 13:32:49 +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
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
77496bcea9 - fixed several cases of accessing full path to files in archives 2013-07-29 11:38:18 +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
Ivan Savenko
91cd88ba97 - compile fix for OSX 2013-07-11 20:10:17 +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
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
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
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
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
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
Michał W. Urbańczyk
fc6e72dc75 * Fixed enchantments (#1265). Their effects were not properly added when reading config. Battle interface will be little less likely to block itself after corrupted spell cast.
* Fail gracefully when the file from which game is started is in invalid version.
* Bumped versions.
2013-05-19 15:14:23 +00:00
Michał W. Urbańczyk
be7c2bd07f CGHeroInstance* can be serialized over network even when hero has been defeated. Strongly typed hero type ID introduced.
Should fix #1260.
2013-05-18 22:30:48 +00:00
Ivan Savenko
8be801a6dc - CMappedFileLoader class to remap WoG files to h3 names
- WoG should be optional, all remapped files are listed in WoG/config/wogFileOverrides.json
- fixed several cases of incorrect positioning of creatures in battles
- some missing sounds for battle effects
- negative luck support, disabled by default
- a bit hackish detection of WoG presence, VCMI should work on SoD-only installs
2013-05-04 13:14:23 +00:00
Ivan Savenko
3285f1910b - finally, solution for imageIndex fields. All image lists will be generated in runtime
- iconIndex fields from json are no longer used
- simple check for missing icons on startup
2013-04-22 19:51:22 +00:00
Ivan Savenko
c6cc6e6301 Large changeset, first part of editing H3 objects via mods feature. Changes:
- loading of all objects (including H3 objects) will be directed by mod handlers
- common base for all handlers accessible from mod system (IHanderBase)
- json format changes: use struct with string ID's instead of vector

- fixed some gcc/clang errors and warnings
- fixed several cases of memory leaks and invalid memory access (mostly related to usage of bonus system and/or identifiers resolution)

Note that right now loading is much slower than before due to excessive json validation (or not fast enough validator)
2013-04-21 12:49:26 +00:00
Michał W. Urbańczyk
d1d67caa0b Get rid of some old serialization workaround code that is not needed because serializer was improved in the meantime.
Fixing #1254.
Fixed possible race causing corruption of the server savegame.
2013-04-20 18:44:55 +00:00
Michał W. Urbańczyk
e8354908c3 Big change: Introduced new mechanism to handle queries. It should not cause any visible changes ATM apart from fixing several long-standing bugs realted to handling post-visit/battle/levelup callback, including infamous creature bank issues: #955, #1053, #1063, #1191. Needs testing.
Minor changes:
* default log level set to trace
* LOG_TRACE raii guardian lifetime will last till the end of block
* compile fixes
* minor refactorings
2013-04-20 11:34:01 +00:00
beegee1
c10266ed97 - Reduced complexity to use the CMapGenerator(simpler interface) - Removed h3m.txt and tchar_amigaos4.h 2013-04-14 18:52:05 +00:00
beegee1
f10ba48c77 - Fully integrated new logging API(ERM, Editor, missing parts) - Removed old logger 2013-04-11 15:58:01 +00:00
beegee1
6827fcdb53 - Integrated the logging API into the server project - Simplified CBasicLogConfigurator usage(exception handling, logging, log file appending) 2013-04-10 17:18:01 +00:00
beegee1
c7c2686379 - Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets 2013-04-09 14:31:36 +00:00
beegee1
30bcec42c6 - Renamed client/BattleInterface to client/battle and client/UIFramework to client/gui 2013-04-07 11:52:07 +00:00
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
Ivan Savenko
c927913f5f - Improved json validation. Now it support most of features from latest json schema draft
- Set of schemas in config/schemas directory that are used to validate input from mods.
2013-04-02 17:06:43 +00:00
Ivan Savenko
5082dafd62 - h3 hero classes and artifacts can be modified via json
- commander artifacts are now merged into main artifacts.json, todo - split 2.5k file into something manageable
2013-03-12 14:56:23 +00:00
mateuszb
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +00:00
Ivan Savenko
b5fcefe455 - moved all system-specific handling of filesystem to VCMIDirs.cpp (new file)
- fixed #1128, artifact constituents are now stored as pointers
2013-03-02 18:41:25 +00:00
Michał W. Urbańczyk
8c7c4789ca Attempt to apply patch from stopiccot. 2013-03-01 21:32:26 +00:00
Ivan Savenko
74ac44662c - a bit less memory usage during compilation with gcc, new file - RegisterTypes.cpp
- fixed several issues related to visiting town by ally
- fixed #1215
2013-02-23 12:22:23 +00:00
mateuszb
bda766b697 * refactoring 2013-02-12 19:49:40 +00:00
mateuszb
af5287c193 * fixed opening custom campaign selection window
* artifact positions refactored
* vstd::advance allows moving between enum values
2013-02-06 23:24:43 +00:00
Ivan Savenko
56ffd05648 patch from stoppicot:
1. vcmiclient now usese custom Info.plist 
 2. Original H3 game data is now also stored in Application Support folder
2013-02-06 15:39:34 +00:00
Michał W. Urbańczyk
17755caa10 * fixed #1199
* fixed advancing between misisons in campaigns
2013-02-05 20:06:13 +00:00
Ivan Savenko
46eb0b3daf - wrokaround/fix for #1177
- removed assert in Fonts.cpp (can be triggered a lot by old pregame\battles code)
- fixed battle console text positioning
- fixed some new compiler warnings
2013-01-20 22:49:34 +00:00
Michał W. Urbańczyk
5b919d88eb "More stable" opening AI. 2013-01-20 12:06:49 +00:00