PUISSANCE 4 C++

s@ldon Messages postés 140 Date d'inscription samedi 1 novembre 2003 Statut Membre Dernière intervention 30 septembre 2009 - 2 avril 2008 à 16:55
Fituza Messages postés 23 Date d'inscription mardi 20 avril 2004 Statut Membre Dernière intervention 16 octobre 2008 - 15 août 2008 à 22:03
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/46205-puissance-4-c

Fituza Messages postés 23 Date d'inscription mardi 20 avril 2004 Statut Membre Dernière intervention 16 octobre 2008
15 août 2008 à 22:03
Si tu veux je peux te filer une version fait avec la SDL au moins pour la conversion ca sera pas compliqué...
s@ldon Messages postés 140 Date d'inscription samedi 1 novembre 2003 Statut Membre Dernière intervention 30 septembre 2009 3
8 août 2008 à 21:08
Il est fait avec l'API WIn32...qui est celle de windows. DOmage pour toi petit linuxien...
SInon, du coté de wineHq et une recherche sur la cross comilation devrait résoudre ton pb...

Bon ok : installe Windows, sa ira plus vite, et ce sera plus simple... ;)
cs_Arnold59 Messages postés 50 Date d'inscription lundi 8 mars 2004 Statut Membre Dernière intervention 3 mars 2009
7 août 2008 à 22:01
Bonjour,

Est-il possible d'utiliser ton programme sous Linux.

Dans ce cas, que faut-il rendre Générique ?

--> Compilation avec gcc 4.2.3
Puissance4/src$ gcc -c *
Dans le fichier inclus à partir de Game.cpp:1:
Game.hpp:3:21: erreur: windows.h : Aucun fichier ou dossier de ce type
Dans le fichier inclus à partir de Background.hpp:3,
à partir de Game.hpp:5,
à partir de Game.cpp:1:
MyPicture.hpp:29:7: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Game.hpp:5,
à partir de Game.cpp:1:
Background.hpp:52:8: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Game.hpp:6,
à partir de Game.cpp:1:
Player.hpp:23:7: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Game.cpp:1:
Game.hpp:17:7: attention : pas de retour chariot à la fin du fichier
Game.cpp:64:2: attention : pas de retour chariot à la fin du fichier
In file included from Background.hpp:3,
from Game.hpp:5,
from Game.cpp:1:
MyPicture.hpp:8: erreur: «UINT» has not been declared
MyPicture.hpp:10: erreur: «HDC» has not been declared
MyPicture.hpp:11: erreur: «HDC» has not been declared
MyPicture.hpp:23: erreur: «HBITMAP» does not name a type
MyPicture.hpp:24: erreur: «COORD» does not name a type
MyPicture.hpp:25: erreur: «SIZE» does not name a type
MyPicture.hpp:26: erreur: «UINT» does not name a type
In file included from Game.hpp:5,
from Game.cpp:1:
Background.hpp:17: erreur: «HDC» has not been declared
In file included from Game.hpp:6,
from Game.cpp:1:
Player.hpp:11: erreur: «HDC» has not been declared
Player.hpp:14: erreur: «HDC» has not been declared
In file included from Game.cpp:1:
Game.hpp:11: erreur: «HWND» does not name a type
Game.hpp:12: erreur: ISO C++ forbids declaration of «HDC» with no type
Game.hpp:12: erreur: expected «;» before «*» token
Game.hpp:15: erreur: «DWORD» does not name a type
Game.cpp:3: erreur: «DWORD» does not name a type
Main.cpp:1:21: erreur: windows.h : Aucun fichier ou dossier de ce type
Dans le fichier inclus à partir de Background.hpp:3,
à partir de Game.hpp:5,
à partir de Main.cpp:2:
MyPicture.hpp:29:7: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Game.hpp:5,
à partir de Main.cpp:2:
Background.hpp:52:8: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Game.hpp:6,
à partir de Main.cpp:2:
Player.hpp:23:7: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Main.cpp:2:
Game.hpp:17:7: attention : pas de retour chariot à la fin du fichier
In file included from Background.hpp:3,
from Game.hpp:5,
from Main.cpp:2:
MyPicture.hpp:8: erreur: «UINT» has not been declared
MyPicture.hpp:10: erreur: «HDC» has not been declared
MyPicture.hpp:11: erreur: «HDC» has not been declared
MyPicture.hpp:23: erreur: «HBITMAP» does not name a type
MyPicture.hpp:24: erreur: «COORD» does not name a type
MyPicture.hpp:25: erreur: «SIZE» does not name a type
MyPicture.hpp:26: erreur: «UINT» does not name a type
In file included from Game.hpp:5,
from Main.cpp:2:
Background.hpp:17: erreur: «HDC» has not been declared
In file included from Game.hpp:6,
from Main.cpp:2:
Player.hpp:11: erreur: «HDC» has not been declared
Player.hpp:14: erreur: «HDC» has not been declared
In file included from Main.cpp:2:
Game.hpp:11: erreur: «HWND» does not name a type
Game.hpp:12: erreur: ISO C++ forbids declaration of «HDC» with no type
Game.hpp:12: erreur: expected «;» before «*» token
Game.hpp:15: erreur: «DWORD» does not name a type
Main.cpp:4: erreur: «LRESULT» does not name a type
Main.cpp:6: erreur: expected initializer before «WinMain»
Dans le fichier inclus à partir de MyPicture.cpp:1:
MyPicture.hpp:3:21: erreur: windows.h : Aucun fichier ou dossier de ce type
MyPicture.hpp:29:7: attention : pas de retour chariot à la fin du fichier
MyPicture.cpp:76:2: attention : pas de retour chariot à la fin du fichier
In file included from MyPicture.cpp:1:
MyPicture.hpp:8: erreur: «UINT» has not been declared
MyPicture.hpp:10: erreur: «HDC» has not been declared
MyPicture.hpp:11: erreur: «HDC» has not been declared
MyPicture.hpp:23: erreur: «HBITMAP» does not name a type
MyPicture.hpp:24: erreur: «COORD» does not name a type
MyPicture.hpp:25: erreur: «SIZE» does not name a type
MyPicture.hpp:26: erreur: «UINT» does not name a type
MyPicture.cpp:3: erreur: «UINT» has not been declared
MyPicture.cpp: In constructor «MyPicture::MyPicture(int, int, int, int)»:
MyPicture.cpp:5: erreur: «hBitmap» was not declared in this scope
MyPicture.cpp:5: erreur: «GetModuleHandle» was not declared in this scope
MyPicture.cpp:5: erreur: «MAKEINTRESOURCE» was not declared in this scope
MyPicture.cpp:5: erreur: «LoadBitmap» was not declared in this scope
MyPicture.cpp:6: erreur: «NULL» was not declared in this scope
MyPicture.cpp:8: erreur: «CoordDest» was not declared in this scope
MyPicture.cpp:8: erreur: «CoordSrc» was not declared in this scope
MyPicture.cpp:12: erreur: «SizeDest» was not declared in this scope
MyPicture.cpp:12: erreur: «SizeSrc» was not declared in this scope
MyPicture.cpp:14: erreur: «class MyPicture» has no member named «Colorkey»
MyPicture.cpp:18: erreur: «MB_OK» was not declared in this scope
MyPicture.cpp:18: erreur: «MessageBox» was not declared in this scope
MyPicture.cpp: At global scope:
MyPicture.cpp:23: erreur: variable or field «Print» declared void
MyPicture.cpp:23: erreur: «HDC» was not declared in this scope
MyPicture.cpp:23: erreur: «hDC» was not declared in this scope
MyPicture.cpp:35: erreur: variable or field «Erase» declared void
MyPicture.cpp:35: erreur: «HDC» was not declared in this scope
MyPicture.cpp:35: erreur: «hDC» was not declared in this scope
MyPicture.cpp:35: erreur: expected primary-expression before «&» token
MyPicture.cpp:35: erreur: «background» was not declared in this scope
MyPicture.cpp: In member function «void MyPicture::MoveSRC(int, int)»:
MyPicture.cpp:55: erreur: «CoordSrc» was not declared in this scope
MyPicture.cpp: In member function «void MyPicture::MoveDEST(int, int)»:
MyPicture.cpp:60: erreur: «CoordDest» was not declared in this scope
MyPicture.cpp: In member function «void MyPicture::ResizeDEST(int, int)»:
MyPicture.cpp:65: erreur: «SizeDest» was not declared in this scope
MyPicture.cpp: In member function «void MyPicture::SetColorKey(int, int, int)»:
MyPicture.cpp:70: erreur: «Colorkey» was not declared in this scope
MyPicture.cpp:70: erreur: «RGB» was not declared in this scope
MyPicture.cpp: In destructor «MyPicture::~MyPicture()»:
MyPicture.cpp:75: erreur: «hBitmap» was not declared in this scope
MyPicture.cpp:75: erreur: «DeleteObject» was not declared in this scope
Dans le fichier inclus à partir de Player.hpp:3,
à partir de Player.cpp:1:
MyPicture.hpp:3:21: erreur: windows.h : Aucun fichier ou dossier de ce type
MyPicture.hpp:29:7: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Player.hpp:4,
à partir de Player.cpp:1:
Background.hpp:52:8: attention : pas de retour chariot à la fin du fichier
Dans le fichier inclus à partir de Player.cpp:1:
Player.hpp:23:7: attention : pas de retour chariot à la fin du fichier
Player.cpp:40:2: attention : pas de retour chariot à la fin du fichier
In file included from Player.hpp:3,
from Player.cpp:1:
MyPicture.hpp:8: erreur: «UINT» has not been declared
MyPicture.hpp:10: erreur: «HDC» has not been declared
MyPicture.hpp:11: erreur: «HDC» has not been declared
MyPicture.hpp:23: erreur: «HBITMAP» does not name a type
MyPicture.hpp:24: erreur: «COORD» does not name a type
MyPicture.hpp:25: erreur: «SIZE» does not name a type
MyPicture.hpp:26: erreur: «UINT» does not name a type
In file included from Player.hpp:4,
from Player.cpp:1:
Background.hpp:17: erreur: «HDC» has not been declared
In file included from Player.cpp:1:
Player.hpp:11: erreur: «HDC» has not been declared
Player.hpp:14: erreur: «HDC» has not been declared
Player.cpp: In constructor «Player::Player(int, int)»:
Player.cpp:6: erreur: «RGB» was not declared in this scope
Player.cpp: At global scope:
Player.cpp:8: erreur: «HDC» has not been declared
Player.cpp:24: erreur: «HDC» has not been declared
s@ldon Messages postés 140 Date d'inscription samedi 1 novembre 2003 Statut Membre Dernière intervention 30 septembre 2009 3
2 avril 2008 à 16:55
Pas d'IA...quel domage...
Je te conseille de regarder le mien (en C++) si un jour, tu veux implémenter un joueur "ordinateur".
http://www.cppfrance.com/codes/PUISSANCE-OPENGGL-AVEC-IA-MIN_MAX-ALPHA-BETA_41137.aspx

Allez, les graphismes sont sympas...6/10
Rejoignez-nous