ddnet/src/game/client/components/debughud.h
c0d3d3v a9c8b344a2
Player position, speed and angle can now be displayed in the HUD.
- Added RenderMovementInformation() to the HUD
- Use m_Width instead of recalculating the display width each time in hud.cpp
- Reworked Debug HUD:
    - Display velspeed.x*ramp and velspeed.y instead of velspeed*ramp
    - Show unit of speed
    - The graph for the velspeed.x*ramp behavior (if dbg_tuning is active) is now nicer and usable. A second graph zooming in on the turning point has been added.
    - The velspeed.x*ramp graph will be redrawn only when new tuning parameters are added
- The target angle used to draw the tees is now calculated using the m_TargetX, m_TargetY in DDNetCharacterDisplayInfo if available.
- Added m_TargetX, m_TargetY and m_RampValue to DDNetCharacterDisplayInfo Snap (m_RampValue has a precision of one thousandth)
- Added CGraph::InsertAt() to create static Graphs
- Added "assets/hud" to initial created Directories
- Added Settings to hide Dummy Action HUD and Player Movement HUD cl_showhud_dummy_actions, cl_showhud_player_position, cl_showhud_player_speed, cl_showhud_player_angle
- Added Pointer to m_PrevExtendedDisplayInfo, for calculation of interpolated Angle in Player Rendering
- Added GetDigitsIndex(int Value, float Max); to hud.cpp
2022-04-14 13:42:19 +02:00

29 lines
762 B
C++

/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_CLIENT_COMPONENTS_DEBUGHUD_H
#define GAME_CLIENT_COMPONENTS_DEBUGHUD_H
#include <engine/client/client.h>
#include <game/client/component.h>
class CDebugHud : public CComponent
{
void RenderNetCorrections();
void RenderTuning();
void RenderHint();
CGraph m_RampGraph;
CGraph m_ZoomedInGraph;
float m_SpeedTurningPoint;
float MiddleOfZoomedInGraph;
float m_OldVelrampStart;
float m_OldVelrampRange;
float m_OldVelrampCurvature;
public:
virtual int Sizeof() const override { return sizeof(*this); }
virtual void OnRender() override;
};
#endif