Advertisement
Guest User

game.cpp

a guest
Sep 20th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.17 KB | None | 0 0
  1. #include "LogManager.h"
  2. #include "Clock.h"
  3. #include "GameManager.h"
  4. #include "GraphicsManager.h"
  5. #include "Position.h"
  6. #include "Utility.h"
  7.  
  8. #include <iostream>
  9. #include <string>
  10. #include <ctime>
  11. #include <sstream>
  12.  
  13. #ifdef CYGWIN
  14. #   include <ncurses/curses.h>
  15. #else
  16. #   include <curses.h>
  17. #endif
  18.  
  19.  
  20. int main(){
  21.     /*GameManager& game = GameManager::getInstance();
  22.     game.startUp();
  23.     game.populateWorld();
  24.     game.run();
  25.     game.shutDown();*/
  26.  
  27.  
  28.     GraphicsManager& gm = GraphicsManager::getInstance();
  29.     LogManager& log = LogManager::getInstance();
  30.     Position pos(3, 3);
  31.     log.logWithTime(LOG_LEVEL_DEBUG, "Starting up GraphicsManager.");
  32.     int result = gm.startUp();
  33.     log.logWithTime(LOG_LEVEL_DEBUG, "Grabbing result: " + Utility::intToString(result));
  34.     if (result < 0){
  35.         log.logWithTime(LOG_LEVEL_DEBUG, "Encountered an error.");
  36.         gm.shutDown();
  37.         return 0;
  38.     }
  39.     log.logWithTime(LOG_LEVEL_DEBUG, "Drawing character in RED");
  40.     gm.drawCharacter(pos, 'a', COLOR_RED);
  41.     log.logWithTime(LOG_LEVEL_DEBUG, "Swapping buffers.");
  42.     gm.swapBuffers();
  43.     log.logWithTime(LOG_LEVEL_DEBUG, "Shutting down.");
  44.     gm.shutDown();
  45.     log.logWithTime(LOG_LEVEL_DEBUG, "COMPLETE!");
  46.     return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement