Ivan Savenko
b88a8da4e8
Split off some netpack structures into separate files
2023-10-23 13:59:15 +03:00
nordsoft
c8452355ce
Revert "Merge pull request #2959 from Alexander-Wilms/faster-server-connection"
...
This reverts commit 43636af2e4
, reversing
changes made to aed2e360ba
.
# Conflicts:
# client/CServerHandler.cpp
2023-10-14 22:52:24 +02:00
Nordsoft91
4ae123e2a1
Merge pull request #3038 from Alexander-Wilms/connection-error-window
...
Show info dialog when connection to multiplayer server fails
2023-10-12 00:16:04 +02:00
Alexander Wilms
7c627d8163
Show info dialog when connection to multiplayer server fails
2023-10-10 18:11:11 +02:00
Nordsoft91
b6da60b105
Merge pull request #3023 from Laserlicht/video_audio
...
audio from SMK video file
2023-10-10 00:40:33 +02:00
Laserlicht
89a39fcfc0
code review
2023-10-08 20:27:56 +02:00
Nordsoft91
43636af2e4
Merge pull request #2959 from Alexander-Wilms/faster-server-connection
...
Sleep for 10 ms instead of 1000 ms while waiting for server connection
2023-10-08 17:21:57 +02:00
Laserlicht
be2b3afe48
implements sounds
2023-10-08 12:49:59 +02:00
Alexander Wilms
c8f1512a3f
Use correct address to decide whether we're connecting to a remote server or a local one
2023-10-06 23:33:51 +02:00
Ivan Savenko
e322d0a084
Merge pull request #2966 from IvanSavenko/simplify_ui_lock
...
Simplified locking of game UI state
2023-10-04 16:50:23 +03:00
nordsoft
6da605ff83
Campaign meta strings
2023-09-28 00:10:28 +02:00
nordsoft
03c099d4fd
First steps
2023-09-27 22:53:13 +02:00
Ivan Savenko
d6b9fa8fbd
Replaced CPlayerInterface::pim with CGuiHandler::interfaceLock
...
- Removed CPlayerInterface::pim since this lock does not actually
protects LOCPLINT but rather entire game UI state
- added more logical CGuiHandler::interfaceLock
- interface lock is now non-recursive and is locked only once by initial
caller that want to access GUI
2023-09-27 18:33:52 +03:00
Ivan Savenko
71a1ed816a
Merge pull request #2892 from Laserlicht/highscore_menu
...
Highscore Menu & end video
2023-09-27 15:48:47 +03:00
Laserlicht
242e0ffa4a
fix playername
2023-09-26 22:06:04 +02:00
Laserlicht
2738dc3190
better approach for redrawing
2023-09-26 21:12:04 +02:00
Laserlicht
c3373ea34c
code review
2023-09-25 18:06:40 +02:00
Laserlicht
68e536c290
code review
2023-09-24 02:00:42 +02:00
Laserlicht
e69b91fbdd
fix layer problem
2023-09-23 23:44:12 +02:00
Laserlicht
41b03e7c5b
fixed some edge cases
2023-09-23 23:11:17 +02:00
Laserlicht
96df11a6f2
always show actual entry
2023-09-23 22:45:38 +02:00
Laserlicht
8a0565eb9b
use vector
2023-09-23 22:15:05 +02:00
Laserlicht
6f8b62d77d
codereview
2023-09-23 20:41:30 +02:00
Laserlicht
ca96749c45
workaround for missing video
2023-09-23 16:28:28 +02:00
Laserlicht
06895e6733
fine tuning
2023-09-23 15:11:48 +02:00
Laserlicht
e3edcb6cd8
rmb; bugfix; tabs
2023-09-23 14:51:39 +02:00
Laserlicht
d2398b804a
implement adding
2023-09-23 13:14:45 +02:00
Laserlicht
049f90159d
highlight preparation
2023-09-23 01:53:45 +02:00
Laserlicht
d3f007453d
win screen ready
2023-09-23 01:36:01 +02:00
Laserlicht
901a33bf1d
calculation
2023-09-23 01:03:15 +02:00
Laserlicht
1a0f5cf159
calc preperation
2023-09-23 00:21:36 +02:00
Laserlicht
30c6cf3b98
video & audio correction; win/lose
2023-09-22 21:45:12 +02:00
Laserlicht
a4cb74f0dc
highscore input window
2023-09-22 20:39:20 +02:00
Laserlicht
909b06f7c1
draw images
2023-09-22 02:19:31 +02:00
Laserlicht
92b0e2b400
initial highscore support
2023-09-22 01:39:35 +02:00
Laserlicht
5fd2eee3e8
code review
2023-09-21 21:27:06 +02:00
Laserlicht
4d8414bd3d
unlock functionality
2023-09-20 23:06:32 +02:00
Laserlicht
dfb5ccbeaf
add persistent storage & completed campaign support
2023-09-20 22:18:53 +02:00
Laserlicht
52b86eb9c1
get back to campaignmenu
2023-09-20 21:18:13 +02:00
Laserlicht
34182069f5
campaignset
2023-09-20 03:13:54 +02:00
Laserlicht
1c68937d95
new approach
2023-09-15 15:26:14 +02:00
Laserlicht
42d2257f19
VCMI credits
2023-09-15 15:26:14 +02:00
Laserlicht
994da3fcf2
code review
2023-09-11 14:44:07 +02:00
Laserlicht
fa19ed4e7c
format
2023-09-11 14:11:16 +02:00
Laserlicht
00f07f93d1
wait while audio playing; no audio on custom campaigns
2023-09-11 14:04:44 +02:00
Laserlicht
fc1ce85a72
basic voice support
2023-09-11 12:57:10 +02:00
Ivan Savenko
9cfcf5ea19
Fix regressions
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
97b7d44c88
Use ResourcePath for video accessing
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
0613756abc
Remove unused code
2023-08-23 16:32:29 +03:00
Ivan Savenko
87957e74c1
Replaced boost::thread_specific_ptr with thread_local
2023-08-23 16:32:29 +03:00
Ivan Savenko
142889e3a5
Give all threads created by client human-readable name for debug
2023-08-23 16:32:29 +03:00
nordsoft
937935ce8c
Fix compiling (how does it work on mac?)
2023-08-23 01:20:29 +04:00
nordsoft
d9a2a7bfd0
Fix minor points
2023-08-22 16:00:14 +04:00
nordsoft
b1bfc2239f
Backward compatibility with mods
2023-08-22 00:32:26 +04:00
nordsoft
a60d503078
Fix progress bar
2023-08-21 19:21:32 +04:00
nordsoft
45f13c7964
Progress update on client side
2023-08-21 19:21:27 +04:00
nordsoft
584dd20943
Progress on server side for rmg
2023-08-21 19:21:22 +04:00
nordsoft
989a0859ef
Fix tutorial loading
2023-08-20 17:58:40 +04:00
nordsoft
70d04ad957
Replace thread approach with callback based
2023-08-11 20:04:14 +04:00
nordsoft
ef7008a753
Unblock UI while tutorial loading
2023-08-10 01:27:13 +04:00
nordsoft
f4869cbfb0
Tutorial load game mode
2023-08-09 15:29:48 +04:00
nordsoft
04c0124759
Remove unnecessary strings
2023-08-09 14:59:26 +04:00
nordsoft
1def98a862
Tutorial implemented
2023-08-09 03:54:09 +04:00
Ivan Savenko
4d08a131d3
Reorganization of boost filesystem usage
...
- Removed (most of) boost filesystem namespace usings
- Replaced boost::filesystem::fstream with std::fstream and different
constructor that should be available on any plaftorm
2023-07-28 19:12:04 +03:00
Ivan Savenko
bb17cc13b1
Implemented lazy totalRedraw to prevent multiple redraws on single frame
2023-07-18 17:31:21 +03:00
Ivan Savenko
0deeff30b9
replaced clickPressed with clickReleased where applicable to H3
2023-07-09 17:55:39 +03:00
Ivan Savenko
ca889a5c2a
Replaced clickLeft with clickPressed clickReleased methods
2023-07-08 14:33:04 +03:00
Ivan Savenko
8b61c0d59b
Replaced CIntObject::type bitfield with bool's. Added input blocking.
2023-07-03 19:24:12 +03:00
Ivan Savenko
cdc27d1fcf
Play correct music file in campaign menu
2023-06-27 20:09:11 +03:00
Ivan Savenko
0f8d53e978
Replaced SDL user events list with dispatching of arbitrary functors
2023-06-26 21:51:10 +03:00
Ivan Savenko
f6b2f58da9
Use inheritance instead of composition for campaign header
2023-06-26 17:15:59 +03:00
Ivan Savenko
8420a90aa4
Reorganization of campaigns code
2023-06-26 17:15:59 +03:00
Ivan Savenko
d1e5a347ff
Refactoring of campaign handler: rename types and use strong typing
2023-06-26 17:15:59 +03:00
Ivan Savenko
d4aa778547
Replaced clickRight event with showPopupWindow/closePopupWindow
2023-06-20 19:58:05 +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
b04b11b9d1
Merge pull request #2175 from IvanSavenko/map_format_mappings
...
HotA map format support - object mapping
2023-06-01 22:06:18 +03:00
Ivan Savenko
acac42291e
Remove excessive CMap.h includes
2023-05-31 23:18:38 +03:00
Michael
eb618fbff9
rename function
2023-05-28 17:29:11 +02:00
Michael
8672fc7e3d
Allows to translate default playername
2023-05-28 16:57:24 +02:00
Michael
3ee7610015
added missing translation strings
2023-05-28 14:58:21 +02:00
Ivan Savenko
5e86b00dda
Moved input handling from GuiHandler to set of classes in eventsSDL dir
2023-05-20 01:51:49 +03:00
Ivan Savenko
d5d0ca96a8
Minor fixes and cleanup
2023-05-20 01:51:49 +03:00
Ivan Savenko
1f513fd280
Extracted event management from GuiHandler and CIntObject
2023-05-20 01:51:49 +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
051a4a3c17
Encapsulation of WindowHandler state
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
b1bd49ecd8
Fix main menu resize on resolution change
2023-05-09 13:10:33 +03:00
Ivan Savenko
dea10e6091
Use more descriptive names for hotkeys
2023-05-01 17:59:20 +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
nordsoft
91b4782a2f
Refactor more fields from campaign header
2023-04-17 04:47:54 +04:00
Konstantin
5366f9190e
vcmi: reduce boost::lexical_cast usage
2023-03-09 16:36:46 +03:00
Andrey Filipenkov
313d479d42
fix using JNI from server in single process build
2023-03-02 12:09:48 +03:00
Ivan Savenko
7c58a46279
Removed some instances of access to screen
surface
2023-02-03 18:23:53 +02:00
Ivan Savenko
3fef2a5e1f
Moved Colors to a separate file, updated includes
2023-02-03 11:39:40 +02:00
Ivan Savenko
aab082fd2e
Remove remaining access to SDL_Events
2023-02-03 11:39:40 +02:00
Ivan Savenko
6669ffd4b3
Moved input-related code from SDL_Extensions to GuiHandler
2023-02-03 11:39:40 +02:00
Ivan Savenko
108a42e4ba
Reorganized includes for new layout. New class - IImageLoader
2023-02-01 20:42:06 +02:00
Ivan Savenko
9c3030603d
Removed most SDL includes from headers, removed SDL int's
2023-01-30 19:55:32 +02:00
Ivan Savenko
e35a669eeb
Refactoring of CPicture class to improve encapsulation
2023-01-30 13:58:13 +02:00
Konstantin
cf56f7ccce
vcmi: remove unused-but-set-variables
2023-01-26 23:49:00 +03:00
Ivan Savenko
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
Ivan Savenko
0e8ee929df
Renamed CCursorHandler -> CursorHandler
2023-01-15 21:18:34 +02:00
Ivan Savenko
7c0d5666a0
Return string by copy to fix cases when string is constructed on stack
2023-01-01 20:55:43 +02:00
Ivan Savenko
b275d9de72
merge beta branch into develop
2022-12-29 22:08:53 +02:00
Ivan Savenko
b6735618f5
Formatting
2022-12-29 21:50:04 +02:00
Ivan Savenko
986c0c534d
Main menu buttons are now defined using position of their center
...
Fixes positioning of main menu buttons in localized versions of the game
2022-12-29 21:50:04 +02:00
Ivan Savenko
d29c9d6445
Fortify CLabel interface to prevent unchecked access
2022-12-19 22:04:50 +02:00
Ivan Savenko
c302efd315
Fix crash on accessing not yet created object
2022-12-12 00:04:46 +02:00
Ivan Savenko
ac839ad26a
Changes to rest of the code according to review:
...
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43:43 +02:00
Ivan Savenko
495e0b3657
Merge remote-tracking branch 'vcmi/develop' into battleint_refactor
2022-12-01 23:58:01 +02:00
Ivan Savenko
a512e0d58f
Fixed ugly solid-white status bars in pregame, removed operator* from
...
CPicture
2022-11-29 17:07:21 +02:00
Ivan Savenko
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
Ivan Savenko
abb553d975
Next step of code refactoring:
...
- refactoring of CBattleFieldController code (except for 2 arcane
methods)
- introduced class CCanvas for encapsulated rendering surface
- battleint rendering is now partially done with CCanvas
- removed unused includes of CBitmapHandler
2022-11-25 11:46:47 +02:00
nordsoft
e7a8466e2b
Merge remote-tracking branch 'upstream/develop' into lobby
2022-11-15 22:09:46 +04:00
Ivan Savenko
38b8fc0af8
Formatting: space -> tabs
2022-11-13 14:24:15 +02:00
Ivan Savenko
4af9bc2461
Music: remember playback position of music tracks
...
Town & terrain themes will now resume from previously stopped position
instead of playing from start, as it was in original game.
Fixes #965
2022-11-13 14:05:51 +02:00
nordsoft
97e5fc8a07
Lobby works
2022-11-08 04:44:34 +04:00
Andrey Filipenkov
8f51a8756b
restore last used address in Multiplayer join dialog
...
in all other cases (when machine is host) hardcoded localhost address is displayed
2022-10-01 17:41:12 +03:00
Andrey Filipenkov
ef2e45a977
stop text input on connection start
2022-09-24 15:55:25 +03:00
Andrey Filipenkov
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
Andrey Filipenkov
5823a384bd
show keyboard automatically when joining multiplayer
...
kambala-decapitator/vcmi#10
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
2b1e6ca342
prevent showing keyboard automatically in main menu
...
closes kambala-decapitator/vcmi#10
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
a320af837d
fix includes in client subdirectories
2022-09-18 17:43:40 +03:00
Dmitry Orlov
c99b8b54e6
Fix: 'Load' and 'Main menu' in-game buttons should work properly
2021-01-17 19:18:26 +03:00
John Bolton
a05ae78e67
Fixed lots of warnings.
...
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.
4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
Dydzio
97869fc36f
Fixed single map victory crash
2019-03-29 22:01:51 +01:00
KasyanDiGris
fa5a14e2d8
Stabilize vcmi ( #488 )
...
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Alexander Shishkin
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
Arseniy Shestakov
4af288aee4
Refactoring of main menu related code
...
We need to make sure it's not stay active during gameplay.
Proper fix would require actually removing menu interface from GH, but then GH needs refactoring too.
2018-04-07 18:44:21 +07:00
Alexander Shishkin
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
Arseniy Shestakov
ac66fc7f42
Full rework of pre-game interface and networking
...
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.
TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00