Commit Graph

440 Commits (6ec644d20bb89b5330ea796c5ba6881ee644b374)

Author SHA1 Message Date
krzys-h a3477edc8e Pause game when in background, closes #609 2016-02-13 21:35:01 +01:00
krzys-h 254891d8f1 Save log to file, closes #696 2016-02-13 20:32:26 +01:00
krzys-h 977607a934 Updated license headers 2016-02-13 14:11:30 +01:00
krzys-h 55412842df Fixed some code style warnings 2016-02-13 13:46:56 +01:00
Krzysztof Dermont c780148b77 Fix crash related to TTF and PHYSFS
TTF fonts will be loaded to memory instead of file pointers

Added new class CSDLMemoryWrapper that loads data from PHYSFS into memory block
and closes file after. This closes issues #519, #708 and #619
2016-02-11 16:12:16 +01:00
Krzysztof Dermont 8a0cda1c2a Fix issue #648
Should be proper fix
2016-02-10 17:06:02 +01:00
Krzysztof Dermont 12e3724319 Implement issue #606
Add button to open SatCom in main menu
2016-02-10 17:04:26 +01:00
krzys-h 7a521fbc90 Joystick configuration, closes #499
Not yet tested as I don't have a joystick currently with me, but should work fine
2016-01-24 17:36:25 +01:00
krzys-h 40352be5cc Add language switcher to the settings UI, closes #506 2016-01-24 16:03:24 +01:00
krzys-h 6d8a5bab31 Removed system mouse option
Not really needed, as it is an SDL cursor not system cursor, which is no better than ours
2016-01-24 15:24:59 +01:00
krzys-h 07a4d6a16b CBot namespace 2015-12-26 14:29:10 +01:00
krzys-h 5db1254dd8 Unified CBot error naming 2015-12-20 19:01:03 +01:00
krzys-h 51644369cb Moved standard math and file functions into CBot library 2015-12-20 18:36:20 +01:00
krzys-h 2e17712b5d Added official build info in crash screen 2015-12-19 22:10:15 +01:00
Grunaka ece0666954 Create new file CBot.h. Included only useful interfaces. 2015-12-01 23:25:36 +01:00
krzys-h 6f91442db1 Removed some more unused strings 2015-11-21 17:10:14 +01:00
krzys-h 9bea0355f0 Removed some unused strings 2015-11-21 16:54:21 +01:00
Piotr Dziwinski d11ebc891c Bring to zero some types of issues reported by colobot-lint 2015-10-04 00:09:10 +02:00
krzys-h 6e1504d7a5 Further cleanup USE_SDL_MAIN 2015-09-29 22:39:34 +02:00
Victor Vieux 49ee00d90d fix MacOSX install instruction and compilation
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-09-29 22:39:33 +02:00
Piotr Dziwinski 61a3ba2800 Fix undefined function colobot-lint issues 2015-09-29 21:44:24 +02:00
krzys-h fd07589ebb Separated config.h and version.h
This prevents unnecessary recompilation of some files when version number changes
2015-09-26 21:12:12 +02:00
krzys-h f6823389cc Fixed displaying joystick button 0 name, closes #646 2015-09-25 23:24:29 +02:00
krzys-h 07df35ca01 Refactored mouse wheel 2015-09-25 22:54:48 +02:00
krzys-h 0c64e62979 Fixed a minor error in event logging 2015-09-25 22:18:44 +02:00
krzys-h a0034f8000 Finalized SDL2 migration 2015-09-25 21:26:49 +02:00
krzys-h e965414d34 Rewritten text input to SDL2 2015-09-25 19:49:50 +02:00
krzys-h 53e4470dbf Started SDL2 migration 2015-09-24 21:09:46 +02:00
krzys-h 7500ab4988 Added code battle spectator mode switch 2015-09-13 15:59:42 +02:00
krzys-h 20105d09ec Added code battles button to the main menu 2015-09-10 20:20:24 +02:00
krzys-h 51330dde5e Added code battle start button; fixed bug with starting code battle 2015-09-06 19:12:00 +02:00
krzys-h e956311626 Moved free camera controls to numpad; added 'camtype %d', 'camspeed %f', 'freecam' 2015-09-04 19:04:42 +02:00
krzys-h 78e4e440b5 Removed cancel button from player selection screen
Not really needed, and it had a bug with removing players (it would still go back to the deleted player)
2015-09-01 16:30:05 +02:00
krzys-h ff17961584 Refactored CPauseManager 2015-08-31 21:47:55 +02:00
Piotr Dziwinski a47da3fd3f Whitespace fixes 2015-08-30 22:18:49 +02:00
Piotr Dziwinski a1d2ca50a8 Fix #619
This fixes handling of status codes from PHYSFS functions and seems to
solve crashes like in #619
2015-08-30 22:14:14 +02:00
krzys-h d9c8a7ed9b Fixed MXE builds, 2nd try 2015-08-25 12:18:15 +02:00
Piotr Dziwinski c3d4d46583 Fix missing empty line after license header 2015-08-22 17:52:07 +02:00
Piotr Dziwinski b93f610930 Fix license header in all files 2015-08-22 16:40:02 +02:00
krzys-h 14396847d6 Added missing license headers again 2015-08-19 20:27:29 +02:00
krzys-h d723295aad Revert "Backported some thread classes cleanup from dev-threads (1ad8ff6e47fb9e249e6bcbc2f4a3a94933a1168a)"
This reverts commit 7cf73c94c4.

I wanted to make this better but failed so badly ;) The memory holding the thread function pointer may be freed before the thread is started, so the whole resource passing thing is needed anyway.

This probably fixes #584
2015-08-19 20:25:17 +02:00
Piotr Dziwinski a63a959dbe Apply clang-modernize -use-nullptr 2015-08-17 22:40:52 +02:00
Piotr Dziwinski 2289d69735 Replace NULL -> nullptr 2015-08-16 12:43:42 +02:00
krzys-h f21025b526 User-friendly abort error messages 2015-08-16 00:44:36 +02:00
Piotr Dziwinski d703eb7165 Compile fixes for MSVC2013 2015-08-16 00:39:08 +02:00
krzys-h fe5a8c4629 Updated progress bar values 2015-08-15 23:37:30 +02:00
Piotr Dziwinski 7fe8199c96 Compile fix 2015-08-15 19:54:06 +02:00
Piotr Dziwinski bd10f424ec Better parsing of bool properties 2015-08-15 19:45:49 +02:00
Piotr Dziwinski f773d5714d Fix implicit bool casts in CSettings 2015-08-15 19:17:15 +02:00
Piotr Dziwinski dd227f5fba Fix some stupid mistakes connected with implicit bool casts 2015-08-15 19:17:15 +02:00
krzys-h 9a15db1bea Split global.h 2015-08-15 14:02:07 +02:00
Piotr Dziwinski efedb44cce Add proper initializations and remove manual memory management in remaining classes
Except CBot-related stuff of course
2015-08-14 23:44:00 +02:00
Piotr Dziwinski 870f89ac4a Further fixes for GCC 4.7 build 2015-08-14 19:34:17 +02:00
krzys-h 78a279b479 Better shadow type selection UI 2015-08-14 13:37:27 +02:00
krzys-h eda7435eb6 Removed a lot of useless settings (#556) 2015-08-14 13:04:05 +02:00
krzys-h e5e1d4973f CDestroyableObject, CFragileObject, CShieldedObject and CShieldedAutoRegenObject 2015-08-13 13:41:25 +02:00
krzys-h ff957afefc Moved files not directly related to CObject into src/level/ directory 2015-08-13 11:47:32 +02:00
Piotr Dziwinski 93a06c0c23 Remove manual memory management from graphics classes 2015-08-12 21:07:16 +02:00
krzys-h 60797f72d3 Removed some old, unused code 2015-08-12 17:25:41 +02:00
krzys-h f7d2f501bb Moved common interface implementations to separate classes
Additionaly, merged all "inappropariate bot" errors into one and renamed ERR_GENERIC -> ERR_UNKNOWN
2015-08-12 16:54:44 +02:00
Piotr Dziwinski 513a1129fa Add proper initializers and remove manual memory management from common classes 2015-08-10 22:33:22 +02:00
krzys-h 7cf73c94c4 Backported some thread classes cleanup from dev-threads (1ad8ff6e47fb9e249e6bcbc2f4a3a94933a1168a) 2015-08-09 13:52:15 +02:00
krzys-h bb3fc63e03 More details on terrain loading 2015-08-07 23:40:38 +02:00
krzys-h 57469533b6 Implemented loading progress bar 2015-08-07 20:48:55 +02:00
Piotr Dziwinski e9e1c8d4dd Add proper initializations and remove manual memory management in app classes 2015-08-07 10:16:46 +02:00
krzys-h 69e6ae2c5e Added "saving in progress" indicator 2015-08-06 20:15:17 +02:00
krzys-h 8d34286b1d Added "No userlevels installed" message 2015-08-06 19:37:18 +02:00
Piotr Dziwinski f95980456a Replace anonymous union in Event with pointer to appropriate struct 2015-08-06 19:11:50 +02:00
krzys-h e05fba22fd Moved some interface controls around 2015-08-06 19:03:15 +02:00
krzys-h ec3ded75b8 Removed unused LOD level setting 2015-08-06 18:35:56 +02:00
krzys-h 7649731b49 Reimplemented hiding mouse during loading 2015-08-06 18:28:28 +02:00
krzys-h dc9e2d2e8b GUI loading error popup
Also added fireParticles option
2015-08-06 18:19:01 +02:00
krzys-h 711643b454 Refactored CMainDialog 2015-08-06 16:02:59 +02:00
Piotr Dziwinski 654ef7ba59 Add proper initializers to common classes 2015-08-06 14:31:40 +02:00
Piotr Dziwinski 2906451d06 Indent style fix 2015-08-06 14:31:40 +02:00
Piotr Dziwinski 61ec101b11 Replace size_t with std::size_t
For some reason Clang's AST API doesn't like size_t
2015-08-06 14:31:40 +02:00
Piotr Dziwinski 596bb49de0 Normalize static variables and functions
* get rid of some of them
 * put the rest into anonymous namespaces
2015-08-06 10:12:20 +02:00
Piotr Dziwinski bdeeaf690b Get rid of memsets 2015-08-06 09:37:25 +02:00
Piotr Dziwinski 9ccb39ce66 Fix Clang compilation 2015-08-05 22:02:59 +02:00
krzys-h 47d79c9977 Added #Include support in level files 2015-08-05 19:27:26 +02:00
Piotr Dziwinski c2387b4b56 Class naming fix 2015-08-04 20:58:03 +02:00
Piotr Dziwinski 18f9bfb575 Make saving screenshot thread- and exception-safe
* introduce ResourceOwningThread wrapper for safely passing resources
   to new threads
 * make CEventQueue thread-safe
 * start screenshot saving thread using ResourceOwningThread
 * change direct call at end of writing screenshot to thread-safe
   event communication
2015-08-04 20:37:15 +02:00
krzys-h 3f48e4699d Moved window position and font size storage from CRobotMain to CSettings 2015-08-04 13:09:34 +02:00
krzys-h 4b271cee2d Moved settings out of CMainDialog into a separate class
Also fixed some problems with resolution list selection after starting game
2015-08-04 12:46:54 +02:00
Piotr Dziwinski 11b0398c03 Include refactoring
* reordered includes according to correct style
 * removed some unnecessary includes
2015-08-02 17:49:07 +02:00
Piotr Dziwinski 7d8b56d9ab More style fixes 2015-08-02 12:06:14 +02:00
Piotr Dziwinski 3b585d9f51 Some style and whitespace fixes 2015-08-02 11:36:36 +02:00
krzys-h 9e7cc0bab5 Renamed original shadows to simple shadows 2015-07-20 18:51:01 +02:00
krzys-h f03734d17f Added shadow mapping to settings screen 2015-07-20 18:42:09 +02:00
krzys-h e2ebcb769e Added MSAA to settings screen 2015-07-20 16:29:09 +02:00
krzys-h 90756f8b34 Added FilterMode, MipmapLevel and Anisotropy to settings screen 2015-07-20 13:56:45 +02:00
krzys-h a879e496f5 Removed unused texture quality setting 2015-07-20 12:21:16 +02:00
krzys-h 8c87eedd28 Fixed huge lag on closing settings
Introduced in 02c24fbf27, this was supposed to make it more resistant to crashes but turned out to generate huge lag on closing settings
Instead, I added manual .Save() after every value change
2015-07-19 21:35:55 +02:00
krzys-h 02c24fbf27 CProfile -> CConfigFile 2015-07-19 16:05:09 +02:00
krzys-h 86f473ac16 Finished support for up to 999 chapters and levels 2015-07-18 19:48:25 +02:00
krzys-h ea9361fbb4 LevelCategory enum 2015-07-18 19:45:40 +02:00
Piotr Dziwinski 25eaf8f72f Add MakeUniqueArray for array types 2015-07-17 20:57:12 +02:00
Piotr Dziwinski a872ea128b Add MakeUnique template to avoid use of naked new 2015-07-17 20:06:59 +02:00
krzys-h 82247e75fc Fixed a crash
This replaced more than I throught
2015-07-16 22:27:25 +02:00
krzys-h aa0946f4ba Fixed line endings in pathman.cpp 2015-07-16 22:15:22 +02:00
krzys-h c8f6e8124e Replaced CLogger::GetInstancePointer() calls with GetLogger() 2015-07-16 22:12:44 +02:00
Piotr Dziwinski 6dcf4dffa6 Refactor CSNDFile -> CSNDFileWrapper
This seems more consistent
2015-07-16 21:47:48 +02:00
Piotr Dziwinski 8ca77f27a1 Extracted CSDLFileHandler from CResourceManager
This also possibly fixes some rare error cases (e.g. #439)
2015-07-16 21:13:38 +02:00
krzys-h 8a72f0a849 Addressed commit comments on a0e0ee3631 2015-07-16 20:09:06 +02:00
krzys-h a0e0ee3631 Separate shortcut bars for teams 2015-07-16 13:46:40 +02:00
Piotr Dziwinski c8498548cc Remove manual memory management in oalsound
Plugging a few more memory leaks detected by valgrind
2015-07-15 22:43:30 +02:00
Piotr Dziwinski 83f3cfa6e0 Fix some memory problems reported by valgrind
Also remove some manual memory management
2015-07-15 20:23:21 +02:00
krzys-h 78f4749134 Disallow controlling enemy objects from CBot 2015-07-13 18:53:56 +02:00
krzys-h 3479c51bb9 Refactored EnableBuild, EnableResearch and DoneResearch
* Moved from global variables to CRobotMain members
* Added functions for accessing the values
* Cleaned up some code related to building objects, BotFactory, ResearchCenter and AutoLab
2015-07-13 17:38:19 +02:00
krzys-h 38a0849e10 Added system mouse option
This reverts commit e21853d632.
2015-07-13 12:11:11 +02:00
Piotr Dziwinski 394f911d7b Remove unnecessary #include "object/object.h" 2015-07-12 14:23:18 +02:00
Piotr Dziwinski 4dc40a8853 Fix missing curly braces 2015-07-12 12:38:25 +02:00
Piotr Dziwinski 37b0d5796d Fix PNGSaveSurface not closing file sometimes 2015-07-12 12:33:30 +02:00
krzys-h 24db675d3f Added x6 speed option 2015-07-10 20:17:00 +02:00
Piotr Dziwinski 93e950584a Refactor model-related code
* refactored model loading code based on code from dev-models
 * support new model format V2 (without LOD levels)
 * removed LOD levels support in CEngine and from model files
 * preparations for new model format V3:
   - support for multiple meshes in one model file
   - support for saving crash spheres and shadow spots
   - removed all direct dependencies on CEngine enum values
   - quantized model rendering states to new flags and enums
2015-07-09 21:37:04 +02:00
Tomasz Kapuściński c7ccb29d6a Removed spoiler from tooltip in options menu (fixes #489) 2015-06-28 23:07:42 +02:00
Piotr Dziwinski f871ba4729 Create CExchangePost subclass 2015-06-27 23:22:55 +02:00
Piotr Dziwinski 8806d1708d Proper CAuto, CBrain, CMotion, CPhysics, CPyro lifetime management
* change manual memory manament to std::unique_ptr
 * create CPyroManager
 * finally get rid of CInstanceManager
2015-06-22 21:58:58 +02:00
Piotr Dziwinski 0c9a9bce98 Proper CObject lifetime management
CObjectManager is now the only class responsible for storing CObjects
2015-06-21 15:13:55 +02:00
Tomasz Kapuściński 6434ff55dd Ending splashscreen enhancement (fixes #472) 2015-06-05 20:20:06 +02:00
Piotr Dziwinski 35ce6c228a Fix gcc warning 2015-05-19 23:03:32 +02:00
Piotr Dziwinski ccaac2c544 Rewrite unit tests to use HippoMocks 2015-05-13 00:52:18 +02:00
Piotr Dziwinski 4c8127c6ec Fix two bugs uncovered by MSVC 2015-04-27 20:04:01 +02:00
Piotr Dziwinski bca9a019ae Suppress some MSVC warnings 2015-04-27 20:02:22 +02:00
Piotr Dziwinski 544e513148 Minor MSVC compilation fixes 2015-04-27 18:17:03 +02:00
krzys-h df4cb110b5 Made example programs not directly runnable (#450) 2015-04-17 22:39:57 +02:00
krzys-h e21853d632 Removed old, unused mouse shadow option 2015-04-17 21:54:03 +02:00
krzys-h 1a8bb9c0fb Marked programs from SatCom with a star 2015-04-06 16:21:19 +02:00
krzys-h 58016c6c69 Made programs from SatCom read-only; added program cloning 2015-04-06 16:07:49 +02:00
krzys-h a3ae7802a2 New scripts interface, removed script limit
This is a big change in game structure and requires more testing!
2015-03-29 14:21:02 +02:00
Piotr Walkusz bf55691e44 Issue #399 : Sniffer can delete mark and probe ground 2015-03-22 14:40:19 +01:00
krzys-h d2d0886b76 Implemented %cat%
and renamed BuildSceneName to BuildScenePath
2015-03-22 13:51:14 +01:00
krzys-h 47ed73247b Use std::wstring in boost::filesystem calls on Windows, fixes #414 2015-03-22 13:36:23 +01:00
krzys-h a60a4590b2 Better error logging in CResourceManager for further debugging #414 2015-03-19 19:55:22 +01:00
krzys-h bb9e490316 Removed unused Copy function
It's not used by the game and causes incombatibility with some version of Boost.
Should fix Travis build, see issue #393
2015-03-18 21:45:28 +01:00
krzys-h e179847358 Fixed remapping virtual keys, closes #415 2015-03-18 21:29:33 +01:00
krzys-h f54b46b61d CPathManager
* Moved path management from CApplication to CPathManager
* Moved %lvl% replacements from CParserParam to CPathManager
* Added %lvl% support in produce(), closes #426
2015-03-08 15:22:21 +01:00
Tomasz Kapuściński 03bb000e82 Revert "Potential fix to Travis build fails"
This reverts commit ed0e5dfef5.
2015-01-31 11:55:37 +01:00
Tomasz Kapuściński ed0e5dfef5 Potential fix to Travis build fails 2015-01-30 22:13:07 +01:00
krzys-h 4fef3af9ef Moved all CObject management from CInstanceManager to CObjectManager 2014-12-21 19:04:31 +01:00
krzys-h fb07691790 New speed keybindings 2014-12-14 17:05:28 +01:00
krzys-h be0f4c2ffe Refactored keybindings UI and added some keybindings 2014-12-14 16:54:32 +01:00
krzys-h 5948a9e9d8 Show game version in logs, closes #413 2014-12-11 19:59:24 +01:00
krzys-h 601a58ea31 Nicer formatting of key names 2014-12-11 19:48:06 +01:00
krzys-h eec6041104 Refactoring of input and input bindings, CInput class 2014-12-11 19:14:33 +01:00
krzys-h 48ca5b5663 Removed info about CD in background music tooltip; removed unused 3D sound translation 2014-11-11 14:59:56 +01:00
krzys-h a1fe9c8d7f Implemented autosave (#292) 2014-11-11 14:50:44 +01:00
krzys-h b8103963c3 Sorting saved games list (#380) 2014-11-11 12:08:19 +01:00
krzys-h c330bcac6d PHYSFS in CStudio 2014-11-10 18:17:13 +01:00
CoLoRaptor 81a02220ee Depth of field to Render distance in EN & PL translations, close issue #369 2014-11-05 23:01:33 +01:00