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

58 Commits

Author SHA1 Message Date
Ivan Savenko
652ceb2bde Finally shattered CObjectHandler.cpp into tiny bits
- This file is now split into multiple smaller files in mapObjects
directory
- CObjectHandler itself now contains only core classes (Handler itself,
CGObject and interfaces)
- Cleaned up excessive #include's through whole project
2014-06-05 19:52:14 +03:00
Ivan Savenko
0afdfa529c Moved all object-related files to lib/mapObjects directory.
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00
Ivan Savenko
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00
Ivan Savenko
7f276185bd Moving files:
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
Ivan Savenko
153dd1f5f9 - Added new files that should have been in last commit 2014-04-27 15:19:23 +03:00
Ivan Savenko
7725232253 backup of current progress, started design of "Object configurer" that
will be responsible for configuring of ObjectWithReward's from json
config.
2014-04-25 17:59:05 +03:00
O01eg
c6238588bd Rename new files. 2014-04-20 12:58:58 +04:00
O01eg
927eb33c11 Split IGameCallback to reduce memory required to debug compilation. 2014-04-19 21:44:21 +04:00
beegee1
1d57b75bc5 - random number generation refactoring
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
Ivan Savenko
43ba3d30ea Breaking things - first commit towards configurable object(s).
- New files: lib/CObjectWithReward.h/cpp
- Classes that will be replaced by configurable object are now in this
fil

Status: far from functional, currently at "it compiles" point, some
essential pieces are still missing.
2014-04-06 23:14:26 +03:00
alexvins
33935ceb67 cmake/msvc project updates. untested. 2014-03-07 13:23:30 +00:00
Ivan Savenko
8d36bcabce Split registerTypes into multiple files, now in lib/registerTypes
directory in order to reduce huge memory usage by gcc
2014-02-24 19:57:33 +00:00
stopiccot
d66f0222f2 more portable OS X library install names 2014-02-23 16:40:55 +00:00
beegee1
95034b9fa0 - Updated PCH to use our StdInc.h as the prefix header (not generated one from cotire) -> no exclude headers from ffmpeg/etc... statements required
- Fixed compilation error (VCAI ResourceSet logging)
2014-02-05 20:25:36 +00:00
beegee1
df0a28d9cb - added PCH compilation for CMake using cotire module (PCH is OFF per default, can be enabled with ENABLE_PCH=ON) 2014-02-01 13:37:26 +00:00
beegee1
d4fd361d4b - fixed #1643 -> hero placeholder handling
- fixed bug when loading victory/loss conditions of the 3rd scenario in the first ROE campaign
- fixed bug when loading artifacts to hero of the 3rd scenario in the first ROE campaign (due to corrupt H3M map)
- implemented function object to quickly find a object by it's sub ID in a list
- added netbackbase.h to header list in CMake
- removed false message which said that the server loaded the map successfully
2014-01-30 18:56:31 +00:00
Ivan Savenko
7e02f6b670 Support for overriding victory/defeat conditions from h3m map or
campaign:
- new file MapFormatJson that implements small subset of Json map
format, as described on wiki
- vcmi will read overrides from file config/mapOverrides.json (currently
empty)
- Json writer for logical expressions

TODO: write data for map overrides
2013-12-30 23:09:58 +00:00
Ivan Savenko
ee1b0459e6 Extended building dependencies:
- buiding/structure lists must use object format. This may break some
outdated mods.
- generic support for logical expressions that consist from and/or/not
operators.
- string ID's for buidings are now actually used.
2013-12-02 11:58:02 +00:00
beegee1
41e274b4aa - Moved FunctionList from /client to /lib -> used in client and server
- Updated project files
2013-11-30 10:08:38 +00:00
Ivan Savenko
dd73573c5c - vcmi can now calculate crc32 checksum of a file
- reorganized internal filesystem structure - all files from one mod are
now grouped in same FS node
- modhandler will now calculate crc32 checksum for each mod
- modhandler now knows validation status of each mod

todo - use checksum to determine mods that have not changed since last
start and disable validation for them.
2013-11-08 20:36:26 +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
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
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
beegee1
1ac328635a - Added handler classes CRmgTemplateStorage and CTerrainViewPatternConfig to LibClasses
- Re-organized CMapGenerator
- Created CZone and CTemplate objects in the heap and used pointers
- Added stub classes CZoneGraphGenerator and CZonePlacer (include warnings of unused variables, please ignore them)
- Fixed CRandomGenerator bug that always the same number was produced
- Better structure of Visual Studio project files with using filters
- Updated project files (VS, CMake)
- Excluded compiler warning mismatched-tags (false positive)
- Fixed a bug when compiling with unit tests enabled
2013-08-17 12:46:48 +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
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
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
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
beegee1
feea589648 - Bug-fixing for last commit - Moved CMapGenOptions to CMapGenerator 2013-04-15 17:18:04 +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
Michał W. Urbańczyk
f42cfa6f43 MSVC compile fixes:
1) Names of compile units need to be unique, renamed the new CLogget.cpp to CNewLogger.cpp. (at least till the old CLogger is gone)
2) Fixes for project files (a few includes were marked as compile items).
2013-04-11 01:05:51 +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
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
beegee1
89ad007b44 - Renamed Logging to logging 2013-04-07 10:30:01 +00:00
beegee1
b82f232e50 - Moved the private part of the logging API to CLogger.h/.cpp 2013-04-07 10:17:55 +00:00
beegee1
0baa261dfc - Implemented the new logging API(not used currently) - Added lock typedefs to Global.h - Some layout updates to Global.h 2013-04-05 10:29:46 +00:00
alexvins
2eb8263e51 Basic Configuration for bonus types
* introduced new handler BonusTypeHandler
* config\bonusnames.json converted to common format and splitted info main and localizable parts
* hanlders initialization refactored
2013-03-06 18:49:56 +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
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
alexvins
8249e15f0f [c::b] update projects 2013-02-11 19:27:37 +00:00
alexvins
d264f17b76 [refactor] separate h3m reader from rest of mapservice 2013-02-04 10:29:59 +00:00
beegee1
0311e5e6f5 - Added basic mock/test generation - Added stub for terrain editing 2013-01-06 19:30:12 +00:00
alexvins
4bc2fd5519 [c::b] renamed map subfolder to workaround dependency tracking bug 2013-01-03 12:19:20 +00:00
Ivan Savenko
ffe8b99369 - reorganized hero classes
- artifact iconIndex should work
- new file with hardcoded string constants: lib/StringConstants.h

Note: some minor bugs, will fix soon:
- slow to open hero window
- hero adventure map images serialization is broken\incorrect
2012-12-14 15:32:53 +00:00
Ivan Savenko
2643762f08 Mac OS patch from stopiccot 2012-12-01 06:30:52 +00:00
beegee1
e08db9790b * Map size can be any integer value * Changed new_*; to new_*(); for zero-parameter c-tors (=code convention; stack allocated objects without parantheses as ever to avoid c++ most vexing parse) 2012-11-13 18:01:31 +00:00
beegee1
c336abcf4a * Added RMG tab to pregame(disabled by default, activate with: enableRMG=true in settings.json) * Fixed tab intendation * Renamed colors to more comprehensible names 2012-11-11 12:23:31 +00:00
beegee1
a878f5f79a * Separated map loading from the map object * Moved map classes to lib/Map * Renamed map.h/cpp to CMap.h/cpp * Profiling of map loading is now optional * Updated CMemoryStream 2012-11-03 13:30:47 +00:00
Ivan Savenko
f113f9573d - CPack support. Works on my side, needs tweaks for Win 2012-10-05 12:38:17 +00:00