Recent Posts
None | 7 sec ago
Java | 17 sec ago
Java | 1 min ago
C++ | 2 min ago
Lua | 2 min ago
None | 2 min ago
C++ | 2 min ago
Lua | 2 min ago
None | 3 min ago
None | 3 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 9th of Feb 2010 09:19:02 PM Download | Raw | Embed | Report
  1. //-----------------------------------------------------------------
  2. // Game File
  3. // C++ Source - Herhaling.cpp - version 2008 v2_06
  4. // Copyright Kevin Hoefman - kevin.hoefman@howest.be
  5. // http://www.digitalartsandentertainment.be/
  6. //-----------------------------------------------------------------
  7.  
  8. //-----------------------------------------------------------------
  9. // Include Files
  10. //-----------------------------------------------------------------
  11. #include "Herhaling.h"                                                                                                                                                         
  12.  
  13. //-----------------------------------------------------------------
  14. // Defines
  15. //-----------------------------------------------------------------
  16. #define GAME_ENGINE (GameEngine::GetSingleton())
  17.  
  18. //-----------------------------------------------------------------
  19. // Herhaling methods                                                                                                                                                           
  20. //-----------------------------------------------------------------
  21.  
  22. Herhaling::Herhaling()  : m_btnActiePtr(0),m_txtTellerPtr(0),m_txtNoemerPtr(0)                                                                                                                                                                 
  23. {
  24.         // nothing to create
  25. }
  26.  
  27. Herhaling::~Herhaling()                                                                                                                                                                        
  28. {
  29.         // nothing to destroy
  30. }
  31. void Herhaling::GameInitialize(HINSTANCE hInstance)                    
  32. {
  33.         AbstractGame::GameInitialize(hInstance);
  34.         GAME_ENGINE->SetTitle("Herhaling");                                    
  35.         //GAME_ENGINE->RunGameLoop(true);
  36.  
  37.         // Stel de optionele waarden in
  38.         GAME_ENGINE->SetWidth(640);
  39.         GAME_ENGINE->SetHeight(480);
  40.     GAME_ENGINE->SetFrameRate(50);
  41. }
  42. void Herhaling::GameStart()
  43. {
  44.         m_BreukPtr = new Breuk(0,0);
  45.  
  46.         m_btnActiePtr = new Button("Actie");
  47.         m_btnActiePtr->SetBounds(10,10,125,25);
  48.         m_btnActiePtr->AddActionListener(this);
  49.         m_btnActiePtr->Show();
  50.  
  51.         m_txtTellerPtr = new TextBox("");
  52.         m_txtTellerPtr->SetBounds(150,10,125,25);
  53.         m_txtTellerPtr->AddActionListener(this);
  54.         m_txtTellerPtr->Show();
  55.  
  56.         m_txtNoemerPtr = new TextBox("");
  57.         m_txtNoemerPtr->SetBounds(150,40,125,25);
  58.         m_txtNoemerPtr->AddActionListener(this);
  59.         m_txtNoemerPtr->Show();
  60.  
  61.        
  62.        
  63. }
  64. void Herhaling::GameEnd()
  65. {
  66.         delete m_BreukPtr;
  67.         delete m_btnActiePtr;
  68.         delete m_txtTellerPtr;
  69.         delete m_txtNoemerPtr;
  70. }
  71. void Herhaling::MouseButtonAction(bool isLeft, bool isDown, int x, int y, WPARAM wParam)
  72. {
  73. }
  74. void Herhaling::MouseMove(int x, int y, WPARAM wParam)
  75. {
  76. }
  77. void Herhaling::CheckKeyboard()
  78. {
  79. }
  80. void Herhaling::KeyPressed(TCHAR cKey)
  81. {
  82. }
  83. void Herhaling::GamePaint(RECT rect)
  84. {
  85. }
  86. void Herhaling::GameCycle(RECT rect)
  87. {
  88. }
  89.  
  90. void Herhaling::CallAction(Caller *CallerPtr)
  91. {
  92.         if(CallerPtr == m_btnActiePtr)
  93.         {
  94.                 GAME_ENGINE->MessageBox(String("De teller is ") + m_BreukPtr->GetTeller + " en de noemer is " + m_BreukPtr->GetNoemer);
  95.         }
  96.         GAME_ENGINE->Repaint();
  97. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: