Laserlicht
3e71cbcc39
Block feature is battle against human
2024-01-27 14:35:54 +01:00
Laserlicht
a2fd5039ab
setting
2024-01-27 01:16:55 +01:00
Laserlicht
e8c541f873
end with auto combat
2024-01-26 23:15:56 +01:00
Ivan Savenko
6e629a6a5f
split getBonusLocalFirst into two distinct method:
...
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00
Ivan Savenko
bd5682ecc3
Merge remote-tracking branch 'vcmi/master' into develop
2024-01-19 13:49:54 +02:00
Alexander Wilms
73019c204d
Replace redundant types with auto
for the lvalues of template factory functions for smart pointers
...
grep -r --include \*.h --include \*.cpp "= std::" * | grep -v auto | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return" | grep -v double | grep -v si64 | grep -v si32 | grep -v ui32 | grep \< | grep -v float | tr -d '\t' | grep -v assert > redundant_types.txt
import re
with open("redundant_types.txt") as f:
for line in f:
line = line.strip()
path = line.split(":", 1)[0]
original_code = ":".join(line.split(":")[1:]).strip()
print()
print(path)
print(original_code)
prefix = "auto "
if original_code.startswith("static"):
static = True
else:
static = False
cpp_type = " ".join(original_code.split("=")[0].strip().split(" ")[0:-1])
print(cpp_type)
if static:
new_code = "static auto "+ " ".join(original_code.split(" ")[2:])
else:
new_code = "auto "+ " ".join(original_code.split(" ")[1:])
print(new_code)
if True:
with open(path, "r") as f:
filedata = f.read()
filedata = filedata.replace(original_code, new_code)
with open(path, "w") as f:
f.write(filedata)
2024-01-17 12:50:00 +00:00
Ivan Savenko
a9005da01e
Merge pull request #3366 from Laserlicht/battle_informations
...
Battle stacks informations
2023-12-28 12:39:26 +02:00
Laserlicht
f0c97b344a
add duration + morale/luck
2023-12-23 16:07:12 +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
9bf1e72a19
Merge pull request #3346 from IvanSavenko/better_timers
...
[1.4.2] Better timers
2023-12-22 23:19:20 +02:00
Laserlicht
72911ec9a3
Army window
2023-12-22 21:26:40 +01:00
Ivan Savenko
ebbba0029f
Fix positioning and size of turn timers widget with English fonts
2023-12-22 18:40:29 +02:00
Ivan Savenko
241add394c
Fixed timer widget in pvp battle
2023-12-22 18:40:28 +02:00
Ivan Savenko
f834cb3d99
Display different timers separately when applicable
2023-12-22 18:40:28 +02:00
Dydzio
39c3db04f3
Add missing antimagic functionality to antimagic garrisons
2023-12-21 18:09:33 +01:00
Ivan Savenko
3880ea58b9
Merge branch 'josch/dos2unix' into develop
2023-10-22 18:39:03 +03:00
Ivan Savenko
b394158dc9
Bonus Source ID now uses metaidentifier
2023-10-22 16:55:18 +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
6f0108e462
Use ResourcePath for referencing texts and json's
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
Ivan Savenko
695a51d8c8
Merge remote-tracking branch 'vcmi/beta' into develop
2023-08-28 21:19:53 +03:00
Dydzio
e1eb245565
Better default stack action handling + "F shortcut" mode fixes
2023-08-27 17:33:10 +02:00
Ivan Savenko
0240ee886d
Converted (almost) all namespace enum's to enum classes
2023-08-25 13:38:02 +03:00
Ivan Savenko
44d16b32fe
Use API identical to std classes where possible
2023-08-23 16:32:29 +03:00
Dydzio
6bfbe80cc9
Allow toggling quick combat spells usage
2023-08-19 17:23:55 +02:00
Ivan Savenko
791eb1a37b
Added workaround for running game with outdated extras mod from 1.2
2023-08-01 14:47:17 +03:00
Ivan Savenko
aed8c411fc
Minor rework & cleanup of combat replays
2023-07-27 19:25:55 +03:00
Dydzio
47b6358e6e
Improve feature by triggering hero window refresh in response to netpack
2023-07-22 21:51:14 +02:00
Dydzio
05735a20e1
Fix for hero info window mana points not getting spent on spellcast
2023-07-22 15:32:00 +02:00
Dydzio
f4f789804d
Update client/battle/BattleWindow.cpp
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2023-07-18 15:15:58 +02:00
Dydzio
48a72f90f7
Add option for persistent hero info window as in HD mod
2023-07-17 23:25:16 +02:00
Michael
4e242f98fd
Battleintro: Skip with mouse button
2023-07-15 21:18:04 +02:00
Ivan Savenko
85262cf4f5
Moved CGameState files into a separate directory
2023-06-26 17:15:59 +03:00
Ivan Savenko
1cec6918a0
Fix spellcast cancelation in battle
2023-06-05 19:20:06 +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
ad3e54e6c0
Reduced usage of topWindow() method
2023-05-16 21:57:45 +03:00
Ivan Savenko
e2ef136003
Renamed "Int" -> "Window" in WindowHandler API
2023-05-16 19:10:22 +03:00
Ivan Savenko
7838190ef4
Moved window stack management from GuiHandler to new class
2023-05-16 19:10:21 +03:00
Ivan Savenko
ecff5f3d12
Do not trigger multiple hotkeys when battle window wait for any key
2023-05-09 13:10:33 +03:00
Ivan Savenko
342ea138f9
Fix remaining graphical artifacts on switching from world view
2023-05-09 13:10:33 +03:00
Ivan Savenko
d4098059b8
Proper support for player-colored buttons in UI
2023-05-09 13:10:33 +03:00
Konstantin
05eccbc2bb
vcmi: split bonus to enumerator and HeroBonus.h
2023-05-03 18:01:06 +03:00
Ivan Savenko
6c637dd8e6
Integrated hotkeys with InterfaceObjectConfigurable
2023-05-01 17:59:21 +03:00
Ivan Savenko
832e56e005
Implementation of (very basic) shortcuts system
...
- Added EShortcut enumeration that contains all in-game shortcuts
- CIntObject::keyPressed now receive values from hotkey enumeration
- On keypress, SDL key code will be translated to shortcut ID
- Removed access to SDL key codes from most of engine
2023-05-01 17:58:17 +03:00
Konstantin
7a5775a9f9
vcmi: use std::optional
2023-04-17 00:43:13 +03:00
Ivan Savenko
dfa2e2a349
Merge beta into develop
2023-04-11 19:37:35 +03:00