Hallo,
ich hab ein Problem bei dem erstellen des SDL_Games.
Code::Blocks spuckt mir folgenden Error aus:
Lektion12\SDL_Game\Shot.hpp |13| error: argument of type `bool (CShot:
()' does not match `bool'
Der Code ist so abgetippt wie er im Buch steht, für alle die die das Buch nicht haben oder keine Lust haben nachzugugen, hier die
Shot.hpp:
|
C-/C++-Quelltext
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef SHOT_HPP
#define SHOT_HPP
#include"Sprite.hpp"
class CShot
{
public:
void Init (CSprite *pSpriteShot, float fXPos, float fYPos);
void Update ();
void Render ();
bool bIsAlive () {return m_bIsAlive;}
void SetAlive (bool m_bIsAlive) {m_bIsAlive = bIsAlive;}
SDL_Rect GetRect() {return m_Rect;}
private:
CSprite *m_pSpriteShot; //Zeiger auf Laser-Sprite
float m_fXPos; //X-Position des Schusses
float m_fYPos; //Y-Position des Schusses
bool m_bIsAlive; //"Lebt" der Schuss noch?
SDL_Rect m_Rect; //Rect des Schusses
};
#endif // SHOT_HPP
|
Wenn ihr noch mehr Dateien braucht, bitte bescheid sagen.
Danke im Voraus
Commander Rex