Revision 389
classes report
proj/doc/report/report.tex | ||
---|---|---|
231 | 231 |
Collection of useful classes and functions. This module was developed with the goal of being as general and independent from \texttt{proj} as possible, although there are rare occasions where sub-modules of \texttt{libs} include sub-modules of \texttt{proj}. |
232 | 232 |
\subsubsection{\texttt{classes}} |
233 | 233 |
Provides classes \texttt{list\_t} and \texttt{queue\_t}. These classes achieve generality by storing pointers to \texttt{void}, which have as major disadvantage requiring the use of \texttt{free}. \par |
234 |
\textcolor{red}{CONTINUE LIBS MODULES} |
|
234 |
Provides various classes to store information about entities (such as map, shooter, bullets) |
|
235 |
as well as structs to store player information, key presses, text.\par |
|
236 |
The class \texttt{keys\_t} holds information of the keys that are pressed, as well as if the left button of the mouse is pressed. This values are stored in 1 bit each, minimizing the space occupied in memory, and is updated on every KBC and Mouse interrupt.\par |
|
237 |
The class \texttt{rectangle\_t} provides ease on drawing rectangles on the screen with functions to change its position, color, line width, fill color, among others.\par |
|
238 |
The class \texttt{glyph\_t} allows letters to be drawn, and is the base class to then represent text on screen.\par |
|
239 |
The class \texttt{font\_t} is an extension of the previous one, allowing multiple letters to be drawn.\par |
|
240 |
The class \texttt{text\_t} extends the previous class by creating an interface with strings, allowing to modify the string to be drawn, the size of each character, among other aspects.\par |
|
241 |
The class \texttt{menu\_t} allows the creation of menus with multiple click-able boxes with text. |
|
242 |
The class \texttt{basic\_sprite\_t} allows to load XPM maps and draw those onto the screen, it is the main class for all the entities, as it will hold the textures of each entity.\par |
|
243 |
The class \texttt{sprite\_t} improves the previous class by adding the capability of rotating and scaling the image to be rendered.\par |
|
244 |
The class \texttt{gunner\_t} represents an entity, this entity can assume melee or ranged form, and also can represent a person or a zombie. This entity also has other features for the game such as health bar and the team the entity is on.\par |
|
245 |
The class \texttt{bullet\_t} represents a bullet, characterized by the source of bullet, this is who shot the bullet, its velocity and damage in case it collides with a person or zombie.\par |
|
246 |
The class \texttt{map\_t} represents the map of the game, as well as being the interface for the path finding algorithm used for the autonomous opponents.\par |
|
247 |
The class \texttt{score\_info\_t} is used to store information about a score, such as the value of the score, the time played to obtain the score and the date and time it happened.\par |
|
248 |
The class \texttt{highscores\_t} uses the previous class to store information about the three best scores, and allows them to be drawn to the screen, similar to menu.\par |
|
249 |
The classes \texttt{host\_info\_t}, \texttt{remote\_info\_t} and \texttt{bullet\_info\_t} represent information to be transmitted to the serial port containing information about the game. |
|
250 |
\newpage |
|
235 | 251 |
\subsection{\texttt{proj}} |
236 | 252 |
\textcolor{red}{MAKE PROJ MODULES} |
237 | 253 |
\section{Implementation details} \label{sec:details} |
Also available in: Unified diff