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

40 Commits

Author SHA1 Message Date
156de5b17e Added GameInstance class
- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
2025-02-21 16:54:06 +00:00
2ebf1daf0d add smooth drag for RMB & fix drag for new windows 2025-01-19 00:30:23 +01:00
19c981fc56 Added similar screen for Obelisk, moved assets to dedicated folder 2025-01-06 13:05:45 +00:00
6d0dc9c5bb Added popup for keymasters/border guards similar to teleporters 2025-01-05 23:22:46 +00:00
6d8e447ff3 Added new right-click popup to teleporters
Whirlpool, Subterranean Gates, and all Monoliths now show custom popup
on right-click that show all linked objects (exits and entrances).

Only revealed objects are visible, rest are hidden behind fow.

Exits, entrances, and bidirectional objects have different icon that
indicates direction.
2024-12-21 12:01:33 +00:00
6366175a3c fix window 2024-11-23 19:19:07 +01:00
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
be7d27234f map drag with right mouse 2024-08-28 22:17:05 +02:00
658747d342 Code cleanup 2024-02-27 14:45:15 +02:00
4b4dedeab9 Code formatting 2024-02-26 18:53:12 +02:00
e6b339448f Refactoring & deduplication of infowindow code 2024-02-26 18:32:15 +02:00
658cc14cd0 Removed direct usage of SDL_Surface in info windows 2024-02-26 15:49:27 +02:00
5419df1140 Removed no longer used class 2024-02-26 15:49: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
d7d435dcb7 Add game pause 2023-10-08 16:03:57 +02:00
39838fdd3c extend for all selections 2023-09-15 15:24:17 +02:00
e8453916cf Merge remote-tracking branch 'vcmi/beta' into develop 2023-09-08 18:49:06 +03:00
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
ed12f20609 Improve neutral creature adventure map popup 2023-08-21 14:42:41 +02:00
43795c39a5 Replaced all usage of SDL_Color outside of render with ColorRGBA 2023-07-31 21:07:30 +03:00
06437cbde6 Renamed gesture-related methods, remove unused code 2023-06-20 19:58:05 +03:00
85a11c090e Enter popup await mode only if there is an active popup 2023-06-20 19:58:05 +03:00
d4aa778547 Replaced clickRight event with showPopupWindow/closePopupWindow 2023-06-20 19:58:05 +03:00
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
86f5d6de69 vcmi: modernize headers 2023-04-30 13:35:54 +03:00
8ed115a628 Fix ios compile 2023-01-20 16:11:43 +02:00
9be38780cd Removed remaining parts of Geomeotries.h/cpp 2023-01-20 16:11:43 +02:00
ee7a573cb8 Refactoring of SDL API usage:
- Rect no longer inherits from SDL_Rect
- renamed vcmi functions that used SDL naming format
- moved all functions in SDL_Extensions file into CSDL_Ext namespace
- SDL_Rect is now used only by SDL_Extensions, all other code uses Rect
2023-01-20 16:11:43 +02:00
0cae259f53 Most of rendering in BattleInt is done via canvas
- refactoring of CBattleStacksController.cpp
- moved EAlignment enum to Geometries.h from CIntObject
- renamed EAlignment to ETextAlignment, to avoid conflict with good/evil
alignemt
- ETextAlignment is now enum class
2022-11-26 23:12:20 +02:00
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
75f8c8b29a Gui cleanup4 (#446)
* use smart pointers for almost all widget fields
* use SDL2 texture for cursor
* a lot af small tweaks and formatting
* removed CompImage class, it is actually useless as long as regular SDLImage support margins
* CGuiHandler: use smart pointers for [push|pop]Int
2018-07-25 01:36:48 +03:00
5c09f751b3 Gui cleanup3 - UI refactoring to use smart pointers (#440)
* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
2018-04-07 18:34:11 +07:00
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
6196ae7fca Fixed a few CWE-457 2016-11-27 19:00:16 +03:00
055c84bc7a cleanup 2016-10-16 04:23:38 +03:00
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
1e5e02c7df Compilation fixes caused by merge, replaced some remaining boost::bind with std's 2014-08-09 15:14:31 +03:00
10fc1892a8 Large refactoring of button classes:
- renamed CAdventureMapButton to more expectable CButton
- merged CButtonBase into CButton
- created more generic class for clickable elements
- created more generic class for selectable elements
- renamed CHighlightableButton to CToggleButton
- renamed CHighlightableButtonsGrous to CToggleGroup
- minimized differences between API of all these classes
- removed all but one contructors in buttons, with same parameters across all classes
2014-08-03 14:16:19 +03:00
731aedf3a1 Split CIntObjectClasses into multiple smaller files. This should be the last change in files 2014-07-15 10:14:49 +03:00