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

96 Commits

Author SHA1 Message Date
b275d9de72 merge beta branch into develop 2022-12-29 22:08:53 +02:00
61ed408f61 Fix typo 2022-12-29 21:49:20 +02:00
588b635d1c Workaround for a potential deadlock in MusicHandler 2022-12-29 21:49:20 +02:00
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
e6afd8621c Minor improvements & fixes to music player
- music will be selected correctly after rapid leaving and reentering
town screen
- music sets are now store as single std::map instead of unnecessary
"map of maps"
- fixed computation of resume time for restarted/looped music tracks
- updated & clarified some comments
- converted C functions for SDL_Mixer callbacks into lambdas
- formatting fixes
2022-11-21 16:20:20 +02:00
61eca7e3be Hotfix: erase stored music position once it has been used
Fixes infinite loop on attempts to resume music track from position
larger than music duration
2022-11-20 23:42:50 +02:00
2324148187 Fix compilation using older SDL library 2022-11-13 14:59:28 +02:00
38b8fc0af8 Formatting: space -> tabs 2022-11-13 14:24:15 +02:00
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
11dd71515a comment 2022-09-26 09:18:01 +02:00
2bd30556a3 Store TerrainType by havlue and handle by reference 2022-09-26 09:17:55 +02:00
4ea57ea7fc A variety of suggested style tweaks 2022-09-25 09:33:56 +02:00
11e1bb44a2 Load sounds for new terrains later 2022-09-21 13:43:00 +02:00
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
b20f649521 stash 2022-09-19 16:13:58 +02:00
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
f2187f6767 fix infinite recursion when using SDL_mixer v2.6
Mix_HaltChannel -> soundFinishedCallback -> Mix_FreeChunk -> soundFinishedCallback -> ...
2022-08-03 12:08:41 +03:00
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28:28 -07:00
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
1afbdf7027 CSoundHandler: fix "unmutable" game (#588)
After a sound fade, now uses current volume instead of setting it to 100.

Fixes #3050.
2019-05-07 06:30:44 +03:00
f7262730b1 Defer SDL mixer free on 1st handler release (#578) 2019-04-21 22:09:14 +03:00
53d75684ee Prevent shadowing of global variable in function argument 2018-10-29 16:34:03 +01:00
da117e9255 Code style: remove void from constructors without arguments 2018-01-13 11:51:47 +03:00
d3b3389a37 Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 18:16:35 +01:00
d96a3aa5b7 CAudioBase: move mutex to base class since CSoundHandler need it 2018-01-02 09:49:04 +01:00
f15cadc87b Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 09:49:03 +01:00
e8a7078bb1 Quick fix for #389.
* modded music support should be redone separately
2017-11-16 17:47:52 +03:00
76eed8682c Allow mods to add music played during battles and ai turn 2017-11-11 21:16:11 +01:00
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
5c07e1c432 Minor typo fixes 2016-11-10 11:51:47 +01:00
46bd1c40cc Fix memory leak
SDL_RWFromMem does not take the ownership of the passed memory, so we
have to free it ourselves.
2016-08-31 11:45:37 +02:00
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
33d0738859 support for music streaming 2016-01-30 22:34:46 +01:00
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
dca1e28bc1 SDL1 wipe, part 1. Untested. 2015-06-21 01:59:30 +03:00
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
37a5930f84 CSoundHandler: fix memory leak and implement cache
This one fix issue 2091 and add caching that actually works.
2015-02-15 22:51:33 +03:00
66b022f93e initializer lists part1 2014-10-02 19:43:46 +04:00
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
3b8d0e44d4 Merge branch 'develop' into SDL2 2014-06-24 14:09:44 +04:00
47979d28bb Remove broken assertion
* this restores music support
2014-06-13 07:55:46 +04:00
ac2896da42 Implemented SDL2 unicode input. Hotkeys are sill broken. 2014-06-13 07:55:42 +04:00
62d42465de fix compilation
* may not even run
* text input disabled
2014-06-13 07:55:38 +04:00
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00
1d57b75bc5 - random number generation refactoring
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
43ba3d30ea Breaking things - first commit towards configurable object(s).
- New files: lib/CObjectWithReward.h/cpp
- Classes that will be replaced by configurable object are now in this
fil

Status: far from functional, currently at "it compiles" point, some
essential pieces are still missing.
2014-04-06 23:14:26 +03:00
065b8366fb [Spells] Added basic support for icons and sounds
* few changes in spell format
* save format changed
2014-03-10 16:00:58 +00:00