forked from chocolate-doom/chocolate-doom
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Heretic: add true color support (#1111)
* Heretic: true color - initials * Heretic: true color - V_DrawShadowedPatch now working * Heretic: true color - fine tune patch shadows, better namings Despite of here in V_ functions TINTTAB is used for shadows drawing, it's initial purpose is slightly different - it is a blending table, which is *also* used for shadows. "drawtinttab" must be more clear in this context, and in case one day TC implementation will be done for Strife, XLA's function should be named "drawxlatab". * Heretic: true color - fix V_DrawFullscreenRawOrPatch warning * Heretic: true color - use COLORMAP lump for invulnerability effect * Heretic: true color - simplify previous commit Remove duplication of invul. colormap generation. * Heretic: true color - remove redundant `sizeof` multipler for invul colormap handling Raven Software's oversight, or attempt to reduce memory consumption? https://github.com/OpenSourcedGames/Heretic/blob/master/Heretic%20Source/R_MAIN.C#L776 * Heretic: true color - remove redundant truecolor declarations * Heretic: true color - add proper comment for removed sizeof() * Heretic: true color - extend TINTTAB rendering functions * Heretic: true color - translucent sprites * Heretic: true color - no need for `V_LoadTintTable` As not used in true color mode at all. * Heretic: true color - proper palette for E2END pic Fairly simple. We need only proper 256 colors for drawing E2END itself, but we also need to do a proper reset while switching back to normal palette, otherwise we'll get some wrong colors. Suggestions for future: - externalize gamma2table to i_video.h - externalize R_InitColormaps and R_SetUnderwaterPalette to r_local.h * Heretic: true color - better emulation of original Heretic's translucency * Heretic: true color - add missing dc_translation to R_DrawTranslatedTLColumn * Heretic: true color - small styling corrections Also, "viewactive" is not needed. Despite of existing ovet the code, it's not doing anything. Using "setsizeneeded" wasn't optimal, it too expensive. All we need is: - BorderNeedRefresh - updates screen border and bezel, including message area. - SB_state - do a full redraw of whole status bar. * Heretic: true color - use exclusively I_BlendOverTinttab for blending * Heretic: true color - automap (line drawing) This is, hopefully, as small diff as possible, which could be useful for custom COLORMAPs (but are there any existing?). Note that unlike Doom, REINDEX is using lesser color range to be as close to original smoothing as possible. At this point, only background is not working on automap. * fix status bar chain shading * fix automap background drawing/parallaxing * Externalize R_InitColormaps and R_SetUnderwaterPalette Not sure if R_SetUnderwaterPalette needed to be guarded by a macro in header file, but probably this will make sence for better understanding about the nature of this function, i.e. it's "for true color only". * Externalize I_SetGammaTable and gamma2table No changes for Hexen and Strife needed, as these externals were made for true color render only. * Allow R_SetUnderwaterPalette to accept any Hehacked-ed palette Much neater and less macrocized now. Thanks, Fabian! * Remove unnecessary comment * Update automap code * Revert back pixel_t to byte for arrays of line colors. My typo made back in the time I was just started working on automap. * Still use two arrays for normal and overlay mode. Idea of having "middle" color for walls drawing and array does not seems to be good enough, as we loose original color for both modes. In theory, both arrays can be consolidated into one, but this is a bit tricky because we have to define "which color should be used for common walls drawing" w/o hitting if/else condition. --------- Co-authored-by: Fabian Greffrath <fabian@greffrath.com>
- Loading branch information
1 parent
50f49ed
commit f9ddf41
Showing
19 changed files
with
373 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.