Thread: Sweet!

  1. #1
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001


    I'm sorry, I just must express my joy in writing a function that would normally take lots of attempts and debugging to get right, but it works now! First compile and run after switching up my whole pong program and it works!

    here it is (please don't laugh because it would be real simple for you to do )
    void InitBlocks()
    	int xcounter = 0;
    	int ycounter = 0;
    	BITMAP bm;
    	GetObject(blockstate1, sizeof(bm), &bm);
    	for(int x=0; x<=399; x++)
    		blocks[x].current_pic = &blockstate3;
    		blocks[x].health = 3;
    		blocks[x].height = bm.bmHeight;
    		blocks[x].width = bm.bmWidth;
    		if(lev1[xcounter][ycounter] == 1)
    			blocks[x].state = true;
    			blocks[x].state = false;
    		blocks[x].x = blocks[x].width * xcounter;
    		blocks[x].y = blocks[x].height * ycounter;
    		if(xcounter == 20) //20 will not be processed
    			xcounter = 0;

  2. #2
    I see no reason to laugh if it works and does exactly what you want it to do you have successfully created something of use

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Short & Sweet for a beginner
    By dispatch4599 in forum C++ Programming
    Replies: 5
    Last Post: 03-02-2008, 07:33 PM
  2. Sweet Sweet Caffinee
    By Thantos in forum A Brief History of
    Replies: 18
    Last Post: 12-14-2004, 12:22 PM
  3. It's So Sweet
    By TechWins in forum A Brief History of
    Replies: 12
    Last Post: 08-24-2003, 02:19 PM
  4. Everyone look at my totally sweet spaceship
    By Shadow12345 in forum Game Programming
    Replies: 4
    Last Post: 09-30-2002, 02:27 PM
  5. Sweet For Text Rpg's
    By rkjd2 in forum C++ Programming
    Replies: 3
    Last Post: 03-16-2002, 05:44 PM
Website Security Test