RingRacers/src/r_debug_detail.hpp
James R 53b2922fbb Add the debugrender_highlight command, highlight specific rendering in flat colors
Software mode only.

The command is used like this:

debugrender_highlight planes sprites
debugrender_highlight pl spr
debugrender_highlight none

(Abbreviations work.)

Supported rendering to flag:

planes      - sector floor/ceiling
fofplanes   - FOF top/bottom
fofsides    - FOF sides
midtextures - pegged midtexture
walls       - sector upper/lower texture, one-sided linedefs
sprites     - sprites
sky         - skybox
2023-03-06 05:25:36 -08:00

42 lines
1.2 KiB
C++

// RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2023 by James Robert Roman.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file r_debug_detail.cpp
/// \brief Software renderer debugging, internal header
#ifndef __R_DEBUG_DETAIL__
#define __R_DEBUG_DETAIL__
#include "r_main.h"
namespace srb2::r_debug::detail
{
struct HighlightDesc
{
uint8_t color;
const char* label;
const char* description;
};
constexpr HighlightDesc kHighlightOptions[NUM_SW_HI] = {
{0x96, "planes", "Sector floor/ceiling"},
{0x49, "fofplanes", "FOF top/bottom"},
{0xB6, "fofsides", "FOF sides"},
{0x7A, "midtextures", "Two-sided midtexture"},
{0xC9, "walls", "Sector upper/lower texture, one-sided midtexture"},
{0x23, "sprites", "Sprites"},
{0x0F, "sky", "Sky texture"}};
char* skip_alnum(char* p, int mode);
char* parse_highlight_arg(char* p);
void highlight_help(bool only_on);
}; // srb2::r_debug::detail
#endif // __R_DEBUG_DETAIL__