help with introduction to c++ part 10

62729b540737c9893b8005b272fa96fa
0
Leaf 101 Oct 15, 2013 at 13:48

hello.

i am stuck with the part 10 assignment in the link. i try to get multiple tanks. the link to the assignment is this one: http://devmaster.net/posts/2852/introduction-to-c-with-game-development-part-10-arrays this is my code, in spots i dont know what has to go there i wrote ‘cheeseballs’, which was the first word that came into my mind for some reason

 // Template, major revision 3
// IGAD/NHTV - Jacco Bikker - 2006-2009

#include "string.h"
#include "surface.h"
#include "stdlib.h"
#include "template.h"
#include "game.h"

using namespace Tmpl8;


Sprite* MySprites[300];
int Xcoords[300];
int Ycoords[300];

void Game::Init()
{
// put your initialization code here; will be executed once
	for (int index = 0; index < 300; index++)
	MySprites[index] = new Sprite( new Surface("assets/ctankbase.tga"), 16 );
}


void Game::Tick( float a_DT )
   {
       m_Screen->Clear( 0 );
		
		for (int index = 0; index < 300; index++)
		MySprites[index]->Draw( cheeseballs , cheeseballs, m_Screen );

0 Replies

Please log in or register to post a reply.

No replies have been made yet.