1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
Commit Graph

126 Commits

Author SHA1 Message Date
Ivan Savenko
2d08e18f6a Implemented generation of combat unit number window for xbrz mode 2024-09-12 21:22:41 +00:00
Ivan Savenko
36c1ed670f Support for configurable town fortifications
Removed most of hardcoded checks for fort level or for presence of fort/
citadel/castle buildings.

It is now possible to define which parts of town fortifications are
provided by town buildings

Configuration for H3-like fortifications is provided in
buildingsLibrary.json and will be used automatically by mods as long as
mods have buidings named "fort", "citadel" and "castle".

Alternatively, mods can separately define:
- hitpoints of walls (shared value for all sections)
- hitpoints of central, upper and lower towers (separate values)
- presence of moat
- shooters for each tower (separate values)
2024-08-28 19:42:14 +00:00
Ivan Savenko
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
Ivan Savenko
d502850054 Add network thread termination logic for adventure map animations 2024-05-18 12:15:48 +00:00
Ivan Savenko
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
Ivan Savenko
d27b854cb1 Reorganized music, video and sound players:
- All XXXplayers are now in client/media directory
- Reogranized code on one class per file basis
- Extracted interfaces from handlers. Handlers now implement
corresponding interface.
- CCS now only stores pointer to an interface
2024-05-15 17:05:12 +00:00
Ivan Savenko
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
Laserlicht
3084cb2e46 fix battle text position
fix space
2024-01-20 14:35:21 +01:00
Dydzio
d309a00025 Extra fix: fix amount position in battle creature labels 2024-01-07 21:45:39 +01:00
Ivan Savenko
a9005da01e
Merge pull request #3366 from Laserlicht/battle_informations
Battle stacks informations
2023-12-28 12:39:26 +02:00
Laserlicht
7a541c7a42
implement spells 2023-12-23 14:51:26 +01:00
Laserlicht
0b4cf14a3d
basic functionality 2023-12-23 03:06:48 +01:00
Laserlicht
56e1265097
use stacks 2023-12-22 22:26:35 +01:00
Ivan Savenko
0a8b81b2c4 Fix deactivation of current stack if player does not acts in time 2023-12-22 22:46:09 +02:00
Ivan Savenko
d06ae15c6e Fix teleporting animation 2023-11-27 14:08:49 +02:00
Ivan Savenko
3880ea58b9 Merge branch 'josch/dos2unix' into develop 2023-10-22 18:39:03 +03:00
Ivan Savenko
ac925bb786 Renamed new types for consistency with code style 2023-10-22 16:55:19 +03:00
Ivan Savenko
80e6485965 MetaIdentifier now uses std::variant internally 2023-10-22 16:55:19 +03:00
Ivan Savenko
b394158dc9 Bonus Source ID now uses metaidentifier 2023-10-22 16:55:18 +03:00
Ivan Savenko
77facf9387 Implement missing functions, fixes linking errors 2023-10-22 16:54:56 +03:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
Ivan Savenko
f39fbe5151
Merge pull request #2757 from IvanSavenko/filesystem_refactor
Filesystem refactor - part 1
2023-09-07 10:51:02 +03:00
Ivan Savenko
41210c1dbf Client-side support for multiple battles 2023-09-06 16:03:47 +03:00
Ivan Savenko
1d0e696db6 Added RenderHandler that acts as factory for images and animations 2023-09-04 18:22:34 +03:00
Ivan Savenko
8dfdfffd87 Use ResourcePath for audio files 2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Konstantin
344593e891 vcmi: made some CSpell properties private
There are getters for it.
2023-08-23 17:53:08 +03:00
Ivan Savenko
1c552ba9d9 Remove unused code 2023-08-21 17:55:49 +03:00
Ivan Savenko
013417fb7e Code cleanup 2023-08-21 17:55:49 +03:00
Ivan Savenko
6297140bf5 Start of stabilization - battles now start correctly 2023-08-21 17:55:49 +03:00
Ivan Savenko
3213800097 Fix assertion failure on teleport cast 2023-08-03 14:20:54 +03:00
Ivan Savenko
5be4f6ec2f Fix visibility of creature amount label after casting spell before turn 2023-07-22 22:49:48 +03:00
Ivan Savenko
e6d8b65e2c Fix toggling of auto combat 2023-07-22 12:15:27 +03:00
Ivan Savenko
1bf6bbd9b6 Significantly simplified threading model in battles 2023-07-18 19:55:59 +03:00
Ivan Savenko
5e8a778e7d Attempt to fix / trace crashes from Google Play statistics 2023-07-18 17:31:21 +03:00
Ivan Savenko
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00
Ivan Savenko
8ea0ecaec1 show/showAll methods now use Canvas instead of SDL_Surface
- added compatibility method to Canvas to allow SDL_Surface access
- added drawBorder method to Canvas to replace CSDL_Ext method
- added drawColor method to Canvas to replace CSDL_Ext method
- minor changes to Tavern and Trade windows to adapt to new API
2023-06-02 16:42:18 +03:00
Ivan Savenko
867c5355da Fix tower shooters animation updates 2023-05-20 13:11:52 +03:00
Ivan Savenko
8a31aeb94b Battle animations use tick() for updates 2023-05-14 22:23:00 +03:00
Ivan Savenko
03df274450 Framerate manager is now in a separate file and private member of GH 2023-05-14 22:22:37 +03:00
Konstantin
05eccbc2bb vcmi: split bonus to enumerator and HeroBonus.h 2023-05-03 18:01:06 +03:00
Konstantin P
b472c89276 vcmi: make some CStack properties private
There is a getters for this properties already available
2023-04-27 20:58:49 +03:00
Ivan Savenko
4a169972f0 Further refactoring to cleanup code of advmap and locplint 2023-04-20 22:04:24 +03:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Konstantin
bc1aad3b26 vcmi: remove deprecated CStack::getCreature()
Function battle::Unit::unitType() does the same.
2023-04-13 11:24:19 +03:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Ivan Savenko
e9aed2761c Fix target selection for teleport 2023-03-31 23:18:45 +03:00
Ivan Savenko
1fcaeba8e0 Fix stack amount boxes flickering between actions 2023-03-29 13:21:43 +03:00