Thread: need help

  1. #16
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by Barjor
    It might be excelent code but I'm not gonna find out without proper formating
    Same here. Without correct formatting, no one will help you, and the thread will turn out just like this one

  2. #17
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    WHAT DO U WANT ME TO DO?

    Quantrizi i dont think u got much to offer i mean

    116 (4.63 posts per day)

    since march 2002, must be bull-shet posts like these u post here

  3. #18
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Nope......have a lot of free time.........
    WHAT DO YOU WANT ME TO DO?
    Just like everyone else, edit your first post and insert the code tags, is it that hard......and it's harder to read un-tagged code, than it is w/ tags.

  4. #19
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    I don't think he understand

    //code

    isn't the same as [code] and [/code]
    When you use REAL code tags, if retains indents and spaces, when you don't, they're lost and the hierarchy of your code is lost... making it ugly.

    Code:
    Look at me! I can use tabs! 			!;
    And many spaces         See?
    Without code tags, the exact same thing looks like the following:
    Look at me! I can use tabs! !;
    And many spaces See?

  5. #20
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    ok how do make em?

  6. #21
    Unregistered
    Guest
    Code:
    Code:
    
    

  7. #22
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    I forgot to do the samething on a similar post, except there were far less linesin the code example, recently...all you have to do is change your line of "//code:" to "[*CODE*]" and then change your line of "//end of code" to "[*/CODE*]". Other than that I can't help you, because I'm not as advanced as you.

    EDIT: I had to insert the *s because without them that part of my post would be put into "CODE" format.
    Last edited by TechWins; 04-17-2002 at 04:15 PM.

  8. #23
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    To start the code you type

    Code:
    Code:
    
    
    And to end the code you type
    Last edited by Barjor; 04-17-2002 at 04:14 PM.

  9. #24
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    Code:
    testing...

  10. #25
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    ok then here it comes again:


    Code:
    
    
    #include <allegro.h> // You must include the Allegro Header file
    
    
    
    int main(int argc, char *argv[])
    {
    
    
    	
    	allegro_init(); // Initialize Allegro
    	install_keyboard(); // Initialize keyboard routines
    
    	
    	
    	set_color_depth(16); // Set the color depth
    							
    	set_gfx_mode(GFX_AUTODETECT, 640,480,0,0); // Change our graphics mode to 640x480
                 BITMAP*bild;
         bild=load_bitmap("c:\\temp\\ship.bmp",0);
    
    	BITMAP *my_pic; //Declare a BITMAP called my_pic
    	my_pic = load_bitmap("c:\\temp\\rocket.bmp", NULL); // Load our picture
    
    	BITMAP *buffer; //Declare a BITMAP called buffer.
    
    	/************************************
    	Here is a new function. As you
    	can see, we have already declared
    	a BITMAP called 'buffer'. This bitmap
    	will be our 'buffer' which will make
    	things look smooth.
    	We obviously don't want to load a 
    	bitmap into its memory - we are just
    	going to be using it to be drawing bitmaps
    	to it.
    
    	So we use the function
    	   create_bitmap();
    
    	create_bitmap takes two parameters,
    	   create_bitmap(width, height);
    	and will just create an empty bitmap
    	in that memory location.
    
        Pretty simple. So, lets create a bitmap
    	with the dimensions of the screen
    	************************************/
    	buffer = create_bitmap(640,480); //Create an empty bitmap.
    
    	while(!key[KEY_ESC])//If the user hits escape, quit the program
    	{
    
    
    		if(key[KEY_RIGHT])// If the user hits the right key, change the picture's X coordinate
    		{
    			my_pic_x ++;// Moving right so up the X coordinate by 1
    		}
    		 if(key[KEY_LEFT])// Ditto' - only for left key
    		{
    			my_pic_x --;// Moving left, so lower the X coordinate by 1
    		}
    		 if(key[KEY_UP])// If the user hits the up key, change the picture's Y coordinate
    		{	                  for(int w=500;w>0;)
    { 
    
    
    
    putpixel(buffer,my_pic_x,w+10,0);
    putpixel(buffer,my_pic_x,w--,500);
    
      }
    		 if(key[KEY_DOWN])// Ditto' - only for down
    		{
    			my_pic_y ++;// Moving down, so up the Y coordinate by 1
    		}
    
    
    		acquire_screen();// Get the screen
    		draw_sprite(buffer, bild, my_pic_x, my_pic_y);//Draw the picture to the buffer
    	    blit(buffer, screen, 0,0,0,0,640,480);//Draw the buffer to the screen
    		release_screen();// Release it
    
     }
    
    
    
    	destroy_bitmap(bild);//Release the bitmap data
    	destroy_bitmap(buffer);//Release the bitmap data
    
    
    	return(0);// Exit with no errors
    }
    END_OF_MAIN();

  11. #26
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    pode has graduated Code Tags 101 with a C++ (little joke), and now to fix ur code *what's the cause of posting your code anyways?*

  12. #27
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    i thought i made that clear that i have problems making beams
    coming from my ship when u press up_key!

  13. #28
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Sorry......I ain't to familiar with Allegro, but wouldn't the VK stuff work......or no

  14. #29
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    What? How come I can't create code tags?

    &#91;code]
    Hmm?
    &#91;/code]

  15. #30
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    MM I don't really see anything weird either. Sorry that I given you all this hassel and not be able to help you..I will look at it again later.

Popular pages Recent additions subscribe to a feed