Hi there,

This is my first time posting here so I would first like to apologize for any mistake I may make.

The reason I'm here is because I am designing an assignment in which I draw a .bmp to the screen and the image is supposed to float inside without leaving the window. I am not here asking for someone to do the assignment for me, just to help me out with some tips. I've had classes in c++ but for some reason win32 programming feels like c++ with an accent.

here is my code (by the way I am learning with Beginning game programming: second edition)

void Game_Run()
    //this is called once every frame
    //do not include your own loop here!

    static int x = 0, y = 0;
    RECT rect;
    GetClientRect(global_hwnd, &rect);

    if (rect.right > 0)
        DrawBitmap(global_hdc, "asteroid.bmp", x, y);
		if (x > rect.right)
			x = 0;

the code was first set up to draw an infinite amount of pictures at random places and this is what I have so far, any tips will be appreciated.

8 Years
Discussion Span
Last Post by __avd
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.