Don't document bad code



  • rewrite it



  • [cpp]
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(void)
    {
    return Game;
    }

    protected:

    private:
    void clearMin(int iStartX, int iEndX);
    void renderPreGame();
    void renderInGame(int iTime);
    void renderInGameMenu();
    void renderGameOver();

    void prepareGame();
    void runGame();
    void endGame();

    void runMenu();
    void runGameOver();

    void checkKeys_DEF();
    void showScreen_DEF();

    XDisplay* m_pxdisplayActual;

    XSurface m_xsurfField;
    XSurface m_xsurfAppleCount;

    XSurface m_xsBackLeft;
    XSurface m_xsBackRight;
    XSurface m_xsBlack;

    XSprite m_xsTileSet;
    XSprite m_xsParticles;

    XSprite m_xsMenu;
    XSprite m_xsMenuHead;

    XFont m_xfChars;

    // #define FrameCount //uncomment this to activate framecounter
    #ifdef FrameCount
    XFrameCounter m_xfcFrameCounter;
    #endif

    int m_iTimePassed;
    int m_iLastTick; //Zeitpunkt des letzten Events
    int m_iGameStatus;
    int m_iMenuStatus;

    bool m_bMoreFood;
    int m_iFoodCount;
    int m_iFoodTime;
    int m_iFoodSound;

    char m_pcPlayerName[128];

    Field m_Field;

    Player* m_ppPlayer[3]; //Zeiger auf ein Feld von Spielern

    State m_stateNext;

    WPARAM m_wWMKey;

    FSOUND_SAMPLE* m_pfsTurn;
    FSOUND_SAMPLE* m_pfsEat;
    FSOUND_SAMPLE* m_pfsTime1;
    FSOUND_SAMPLE* m_pfsTime2;
    FSOUND_SAMPLE* m_pfsOpen;
    FSOUND_SAMPLE* m_pfsMenu;
    FSOUND_SAMPLE* m_pfsDead;
    FSOUND_SAMPLE* m_pfsWon;
    FSOUND_SAMPLE* m_pfsStar;
    FSOUND_SAMPLE* m_pfsRainbow;
    FSOUND_SAMPLE* m_pfsRedGotFlag;
    FSOUND_SAMPLE* m_pfsRedScores;
    FSOUND_SAMPLE* m_pfsBlueGotFlag;
    FSOUND_SAMPLE* m_pfsBlueScores;

    FMUSIC_MODULE* m_pfmMuzak[2];
    int m_iNumberOfMuzaks;
    int m_iActualMuzak;
    int m_iMusicTime;
    };

    #endif // _PPGame_H

    class PPGame;

    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    // Dateiname: PPGame.h
    /////////////////////////////////////////////////////////////////////////////////////
    // Autor: Christian Roesch
    //
    // Erstelldatum: 07.08.2001
    // letzte Änderung: 23.11.2001
    /////////////////////////////////////////////////////////////////////////////////////
    // Info: Die Klasse fürs Ingame
    /////////////////////////////////////////////////////////////////////////////////////

    #ifndef _PPGame_H
    #define _PPGame_H

    // includes
    #include "PPart.h"
    #include "global.h"
    #include "Field.h"
    #include "Player.h"
    #include "XGameSDK\XDisplay.h"
    #include "XGameSDK\XSprite.h"
    #include "XGameSDK\XFont.h"
    #include "XGameSDK\XInput.h"
    #include "XGameSDK\XFrameCounter.h"

    // Klassen-Deklaration

    class PPGame : public PPart
    {
    public:
    virtual HRESULT initialize(XDisplay* pxdisplayDest);
    virtual HRESULT uninitialize(void);

    virtual State run(int iTime, XDisplay* pxdisplayDest);

    virtual HRESULT recoverFromFocusLost(void);

    virtual void wndProc(HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam);

    State getState(



  • Find'st du den so gut, dass du ihn gleich 18 x postest?



  • SeppSchrot schrieb:

    Find'st du den so gut, dass du ihn gleich 18 x postest?

    vielleicht will er damit jemanden erschrecken. den code und einiges mehr hab ich gestern aus ästetischen gründen aus dem c++-forum gelöscht.



  • Wollte gucken ob das Forum einen Bug hat.



  • SeppSchrot schrieb:

    Find'st du den so gut, dass du ihn gleich 18 x postest?

    er hat das mit dem 'rewrite' wohl falsch verstanden ... 🙂


Anmelden zum Antworten