diff options
author | rubidium <rubidium@openttd.org> | 2011-05-01 10:15:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-01 10:15:33 +0000 |
commit | 485c7cd99e4367b271279a7588c47ddabd6a3a47 (patch) | |
tree | 8e8bef53236b50c09032146a8d2da95fcdde5c6f /src/blitter/factory.hpp | |
parent | 70c7ec30b1c10bc4502a14e45555fff7a310fca4 (diff) | |
download | openttd-485c7cd99e4367b271279a7588c47ddabd6a3a47.tar.xz |
(svn r22397) -Document: some tidbits of the blitter code
Diffstat (limited to 'src/blitter/factory.hpp')
-rw-r--r-- | src/blitter/factory.hpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp index cdacdac2f..7d25823a6 100644 --- a/src/blitter/factory.hpp +++ b/src/blitter/factory.hpp @@ -27,16 +27,24 @@ bool QZ_CanDisplay8bpp(); */ class BlitterFactoryBase { private: - const char *name; + const char *name; ///< The name of the blitter factory. - typedef std::map<const char *, BlitterFactoryBase *, StringCompare> Blitters; + typedef std::map<const char *, BlitterFactoryBase *, StringCompare> Blitters; ///< Map of blitter factories. + /** + * Get the map with currently known blitters. + * @return The known blitters. + */ static Blitters &GetBlitters() { static Blitters &s_blitters = *new Blitters(); return s_blitters; } + /** + * Get the currently active blitter. + * @return The currently active blitter. + */ static Blitter **GetActiveBlitter() { static Blitter *s_blitter = NULL; @@ -121,7 +129,12 @@ public: return *GetActiveBlitter(); } - + /** + * Fill a buffer with information about the blitters. + * @param p The buffer to fill. + * @param last The last element of the buffer. + * @return p The location till where we filled the buffer. + */ static char *GetBlittersInfo(char *p, const char *last) { p += seprintf(p, last, "List of blitters:\n"); |