Commit Graph

651 Commits

Author SHA1 Message Date
Christoph Oelckers 193b940eef - palette code cleanup. 2020-05-27 22:19:02 +02:00
Christoph Oelckers 29db3febb8 - updated the platform code to be mostly identical with GZDoom 2020-05-26 00:08:26 +02:00
Christoph Oelckers c4017de12f - updated to GZDoom's new texture management system. 2020-05-25 23:59:07 +02:00
Christoph Oelckers 55a3c62b59 - use GZDoom's 2D drawer.
Console and menu font colors are not ok yet, aside from that it works.
2020-05-25 17:11:32 +02:00
Christoph Oelckers 758e4ad7cb - stripped down the palette manager in the GL backend and let it use the data that's managed elsewhere.
This class is only needed to manage the palette textures used by the indexed render mode, all the rest is available globally.
2020-05-25 00:31:55 +02:00
Christoph Oelckers 531c68edfe - use GZDoom's font code to fix the crash issues and moved around some files in the PK3.
This pulls in a lot of Doom specific font setup, this can be sorted out later as it won't get into the way.

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/glbackend/hw_draw2d.cpp

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/glbackend/gl_texture.cpp

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/build/src/palette.cpp
#	source/core/gamecontrol.cpp
2020-05-24 23:28:44 +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 7a84887fc4 - transitioned FTexture.
Mostly working. Note: Brightmaps must be per-translation!
2020-05-24 19:12:22 +02:00
Christoph Oelckers 266364fc2e - properly implement texture offsets 2020-05-24 13:26:45 +02:00
Christoph Oelckers 498b19873d - split up textures.h. 2020-05-24 07:58:56 +02:00
Christoph Oelckers b8a289bf61 - move brightmap handling to the common code.
# Conflicts:
#	source/common/utility/basics.h

# Conflicts:
#	source/build/src/palette.cpp
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
Christoph Oelckers f929419a0a - refactoring of the lookup tables. 2020-05-23 22:43:04 +02:00
Christoph Oelckers daf77e55f7 - fixed compilation.
Much of this commit will have to be undone later, once the texture manager becomes available.
2020-05-23 22:43:04 +02:00
Christoph Oelckers b971bc2717 - avoid using global palette settings when drawing 2D content with a custom palette.
Instead pass the palette info with the render call to avoid stale global state.
2020-05-23 22:43:01 +02:00
Christoph Oelckers 8d3199514d - removed some 'pragma' cruft. 2020-05-23 13:08:10 +02:00
Christoph Oelckers d0406e27b6 - all base palette data has been transitioned to GPalette. 2020-05-23 12:31:05 +02:00
Christoph Oelckers 6f9ee4b60f - store palettes in the palette container. 2020-05-23 12:31:05 +02:00
Richard C. Gobeille e2d79b4682 engine: add yax_getflorzofslope() and yax_getceilzofslope() 2020-05-22 17:01:36 +02:00
Richard C. Gobeille 94d098f8ef Fix a crash with tabledivide64()
Fixes #1.
2020-05-22 16:50:02 +02:00
NY00123 6fcb8f7a6a Add gethiq16angle and the getq16angle wrapper to the engine 2020-05-21 18:47:37 +02:00
Mitchell Richters 3749a89d6a Build: Change renderSetRollAngle() to take a float and not an int32_t. 2020-05-13 15:12:44 +02:00
Mitchell Richters 68a0ead5f0
- fix Linux builds following reset of master branch. (#44)
* - fix Linux builds following reset of master branch.

* - fix Linux Clang CI failure.

* - change '#ifdef __linux__' to '#ifndef _WIN32' as requested/required.

* - initialise batchrun in proper spot.
2020-05-05 10:45:21 +03:00
Mitchell Richters 1ce4081d37 - change 'refreshfreq' from int to double.
A double is already used in CalcSmoothRatio. Further to this, displays that use TV standard frequencies do not use perfect 60Hz frequencies, but frequencies such as 59.94Hz, 23.976Hz (precisely, 24*(1000/1001) = 23.9760239760239760...) etc.

Reference: 'https://www.ghacks.net/2010/04/28/59-hertz-refresh-rate/', 'http://www.paradiso-design.net/videostandards_en.html'.

# Conflicts:
#	source/build/include/baselayer.h
#	source/platform/posix/cocoa/i_main.mm
2020-04-16 00:03:00 +02:00
Christoph Oelckers 156a225ff4 - renamed global palookup variable.
Since the same word gets used in text messages and local variables in the game code it is easier this way to search for it and facilitate its transition to the translation table management in PaletteContainer.
2020-04-13 23:58:46 +02:00
Christoph Oelckers fda4293013 - draw the movie franes outside of the tile system to reduce the palette maintenance.
The movie code has always been the part causing the most issues because it alters the palettes - the rest treats them as static data.
2020-04-13 23:58:45 +02:00
Christoph Oelckers fac004b4d2 - palette code cleanup 2020-04-13 23:58:44 +02:00
Christoph Oelckers 8e87674d4c - backend code matching with GZDoom 2020-04-12 08:30:40 +02:00
Christoph Oelckers 5584c726ba - file system update and adjustment. 2020-04-12 08:30:40 +02:00
Christoph Oelckers f671eb622f - migrated to GZDoom's utility code. 2020-04-12 08:30:39 +02:00
Christoph Oelckers 797640c494 - use ZDoom's memory allocation wrapper instead of EDuke's.
This simply plays nicer with the compiler's diagnostics.
2020-04-12 08:30:38 +02:00
Christoph Oelckers 66ecb05eb8 - use Printf as the only command to print to the console.
All uses of OSD_Printf, initprintf etc. have been renamed.
2020-04-12 08:30:38 +02:00
Christoph Oelckers 6ef93ba514 - match cmdlib.cpp/.h with GZDoom. 2020-04-12 08:30:36 +02:00
Christoph Oelckers 5af0217db7 - got rid of the software rendering blend tables. 2020-03-29 17:23:57 +02:00
Christoph Oelckers 41545b644a - cleaned out most of the software renderer's static global variables. 2020-03-29 16:59:49 +02:00
Christoph Oelckers 7392b699e4 - cleaning out a few more parts of the software renderer. 2020-03-29 15:54:02 +02:00
Christoph Oelckers 3f69044770 - removed all references to sdlayer.cpp as all that was left in there was only needed for software rendering.
- removed now unused a-c.cpp.
2020-03-29 15:22:07 +02:00
Christoph Oelckers 0de4b134da - stripped out most of the software renderer.
Now that the camera textures can be handled through the hardware renderer this isn't needed anymore.
2020-03-29 14:55:09 +02:00
Christoph Oelckers 621a9338e5 - render camera textures with the hardware renderer.
This removes the last active use case for the software renderer and allows rendering the camera views at a higher resolution.
For Shadow Warrior this necessitated a split of JS_DrawMirrors, because it processed cameras and mirrors in the same loop which cannot be done with the hardware renderer.
2020-03-29 14:01:46 +02:00
Christoph Oelckers 73a4e0d1fe - made Blood's FullMap flag global and removed the hacks to show the full automap.
Also refactor show2dsector into a bit array to get rid of the bit shifting code at play here.
2020-03-07 19:30:18 +01:00
Christoph Oelckers f59bfa1224 - consolidation of screentext code 2020-03-05 00:58:38 +01:00
Christoph Oelckers 348325c879 - removed some editor-only code from engine.cpp 2020-03-01 19:12:18 +01:00
Christoph Oelckers a873dcf6e0 - fixed the pause key.
Apparently SDL maps this to a different scan code.
Since pause is hard coded in all games the corresponding menu option has been disabled.
2020-02-16 17:22:14 +01:00
Christoph Oelckers 7909f29691 - allow starting Duke, NAM and WW2GI with the RedNukem-based game code for Redneck Rampage.
This mainly required some rework of the menu setup to be less explicit about the frontend's menu classes.
2020-02-12 20:25:59 +01:00
Christoph Oelckers c53d9cfc3a - reworked voxel texture generation to use the backend's palette manager.
The original code was not able to handle changing palettes and only worked if each palette change resulted in a full texture flush - which Raze does not perform.
2020-02-09 20:14:26 +01:00
Christoph Oelckers 91b9ce54e4 - use a dedicated flag for defined hightile tints so that the shader can use them. 2020-02-09 15:53:08 +01:00
Christoph Oelckers a5fc374b59 - always recalculate the projection matrix.
Trying to cache this is not useful, it barely saves time and was causing display errors.

# Conflicts:
#	source/build/src/polymost.cpp
2020-02-09 15:53:07 +01:00
Christoph Oelckers dbc958baeb - fixed swapped color channels in the tinting part of the shader. 2020-02-05 20:02:50 +01:00
Christoph Oelckers 5d4514060b - disable palette emulation for Blood's cutscenes.
These use color 255 as a valid index which the palette emulation shader does not handle.
2020-02-04 20:40:10 +01:00
Christoph Oelckers a90185bea9 - cleaned up the remaining dependencies on windows.h
This file now only gets included by code that really needs it.
2020-02-03 21:30:57 +01:00