![]() |
|
blit crash further down the road! |
khristina yer
Member #5,795
May 2005
![]() |
ok I've got a simple piece of code that shows a similar problem.
I've included the source and image in the attachment. |
CGamesPlay
Member #2,559
July 2002
![]() |
Why is this an Allegro Development thread? Did you mean Programming Questions? When you pass the background pointer to the load_image_depth_one function, you pass a copy of it. When that function changes it, main never knows what the new address is. You need to have the function return the new BITMAP* (BITMAP* load_image_depth_one()), or accept a pointer to a BITMAP*: void load_image_depth_one(BITMAP** bitmap) { *bitmap = load_bitmap("etc", NULL); } Called using:load_image_depth_one(&background); Please refrain from posting your programming questions to this section of the forum in the future. -- Ryan Patterson - <http://cgamesplay.com/> |
khristina yer
Member #5,795
May 2005
![]() |
Quote: When you pass the background pointer to the load_image_depth_one function, you pass a copy of it. Oh of course, what was I thinking? No wonder it doesn't work right. I'm sorry for posting in the wrong forum, I'll post in the right one next time. I fix that code and it worked correctly. |
|