1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

444 Commits

Author SHA1 Message Date
SoundSSGood
348684f93e Graphical glitches fixed 2023-04-01 16:15:10 +03:00
Ivan Savenko
b875da108b
Merge pull request #1717 from SoundSSGood/backpack-limit-size
Introducing backpack size limit functionality
2023-03-27 17:17:49 +03:00
Ivan Savenko
b0a3f95d20 Do not activate new items when parent widget is inactive 2023-03-24 18:56:38 +02:00
SoundSSGood
19096f39f0 Backpack limit. Amount of fixes. 2023-03-21 22:11:42 +02:00
SoundSSGood
f0f9eecf97 Backpack limit part5. End of battle. Other stuff 2023-03-21 12:14:33 +02:00
SoundSSGood
9f8aa25297 Backpack limit part4 (Using cheats, buying) 2023-03-21 12:14:33 +02:00
SoundSSGood
96e8a1f21c Backpack limit part1 (move, disassemble) 2023-03-21 12:14:33 +02:00
SoundSSGood
72122fb433 CArtifact, CArtifactInstance, CCombinedArtifactInstance reorganization 2023-03-21 12:14:33 +02:00
Ivan Savenko
a0e9e01b48 Renamed & reorganized all game mechanics settings names 2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02:00
Konstantin
ebbc8cf208 vcmi: remove BLOCK_LUCK bonus
To block a luck, just set both INDEPENDENT_MAX and INDEPENDENT_MIN
to 0 of LUCK bonus
2023-03-16 16:46:42 +03:00
Konstantin
c07e74250b vcmi: remove BLOCKS_MORALE bonus
To block morale, just set INDEPENDENT_MAX and INDEPENDENT_MIN
to 0, there is no need for separate bonus.
2023-03-16 16:46:42 +03:00
Ivan Savenko
dc926aac03
Merge pull request #1690 from rilian-la-te/fixup-infobars
Fix yellow text rendering.
2023-03-16 14:47:43 +02:00
Ivan Savenko
2a2af34788
Merge pull request #1650 from SoundSSGood/arts-swap-regression-fix
Arts swap regression fixed
2023-03-16 14:47:31 +02:00
Konstantin
c497f17dd1 TextControls: fix centering of the yellow text 2023-03-15 14:35:55 +03:00
Konstantin
40222e3f77 vcmi: fix week animation 2023-03-13 01:22:19 +03:00
Konstantin
bf67784840 vcmi: correctly show spells from SpellInt.def 2023-03-11 21:41:57 +03:00
Konstantin
de211e9f13 vcmi: all notifications now shows inside the infobar properly
No more dangling images or text.
2023-03-11 21:41:57 +03:00
Konstantin
bc228a938a vcmi: use enum class for EComponentType
There is really no reason not to use it
2023-03-11 21:41:57 +03:00
Konstantin
2bd74e5c67 vcmi: use small icons for medium components
It makes more sense due to current UI implementation. It is better
to have icon smaller than have icons overlap
2023-03-11 21:41:57 +03:00
Konstantin
1ca89c8492 vcmi: implement splitting by ID in infobar
This will get a much better result than naive sorting
2023-03-11 21:41:57 +03:00
Konstantin
8a05f5bed7 vcmi: allow set font size on component
Now it is possible to set arbitrary font size
for CComponent. So, let's use it
2023-03-11 21:41:57 +03:00
Konstantin
da8840c499 CComponent: do not always assume 80 for text 2023-03-11 21:41:57 +03:00
Konstantin
4617ce10e5 vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
Konstantin
0dbc7169d8 vcmi: fix creature numbers on infobar
It was rendered on a border
2023-03-11 21:41:57 +03:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
SoundSSGood
e24eb6cc12 regression fixed 2023-03-08 17:20:38 +02:00
Ivan Savenko
f09897b2b4 Remove unnecessary redraws 2023-03-05 19:51:42 +02:00
Ivan Savenko
acdb8d6e06 renamed Unicode -> TextOperations, to use for all text processing 2023-03-05 17:39:23 +02:00
Ivan Savenko
65c020ef34 Moved Unicode namespace out of GeneralTextHandler file 2023-03-05 17:30:38 +02:00
Ivan Savenko
476e60c753
Merge pull request #1615 from SoundSSGood/CArtifactsOfHero-refactoring
Optimization and cleanup CArtifactHolder
2023-03-05 17:28:36 +02:00
SoundSSGood
a1dbbe2d86 redraw optimization 2023-03-03 10:17:31 +02:00
Andrey Filipenkov
fd56f86a84 introduce VCMI_MOBILE macro 2023-03-02 12:09:49 +03:00
Ivan Savenko
8c52cbcd00
Merge pull request #1429 from dydzio0614/creature-numeric-quantities
Implement numeric creature descriptions with config toggle on/off
2023-02-26 22:57:01 +02:00
Dydzio
e48a4185ed Use config values from new settings 2023-02-15 23:36:09 +01:00
Ivan Savenko
f8c1c46562 removed CAdvMapInt::handleRightClick method 2023-02-14 11:18:41 +02:00
SoundSSGood
0f93b0991c Regression fixed 2023-02-13 15:16:42 +02:00
SoundSSGood
34a0dbc0b6 misc slots. fixed combined arts moving 2023-02-12 20:13:26 +02:00
Ivan Savenko
ab8b407294 Style cleanup 2023-02-08 13:56:09 +02:00
Ivan Savenko
34dcb4127a Removed text utilities from SDL_Extensions 2023-02-03 18:55:25 +02:00
Ivan Savenko
d87fb43dcd Replaced SDL access with VCMI methods 2023-02-03 11:39:40 +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
cfcaf5cbb6 renamed keyDown -> keyPressed 2023-02-03 11:39:40 +02:00
Ivan Savenko
d4fba3787c Removed usage of SDL_KeyboardEvent from UI code 2023-02-03 11:39:40 +02:00
Ivan Savenko
860fe43131 Merged two mouse button enums 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
214fc19e74 CIntObject now receives mouse position as point instead of SDL event 2023-02-03 11:39:39 +02:00
Ivan Savenko
108a42e4ba Reorganized includes for new layout. New class - IImageLoader 2023-02-01 20:42:06 +02:00
Ivan Savenko
8a9492d129 Moved client files to more suitable locations 2023-02-01 13:09:19 +02:00
Ivan Savenko
0ba74fea73
Merge pull request #1515 from IvanSavenko/time_based_animations
Time based animations
2023-02-01 12:25:54 +02:00
Ivan Savenko
c3a2dee45a Code cleanup 2023-01-31 15:00:46 +02:00
Ivan Savenko
5cc23cc286 Renamed SDL_Pixels -> SDL_PixelAccess due to similar SDL header 2023-01-30 20:06:08 +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
e14290fde0 Removed loading of images from file into SDL_Surface 2023-01-30 18:25:47 +02:00
Ivan Savenko
87218c63c4 CPicture now uses IImage internally 2023-01-30 17:18:59 +02:00
Ivan Savenko
e35a669eeb Refactoring of CPicture class to improve encapsulation 2023-01-30 13:58:13 +02:00
Ivan Savenko
42df5626d9 Added Color class to replace SDL_Color 2023-01-30 00:12:43 +02:00
Ivan Savenko
3acee297be CShowableAnim is now time-based with timing matching H3 2023-01-28 13:19:35 +02:00
Ivan Savenko
50a0fc4fb2 Removed pointer to current SDL_Event from GuiHandler 2023-01-27 23:17:40 +02:00
Andrey Filipenkov
54537fc02c
Merge pull request #1478 from kambala-decapitator/units-huge-numbers
limit displayed units number to 4 digits
2023-01-25 17:47:08 +03:00
Dydzio
30ef4ac1b1 Improve handling of empty text in console, remove unused includes 2023-01-22 01:14:28 +01:00
Dydzio
685d63603d Merge branch 'develop' into creature-numeric-quantities 2023-01-21 12:57:29 +01:00
Andrey Filipenkov
6727a3673f limit displayed units number to 4 digits on adventure map
- garrison view (hero, town)
- small hero window
2023-01-20 20:40:28 +03:00
Ivan Savenko
8ed115a628 Fix ios compile 2023-01-20 16:11:43 +02:00
Ivan Savenko
fc0f5a9fb3 Reduced SDL includes 2023-01-20 16:11:43 +02:00
Ivan Savenko
9be38780cd Removed remaining parts of Geomeotries.h/cpp 2023-01-20 16:11:43 +02: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
05a1d7c6e3 All text for factions/towns/building are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
388ed88b5d All artifact strings now pass through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
fa6f7513e8 All heroes-related strings are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
e22f6283c2 Secondary skills strings are now passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822 All spell texts are now passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
8aebe404e3 Fix status bar activation via click 2023-01-20 15:15:28 +02:00
Ivan Savenko
c400416058
Merge pull request #1409 from IvanSavenko/translate_terrain
Refactoring of terrain handlers
2023-01-18 00:12:31 +02:00
Nordsoft91
672bcb488b
Merge pull request #1381 from dydzio0614/client-commands-improvements
Client commands code improvements + ingame support
2023-01-18 02:04:38 +04:00
Ivan Savenko
05ac217b0f Merge with vcmi/develop 2023-01-17 23:02:25 +02:00
Dydzio
e593b61201 Merge branch 'develop' into client-commands-improvements 2023-01-16 01:13:06 +01:00
Ivan Savenko
9971bdca1b Existing software cursor logic is now in a separate class 2023-01-15 21:18:34 +02:00
Ivan Savenko
0e8ee929df Renamed CCursorHandler -> CursorHandler 2023-01-15 21:18:34 +02:00
Ivan Savenko
246281e62a Merged vcmi/beta with vcmi/develop 2023-01-15 17:46:42 +02:00
Dydzio
8b2fc5198e Remove condition that causes unintended behavior 2023-01-15 17:31:32 +02:00
Dydzio
3596d167a7 Adjust code to develop + change place in code where alpha is applied 2023-01-15 17:31:32 +02:00
Dydzio
9e7e649d37 Gradual fade-in of built building 2023-01-15 17:31:32 +02:00
Ivan Savenko
6ea7add4bb
Merge pull request #1394 from SoundSSGood/art-move-fix
Artifact movement refactoring
2023-01-15 17:29:36 +02:00
Dydzio
06376ca4ef Change ClientCommandManager to become non-static 2023-01-15 01:09:58 +01:00
Dydzio
8248feebf7 Implement numeric creature descriptions with config toggle on/off 2023-01-14 15:55:08 +01:00
Dydzio
aac515f64e Merge 'develop' branch 2023-01-11 16:24:53 +01:00
SoundSSGood
a0568823a9 swap contitutient 2023-01-11 13:17:33 +02:00
Ivan Savenko
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
Ivan Savenko
7c7ae26e67 Map/Road/River identifiers are now private members 2023-01-10 00:01:35 +02:00
Ivan Savenko
1468f6aded Converted terrainTypeHandler into proper handler class 2023-01-10 00:01:35 +02:00
Ivan Savenko
1fece0ce18
Merge pull request #1229 from IvanSavenko/battle_improvements
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
SoundSSGood
4005b48360 Regressions fixed 2023-01-08 23:31:12 +02:00
SoundSSGood
c706b4d419 CArtifactsOfHero::artifactMoved updated 2023-01-08 23:31:06 +02:00
SoundSSGood
6b7ce798d0 artifactTransitionPos created 2023-01-08 23:24:13 +02:00
Dydzio
58fe0e6bd9 Apply command review suggestions + minor cleanup 2023-01-08 20:30:57 +01:00
Dydzio
16d06827d6 Change thread join to detach 2023-01-07 15:42:34 +01:00
Andrii Danylchenko
9f9798d3a4 Update android JNI bindings 2023-01-07 09:26:01 +02:00
Dydzio
7708885cf9 Use / as command prefix 2023-01-06 22:53:10 +01:00
Dydzio
4157feb2f3 Small cleanup 2023-01-06 21:20:46 +01:00
Dydzio
622e012fcf Allow ingame console to use clientside commands and print output 2023-01-06 21:01:54 +01:00
Ivan Savenko
9a620a9091 Refactoring of GeneralTextHandler to reduce boilerplate code in callers 2023-01-01 15:13:02 +02:00
Ivan Savenko
01d0cd4f7a Changed configurable UI to match text refactoring:
- help.txt strings are now loaded as (hover, help) pairs
- renamed string pairs from translate.json to use (hover, help) form
- interface builder will always load label texts via unified ID
- interface builder way of loading buttons text has been changed:
- - field has been renamed "zelp" -> "help" for consistency
- - "help" field now only accepts string or object json type
2023-01-01 14:56:45 +02:00
Ivan Savenko
bdb8e0ee5c Introduced string identifiers for H3 texts, still WIP 2023-01-01 14:56:44 +02:00
Ivan Savenko
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
Ivan Savenko
7a35bcc812
Merge pull request #1221 from IvanSavenko/warnings_fix
Fix remaining compiler warnings
2022-12-29 21:51:55 +02:00
Ivan Savenko
bb65246aa3 Merge remote-tracking branch 'vcmi/develop' into battle_improvements 2022-12-26 01:15:44 +02:00
Ivan Savenko
4b3d93f378 Minor cleanup 2022-12-25 17:43:55 +02:00
Ivan Savenko
405b2976d5 Renamed getUpgradeInfo -> fillUpgradeInfo 2022-12-25 14:03:43 +02:00
Nordsoft91
785787e454
Merge branch 'develop' into interface-builder 2022-12-24 21:56:29 +04:00
Ivan Savenko
325c29da0d Merge remote-tracking branch 'vcmi/develop' into battle_improvements 2022-12-23 14:51:34 +02:00
Ivan Savenko
eb20a4b208 Merge remote-tracking branch 'vcmi/develop' into warnings_fix 2022-12-23 14:40:45 +02:00
Ivan Savenko
f073c676f9 Merge 1.1 release into develop 2022-12-23 14:17:18 +02:00
Ivan Savenko
8b207fae63 ECreatureAnimType enum -> enum class 2022-12-22 01:04:58 +02:00
nordsoft
7e7071fc95 Merge remote-tracking branch 'upstream/develop' into interface-builder 2022-12-22 01:24:29 +04:00
Ivan Savenko
c835a84051 Moved all GUI handling from BattleInterface to BattleControlPanel 2022-12-21 17:02:53 +02:00
Ivan Savenko
822df113f3 Fix formatting 2022-12-21 13:18:16 +02:00
Ivan Savenko
b373c4a2b6 Fix Status Bar & In-game console activation 2022-12-19 22:53:31 +02:00
Ivan Savenko
a75b437fef Disable text input on window deactivation 2022-12-19 22:06:01 +02:00
Ivan Savenko
d29c9d6445 Fortify CLabel interface to prevent unchecked access 2022-12-19 22:04:50 +02:00
Ivan Savenko
fc4d2a31b4 Fix redrawing of hero exchange window on artifact (de)assembly 2022-12-18 15:09:33 +02:00
Ivan Savenko
57dba9433c Correctly update drag-and-drop cursor if our window gets deactivated 2022-12-18 14:34:38 +02:00
nordsoft
d7b0770b71 Remove excessive code 2022-12-17 20:50:33 +04:00
nordsoft
b1f2c7aed4 Team alignments implemented 2022-12-17 08:19:16 +04:00
nordsoft
d3c3feb037 Configurable template selection 2022-12-16 02:15:53 +04:00
Ivan Savenko
864990db13 Implemented Bloodlust & Petrification effect
- ColorFilter is now in separate file
- Moved lerp function into global.h
- Bloodlust visuals mostly matches H3
- Petrify visual matches H3
- TODO: Adjust timing of all ColorFilter efects to match H3
- TODO: Petrify should pause stack animations
- TODO: ColorFilter-powered effects should be configurable in Spell system
2022-12-15 23:24:03 +02:00
Ivan Savenko
7857668158 Implemented group attack animations for dragons/Hydras/etc 2022-12-14 14:21:58 +02:00
Ivan Savenko
1dea1854ae Moved battle animation enum's into new file 2022-12-13 21:31:49 +02:00
Ivan Savenko
d40d5250b7 changes to status bar according to review comments:
- renamed IStatusBar API to more clear names
- removed "locking" of status bar
- added comments for IStatusBar API
- removed dynamic_casts to CGStatusBar, now IStatusBar API is fully
sufficient
2022-12-12 18:23:41 +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
c855823528 Renamed files in client/battle to match new names of classes 2022-12-09 13:38:46 +02:00
Ivan Savenko
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
Ivan Savenko
908e6892f3 Removed CGHeroInstance::getPosition pseudo-override
Now access to hero visible position is always done via visitablePos
2022-12-07 22:10:08 +02:00
Ivan Savenko
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
Ivan Savenko
495e0b3657 Merge remote-tracking branch 'vcmi/develop' into battleint_refactor 2022-12-01 23:58:01 +02:00
SoundSSGood
3bf0cfe4fa
Merge branch 'vcmi:develop' into refactoring-art 2022-11-29 22:34:08 +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
Andrii Danylchenko
d6ca8017bf Clickable status bar to send messages with on mobile 2022-11-29 08:05:54 +02:00
SoundSSGood
909dcb82fa use ArtifactID 2022-11-29 00:32:18 +02:00
Ivan Savenko
3e58d1e3c5 Merge remote-tracking branch 'refs/remotes/vcmi/develop' into battleint_refactor 2022-11-28 16:10:13 +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
SoundSSGood
e6e669d024 ArtifactUtils::isSlotBackpack() func + refactoring 2022-11-18 23:13:44 +02:00
SoundSSGood
30bbb57619
Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-11-18 22:15:03 +02:00
Ivan Savenko
7a6ad671ab Separated battle control panel into new class, refactoring of
CGStatusBar to allow shared API with battle console
2022-11-18 17:54:10 +02:00
SoundSSGood
e9ab894638 backpack assemble 2022-11-18 01:55:29 +02:00
SoundSSGood
16b650136a backpack disassemble 2022-11-18 01:27:39 +02:00
SoundSSGood
2d078132bf assemble in backpack initial 2022-11-17 19:43:54 +02:00