home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
WTJ9403.ZIP
/
BARNHART
/
SCENE2.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-21
|
1KB
|
51 lines
// scene2.cpp - This function sets up the second scene (or screen) of the game
// Andy Barnhart
// This program is provided as a sample to accompany an article on graphics
// animation using C++
// This seems to work for me and I hope it works for you. No other warranty
// is expressed or implied.
#include <so_all.hpp>
extern Player *player;
void Scene2( void);
void Scene2( void)
{
if( !player) player = new Player("hero", 0, 0);
AddWall("shortplat", 0, LEV(1), 1, 0);
AddWall("brickv", 72,0, 2, 1);
AddCreeper("spidy",AddWall("platform", 72, 128, 2, 0));
AddWall("brickv", 72 + 256, 128, 2, 1);
AddWall("shortplat", 80+256, LEV(3));
AddCreeper( "spidy", AddWall("brick", 0, LEV(6), (GMX+127)/128, 0),
336, GMX - 16);
AddCreeper("spidy",AddWall("platform", 0, LEV(3), 2, 0));
AddWall("platform", 80, LEV(4), 2, 0);
AddDoor("door1", 100,128, 1)->OnTop( 128);
AddWall("brickv", 620, LEV(1)+32, 4, 1);
AddRungs("rungsv", 612, LEV(1) + 44, 4, 1);
AddCreeper("spidy", AddWall( "platform",380, LEV(4)));
AddWall("block",0, LEV(6))->OnTop(LEV(6));
AddMotion("fire",32, LEV(6))->OnTop(LEV(6));
AddWall("block", 96, LEV(6))->OnTop(LEV(6));
AddMotion("fire", 128, LEV(6))->OnTop(LEV(6));
AddWall("block", 192, LEV(6))->OnTop(LEV(6));
AddMotion("fire", 224, LEV(6))->OnTop(LEV(6));
AddWall("block", 288, LEV(6))->OnTop(LEV(6));
ShowScene();
}