1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-25 02:47:40 +00:00

added/fixed some \brief descriptions

This commit is contained in:
Zeno Rogue
2020-03-27 21:47:09 +01:00
parent eadd1d90c0
commit 0412f077e6
10 changed files with 164 additions and 150 deletions

View File

@@ -35,51 +35,53 @@ static const int POLY_TRIANGLES = (1<<22); // made of TRIANGLES, not TRIANG
static const int POLY_INTENSE = (1<<23); // extra intense colors
static const int POLY_DEBUG = (1<<24); // debug this shape
/** HyperRogue map rendering functions do not draw its data immediately; instead, they call the 'queue' functions
/** \brief A graphical element that can be drawn. Objects are not drawn immediately but rather queued.
*
* HyperRogue map rendering functions do not draw its data immediately; instead, they call the 'queue' functions
* which store the data to draw in hr::ptds. This approach lets us draw the elements in the correct order.
*/
struct drawqueueitem {
/** The higher the priority, the earlier we should draw this object. */
/** \brief The higher the priority, the earlier we should draw this object. */
PPR prio;
/** Color of this object. */
/** \brief Color of this object. */
color_t color;
/** Some priorities need extra sorting inside the given class. This attribute is used to specify the inner sorting priority. */
/** \brief Some priorities need extra sorting inside the given class. This attribute is used to specify the inner sorting priority. */
int subprio;
/** Draw the object. */
/** \brief Draw the object. */
virtual void draw() = 0;
/** Draw the object as background. */
/** \brief Draw the object as background. */
virtual void draw_back() {}
virtual ~drawqueueitem() {}
/** When minimizing OpenGL calls, we need to group items of the same color, etc. together. This value is used as an extra sorting key. */
/** \brief When minimizing OpenGL calls, we need to group items of the same color, etc. together. This value is used as an extra sorting key. */
virtual color_t outline_group() = 0;
};
/** Drawqueueitem used to draw polygons. The majority of drawqueueitems fall here. */
/** \brief Drawqueueitem used to draw polygons. The majority of drawqueueitems fall here. */
struct dqi_poly : drawqueueitem {
/** see hr::band_shift */
/** \brief see hr::band_shift */
ld band_shift;
/** matrix used to transform the model */
/** \brief matrix used to transform the model */
transmatrix V;
/** a vector of GL vertices where the model is stored */
/** \brief a vector of GL vertices where the model is stored */
const vector<glvertex> *tab;
/** the where does the model start */
/** \brief the where does the model start */
int offset;
/** how many vertices in the model */
/** \brief how many vertices in the model */
int cnt;
/** the offset in the texture vertices */
/** \brief the offset in the texture vertices */
int offset_texture;
/** outline color */
/** \brief outline color */
color_t outline;
/** width of boundary lines */
/** \brief width of boundary lines */
double linewidth;
/** various flags */
/** \brief various flags */
int flags;
/** Texture data for textured polygons. Requires POLY_TRIANGLES flag */
/** \brief Texture data for textured polygons. Requires POLY_TRIANGLES flag */
struct basic_textureinfo *tinf;
/** used to find the correct side to draw in spherical geometries */
/** \brief used to find the correct side to draw in spherical geometries */
hyperpoint intester;
/** temporarily cached data */
/** \brief temporarily cached data */
float cache;
void draw();
void gldraw();
@@ -87,24 +89,24 @@ struct dqi_poly : drawqueueitem {
virtual color_t outline_group() { return outline; }
};
/** Drawqueueitem used to draw lines */
/** \brief Drawqueueitem used to draw lines */
struct dqi_line : drawqueueitem {
/** see hr::band_shift */
/** \brief see hr::band_shift */
ld band_shift;
/** starting and ending point */
/** \brief starting and ending point */
hyperpoint H1, H2;
/** how accurately to render the line */
/** \brief how accurately to render the line */
int prf;
/** width of this line */
/** \brief width of this line */
double width;
void draw();
void draw_back();
virtual color_t outline_group() { return color; }
};
/** Drawqueueitem used to draw strings, using sccreen coodinates */
/** \brief Drawqueueitem used to draw strings, using sccreen coodinates */
struct dqi_string : drawqueueitem {
/** text */
/** \brief text */
string str;
/** onscreen position */
int x, y;
@@ -122,19 +124,19 @@ struct dqi_string : drawqueueitem {
/** Drawqueueitem used to draw circles, using screen coordinates */
struct dqi_circle : drawqueueitem {
/* onscreen position */
/** \brief onscreen position */
int x, y;
/* circle size */
/** \brief circle size */
int size;
/* which color should it be filled with */
/** \brief which color should it be filled with */
color_t fillcolor;
/* width of the circle */
/** \brief width of the circle */
double linewidth;
void draw();
virtual color_t outline_group() { return 2; }
};
/** Perform an arbitrary action. May temporarily change the model, etc. */
/** \brief Perform an arbitrary action. May temporarily change the model, etc. */
struct dqi_action : drawqueueitem {
reaction_t action;
dqi_action(const reaction_t& a) : action(a) {}
@@ -143,7 +145,7 @@ struct dqi_action : drawqueueitem {
};
#endif
/** Return a reference to i-th component of col.
/** \brief Return a reference to i-th component of col.
* \arg i For colors with alpha, A=0, R=1, G=2, B=3. For colors without alpha, R=0, G=1, B=2.
*/
EX unsigned char& part(color_t& col, int i) {