Ivan Savenko
8aaa9e63dd
Fix build
2024-04-09 18:56:28 +03:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc
2024-03-29 07:48:52 +02:00
Alexander Wilms
ea48257100
Fix SonarCloud issues
...
Replace the use of "::value" with "std::is_abstract_v" and similar issues
2024-03-02 14:08:03 +01:00
Ivan Savenko
922966dcf8
Renamed JsonNode::meta to more logical modScope. Member is now private
2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56
Rename toJson to toString/toCompactString for consistency
2024-02-26 12:55:49 +02:00
Ivan Savenko
c3957c2c2a
Moved json files to new directory, split on per-class basis
2024-02-14 13:08:24 +02:00
Ivan Savenko
9ebd194ab1
Merge pull request #3609 from IvanSavenko/single_process
...
Allow running server as part of client process
2024-02-14 12:06:22 +02:00
Ivan Savenko
4c70abbeb5
Reduced usage of global variables - removed or made const / constexpr
2024-02-12 13:49:45 +02:00
Ivan Savenko
a909d7ddde
Removed cmake_modules/VCMI_lib macro, use it directly in place
2024-02-11 20:38:24 +02:00
Alexander Wilms
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
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
52050d0ef1
Fix build
2023-11-15 15:55:19 +02:00
Ivan Savenko
ae92bdfb51
Fix Lua and test building
2023-10-23 16:05:38 +03:00
Ivan Savenko
b88a8da4e8
Split off some netpack structures into separate files
2023-10-23 13:59:15 +03:00
Ivan Savenko
31cf3442af
Update docs
2023-10-22 16:55:19 +03:00
Ivan Savenko
a3b2354481
Implemented visit mode "limiter". Fixed h3m variable loading
2023-10-16 00:12:38 +03: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
747e28947a
Fix build
2023-09-06 16:03:47 +03:00
Ivan Savenko
823ffa7a07
Always use ResourcePath for referencing images and animations
2023-09-04 18:22:34 +03:00
Ivan Savenko
edd029c79c
Replace "currentPlayer" from gamestate with "activePlayers"
...
- Allows multiple active players at once, e.g. simturns
- Cleared up validation of netpacks by server, e.g. always check for
pack sender
2023-08-25 18:56:15 +03:00
Ivan Savenko
b61c9a9e35
Fix build
2023-08-25 13:46:42 +03:00
Ivan Savenko
62fddca21e
Split massive CModHandler class/file into multiple parts:
...
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
Ivan Savenko
9b5e81929f
Fix build
2023-06-20 19:37:27 +03:00
Konstantin
e60a4318c3
vcmi: a bunch of forward definitions
2023-05-07 20:37:32 +03:00
Konstantin P
8764765dcf
Bonus: complex duration as bitset
...
Fixes #2125
2023-05-05 21:30:45 +03:00
Konstantin
a6de9097be
vcmi: rename HeroBonus.h to Bonus.h
2023-05-02 11:20:58 +03:00
Konstantin
29c76fb9bf
HeroBonus: split BonusList
2023-05-02 00:54:53 +03:00
Konstantin
4866c2fe5c
vcmi: split IBonusBearer
2023-05-02 00:54:53 +03:00
Konstantin
b6eb2dc060
vcmi: rename IFactionMember and ICreature
2023-05-02 00:54:53 +03:00
Konstantin
6fa1b2b19f
vcmi: move bonuses to its own folder
2023-05-02 00:53:50 +03:00
Konstantin
af25ad0866
vcmi: split creatures and faction members
2023-05-02 00:53:50 +03:00
Konstantin
86f5d6de69
vcmi: modernize headers
2023-04-30 13:35:54 +03:00
Konstantin
7a5775a9f9
vcmi: use std::optional
2023-04-17 00:43:13 +03:00
Konstantin
4da97682be
vcmi: remove code duplication for native terrain
2023-04-10 19:28:17 +03:00
Konstantin
fedf7d377c
vcmi: remove TFaction
...
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Konstantin
11b237a23c
vcmi: massive refactoring v1
2023-04-05 22:33:12 +03:00
Konstantin
6d17b9342d
ResourceSet: resolve .at troubles
2023-03-31 14:12:38 +03:00
Konstantin
f0bfce29a0
vcmi: modernize lua v2
2023-02-12 21:23:00 +03:00
Konstantin
976c5e7bd4
vcmi: modernize lua
2023-02-08 13:51:22 +03:00
Konstantin
fb38050f9b
vcmi: build lua with STRICT_COMPILATION
...
This is a fixes for some LUA warnings for building it with strict
compilation.
2023-02-05 12:18:09 +03:00
Dydzio
19925c2c25
VcmiLua builds properly now
2023-02-01 20:25:09 +01:00
Dydzio
a2ce9220ed
Fix tests + scripting compilation on gcc
2023-01-05 17:42:33 +02:00
Ivan Savenko
2cbe6bcb47
Added common method to get names of hardcoded mod scopes
2022-12-07 15:18:19 +02:00
Tomasz Zieliński
f386f42166
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
# lib/battle/CBattleInfoEssentials.cpp
# lib/rmg/ObstaclePlacer.cpp
# lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Andrey Filipenkov
a851e630d5
fix building vcmiLua for iOS
2022-09-24 15:55:24 +03:00
Andrey Filipenkov
cd88f3fa9e
add vcmiLua headers to CMake
2022-09-24 15:55:24 +03:00
Andrey Filipenkov
9dc5f3ed8b
improve RPATH handling, apply RPATH when installing dylibs
2022-09-24 15:55:20 +03:00
Tomasz Zieliński
494b0f0226
First version that compiles
2022-09-21 11:34:23 +02:00
Andrii Danylchenko
4b4cc3cf4b
battlefields in VLC and custom bonuses for terrain patches
2022-09-11 11:31:27 +03:00
Nordsoft91
c4035134e5
New battlegrounds ( #758 )
2022-09-11 11:31:26 +03:00