1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

172 Commits

Author SHA1 Message Date
Michał W. Urbańczyk
96a92d0f45 * fixed remaining part of #1071 — the screen surface has always to be created in the main thread
* hold events in the queue by value (less ptr jugglery)
2012-09-11 14:25:19 +00:00
Michał W. Urbańczyk
d935e87dd8 #1071 should be fixed. 2012-09-09 23:57:22 +00:00
Ivan Savenko
deb22b3674 - (linux) use empty video player if av_register_protocol function was not found 2012-08-18 10:29:54 +00:00
Ivan Savenko
e67f8afdd9 - removed multiple unused files
- config folder with all json files is used via new FS API
- fixed campaigns loading. Replaced "detect h3m starts" heuristics with CCompessedStream::getNextBlock()
2012-08-02 11:03:26 +00:00
Ivan Savenko
b3c17d2788 large filesystem update. Filesysytem is now fully functional, everything should work.
- completely replaced CLodHandler, removed bitmaph and spriteh
- replaced CLodStream in favour of CCompressedStream (2 new files)
- renamed CResourceLoaderFactory and ResourceIndetifier to shorter names
NOTES:
- campaign loading is currently broken. Will fix.
- I am going to remove several unused files in several days (e.g. LodHandler)
2012-08-01 12:02:54 +00:00
Michał W. Urbańczyk
79f8e0ea3c Fail gracefully when file pointed by --start path doesn't exist. 2012-07-20 20:57:18 +00:00
Ivan Savenko
235cf458d7 - fixed text duplication in choice windows
- fixed compile issues
- added unused and untested for now CComponentBox
2012-07-02 21:51:48 +00:00
Ivan Savenko
770a6e077c - handling of incorrect or missing configuration files (settings.json\defaultSettings.json)
- better code for recruitment window, fixes #1013
- minor tweak to adv.map classes
2012-06-22 11:40:16 +00:00
Ivan Savenko
d60f2d57a0 - first part of CIntObject API clean-up.
- - mostly remove usage of (de)activateSomething functions
- - CIntObject's can be safely deleted in active state or without removing from parent first
- - Added CWindowObject to use as base of all windows (will be required for such features as shadows)

Report any crashes or glitches - it should not cause any issues apart from more console output. 

TODO:
- remove redundant (de)activate and show(All) calls
- decrease usage of blitAtLoc\printAtLoc methods
- switch all windows to new base
2012-06-02 15:16:54 +00:00
Ivan Savenko
49495c9caf - possibly fixed #966 and #958
- fixed crash on shutdown 
- fixed compile issue #973
2012-05-25 11:49:56 +00:00
Michał W. Urbańczyk
ee6e9fcc7f Fixed #947. 2012-05-22 21:08:16 +00:00
Ivan Savenko
45c2809a40 - pregame will use same resolution as main game
- disabled most of now unused code for changing resolution
- added missing spell effect sounds
- adventure map spells sounds
- remaining fixes for big endian systems
2012-05-18 17:35:46 +00:00
Ivan Savenko
90ff99d4eb - fixed ancient #31
- fixed #603
2012-05-14 16:29:06 +00:00
Ivan Savenko
82b60c00a2 - fixed compile issues. Renamed several "battleobstacleSplaced" to "battleobstacleplaced"
- implemented --disable-video command line switch
2012-05-05 08:32:55 +00:00
Michał W. Urbańczyk
017013a5a4 Throwing runtime_errors instead of string (or even char*) objects. 2012-04-22 07:32:45 +00:00
Michał W. Urbańczyk
722ec55384 Redid stack artifacts. Broken save compatibility. Added serializer support for boost::variant and sending CStackInstace* over network by implicitly passing IDs. Moved seeds and checksum to StartInfo. Various minor changes. 2012-04-14 02:20:22 +00:00
Michał W. Urbańczyk
8baec8b093 Implemented #715 (load game from sys options). Fixed #224. Minor improvements. 2012-04-09 02:53:50 +00:00
Michał W. Urbańczyk
d9064f4f7d Implemented #714 — restart functionality, including quick restart tweak (bound to CTRL+R). 2012-04-08 03:06:27 +00:00
Michał W. Urbańczyk
d6223dd137 Fixed #686.
Minor changes.
2012-04-08 02:29:11 +00:00
Michał W. Urbańczyk
b874295b3a Really fixed #918. 2012-04-08 01:43:40 +00:00
Michał W. Urbańczyk
6db3c5bc7e * VCAI: can't request actions from action handling thread
* Save game screen and returning to main menu will work if game was started with --start option
* GUI controls can selectively capture keyboard events. CTextInput won't capture Enter. Fixes #654.
2012-03-11 16:29:01 +00:00
Michał W. Urbańczyk
77b13404c0 Fixed #888. 2012-03-01 13:36:58 +00:00
Michał W. Urbańczyk
f2642cb62c Added VCAI and EmptyAI to the VS solution. Removed from it GeniusAI.
Fixed #329, #884, #885.
2012-02-29 01:31:48 +00:00
Ivan Savenko
2018fc09a4 - fullscreen config option will take effect immediately
- fixed bug with highlightable buttons
- added several missing spells sounds
2012-02-24 20:41:14 +00:00
Michał W. Urbańczyk
e4dc00abac * new file lib/UnlockGuard.h — unlock_guard is for unlocking a mutex for the scope time (RAII)
* all lock/unlock and unlock/lock pairs are done by RAII guards now
* fixed two possible crashes at the end of battle when last stack was killed by spell. That should fix #749 and #752.
* fixed a very nasty race condition, eliminating possible deadlock at the start of battle when human hero has tactics
* fixed #422
2012-02-19 21:03:43 +00:00
Michał W. Urbańczyk
1abf089bc7 Missed fixed for #858 (TortoiseSVN tricked me...)
Fixed #852.
2012-02-16 21:46:28 +00:00
Ivan Savenko
0c3e88226f - (linux) replaced Genius with VCAI
- gcc set to c++0x mode
- most of gcc warnings fixed
- replaced boost::assign with initialization lists (if available in compiler)
- new cheat code: vcmiarmenelos - build everything
- updated linux readme
- minor fixes, applied patch for #98
2012-02-16 17:10:58 +00:00
Ivan Savenko
86e7d96b39 - setting system: replaced settings.txt + sysopt.bin with json-based system (defaultSetting.json + settings.json)
- some work on system settings window
- new menu for selecting resolution (reused town portal graphics), can be opened from system settings
2012-01-12 15:23:00 +00:00
Michał W. Urbańczyk
046e54563c * fixed project files for RD configuration
* fixed crash when creature is casting Hypnosis (ie. exped Vampire Lords)
* fixed crash when creature is casting Cure before attack (ie. exped Unicorns)
* fixed crash when creature is summoning elemental (TODO fix it)
* fixed crash when doing a bonus system operation with a hero liberated from prison (ie. entering town or battle)
* fixed deadlock when StupidAI tried to assault the turrets
* fixed never ending siege when StupidAI has to use catapult (no more deadlocks on AI-AI siege)
* fixed deadlock when a hero received a level during another player's turn (ie. when he successfully defended)
* AI can win the game by defeating all enemies if there is a specific victory condition applying only to human players
* added options to help testing adventure map AI (--onlyAI, --autoSkip and --oneGoodAI).
* many minor changes
2012-01-03 01:55:26 +00:00
beegee1
156aa6e4d9 * Updated class - file - handling
* Renamed color constants
* Renamed class AdventureMapButton to CAdventureMapButton
* Moved basic controls like CTextBox from GuiClasses to CIntObjectClasses
* Moved new creature window from GuiClasses to CCreatureWindow
2011-12-22 13:05:19 +00:00
beegee1
2f5d6f2684 * CHexField renamed to CBattleHex
* CHexFieldControl renamed to CClickableHex
* CCreatureAnimation.cpp/.h moved to BattleInterface/CCreatureAnimation.cpp/.h
* Removed unused project files
* Added VCMI_client filters file for VS 2010
* Gathered common parts of StdInc.h in Global.h
* Boost.Spirit has been included in PCH for ERM project
* StopWatch renamed to CStopWatch
* GuiBase.cpp split up in UIFramework/...
2011-12-17 18:59:59 +00:00
beegee1
7f04ed990b Major refactoring. First part: BattleInterface
Introduction of pre compiled headers,...
2011-12-13 21:23:17 +00:00
Ivan Savenko
0f2e00c780 -(linux) Moved all (I hope) files created by VCMI to ~/.vcmi to prevents crash on launch from read-only directory
- minor fixes for #362 #835 #836
2011-11-01 12:58:01 +00:00
Frank Zago
1f9e97005f When changing resolution, both screen? and res? must be set. Fixes #813. 2011-09-25 16:39:13 +00:00
Frank Zago
6dd9d416b4 Fixed #812. 2011-09-24 01:24:11 +00:00
Frank Zago
c4b8039c1e Added a missing rturn in CGameHandler::isAllowedExchangeForQuery. Fixed several typos. 2011-09-24 01:15:36 +00:00
Frank Zago
4cad2f4587 Cache the selected graphic resolution instead of looking it up many times. 2011-08-24 04:13:45 +00:00
Ivan Savenko
8054c85091 - some work on sound and music players:
-- Adventure map music will update with hero movement
-- implemented battle intro sounds
-- battle music tracks will  be selected randomly each time
- fixed #781
2011-08-19 19:50:24 +00:00
Michał W. Urbańczyk
a043bfa44a * Reinstated music player. Added terrain music. To MSVC users: you need the recently uploaded libraries pack for this to work! [ http://download.vcmi.eu/msvc-pack.7z ]
* Not crash on empty (or 1-byte) lod file. (Case in SoD+WoG installations, where h3ab*.lod are dummies.
2011-08-17 20:44:14 +00:00
Michał W. Urbańczyk
05f166f751 Portability fix for „Win64”. 32-bit DLLs (bink, smack) cannot be loaded, so an empty player-placeholder is used to capture calls we can't properly handle.
Probably some fixes for Linux will be needed. (I guess the whole thing could use some refactoring to unify more code)
2011-08-08 07:12:18 +00:00
beegee1
55e7959fd9 * Bonus system caching updated, partially rewritten, much more robust, thread-safe
* Adjusted projectile speed, trebuchet canon speed
2011-07-13 18:39:02 +00:00
Michał W. Urbańczyk
d88b6b1bb3 Interactive mode for ERM interpreter. 2011-06-23 21:42:30 +00:00
Michał W. Urbańczyk
580c4e4c9b ERM is now a separate project, linking to ./Scripting/ERM.dll and consisting all ERM* files from ./lib.
Little changes around handling ERM. New class in lib: CFileUtility, so the code for scanning files with given extension is not duplicated.
2011-06-20 11:41:04 +00:00
Michał W. Urbańczyk
9775f88045 Version bump.
Initial support for IF:M elements and string formatting.
Various minor changes related to ERM interpreter.

The following script should be functional now:
ZVSE
!?PI;
!!DO1/0/6/1&v2777<>1:P0;

!?FU1;
!!IF:M^Hello world number %X16!^;
2011-06-10 23:50:32 +00:00
Michał W. Urbańczyk
601bee9c0f Fixed unitialized ptr from previous commit. Added classicCreatureWindow option to the config, deciding whether classic or the new creature window will be used. Added switchCreWin console command for switching this option run-time. Garrison slots now shouldn't redraw themselves on top of creature window. 2011-05-25 13:11:03 +00:00
beegee1
66b708c168 * PreGame interface gets now redrawn every frame.
* Changed PreGame event handling and update/draw order.
* Changed mouse cursor drawing in PreGame
* Fixed linux bug where main menu WOG animation gets played only once, windows/linux video handling is now more similar
* Minor code improvements
2011-04-17 18:02:13 +00:00
beegee1
157002fe68 Better implementation of the framerate manager, FPS timer added, minor improvements 2011-04-05 17:38:24 +00:00
Ivan Savenko
c6f1d87ede - fix for #95 and #602
- implemented animation for new town buildings
2011-03-22 13:19:07 +00:00
Ivan Savenko
7209f158a1 - gcc/Linux fixes
- added --nointro parameter to skip intro videos
- minor fixes to scenario selection menu
2011-03-19 22:27:05 +00:00
Michał W. Urbańczyk
207e573001 Fixed #645 by reverting support for screen scrolling [there are still some remains in settings file]
Removed some unused code.
2011-03-01 09:57:18 +00:00
Ivan Savenko
2ff07fa66a - Next part of animation system:
-- Reduced memory usage for images with margins
-- Implemented RLE compression
- Linux-related changes:
-- build system updated to include changed paths
-- new dependency: boost-program-options
-- configure option --disable-debug will produce optimized build

- Several gcc compile fixes
- Optimized CPU usage on town screens
- Removed several includes from headers
- Possible fix for #496
2011-02-06 17:26:27 +00:00
Michał W. Urbańczyk
ed07cfe073 Configurable duels. 2011-01-21 02:36:30 +00:00
Michał W. Urbańczyk
a940daba5e A handful of fixes for artifacts, minor for for battles. 2011-01-15 02:17:56 +00:00
Michał W. Urbańczyk
c1bd81abdd Mostly fixed battle animations.
Added proper ending for duel mode.
2011-01-08 19:38:42 +00:00
Michał W. Urbańczyk
2cf6729eee Towards duel support. 2010-12-25 01:43:40 +00:00
mateuszb
af2c4633ad * partially done duel mode
* program options parsing via boost::program_options
* Stupid AI - a stupid battle-only AI
* precompiled headers for server and Stupid AI on MSVC
2010-12-22 20:14:40 +00:00
mateuszb
49083c4e5a * ConstTransitive CGI more or less done
* hch contents distributed to more appropriate folders
2010-12-20 21:22:53 +00:00
mateuszb
b15deaa203 * more constTransitivePointers in GameInfo, separated client GUI classes from it, moved def handlers from CGDefInfo 2010-12-19 14:39:56 +00:00
mateuszb
5806976a9a * towards ConstTranssitivePointers in CGI 2010-12-18 22:11:28 +00:00
DjWarmonger
ea03273c8e Some work towards useful AI:
-It is possible to toggle adventure AI on / off typing "ai" in the console (default is true)
-General cleaning and formatting of code
-Some minor optimizations
-Teal console log for AI

AI tends to hang in the maze of mutexes and current player interface, further investigation is needed.

Fixed #580
minor tweaks
2010-11-28 16:39:13 +00:00
Ivan Savenko
9771dd12ff - changes in LodHandler:
-- file type (text, image...) can be specified in getFile(), all hacks removed
-- replaced Nodrze with std::set
-  some gcc warnings fixed
2010-11-09 11:27:58 +00:00
Michał W. Urbańczyk
daeb3af67a Early changes towards MP support.
It's possible to connect several clients (running on localhost) and enter MP pregame. The actual MP game still not playable. (though it can be started)
2010-10-24 11:35:14 +00:00
mateuszb
fc79b9b6cf * partial implementation of hero crossover
* minor fixes to resolution handling
* other minor fixes and changes
2010-08-28 14:52:20 +00:00
mateuszb
d1bfe4cbd6 * a bit better screen scrolling for small resolutions
* a bit optimized terrainRect
2010-08-26 15:33:55 +00:00
mateuszb
7cad2364fe * minor fixes for screen scrolling 2010-08-23 16:13:30 +00:00
mateuszb
6b8718b046 * partially done support for resolutions smaller than 800x600 by screen scrolling 2010-08-23 15:16:40 +00:00
mateuszb
d681afe1c1 Changes towards campaign support. 2010-08-20 13:34:39 +00:00
Michał W. Urbańczyk
4aa60cd40e Minor changes. 2010-08-18 09:50:25 +00:00
DjWarmonger
084a0148c7 Compile fix + minor changes. 2010-08-17 15:16:08 +00:00
mateuszb
9445e5b184 * small refactoring
Please don't touch CGI->state directly in client code - use callbacks instead. I'd like to make some mechanics-critical handlers in CGI const - a lot of work, certain changes have been done here.
2010-08-16 09:54:09 +00:00
Michał W. Urbańczyk
78f44dc648 Support for 16bpp displays. Possible optimizations. 2010-08-05 11:02:18 +00:00
mateuszb
54496ddee1 * player's serialID removed (save format broken, new game seems to work)
* building bonus (campaigns) supported
2010-08-03 11:36:52 +00:00
Michał W. Urbańczyk
4140711b6d Version set to 0.82.
Updated changelog.
Fixed crashes on losing.
2010-08-01 14:46:19 +00:00
Michał W. Urbańczyk
c6653949e1 Fixed #90, #581, #567.
Broken #87
2010-08-01 14:04:48 +00:00
Michał W. Urbańczyk
ff078dc440 Fixed #522 (probably), #529, #540.
Version to be released as dev build 0.81b
2010-07-24 11:46:04 +00:00
Michał W. Urbańczyk
9febb357ff Fixed #504. More logging for #419. 2010-07-14 01:08:27 +00:00
Michał W. Urbańczyk
fa4ee94cf9 Fixed #484. Preliminary support for bonus limiters/ 2010-07-12 10:20:25 +00:00
Michał W. Urbańczyk
9af18cf487 Fixed #464 and #467 2010-05-31 20:38:14 +00:00
mateuszb
adbc142ff0 * a bit of campaign support 2010-05-08 18:56:38 +00:00
mateuszb
943c433d3f * moved mapHandler to client folder 2010-04-06 08:59:24 +00:00
Frank Zago
d2d076cd23 Added command line parser. 2010-04-03 22:06:50 +00:00
Michał W. Urbańczyk
993036e4a1 New non battle stack class. (Base for future improved bonus system, stack exp / arts)
Fixed #443
2010-04-02 02:07:40 +00:00
Michał W. Urbańczyk
80f49badc9 Implemented Scuttle Boat and Dimension Door spells.
Fixed #417 and #418.
Moved / refactored some code. Minor fixes.
2010-03-20 22:17:19 +00:00
Michał W. Urbańczyk
85f463e479 Several fixes for pregame:
Fixed #240, #255, #397, #411
2010-03-05 22:51:09 +00:00
Michał W. Urbańczyk
0a950c508b Grail digging and construction.
Minor fixes.
2010-02-24 13:03:36 +00:00
Michał W. Urbańczyk
e6f31b7500 Compilation fixes for VC10.
Changes towards hot-seat support.
2010-02-20 13:24:38 +00:00
mateuszb
4d9d54735f * campaigns, part 1
* minor changes
2010-02-08 14:38:06 +00:00
Ivan Savenko
3aefb896fe - Created config file for true type fonts (disabled by default)
- Implemented buildings with bonuses for defending hero (glyphs of fear, fountain of fortune, some grails)
- Minor fixes
2010-02-04 15:50:59 +00:00
Michał W. Urbańczyk
5279e2e9fc First part of support for victory & loss conditions.
Implemented and tested are
victory:
Defeat hero
Capture town
Defeat monster
Flag dwellings
Flag mines

Lose:
Loss hero
Time expire

**

Some others may work but not has been tested yet.
I've added a new page in VCMI Status spreadsheet with status of various victory/loss conditions.
2010-01-29 20:52:45 +00:00
mateuszb
23a32ebf7a * fixed bug #20
* minor changes
2010-01-29 16:19:12 +00:00
Michał W. Urbańczyk
01831e912a Fixes for adventure AI: battles where AI is the attacker should work, fixed drawing AI heroes under FoW.
Restructured thread structure: no new thread on yourturn, instead of that introduced update() method called by thread dispatching GUI events. 

Further changes are planned.
2009-12-28 04:08:24 +00:00
Frank Zago
39ad6b0270 Only include SDL_syswm.h on Windows. 2009-12-03 04:01:14 +00:00
Michał W. Urbańczyk
4bfc161adc Fixed #237.
Implemented #132 for Windows.
2009-11-28 17:21:54 +00:00
Frank Zago
6b5feb63e6 Implemented "main menu" in-game option. 2009-11-01 01:15:16 +00:00
Frank Zago
7471372074 Fixed several crashes when exiting. 2009-10-26 05:39:30 +00:00
Frank Zago
b02d4c1c2f (linux) Manage one directory per user for save games and config. 2009-10-10 05:47:59 +00:00
Frank Zago
1609b8fdb9 Made all paths dependent on DATA_DIR, USER_DIR, BIN_DIR or LIB_DIR. Data access can now be separated from saved games and binaries.
Fixed a file handle leak.
Bumped revision to 0.74b (linux).
Reworked the build system to remove uneeded dependencies (linux).
Removed use of PATHSEPARATOR since Windows can use / too.
2009-10-04 02:02:45 +00:00
Michał W. Urbańczyk
956a87f264 * redone stack queue algorithm
* recalculating paths only after finished movement / switching selection
* moving hero uses "new" pathfinder
* moving hero by arrow keys / numpad
* VCMI window should start centered
* fixed pairing Subterranean Gates
* fixed issues with creatures sounds after loading
* several minor changes and improvements
2009-09-07 02:29:44 +00:00
Michał W. Urbańczyk
6bdfddd0c4 Mostly implemented Scenario Information and Save Game windows. Adventure Options Window (crash after closing it is known, will be soon fixed). Several minor improvements for pregame. Arrogance will be selected by default when starting a new game. 2009-08-27 08:04:32 +00:00
Michał W. Urbańczyk
66dd31fd8a * attacking and capturing towns
* r-click popups on selected town/hero.bonus and teams in pregame
* disabled music due to bugs in SDL_mixer and smpeg (probably it was the source of reported random crashes / hangups)
* minor fixes
2009-08-22 13:59:15 +00:00