Commit Graph

225 Commits (8b0ccf6667e0ddaba0fae6ad6f2ddc5a1d6bc680)

Author SHA1 Message Date
Piotr Dziwinski d11ebc891c Bring to zero some types of issues reported by colobot-lint 2015-10-04 00:09:10 +02:00
krzys-h 3815ef0bd6 Refactored CPauseManager (again) 2015-10-01 18:55:41 +02:00
krzys-h 58035f3cd1 Fixed rendering camera overlay color, closes #157 2015-09-30 21:41:00 +02:00
Piotr Dziwinski 66ce745be0 Introduce forward declarations as suggested by colobot-lint 2015-09-27 16:28:14 +02:00
krzys-h dfa06dafcf Refactored window resize 2015-09-25 11:11:35 +02:00
krzys-h 53e4470dbf Started SDL2 migration 2015-09-24 21:09:46 +02:00
krzys-h 389aaaf132 Fixed 'invui' disabling too much 2015-09-12 11:51:03 +02:00
krzys-h 2792fa2c6c Fixed mouse cursor scaling (again)
How could I even miss the fact that my previous fix is not working at all? :P
2015-09-11 17:54:55 +02:00
krzys-h fb03a497d7 Added command to hide the UI 2015-09-04 19:16:21 +02:00
krzys-h c3d7876a5c Made CPauseManager not a singleton 2015-08-31 22:05:21 +02:00
krzys-h ff17961584 Refactored CPauseManager 2015-08-31 21:47:55 +02:00
krzys-h 2ec5e07080 Possible fix to #608 2015-08-31 12:06:14 +02:00
krzys-h d4b431adaa Recalculate camera projection matrix after aspect ratio change 2015-08-25 16:18:01 +02:00
krzys-h b5bd1b2d74 Destroy static buffers after resolution change
Under windows, changing the video mode causes SDL to destroy and recreate the OpenGL context, which invalidates all current static buffers.
It works on Linux because the actual SDL implementation here differs.

See http://sdl.beuc.net/sdl.wiki/SDL_SetVideoMode for details:
> Also note that, in Windows, setting the video mode resets the current OpenGL context. You must execute again the OpenGL initialization code (set the clear color or the shade model, or reload textures, for example) after calling SDL_SetVideoMode. In Linux, however, it works fine, and the initialization code only needs to be executed after the first call to SDL_SetVideoMode (although there is no harm in executing the initialization code after each call to SDL_SetVideoMode, for example for a multiplatform application).
2015-08-24 19:43:06 +02:00
Piotr Dziwinski 60f0a7b45c Get rid of "blacklisting shadowXX.png" logs 2015-08-22 18:17:57 +02:00
Piotr Dziwinski b93f610930 Fix license header in all files 2015-08-22 16:40:02 +02:00
Piotr Dziwinski d703eb7165 Compile fixes for MSVC2013 2015-08-16 00:39:08 +02:00
krzys-h 9a15db1bea Split global.h 2015-08-15 14:02:07 +02:00
krzys-h 9d8bef877d Renamed old-style shadows to shadow spots in the code 2015-08-14 13:37:40 +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 1d6c3cc748 Fixed CEngine trying to use unsupported values as defaults, closes #552
Also fixed the settings buttons not being disabled properly
2015-08-14 12:03:53 +02:00
krzys-h 92591c23b6 When flushing texture cache, also remove device textures 2015-08-13 23:49:01 +02:00
krzys-h 1c461ce1c8 Prevent reloading background if not needed 2015-08-13 23:44:08 +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 6b4610e808 Improved stats display 2015-08-09 15:20:38 +02:00
krzys-h 0ed11e0e7d Fixed "unable to open shadow??.png texture" errors again 2015-08-07 22:48:26 +02:00
krzys-h 0468c3efdb Fixed ULTRA LONG loading time bug introduced in 5593f427f6
Well... that escalated quickly :P
And it remained unnoticed for so long!
2015-08-07 22:36:50 +02:00
krzys-h 57469533b6 Implemented loading progress bar 2015-08-07 20:48:55 +02:00
krzys-h f90bb63520 Hide some things in save screenshots
Save indicator, mouse cursor, CDisplayText and interface particles
2015-08-07 15:59:05 +02:00
krzys-h 4d5b4c47a2 Use CText for virus particle rendering
As suggested by @RaptorParkowsky on Trello - https://trello.com/c/56MszsWA/66-texture-remastering-checklist
2015-08-07 13:29:29 +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 22415e183d Remove unneeded empty map.png file 2015-08-06 23:06:36 +02:00
krzys-h 0d00952b10 Rename text.png to effect03.png 2015-08-06 22:41:54 +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 ec3ded75b8 Removed unused LOD level setting 2015-08-06 18:35:56 +02:00
krzys-h b20d589c87 Check available texture units in shadow mapping settings 2015-08-06 13:47:42 +02:00
krzys-h dc85aa2138 Moved all UI controls to a subdirectory 2015-08-06 13:25:24 +02:00
krzys-h 2b4210dcbc Separated CMainUserInterface from CMainDialog 2015-08-06 12:59:09 +02:00
Piotr Dziwinski 0c9e745213 Add proper initializations in remaining graphics classes 2015-08-06 09:33:27 +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 04960035c1 Save screenshot image in a separate background thread (#546) 2015-08-03 21:40:30 +02:00
krzys-h 5e4a423bf0 Cleaned up "textures/"+something, fixed more possible occurences of #531 2015-08-03 20:55:33 +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 6818e32150 Fixed shadow mapping disable when not supported (#522) 2015-07-29 22:30:44 +02:00
krzys-h 083f216529 Team object recoloring (#514) 2015-07-22 12:45:50 +02:00
krzys-h 72b9738eb9 Fixed possible problems when trying to use shadow maps in unsupported configuraions (#522) 2015-07-20 22:34:39 +02:00
krzys-h 52a3e0b24f Fixed minimap texture disappearing on texture settings change
Bug mentioned by @erihel in #505
2015-07-20 21:22:34 +02:00
krzys-h 4741118b61 Added new options to configuration presets 2015-07-20 20:47:44 +02:00
krzys-h 5593f427f6 Proper fix to #94 (finally!!!!)
It was so simple, wasn't it?
Additionaly:
* fixed texture recoloring after changing texture settings while simulation is running
* fixed annoying "could not open textures/shadow*.png" messages
* don't ChangeColor() if not in simulation to reduce lag in settings
2015-07-20 19:35:20 +02:00
krzys-h 7b3ae32626 Shadow mapping now disables old shadows 2015-07-20 18:56:15 +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 02c24fbf27 CProfile -> CConfigFile 2015-07-19 16:05:09 +02:00
Tomasz Kapuściński 644f5b4d7f Corrected some problems with dynamic shadows 2015-07-19 00:07:59 +02:00
Piotr Dziwinski a872ea128b Add MakeUnique template to avoid use of naked new 2015-07-17 20:06:59 +02:00
krzys-h 2b9811d225 Movie lock refactoring 2015-07-16 22:09:50 +02:00
krzys-h 6e404f5aa2 Better mouse scaling on widescreen resolutions 2015-07-13 11:58:52 +02:00
Piotr Dziwinski e8582d214c CStaticObject subclass using new model framework
* added reading/writing working version of new model format V3
 * added CStaticObject with minial interface intended for
   non-interactive static objects like trees
 * converted first model, tree0, to new format
2015-07-11 19:52:38 +02:00
krzys-h 36d08e852c Better splashscreen scaling on widescreen resolutions 2015-07-11 12:57:18 +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
krzys-h c84ce92a86 Fixed F12 debug screen background 2015-07-09 18:50:11 +02:00
Tomasz Kapuściński 37e2f24fbc Corrected small rendering problem 2015-06-25 11:47:42 +02:00
Tomasz Kapuściński 3cc2857372 Small corrections in MSAA implementation 2015-06-22 23:42:01 +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
Tomasz Kapuściński f2318803e5 Added Multisample anti-aliasing (MSAA) 2015-06-22 00:56:47 +02:00
Tomasz Kapuściński 7d57ec634e Refactored framebuffer implementations 2015-06-21 18:48:31 +02:00
Tomasz Kapuściński 94851c2694 Merge branch 'dev' of https://github.com/colobot/colobot into dev 2015-06-20 20:02:11 +02:00
Tomasz Kapuściński ec3069eea7 Defaulted shadow color value to 0.5 2015-06-20 20:02:06 +02:00
Piotr Dziwinski f9b09d08f0 Create CObjectFactory
* move functions creating objects to new class CObjectFactory
 * replace calls to CObject::Create*() with CObjectManager::Create()
 * move creation/deletion of some objects to better places
 * make CModelManager non-singleton
 * clean up some code in changed functions
2015-06-20 19:37:25 +02:00
Tomasz Kapuściński a880210b3d Added ShadowRange option 2015-06-15 18:41:31 +02:00
Tomasz Kapuściński d112971c3e Corrected shadow mapping and added experimental self-shadowing 2015-06-01 17:22:49 +02:00
Tomasz Kapuściński e1a0f5b1c7 Added OpenGL 2.1 engine 2015-05-27 22:12:02 +02:00
Tomasz Kapuściński 8abdd4b740 Improved shadow mapping 2015-05-21 18:18:46 +02:00
Tomasz Kapuściński 3a1dffd8df Fixing some warnings 2015-05-19 17:15:08 +02:00
Tomasz Kapuściński 933609967a Added OpenGL 3.3 graphics implementation 2015-05-19 14:29:31 +02:00
Tomasz Kapuściński d210dcf70e Implemented graceful degradation of shadow quality when not enough texture units are available 2015-05-15 10:12:35 +02:00
Tomasz Kapuściński e747443312 Increased quality of dynamic shadows 2015-05-14 15:31:57 +02:00
Tomasz Kapuściński 2665847c41 Added support for offscreen rendering and high resolution shadow maps 2015-05-12 13:09:31 +02:00
Tomasz Kapuściński b033e35385 Transparent textures no longer cast shadows in transparent parts 2015-05-11 18:00:02 +02:00
Tomasz Kapuściński 0b2f00530b Added experimental support for dynamic shadows (shadow mapping) 2015-05-11 15:21:17 +02:00
Tomasz Kapuściński d3b052f19b Implemented trilinear filtering, mipmap level setting and anisotropic filtering 2015-05-06 17:55:10 +02:00
krzys-h eec6041104 Refactoring of input and input bindings, CInput class 2014-12-11 19:14:33 +01:00
Piotr Dziwinski f30592bf56 Better fix for #94 2014-11-22 13:30:50 +01:00
krzys-h dbdaecd1e8 Fixed texture recoloring reset
Partially fixes #218
2014-11-11 15:32:38 +01:00
krzys-h ef35a3a2ef Custom path to SecondTexture, closes #370 2014-11-10 20:46:39 +01:00
krzys-h 6d2fd18b41 Implemented mission timer 2014-10-29 17:53:46 +01:00
krzys-h d91569e165 Showing coordinates in stats menu (F12/showstat); removed "showpos" cheat
Issue #277

Conflicts:
	src/object/cheat.cpp
	src/object/robotmain.cpp
	src/object/robotmain.h
2014-10-29 16:08:55 +01:00
krzys-h 9d68868f8e Possible fix for #339 (?) 2014-10-25 18:00:39 +02:00
krzys-h 97b7c0cab1 Fixed map turning gray after resizing window 2014-10-20 21:54:52 +02:00
krzys-h f65b00089a Merge branch 'dev' into dev-physfs
Conflicts:
	data
2014-10-14 15:42:19 +02:00
krzys-h 9fd6cf5449 Changed all occurences of PPC in the code to TerranovaTeam 2014-10-14 15:26:18 +02:00
Piotr Dziwinski 5274acd624 Merge with dev 2014-10-07 22:15:40 +02:00
krzys-h b3fa72c007 Moved effect??.png textures and made pos= in GroundSpot optional 2014-09-27 18:26:29 +02:00