Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
player_style.hpp File Reference

Colors and shape markers that tell the players apart, color blindness included. More...

#include <aegis2d/render/color.hpp>
#include <aegis2d/render/export.hpp>
#include <array>
#include <cstddef>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Classes

struct  aegis2d::render::PlayerStyle
 How one player is drawn: the tint of their sprites (their character and shots), and their marker. More...
 

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::render
 OpenGL renderer: sprites, text and camera (client only).
 

Enumerations

enum class  aegis2d::render::MarkerShape : std::uint8_t { aegis2d::render::Circle , aegis2d::render::Triangle , aegis2d::render::Square , aegis2d::render::Diamond }
 Shape drawn next to a player, so players are told apart without color. More...
 

Functions

PlayerStyle aegis2d::render::player_style (std::size_t player)
 Style of one player.
 
std::vector< std::uint8_t > aegis2d::render::marker_image (MarkerShape shape, int size)
 Image of a marker, to load as a texture and draw tinted with the player's color.
 

Variables

constexpr std::size_t aegis2d::render::max_players = 4
 Number of players a game can tell apart with player_styles.
 
constexpr std::array< PlayerStyle, max_players > aegis2d::render::player_styles
 Style of each player, the first player first.
 

Detailed Description

Colors and shape markers that tell the players apart, color blindness included.