Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


krrice

Member Since 06 Jan 2013
Offline Last Active Mar 05 2013 06:32 PM

Topics I've Started

Error when destroying bitmap images

17 February 2013 - 07:43 AM

hey everyone, I am getting arror that I can't figure out. I am making a breakout clone and my error is when i exit the game. The error is

 

Unhandled exception at 0x56c807e5,Access violation reading location 0xfeef001a

 

  /*
         * The /GS security cookie must be initialized before any exception
         * handling targetting the current image is registered.  No function
         * using exception handling can be called in the current image until
         * after __security_init_cookie has been called.
         */
        __security_init_cookie();

        return __tmainCRTStartup();
}

 

I know it has something to do with destroying the bitmap images for my bricks because I can comment out the destroy bitmap code and no errors .

 

in main this is the code for generating the bricks:

 

for(int x = 0; x < bricksWide; x++)
        {
            Brick *brick = new Brick(brickImage, x * al_get_bitmap_width(brickImage), y * al_get_bitmap_height(brickImage), tint);
            brickObj.push_back(brick);
        }

 

and at the end of main this is the code for destroying the bitmaps:

 

for(iter = brickObj.begin(); iter != brickObj.end(); )
    {
        (*iter)->Destroy();
        delete (*iter);
        iter = brickObj.erase(iter);
    }

 

and my Destroy() function in my Brick class is:

 

void Brick::Destroy()
{
    if(image != NULL)
        al_destroy_bitmap(image);
}

 

 


Beginning Directx

17 January 2013 - 04:38 PM

Hi everyone, I want to start learning DirectX. So I purchased Introduction to 3D Game Programming with DirectX 11 by Frank Luna. Well I guess my laptops video card (Radeon HD 4250) doesn't fully support the code in the book. So i was wondering if I started learning DirectX 9 will what I learn transfer to 11 or will I be wasting my time? I plan on getting a new Laptop/PC soon but it will probably be a while.


Tile Map Collision

06 January 2013 - 05:22 PM

Hi everyone , I have this collision code and it gets updated at 60FPS. When I run the game it only has collision with the last 2 in the tile map.

i can't seem to figure out what is wrong.Any info will be appriciated.

 

 

Update Code

 

for(int i = 0; i < map.size(); i++)
	{
		for(int j = 0; j < map[i].size(); j++)
		{
			if(map[i][j] == 2)
			{
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