1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

47 Commits

Author SHA1 Message Date
f3de2cfe1c Removed broken & unused serialization of player interface and AI 2024-05-17 16:35:53 +00:00
19453aab41 Add handling for yes/no dialogs that can be safely skipped by player 2024-04-17 01:08:27 +02:00
522cb571b3 Remove redundant virtual specifiers
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`

```python
import os

with open("../redundant_virtual.txt") as f:
    for line in f:
        print()
        line: str = line.strip()
        print(line)
        tmp = line.split(":")
        file = tmp[0].strip()
        code = tmp[-1].strip()
        print(file)
        print(code)
        new_code = code.replace("virtual ", "", 1)
        # https://superuser.com/a/802490/578501
        command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
        os.system(command)
```
2024-02-10 20:46:13 +01:00
0c07384293 Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum

Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
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
c8e6a7cd27 Fixed most common cases of movement actions 2023-09-16 20:07:26 +03:00
036df2e0ad Support multiple battles in AI 2023-09-06 16:03:46 +03:00
98f7ed9dfd Implement player start turn query 2023-08-28 18:56:36 +04:00
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
013417fb7e Code cleanup 2023-08-21 17:55:49 +03:00
556763fb7b Fixed handling of tactics 2023-07-18 22:02:35 +03:00
2855606a88 Enabled & fixed -Woverloaded-virtual warning from gcc/cland
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
3d1a84875e Queries refactoring
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
f6de3f94ca Teleports: use TTeleportExitsList typedef for exits list
There is several ideas that teleportation code have to be shared between object/spells and this way we can avoid changing showTeleportDialog declaration every time.
2015-11-28 02:41:30 +03:00
25656aa586 Add showTeleportDialog everywhere except actual code for AI and player
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00
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
b01637840a - compile fixes
- fixed building in towns after loading (partial #1272)
2013-05-27 14:20:46 +00:00
7e46d462b6 - compile fixes
- fixed portrait initialization for random heroes
2013-02-12 21:32:55 +00:00
a9d458c8f4 few more refactorings 2013-02-04 21:58:42 +00:00
edccbd4809 Rewritten many parts of query handling. Fixed several scenarios leading to a hang (including #1012). Purged boost::function from player interface (handy but impossible to serialize). VCAI will keep description for each unanswered query, so the further debugging will be easier. 2012-07-15 15:34:00 +00:00
4cd77a0192 Naive solution for endianess issues. Seems to allow loading a big-endian save on little-endian build.
Fixed compile issues with CEmptyAI. Removed unnecessary methods from its.
2012-06-01 15:59:26 +00:00
4e92859cee - fixed crash on loading of some maps
- minor fixes
2012-05-30 18:37:21 +00:00
d491bc1c3a Commanders can level up. It's non-interactive yet.
Printing secondary skills for Commanders.
2012-05-18 14:02:27 +00:00
416c08260a - Basic Commander window
- First part of unified quests interface

This graphics package is needed:
http://forum.vcmi.eu/viewtopic.php?p=6943#6943
2012-05-16 17:29:05 +00:00
91c0ce33f4 - re-generated build system
- fixed several gcc issues
2011-12-31 10:03:29 +00:00
7f04ed990b Major refactoring. First part: BattleInterface
Introduction of pre compiled headers,...
2011-12-13 21:23:17 +00:00
0c3f3c67a9 Callback naming fix. 2011-05-04 02:32:35 +00:00
872a057aa7 Fixed bad prototype. 2011-01-29 19:07:49 +00:00
3d9dc0642d - gcc compile fixes
- corrected projectiles for some units
2010-12-24 15:37:48 +00:00
a9617b3dfd Fixed prototype. 2009-09-10 14:06:28 +00:00
621400ac85 * small refactoring 2009-04-30 14:59:30 +00:00
df25dd7efb Sound patches from Ubuntux #7 - #10:
* Some sound code cleanups
* Renamed soundBase::soundNames into soundBase::soundID
* Add a music handler destructor
* Add Archdevil and vampire pre and post movement sounds

I've applied minor change to fix CMusicHandler - GeniusAI conflict: moved sounds bimap to the .cpp file.

(vcmi_sounds_cleanup.diff
vcmi_sounds_cleanup2.diff
vcmi_sounds_cleanup3.diff
vcmi_add_sounds.diff)
2009-04-30 10:53:06 +00:00
ade4b46edd Sound patch from Ubuntux #2
(vcmi_sounds.diff)
2009-04-22 18:48:56 +00:00
4d3808cfa0 * applied ubuntux's patches
* fixed AmptyAI (it builds now)
2009-04-13 18:52:20 +00:00
b89c951d09 * version set to 0.62
* almost redone treasure chest
* working gaining levels for heroes (including dialog with skill selection)
* corrected another typo i cr_shots
2008-08-13 00:44:31 +00:00
a729484dde * battle funcs added to ICallback
* initing visiting heroes
* merging stacks in town screen
* available creature amount handled
2008-04-13 11:05:39 +00:00
fe5bcc19cf * redone def info handling
* redone randomization (mam nadziemę, że będzie toto działać)
* no more cheating pathfinder
* minor improvements
* version changed to 0.52
2008-02-05 03:56:45 +00:00
d3f5a1c1e7 Finished drawing selection window for treasure chest.
(trzeba dorobic jego zamykanie, zwrocenie infa, zwrot pamieci)
2007-12-27 00:11:46 +00:00
01c996591a More stuff for selection window. 2007-12-25 16:25:53 +00:00
58f1a2169f faster FoW in minimap, does not work, compiler errors 2007-12-06 18:55:58 +00:00
c8c0d0eaaf Bugfixes for AI, Callback Interface, logging macrodefs. 2007-12-06 18:32:06 +00:00
556311c9ab Partially done object scripting and interactions.
Most of 0.4 ;)
2007-11-18 22:58:28 +00:00
04985fce2f * added #45, #44, #43 2007-10-21 16:45:13 +00:00
97f4fbcce8 First EmptyAI. It's not used yet, but it can be compiled.
Support for AIs I'll soon after infoboxes for towns (if there won't anything urgent)
2007-10-16 22:41:45 +00:00