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

183 Commits

Author SHA1 Message Date
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Michał W. Urbańczyk
291da5e893 Fixed #1442, likely a few others as well. 2013-09-12 22:33:08 +00:00
Michał W. Urbańczyk
385f4ab7f5 #1153 and #1395 should be fixed. Terrible, terrible, terrible.
Fixed crash in battles, when attempted to access <0 screen coordinates.
2013-09-01 22:55:57 +00:00
Ivan Savenko
6bee105d7d Some refactoring of text display widgets:
- renamed some methods/classes with better names + some consistency (no more print, setTxt and setText that do exactly same thing)
- TextBox now contains label widget instead of inheriting it
- smooth scrolling support (up/down buttons still scroll one line)
2013-08-29 13:46:27 +00:00
Michał W. Urbańczyk
a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
Michał W. Urbańczyk
79026bdfde Introduced strongly typed QueryID.
Exchange between heroes is now a proper first-class query. Fixes #1269. #66 should also be finally fully fixed.
VC projects: /Zm flag to fix compilation issues with recent Boost.
2013-05-27 10:53:28 +00:00
Michał W. Urbańczyk
6e1464b568 Tribool - I used it wrong. 2013-04-21 12:24:54 +00:00
beegee1
30bcec42c6 - Renamed client/BattleInterface to client/battle and client/UIFramework to client/gui 2013-04-07 11:52:07 +00:00
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
mateuszb
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +00:00
mateuszb
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
mateuszb
d03dbf64a6 * refactoring 2013-02-09 12:56:35 +00:00
mateuszb
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
DjWarmonger
beb1ca1bf8 - getDate function now uses enum for different modes
- Fixed Black Market (#1195)
- Fixed one-week bonuses removed eveyr day (#976)
2013-02-02 08:29:57 +00:00
mateuszb
a1da195b85 * minor refactoring 2013-01-31 20:11:25 +00:00
alexvins
4bc2fd5519 [c::b] renamed map subfolder to workaround dependency tracking bug 2013-01-03 12:19:20 +00:00
Ivan Savenko
b5ebf443fc - all fonts handling is now in new file, UIFramework/Fonts.cpp/h
- common base class for H3 bmp and ttf fonts
- replaced fonts.txt with fonts.json
2012-12-19 17:24:53 +00:00
Ivan Savenko
ffe8b99369 - reorganized hero classes
- artifact iconIndex should work
- new file with hardcoded string constants: lib/StringConstants.h

Note: some minor bugs, will fix soon:
- slow to open hero window
- hero adventure map images serialization is broken\incorrect
2012-12-14 15:32:53 +00:00
beegee1
c336abcf4a * Added RMG tab to pregame(disabled by default, activate with: enableRMG=true in settings.json) * Fixed tab intendation * Renamed colors to more comprehensible names 2012-11-11 12:23:31 +00:00
beegee1
105083dd70 * Code convention updates * Default values for CMap types * Updated BinaryReader c-tor * Converted "bool" int types to bool in CMap classes * Removed map event operators in favor of member methods 2012-11-06 16:39:29 +00:00
beegee1
a878f5f79a * Separated map loading from the map object * Moved map classes to lib/Map * Renamed map.h/cpp to CMap.h/cpp * Profiling of map loading is now optional * Updated CMemoryStream 2012-11-03 13:30:47 +00:00
beegee1
720deba838 * Added comments to map.h * Refactoring(renamed attributes, some steps towards coding guidelines, ..) 2012-10-26 17:51:05 +00:00
alexvins
ff3da291a1 [refactor] reduce some code duplication. no functional changes 2012-10-06 20:35:04 +00:00
Michał W. Urbańczyk
f8a27a9fdb * Moved CConfigHandler from client to lib, CMake/Makefile need updating. I believe other projects besides client also need access to settings. (surprisingly there was a "server" category used only by client... and now VCAI.)
* It is possible to set the battle ai that'll be used by neutrals by typing in VCMI console:
setBattleAI <AIName>
VCAI also respects that setting and uses given AI as its battle back-end.
2012-09-29 10:59:43 +00:00
Michał W. Urbańczyk
ecd8947d8e Crashes on starting next campaign mission should be fixed. 2012-09-25 18:00:55 +00:00
mateuszb
6a81c8b1af * campaign against magic numbers
* ArtifactID was misleading and wrongly used in one place -- renamed and fixed
* minor changes
2012-09-23 18:01:04 +00:00
Ivan Savenko
0ca9f64573 Next part of town configuration:
- town screen is mostly implemented, has some minor issues
- factions are now separate from towns, neutrals have faction with id=9
- more constants to GameConstants: town-specific buildings, strings for terrains and resources
- replaced most access to builtBuildings with isBuilt() method
- replaced id's with enums for town subtype and buildings id's
2012-09-05 12:49:23 +00:00
Ivan Savenko
d72c44e4c3 - fixed modifiers keys behaviour in TextInput
- erm compilation is optional in cmake (too memory-consuming for old systems)
-  minor fixes
2012-08-10 08:49:18 +00:00
Ivan Savenko
708ad6ac7f - music player uses URI's instead of enum from music base
- #1045 and #1046 should be fixed
- moved pregame backgrounds to config/mainmenu
- animation can be overriden with .json multiple times
2012-08-06 07:34:37 +00:00
Michał W. Urbańczyk
edccbd4809 Rewritten many parts of query handling. Fixed several scenarios leading to a hang (including #1012). Purged boost::function from player interface (handy but impossible to serialize). VCAI will keep description for each unanswered query, so the further debugging will be easier. 2012-07-15 15:34:00 +00:00
DjWarmonger
12511d8fee First part of new Quest Log, including common quest interface. 2012-07-06 19:12:04 +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
7a6133a824 - some bugfixing
- removed redundant or unused code in GUI
2012-06-16 22:40:28 +00:00
Ivan Savenko
2d8a15f27c - all windows except for pregame\battles are now CWindowObject-based
- added simple scaling algorithm that works with indexed surfaces
2012-06-15 17:08:19 +00:00
Ivan Savenko
9d2711fb51 - rewrote most of classes from adventure map window
-- new files: client/AdventureMapClasses.*
-- implemented all missing details from infobox
- textinput can handle numbers as input
- fixed several bugs caused by CIntObject changes
- fixed #988
2012-06-13 13:04:06 +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
Ivan Savenko
665837d656 - hopefully better town development for AI
- fixed minimap blitting
- fixed crash on attacking town without moat
2012-05-19 16:22:34 +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
8de71c2b39 - fixed #711, #862, #321
- moved PutPixel templates into header to allow inlining
2012-05-15 08:47:11 +00:00
Ivan Savenko
90ff99d4eb - fixed ancient #31
- fixed #603
2012-05-14 16:29:06 +00:00
Ivan Savenko
9efe05c90b - removed usage of Graphics in several places (Components and hero window).
minor:
- fixed several deprecation warnings in video player
- config file may have multiple upgrades for creatures
2012-05-13 15:04:21 +00:00
Ivan Savenko
46f48f0676 - bugfixing:
-- fixed #942 and #898
-- removed dublicated code in dwelling loading, #900 is fixed
-- fixed roads rendering for #895
2012-05-11 19:03:40 +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
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
3bf76cb719 Fixed #216 and #907.
* CTRL+T will open marketplace window
* T in adventure map will switch to next town
* T in castle window will open a tavern window (if available)
* G will open thieves guild window if player owns at least one town with tavern
* various minor changes
2012-04-08 01:15:18 +00:00
Michał W. Urbańczyk
7317e803db Locking pim mutex in client pack handling method, instead of dozens playerint call-ins. GUI won't try updating in between gamestate change and call-ins about it. Should fix #912.
Minor changes.
2012-04-06 15:02:15 +00:00