Tomasz Kapuściński
cbfcbae7ab
Merge pull request #1560 from lolbot-iichan/dev-fix-multi-team-ant-legs
...
ENGINE: Fix operator < for COldModelManager::FileInfo
2023-04-08 19:46:20 +02:00
Tomasz Kapuściński
4634461c1d
Added vcpkg manifest file
2023-04-03 00:01:30 +02:00
Tomasz Kapuściński
1c9c0929da
Merge pull request #1559 from suve/add-missing-cstdint-includes
...
Add missing <cstdint> includes
2023-03-11 11:53:05 +01:00
olokos
f60c62f05d
Graphics - Engine - Fix pause blur for new SDL
2023-02-06 17:53:56 +01:00
olokos
ec9607784c
Remove redundant " from CMakeLists.txt
2023-02-06 17:22:05 +01:00
lolbot-iichan
0618174b2b
ENGINE: Fix operator < for COldModelManager::FileInfo
...
There was a rare case when Old Model Manager's model base object list was not working correctly.
Testcase:
CreateObject pos=10;0 dir=1.5 type=LeggedTrainer selectable=1 team=1
CreateObject pos=-10;0 dir=0.25 type=LeggedTrainer selectable=1 team=2
Expected result (after fix): models are displayed correctly
Actual result (before fix): some legs are missing, instead of them giant surfaces are floating high above the model
The reason was is failing to find the element that was just created and added with `m_models.find(FileInfo(fileName, mirrored, team))`
This happened for objects that had mirrored body parts (at least Ants, Wasps and all Legged units were affected) in case they were assigned to several teams.
Everyone were missing some legs since the `modelManager->AddModelReference("ant6.mod", true, rank, m_object->GetTeam())`
Wasps were also usually missing some wings.
2023-02-05 16:34:55 +03:00
suve
d47e265863
Add missing <cstdint> includes
...
Some parts of the code used the fixed-size type uint32_t,
which is defined in stdint.h / cstdint - without including said
header file. With GCC13, the inter-header dependencies seem
to have changed and the file is no longer included transitively,
requiring an explicit include.
2023-01-19 10:34:55 +01:00
Tomasz Kapuściński
3b3cdb9961
Fix for config.h?
2022-11-26 16:15:53 +01:00
Tomasz Kapuściński
bedd24801c
Better fix?
2022-11-26 15:49:39 +01:00
Tomasz Kapuściński
983a9a6e03
Another fix for SDL
2022-11-26 15:32:56 +01:00
Tomasz Kapuściński
2f50470591
Fix for linking to SDL
2022-11-26 14:52:39 +01:00
Tomasz Kapuściński
e3ba33a508
Rewritten CModelMesh to use separate vertex attributes
2022-11-12 18:52:21 +01:00
tomangelo2
789c8b2292
Fix compilation with gcc
2022-09-15 01:14:29 +02:00
Tomasz Kapuściński
8632c7404d
Refactored NaN implementation
...
strfind() now returns -1 instead of NaN when substring can't be found
added isnan() as an alternative way of checking if a value is NaN
2022-08-15 00:09:24 +02:00
Tomasz Kapuściński
2ea94244e9
Fixed const-correctness of getters
2022-08-14 23:47:47 +02:00
Tomasz Kapuściński
3c98af04b5
Fixed passing bool to message()
2022-08-13 17:18:14 +02:00
Tomasz Kapuściński
b5e27c9f19
space() now returns a point with NaNs instead of the original position when it can't find free space
2022-07-09 16:48:59 +02:00
Tomasz Kapuściński
ec425c768b
Use the Y floor coordinate from topo() so it doesn't ignore spaceship's modified floor height
2022-07-09 16:47:59 +02:00
Tomasz Kapuściński
3fd9815138
Merge pull request #1507 from rasmusgo/find-space-on-spaceship
...
Find space on spaceship
2022-07-09 16:38:58 +02:00
Tomasz Kapuściński
3805851255
Made recolor a separate material attribute and added more color types
2022-07-09 12:23:50 +02:00
Tomasz Kapuściński
a88d9cdd39
Implemented shader-side recoloring in HSV and added more material tags
2022-06-18 22:18:25 +02:00
Tomasz Kapuściński
7d31b1e55d
Added missing include
2022-05-08 18:31:48 +02:00
Tomasz Kapuściński
56e0c915b5
Cleanup in texture structures and enums, added wrap mode to TextureCreateParams and fixed wrap mode in foreground texture (lens flare effect)
2022-05-08 18:23:37 +02:00
Tomasz Kapuściński
a25ce2d5df
Rewritten particle rendering, now uses its own vertex type for optimization
2022-05-08 16:22:20 +02:00
Tomasz Kapuściński
cac34e259b
Cleanup to reduce includes of device.h header file
2022-05-02 20:59:44 +02:00
Tomasz Kapuściński
2a529ae07f
More cleanup
2022-05-02 19:22:50 +02:00
Tomasz Kapuściński
a1e4e4b97c
Minor cleanup
2022-05-02 19:10:26 +02:00
Tomasz Kapuściński
3b4c2f3049
Cleanup in OpenGL implementation
...
* Changed main directory to opengl33
* Put all remaining renderer classes into separate files
* Added missing license headers
2022-05-02 11:08:33 +02:00
Tomasz Kapuściński
f2cc131ff7
Merge branch 'dev' into dev-graphics-overhaul
...
# Conflicts:
# .github/workflows/build.yml
2022-05-02 09:24:05 +02:00
Tomasz Kapuściński
b6f2a9e544
Fix for invisible batteries (code by melex750) ( #1520 )
...
* Fix for invisible batteries (code by melex750)
* Updated vcpkg
* A workaround for sprintf define
* Added mpg123 to dependencies due to newer version of SndFile
* Removed CONFIG
* Another fix for dependencies
* Made additional dependencies optional
2022-04-29 00:02:04 +02:00
Tomasz Kapuściński
daa9419557
Merge branch 'dev' into dev-graphics-overhaul
...
# Conflicts:
# src/level/player_profile.cpp
# src/object/task/taskgoto.cpp
# src/object/task/taskgoto.h
# src/ui/mainui.cpp
2022-04-23 11:48:09 +02:00
Tomasz Kapuściński
013d3cccf4
Changed team recolor to replace material albedo color instead of multiply by it for design convenience
2022-04-23 10:53:25 +02:00
Tomasz Kapuściński
8f710a24c8
Added proper conversion from sRGB to linear space and added a temporary fix for Blender bug with vertex colors in sRGB
2022-04-23 10:50:53 +02:00
Tomasz Kapuściński
7135a6660b
Replaced error messages with Logger
2022-04-23 10:48:35 +02:00
Tomasz Kapuściński
7664594b8e
Added constructor and conversion between linear space and sRGB
2022-04-23 10:46:38 +02:00
Tomasz Kapuściński
640cde1653
Various improvements and fixes
...
* Added strength parameter for ambient occlusion
* Added proper support for material and emissive textures
* Added team-based recoloring, uses "team" tag
* Changed shadow ranges to make close-up shadows much better
* Fixed background coloring
* Added proper defaulting for glTF values
* Fixed parsing of emissive values
* Added normalization of normals in vertex shaders of object and terrain renderers
2022-04-07 01:11:23 +02:00
Tomasz Kapuściński
4b1b1763df
Removed extensions from model filenames to let the game load alternatives when available
2022-03-12 23:34:46 +01:00
Tomasz Kapuściński
829c5fb42f
Added support for glTF 2.0 model format
2022-03-12 23:31:32 +01:00
Tomasz Kapuściński
aa3efd5841
Simplified model I/O, uses filename extensions to figure out format
2022-03-11 22:40:50 +01:00
Tomasz Kapuściński
920a4c3fc8
Split model I/O to separate files based on model format and removed new binary format
2022-03-11 21:06:40 +01:00
Tomasz Kapuściński
d57370578f
Disabled convert_model tool
2022-03-11 20:48:55 +01:00
Tomasz Kapuściński
4a16ee76a1
Partially refactored model and mesh structures
2022-03-11 19:49:03 +01:00
Tomasz Kapuściński
7af32caec2
Changed path type from std::string to std::filesystem::path in CInputStream, CInputStreamBuffer, COutputStream and COutputStreamBuffer
2022-03-11 17:46:24 +01:00
Tomasz Kapuściński
2d9db9c90a
Refactored lighting in terrain renderer and rewritten drawing terrain to include all PBR properties
2022-03-09 20:47:44 +01:00
Tomasz Kapuściński
d7a22bf74c
Removed explicit from Color constructor
2022-03-09 17:08:51 +01:00
Tomasz Kapuściński
1a7346b845
A couple of fixes for rendering states
2022-03-09 16:59:23 +01:00
Tomasz Kapuściński
8c40b7c753
Force buffer orphaning to fix initial buffer binding
2022-03-09 16:56:03 +01:00
Rasmus Brönnegård
fdc1792932
Let space() find points on the spaceship
2022-03-07 00:02:08 +01:00
Rasmus Brönnegård
483a855848
Add DistanceSquared to vector.h
2022-03-07 00:00:19 +01:00
tomangelo
4541db7f21
Merge pull request #1498 from rasmusgo/dev-loadgame-arg
...
Load game from command line
2022-03-06 23:05:04 +01:00
tomangelo
86d8ee4c38
Merge pull request #1496 from rasmusgo/fix-spelling
...
Fix spelling
2022-03-04 16:28:32 +01:00
tomangelo
061ef44def
Merge pull request #1499 from rasmusgo/dev-better-goto
...
Better goto
2022-02-28 22:16:37 +01:00
Tomasz Kapuściński
fa5e229015
Fixed forward declaration of enums
2022-02-26 19:44:49 +01:00
Tomasz Kapuściński
8533be8d5c
Replaced MakeUnique and MakeUniqueArray with std::make_unique
2022-02-26 18:48:51 +01:00
Tomasz Kapuściński
89551c83cf
Merge branch 'dev' into dev-graphics-overhaul
...
# Conflicts:
# src/graphics/engine/text.cpp
# src/graphics/engine/text.h
# src/script/scriptfunc.cpp
2022-02-26 04:43:56 +01:00
Tomasz Kapuściński
3001927576
Removed engine.h from includes in header files, replaced by forward declarations and includes in source files
2022-02-26 03:53:39 +01:00
Tomasz Kapuściński
baa616050a
Some refactors to reduce extensive recompilation cascades
...
Renamed AlphaMode::OPAQUE to AlphaMode::NONE due to clash with preprocessor define
Moved Gfx::EngineTriangle to a separate file
2022-02-26 02:39:13 +01:00
Tomasz Kapuściński
e839f0dec7
Extended Material structure with PBR material attributes and added some of them to object renderer
...
Moved PBR lighting calculations to a separate shader source file
Removed some unused stuff
2022-02-26 01:16:36 +01:00
Tomasz Kapuściński
3168bf4350
Small cleanup
2022-02-25 21:07:01 +01:00
Tomasz Kapuściński
6447304531
Added nlohmann-json library to dependencies
2022-02-25 20:41:45 +01:00
Mateusz Przybył
6aebf60300
Merge pull request #1487 from pestoffne/fix/editor-input-utf8
...
Fixed input of long UTF-8 symbols in editor (#1423 )
2022-02-25 17:09:27 +01:00
Rasmus Brönnegård
0829cd84fe
goto: Remove unused BEAM_ACCURACY
2022-02-17 23:58:32 +01:00
Rasmus Brönnegård
8af600692e
goto: Reduce NB_ITER back to 200
2022-02-17 23:40:07 +01:00
Rasmus Brönnegård
3478ee322b
goto: Find a more exact end of path wrt goalRadius
...
The last segment of the path is shortened to avoid going too close
and risk bumping into the object that it was meant to approach.
The same position could also be found by finding the roots of a second
order polynomial analytically but this solution is simple and sufficient.
2022-02-15 22:46:30 +01:00
Evgeny Pestov
550d0f915b
Use std::out_of_range in Utf8CharSizeAt
2022-02-14 18:33:41 +07:00
Evgeny Pestov
d9e26c2516
Use std::invalid_argument in Utf8CharSizeAt
2022-02-14 18:23:44 +07:00
Evgeny Pestov
4bce63e38d
Use 0b instead of 0x and check 1-byte prefix first in Utf8CharSizeAt
...
1-byte symbols is more common then 4-bytes symbols.
So checking 1-byte prefix first is more efficient.
2022-02-14 18:09:08 +07:00
Evgeny Pestov
ec8a09e4a9
Merge commit '3405c03' into fix/editor-input-utf8
2022-02-14 17:57:30 +07:00
Evgeny Pestov
05b68a4b80
Refactor: Create function isUtf8ContinuationByte
2022-02-14 17:56:34 +07:00
Tomasz Kapuściński
c378009128
Feature-breaking refactors
...
* Partially filled Material structure, currently only base attributes
* Removed recoloring of textures and team variants
* Removed one base object tier in engine structures
* Removed EngineRenderState
* Rewritten some code to better coding style
2022-02-13 00:03:46 +01:00
Rasmus Brönnegård
2d794d1a32
goto: Handle oversized costs with a special bucket
...
This is a bit redundant because the current usage of goto
does not trigger it. It can be triggered by:
* increasing goalRadius
* decreasing NUMQUEUEBUCKETS
* decreasing BM_DIM_STEP
* increasing edge costs
2022-02-12 23:35:58 +01:00
Rasmus Brönnegård
e38835cfd4
goto with A-star (with bucket queue)
2022-02-12 23:35:58 +01:00
Rasmus Brönnegård
2b8d580355
goto with Dial's algo (Dijkstra's + bucket sort)
2022-02-08 21:14:17 +01:00
Rasmus Brönnegård
ee390bc270
LoadFinishedLevels if needed in LoadScene
2022-02-08 20:02:56 +01:00
Rasmus Brönnegård
14e7cd0e52
Rename loadgame to loadsave
2022-02-08 14:17:11 +01:00
tomangelo
6d8a52eb15
Merge pull request #1458 from lolbot-iichan/produce_teams
...
Add optional team parameter to produce() function
2022-02-07 16:34:19 +01:00
tomangelo
951db17d53
Merge pull request #1488 from colobot/dev-refactor-fonts-cache
...
Refactor fonts reloading
2022-02-07 15:24:10 +01:00
Tomasz Kapuściński
0d612b9928
Optimized text rendering
2022-02-05 21:07:25 +01:00
Tomasz Kapuściński
aacc2d0596
Moved non-CRenderer-specific functionality back to CDevice and refactored some of the state change methods
...
Rewritten control rendering code to use improved way of sending geometry to GPU memory
2022-02-05 19:07:46 +01:00
Tomasz Kapuściński
074706e7ec
Removed Vertex and VertexCol structures
2022-02-04 01:22:27 +01:00
Tomasz Kapuściński
1631b9587f
Removed all DrawPrimitive*() methods from CDevice
2022-02-04 01:06:37 +01:00
Tomasz Kapuściński
750a470b9a
Minor color refactors, added DrawPrimitives, rewritten remaining effect rendering
2022-02-04 01:00:18 +01:00
Tomasz Kapuściński
37bdc8665f
Removed remaining rendering code from CGL33Device and fixed some issues
2022-02-03 20:53:53 +01:00
Tomasz Kapuściński
d16144eee4
Added missing include and removed debugging calls
2022-02-03 18:55:46 +01:00
Tomasz Kapuściński
1a190b7f6f
Partial refactor of UI rendering to improve performance and fix transparency issues
...
Disabled rendering via CDevice
2022-02-03 18:40:58 +01:00
Rasmus Brönnegård
a7b294025e
Rename BeamSearch to PathFindingSearch etc
2022-02-02 20:26:05 +01:00
Rasmus Brönnegård
e2d4dd6995
Use ray tracing algorithm in BitmapTestLine
2022-02-02 20:26:05 +01:00
Rasmus Brönnegård
d9f3078396
Replace beam search with breadth-first search
2022-02-02 20:26:05 +01:00
Tomasz Kapuściński
0908e10ff6
Removed material, lighting, fog and shadowing code from CDevice
2022-02-02 19:09:38 +01:00
Tomasz Kapuściński
7d9badb542
Added UV transform and rewritten animated texture mapping code to use it
2022-02-02 18:13:21 +01:00
Tomasz Kapuściński
3bd4fee844
Merge branch 'dev' into dev-graphics-overhaul
...
# Conflicts:
# src/graphics/engine/camera.cpp
# src/object/auto/autonuclearplant.cpp
# src/object/auto/autopowerplant.cpp
# src/object/interface/powered_object.h
# src/object/motion/motionvehicle.cpp
# src/object/old_object.cpp
# src/object/old_object.h
# src/object/task/taskmanip.cpp
# src/object/task/taskmanip.h
# src/object/task/tasktake.cpp
2022-02-02 18:11:06 +01:00
tomangelo
3405c038c9
Merge pull request #1495 from rasmusgo/numpad
...
Add workaround for numpad home/end keys etc
2022-02-02 16:45:14 +01:00
Rasmus Brönnegård
3400a0fab0
Add -loadgame argument to load game on start
2022-02-02 11:01:57 +01:00
tomangelo2
eff8e885d5
Fix assert fail after PR#1444
2022-01-30 20:40:04 +01:00
tomangelo2
0003494c9e
Merge PR #1444
2022-01-29 17:16:57 +01:00
Tomasz Kapuściński
741d5c75ba
Refactored shadow framebuffer creation and binding
2022-01-24 23:16:22 +01:00
Tomasz Kapuściński
2ff722eee6
Refactored or removed some of the unused CDevice features
2022-01-24 22:29:39 +01:00
Tomasz Kapuściński
39b6621463
Renamed transparency to ghost mode
2022-01-24 21:57:56 +01:00
Tomasz Kapuściński
9a07c1d858
Refactored background, cloud and planet rendering, fixed shadow settings
2022-01-24 21:50:45 +01:00
Rasmus Brönnegård
19ae57c9ad
Fix spelling of appearance
2022-01-24 19:56:47 +01:00