Christoph Oelckers
af781e0422
- moved all font setup out of the C++ code.
...
All internal fonts now get defined through FONTDEFS.
Also fixing a few offsets.
2021-05-31 21:20:31 +02:00
Christoph Oelckers
0bab333f36
- redid font translation so that it doesn't need to crush the font characters' color set to the base palette.
...
Right now it creates a special type of luminance translation that can operate on a true color bitmap.
2021-05-25 12:59:08 +02:00
Christoph Oelckers
cb2bc7967a
- fixed the remaining warnings.
2021-05-12 21:50:01 +02:00
Christoph Oelckers
db7527fa43
- fix sky palette in Polymost mode.
2021-04-22 22:03:16 +02:00
Christoph Oelckers
8c5a9c23c3
- tileimportfromtexture and copytile.
2021-04-20 20:04:44 +02:00
Christoph Oelckers
82194bbf6b
Merge branch 'master' into newrenderer
...
# Conflicts:
# source/games/exhumed/src/2d.cpp
2021-04-17 13:22:30 +02:00
Christoph Oelckers
cd58b1d055
- made the tile size getters a bit more robust.
...
They should not crash on invalid sprites.
2021-04-17 12:40:23 +02:00
Christoph Oelckers
9a58299bee
Merge branch 'master' into newrenderer2
2021-04-14 22:37:59 +02:00
Christoph Oelckers
bc007d75de
- make map art work.
2021-04-14 14:16:09 +02:00
Christoph Oelckers
3cc05e5532
- fixed handling of single-tile skies with palette translation.
2021-04-12 16:00:00 +02:00
Christoph Oelckers
4d29cd2df2
- I shouldn't have used WT's skies as reference - they got front and back faces swapped.
2021-04-08 13:54:58 +02:00
Christoph Oelckers
38ecfc8fa5
- added handling for cubemapped skyboxes.
2021-04-08 12:47:31 +02:00
Christoph Oelckers
d193e199f1
- reorganized hightile offset storage.
2021-04-06 15:55:33 +02:00
Christoph Oelckers
9a46fa7ef0
Merge branch 'master' into newrenderer2
2021-04-05 19:20:56 +02:00
Christoph Oelckers
869433ee2e
- fixed invalidation of programmatic textures.
...
This is only relevant for Vulkan because it stores the descriptor sets with the material, not the hardware texture.
2021-04-05 19:18:57 +02:00
Christoph Oelckers
e30dc82676
- Cleanup of the voxel code.
...
* moving polymost_voxdraw into polymost.cpp.
* consolidated all remaining voxel code in hw_voxels.cpp. All original Build voxel code is completely gone now, except for polymost_voxdraw, so this got moved out of the build/ folder.
* integrate Blood's voxel init code into the main function.
* some further cleanup was allowed as a result of this, so engineInit is gone now because these parts can now be done outside the games' app_init functions.
2021-04-05 18:05:43 +02:00
Christoph Oelckers
8e31c34b06
- fixed tileImportFromTexture.
...
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:02:04 +02:00
Christoph Oelckers
8055ff1d86
- fixed tileImportFromTexture.
...
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:00:41 +02:00
Christoph Oelckers
4647a0b2bc
- fixed cases of small textures being used for the sky.
...
Case in Point: DukeDC uses a 64x64 texture with palette remap for the sky.
2021-03-29 23:25:43 +02:00
Christoph Oelckers
b7e8815133
- some further lightening of compat.h.
2021-03-24 21:13:36 +01:00
Christoph Oelckers
d28d5a5e1f
- use real fog, even in palette emulation mode.
...
Using the palette to apply fog is just far too broken and cannot be kept in check with all the hacks the Build engine allows.
This only works if all elements on screen use the identity translation lookup which is basically never the case.
Real fog, on the other hand, can easily be applied to everything.
2021-02-27 13:30:52 +01:00
Christoph Oelckers
8ffda1c9d1
- Duke: Calculate the true font height of the numbers for alignment in the Statusbar.
...
The original tiles are all 15 pixels tall, but depending on the games can vary in their true height, so use CheckRealHeight on them to get their true dimensions.
Fixes #250
2021-02-01 00:09:22 +01:00
Christoph Oelckers
7b72fccfa2
- fixed hires replacement code not to destroy the intended translation in case there is no replacement.
2021-01-29 13:08:26 +01:00
Christoph Oelckers
52ba0461bc
- fixed hires lookup for tiles using special palettes.
...
In these cases the palette needs to be ignored and the base version picked. The proper handling for this case was undefined, working in some cases and not in others.
Fixes #247
2021-01-29 11:48:32 +01:00
Christoph Oelckers
d04013066c
- build a composite texture of all the segments for sky rendering to reduce the seams between the single segments.
2020-12-04 22:29:25 +01:00
Christoph Oelckers
169d708547
- removed all remaining uses of tilesiz.
2020-11-23 08:55:02 +01:00
Christoph Oelckers
4aa06ff702
- use a static table for SEQ callbacks.
...
This ensures that callback indices are consistent. Runtime registration as performed by NBlood has undefined order and will make savegames non-transferrable.
2020-11-21 16:34:32 +01:00
Christoph Oelckers
483e0b6574
- fixed voxel rendering in palette emulation mode.
...
The recent changes for replacing fonts with hires versions made the paletted handling kick in, although the voxel textures are not suitable for that.
Fixes #178
2020-11-12 19:26:16 +01:00
Christoph Oelckers
2ee18b3a11
- fixed voxel rendering.
2020-11-11 20:31:27 +01:00
Christoph Oelckers
85edf38eba
- do not grayscale all hires tinting.
2020-11-11 07:57:25 +01:00
Christoph Oelckers
e2b6ebec91
- partially fixed colorization for hires replacements.
2020-11-10 23:59:04 +01:00
Christoph Oelckers
96fbfdcf86
- made hires replacements work for untranslated fonts.
2020-11-10 21:34:49 +01:00
Christoph Oelckers
8ac6a4d321
- removed redundant declaration of PickTexture.
2020-11-10 20:30:37 +01:00
Christoph Oelckers
873f4d7c0c
- link hires replacements to textures instead of tile numbers.
...
This is needed to connect them to fonts as well because its glyphs have no tile index.
2020-11-10 20:12:46 +01:00
Christoph Oelckers
ed599d0f05
- moved the hires texture replacement logic into a backend callback.
...
This way it can be handled transparently to the calling code.
Fonts do not work yet, though.
2020-11-10 16:22:02 +01:00
Christoph Oelckers
601680d08e
- moved widthBits and heightBits into engine.
...
These functions will go away with the rest of the renderer when the time comes, so this is the right place.
2020-11-09 20:56:28 +01:00
Christoph Oelckers
f9ab77f700
- create named texture copies for 'tilefromtexture' replacements.
...
We want to be able later to find them in the texture manager again.
2020-10-10 16:52:04 +02:00
Christoph Oelckers
a953404331
- SW's text menus done.
...
This also copies the Build texture animation info into the texture manager so that the 2D code can access it through existing interfaces.
2020-10-07 23:22:29 +02:00
Christoph Oelckers
d22bdf9dc7
- use an alias for the menu bar texture in Blood.
...
Direct tile access has been disabled for now, hopefully this can be buried deep in the engine for all eternity.
2020-10-06 20:05:51 +02:00
Christoph Oelckers
3dbb8cbb11
- safety commit
2020-10-05 21:47:53 +02:00
Christoph Oelckers
4c2ff2950a
- for Duke/RR, when not using English force use of the regular text font for drawing the map label on the automap.
...
This essentially removes the tiny font which is simply too small to ever be able to receive a proper international extension from the equation for localization because the level name display was the only remaining relevant content using this font.
The only other screen where this font is still being used to draw text requiring translated content is the multiplayer summary which will have to be redesigned anyway if multiplayer becomes functional again.
2020-09-29 21:47:32 +02:00
Christoph Oelckers
3210dd5782
- fixed the noisiest value truncation warnings after shortly re-enabling them in the compiler, plus a few places where the warning pointed to incorrect code.
2020-09-26 11:59:24 +02:00
Christoph Oelckers
3344e73fed
- fixed some crashes in the .def parser and texture initialization code.
2020-09-25 20:51:02 +02:00
Christoph Oelckers
5a76dce5f8
- reinstated setuptile.
...
Apparently this is needed by some hires packs to fudge the sprite offsets.
Fortunately, setting sprite offsets is the only thing this was ever used for so it's relatively uninvasive.
2020-09-23 18:18:22 +02:00
Christoph Oelckers
5c777eeb38
- moved implementation of 'animtilerange' into buildtiles.cpp.
2020-09-16 19:13:05 +02:00
Christoph Oelckers
616838dd0a
- little bit of cleanup on tileImport.
2020-09-16 19:13:05 +02:00
Christoph Oelckers
2c3041081d
- remove indirection in picanm access.
2020-09-15 21:17:08 +02:00
Christoph Oelckers
d1293da8dc
- connecting the dots for Blood's special tile features.
2020-09-15 01:27:24 +02:00
Christoph Oelckers
bc5d3eea88
- split the worker part for tileImportTexture out of the parser.
2020-09-15 01:21:17 +02:00
Christoph Oelckers
0e58203d92
- fixed rintersect and removed some unused bits from engine.cpp.
2020-09-13 20:15:46 +02:00
Christoph Oelckers
59eb923c11
- fixed replacement of hires textures.
...
Fixes #107
2020-09-10 20:52:40 +02:00
Christoph Oelckers
83eba019b8
- added support for Megaton's widescreen assets.
...
Fixes #386
2020-09-10 00:05:10 +02:00
Christoph Oelckers
e5612b82c7
- fixed: The tile manager created its backup arrays before loading .def files.
...
This could let such textures disappear with the new main loop.
2020-09-02 00:36:49 +02:00
Christoph Oelckers
0843f5f04a
- ported the final level's text screen and exported its text to the string table.
2020-08-22 18:12:19 +02:00
Christoph Oelckers
3455610031
- base palette cleanup.
...
Avoid passing this anywhere in the client code. It should only be set right before rendering the 3D view and the only code using the base palette should be the 3D renderer and hud_drawsprite.
Also make the palette override CVARs 3D view only in debug mode.
2020-08-14 21:18:14 +02:00
Christoph Oelckers
775eabcd3d
- fixed incorrect 'twodonly' flag set for the base palettes.
...
This let the palette creator skip all translations for the water and slime palette. Fixes #28 .
2020-07-26 17:56:33 +02:00
Christoph Oelckers
d16d8f0d0e
- fixed issues reported by XCode
2020-07-23 17:02:59 +02:00
Christoph Oelckers
55feadd11c
- render the weapons with the DrawTexture interface and properly handle rotatesprite's alignment modes
2020-07-16 13:23:26 +02:00
Christoph Oelckers
69d9a98ead
- Duke end of episode animations ported
2020-06-28 21:38:25 +02:00
Christoph Oelckers
1bb7da173a
- removed a few more dependencies on Build includes.
2020-06-20 18:17:49 +02:00
Christoph Oelckers
83a760874b
- removed some Build related includes from core code.
2020-06-20 18:01:02 +02:00
Christoph Oelckers
ab2686db34
- camtex transition
2020-05-31 21:43:32 +02:00
Christoph Oelckers
611dad7f69
- added the softpoly and Vulkan backend code fron GZDoom.
...
Not hooked up yet.
2020-05-31 10:53:11 +02:00
Christoph Oelckers
00f1043047
- remember custom tile type.
2020-05-30 22:20:53 +02:00
Christoph Oelckers
423f758314
- texture code restructuring.
2020-05-30 21:42:35 +02:00
Christoph Oelckers
cca4fc609f
- texture code cleanup, mainly cppying layer data into the textures at startup to be able to use a real material system.
2020-05-29 23:33:26 +02:00
Christoph Oelckers
594ec6626c
- transitioned to using GZDoom's texture creation code.
...
Also added support for creating indexed textures directly into CreateTexBuffer, where this functionality can be shared.
As an added plus, brightmaps are working again, this time with less hackery.
2020-05-29 19:21:18 +02:00
Christoph Oelckers
f6ca5fa650
- fixed writable tiles.
2020-05-28 18:42:26 +02:00
Christoph Oelckers
193b940eef
- palette code cleanup.
2020-05-27 22:19:02 +02:00
Christoph Oelckers
c4017de12f
- updated to GZDoom's new texture management system.
2020-05-25 23:59:07 +02:00
Christoph Oelckers
7c3cac5721
- buildtiles.h cleaned of merge errors.
2020-05-25 16:53:35 +02:00
Christoph Oelckers
94cb36ae53
- removed helper #ifdefs.
2020-05-25 00:33:25 +02:00
Christoph Oelckers
6bd4f77c5b
- fix compilation.
2020-05-25 00:31:55 +02:00
Christoph Oelckers
a70b7fa698
- use the texture manager to handle texture data.
2020-05-24 23:26:47 +02:00
Christoph Oelckers
7225dbd6a4
- disabled the 0<->255 color swap because no support code to handle this exists yet.
2020-05-24 23:08:45 +02:00
Christoph Oelckers
6bffdf80a1
- finally managed to merge in the original texture system commit.
...
Game compiles and runs but transparency doesn't work yet.
# Conflicts:
# source/CMakeLists.txt
# source/core/menu/menu.cpp
# source/core/textures/buildtiles.cpp
2020-05-24 22:53:14 +02:00
Christoph Oelckers
0179029ed1
- use image sources, not textures to manage Build tiles.
...
The font manager and texture compositor need this - they cannot work off non-image-backed textures.
2020-05-24 22:51:26 +02:00
Christoph Oelckers
53891004a0
- fixed compilation
2020-05-24 22:37:50 +02:00
Christoph Oelckers
bfd11f9cca
- give tiles a name
...
# Conflicts:
# source/core/textures/buildtiles.cpp
2020-05-24 22:33:52 +02:00
Christoph Oelckers
e500db97b1
- v_text updated and moved to 'common'.
...
# Conflicts:
# source/CMakeLists.txt
2020-05-24 22:32:05 +02:00
Christoph Oelckers
272d85663a
- moving files...
2020-05-24 20:39:40 +02:00
Christoph Oelckers
9bb1e43c9f
- picanmbackup must be initialized.
2020-05-24 20:30:02 +02:00
Christoph Oelckers
6007d5dc8f
- fixed typo in offset setter.
2020-05-24 20:11:17 +02:00
Christoph Oelckers
7a84887fc4
- transitioned FTexture.
...
Mostly working. Note: Brightmaps must be per-translation!
2020-05-24 19:12:22 +02:00
Christoph Oelckers
db21b3ec35
- cleanup
2020-05-24 16:38:16 +02:00
Christoph Oelckers
83e2a342d2
- let the fonts use image sources, not textures as their base class for glyphs.
2020-05-24 16:32:52 +02:00
Christoph Oelckers
e985db3d08
- added GZDoom's texture manager.
...
It doesn't do anything yet, but it can now be used to manage textures.
2020-05-24 16:11:10 +02:00
Christoph Oelckers
e6b94d35ff
- reorganized how BuildTiles stores its data.
...
Arrays of struct are better than struct of arrays.
2020-05-24 15:02:20 +02:00
Christoph Oelckers
2c5737795f
- animation fix.
2020-05-24 14:23:39 +02:00
Christoph Oelckers
d6786cf0eb
- final cleanup of picanm code.
2020-05-24 13:53:27 +02:00
Christoph Oelckers
266364fc2e
- properly implement texture offsets
2020-05-24 13:26:45 +02:00
Christoph Oelckers
db4850a028
- added a reverse tile map so that the tile manager can retrieve special info even when a tile texture is passed by object to the render code and not by index.
2020-05-24 10:30:09 +02:00
Christoph Oelckers
0c029750b6
- moved hightile replacements out of the texture class.
2020-05-24 08:47:45 +02:00
Christoph Oelckers
498b19873d
- split up textures.h.
2020-05-24 07:58:56 +02:00
Christoph Oelckers
da26d1cec4
- more trivial adjustments.
2020-05-24 00:38:10 +02:00
Christoph Oelckers
00e7b2fa25
- simple stuff from the texture manager inclusion commit.
...
To get this out of the way first...
2020-05-24 00:27:24 +02:00
Christoph Oelckers
50ab68b53b
- moved filesa to common
2020-05-23 23:53:38 +02:00
Christoph Oelckers
d0cbf21dbe
- swapped the image source implementations with GZDoom's.
2020-05-23 23:46:44 +02:00
Christoph Oelckers
f64bdccaca
- moved renderstyle to 'common' and use GZDoom's color table code unaltered.
...
# Conflicts:
# source/CMakeLists.txt
# source/common/engine/serializer.h
2020-05-23 22:43:05 +02:00
Christoph Oelckers
ae6403a205
- added a level of abstraction to the lookup table code to ease later refactoring.
2020-05-23 22:43:05 +02:00