From: Matt Mullins Date: Sun, 12 Jul 2009 20:30:14 +0000 (-0500) Subject: Merge branch 'master' of koopa.local:~ivan/Desktop/Game X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=b2ec57b13cdbda91b938c50972cc3c7cac1e0b64;p=IvanGame.git Merge branch 'master' of koopa.local:~ivan/Desktop/Game --- b2ec57b13cdbda91b938c50972cc3c7cac1e0b64 diff --cc Level.cpp index 2ba05e9,5e2af20..d2bed66 --- a/Level.cpp +++ b/Level.cpp @@@ -3,15 -3,31 +3,35 @@@ Level::Level(SDL_Surface* screen) : mBackground(0), - mScreen(screen) + mScreen(screen), + mVikingAnimation("viking.anim"), + mSunAnimation("sun.anim") { + // load background mBackground = LoadImage("Backgrounds/bg.bmp"); + + // load sprites + Sprite vikings1(screen, "viking1", &mVikingAnimation); + vikings1.setPosition(10,30); + vikings1.setSpeed(1); + + Sprite vikings2(screen, "viking2", &mVikingAnimation); + vikings2.setPosition(350,300); + vikings2.setSpeed(1.5); + + Sprite sun(screen, "sun", &mSunAnimation); + sun.setPosition(480,50); + sun.setSpeed(1); + + mSprites.push_back(vikings1); + mSprites.push_back(vikings2); + mSprites.push_back(sun); } +Level::~Level() +{ +} + void Level::DrawIMG(SDL_Surface *img, int x, int y) { SDL_Rect dest;