00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KAMPAGNE_H
00019 #define KAMPAGNE_H
00020
00021 #include <string>
00022 #include <list>
00023 #include <cstdio>
00024 #include <iostream>
00025 #include <log4cxx/logger.h>
00026
00027
00028 #include "Mission.hpp"
00029 #include "XML-Errors.hpp"
00030
00034 class CKampagne
00035 {
00036 std::list<CMission*> m_Missions;
00037 std::list<CMission*>::iterator m_ActualMission;
00038 errorCode readFile(std::string Filename);
00039 std::string m_Intro;
00040 std::string m_ImgFile;
00041 int m_framecount;
00042 int m_framedelay;
00043 std::string m_Epilog;
00044 std::string m_Niederlage;
00045 std::string m_Title;
00046 int m_leben;
00047 void clearMissions();
00048
00049 log4cxx::LoggerPtr log_;
00050 public:
00051 CKampagne() : log_(log4cxx::Logger::getLogger("kampagne")) {}
00052 bool init(std::string filename);
00053 CMission* get_Mission() const
00054 {if(*m_ActualMission != NULL) return *m_ActualMission; else return NULL;}
00055 bool nextMission();
00056 std::string get_Intro()
00057 {return m_Intro;}
00058 std::string get_Epilog()
00059 {return m_Epilog;}
00060 std::string get_Niederlage()
00061 {return m_Niederlage;}
00062 std::string get_ImgFile()
00063 {return m_ImgFile;}
00064 std::string get_Title()
00065 {return m_Title;}
00066 int getLeben()
00067 {return m_leben;}
00068 int getFramecount()
00069 {return m_framecount;}
00070 int getFramedelay()
00071 {return m_framedelay;}
00072 std::size_t get_MissionIndex();
00073 bool set_MissionIndex(int index);
00074 };
00075
00076
00077
00078
00079
00080 #endif