home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / BARNHART / SCENE2.CPP < prev    next >
C/C++ Source or Header  |  1993-11-21  |  1KB  |  51 lines

  1.  
  2. // scene2.cpp - This function sets up the second scene (or screen) of the game
  3.  
  4. // Andy Barnhart
  5. // This program is provided as a sample to accompany an article on graphics
  6. //    animation using C++
  7. // This seems to work for me and I hope it works for you. No other warranty
  8. //    is expressed or implied.
  9.  
  10. #include <so_all.hpp>
  11.  
  12. extern Player *player;
  13.  
  14. void Scene2( void);
  15.  
  16. void Scene2( void)
  17.     {
  18.  
  19.     if( !player) player = new Player("hero", 0, 0);
  20.  
  21.     AddWall("shortplat", 0, LEV(1), 1, 0);
  22.  
  23.     AddWall("brickv", 72,0, 2, 1);
  24.     AddCreeper("spidy",AddWall("platform", 72, 128, 2, 0));
  25.     AddWall("brickv", 72 + 256, 128, 2, 1);
  26.     AddWall("shortplat", 80+256, LEV(3));
  27.  
  28.     AddCreeper( "spidy", AddWall("brick", 0, LEV(6), (GMX+127)/128, 0),
  29.         336, GMX - 16);
  30.  
  31.     AddCreeper("spidy",AddWall("platform", 0, LEV(3), 2, 0));
  32.  
  33.     AddWall("platform", 80, LEV(4), 2, 0);
  34.  
  35.     AddDoor("door1", 100,128, 1)->OnTop( 128);
  36.  
  37.     AddWall("brickv", 620, LEV(1)+32, 4, 1);
  38.  
  39.     AddRungs("rungsv", 612, LEV(1) + 44, 4, 1);
  40.  
  41.     AddCreeper("spidy", AddWall( "platform",380, LEV(4)));
  42.     AddWall("block",0, LEV(6))->OnTop(LEV(6));
  43.     AddMotion("fire",32, LEV(6))->OnTop(LEV(6));
  44.     AddWall("block", 96, LEV(6))->OnTop(LEV(6));
  45.     AddMotion("fire", 128, LEV(6))->OnTop(LEV(6));
  46.     AddWall("block", 192, LEV(6))->OnTop(LEV(6));
  47.     AddMotion("fire", 224, LEV(6))->OnTop(LEV(6));
  48.     AddWall("block", 288, LEV(6))->OnTop(LEV(6));
  49.     ShowScene();
  50.     }
  51.