00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020
00021
00022
00024
00025 #ifndef CREDITSMANAGER_H
00026 #define CREDITSMANAGER_H
00027
00029
00030 #include "Globals.hpp"
00031 #include "Bitmapfont.hpp"
00032 #include "Ship.hpp"
00033 #include <vector>
00034 #include <string>
00035
00036 #define CREDITS_SIZE_UPDATE_SPEED 20
00037 #define CREDITS_START_SIZE 5
00038 #define CREDITS_END_SIZE 28
00039 #define CREDITS_FADE_OUT_TIME 5000
00040 #define CREDITS_SPACE_X 200
00041 #define CREDITS_SPACE_SIDE 250
00042 #define CREDITS_Y_INFLUENCE 250
00043 #define CREDITS_Y_DAMAGE 70
00044
00046
00047 struct CreditsAsteroid
00048 {
00049 CShip Ship;
00050 std::string Name;
00051 int TextSize;
00052 int LastSizeUpdate;
00053 };
00054
00058 class CCreditsManager
00059 {
00060 public:
00061
00062 CCreditsManager();
00063 ~CCreditsManager();
00064
00065
00066 void Init(CBitmapFont* BitMapFont);
00067
00068
00069 void Draw();
00070
00071
00072 bool IsFinished() const { return m_Asteroids.size() == 0; }
00073 private:
00074
00075 void CleanUp();
00076
00077
00078 void AddAsteroid(std::string Name, int YOff);
00079
00080 std::vector<CreditsAsteroid*> m_Asteroids;
00081
00082 int m_CurName;
00083 CBitmapFont* m_BitMapFont;
00084
00085 CShip m_PlayerShip;
00086
00087 bool m_Finished;
00088 };
00089 #endif
00090