I'm going nuts!
Started by gardon, Mar 04 2006 10:29 PM
11 replies to this topic
#1
Posted 04 March 2006 - 10:29 PM
Could someone please tell me why I have the same code in two different functions but it only works for one? If I try to load the bitmap in the Menu class it won't run, but it will in the Engine class.
IT will compile no matter what, it just depends if it runs or not.
take a look "http://massive-war.com/k.rar" if you can.
Also, I'm trying to make it so that it will revert back to the menu screen if the escape key is pressed. Why the fuck won't it work?
Sorry, normally I don't ask questions like these, but after 2+ hours of frustration and wasted time, I have no other choice.
Thanks again,
Jason
IT will compile no matter what, it just depends if it runs or not.
take a look "http://massive-war.com/k.rar" if you can.
Also, I'm trying to make it so that it will revert back to the menu screen if the escape key is pressed. Why the fuck won't it work?
Sorry, normally I don't ask questions like these, but after 2+ hours of frustration and wasted time, I have no other choice.
Thanks again,
Jason
#2
Posted 05 March 2006 - 12:23 AM
There is only one call to loadfontandcolor between the two call to loadbitmap. Could this cause the problem ? Remove it, move the loadbitmap call. Give more infos.
Note that your Graphic constructor initialize SDL multiple times too. Don't seem to be the problem here. I can't build it without SDL lib.+
M
Note that your Graphic constructor initialize SDL multiple times too. Don't seem to be the problem here. I can't build it without SDL lib.+
M
#3
Posted 05 March 2006 - 08:17 AM
:P I initialized SDL multiple times. What I wanted to do was make it so it could handle graphics on a different level, but forgot about the old graphics class I used (didn't realize it initialized SDL in the graphics class)
Thans for your time,
Jason
Thans for your time,
Jason
#4
Posted 05 March 2006 - 09:14 PM
What about the st upid:
such and such.exe has encountered an error and needs to close. Tell Microsoft about this problem!
You know... THAT error. Does anyone know what it means and how I can make it stop fucken coming up every time I terminate my program? (It only happens when i exit my program)
Thanks!
Jason
such and such.exe has encountered an error and needs to close. Tell Microsoft about this problem!
---------- --------------- -------------- --Debug-- --Send Report-- --Don't send-- ---------- --------------- ---------------
You know... THAT error. Does anyone know what it means and how I can make it stop fucken coming up every time I terminate my program? (It only happens when i exit my program)
Thanks!
Jason
#5
Posted 05 March 2006 - 09:33 PM
That's usually the result of a pointer exception, i.e. trying to dereference an uninitialized or NULL pointer. Run your program under a debugger to catch it and figure out where it's coming from.
reedbeta.com - developer blog, OpenGL demos, and other projects
#6
Posted 05 March 2006 - 09:46 PM
gardon: you can catch all win32-exceptions yourself and loose the dialog. but i don't see that as being a big point in itself, as it only "hides" the bugs.
#7
Posted 06 March 2006 - 04:05 AM
The problem is probably that you are not releasing the SDL correctly.
..Maybe would be useful if you sit down for a moment and learnt the basics of debugging applications :)
..Maybe would be useful if you sit down for a moment and learnt the basics of debugging applications :)
#8
Posted 06 March 2006 - 04:52 AM
Ok now it won't even compile because it gives me the windows errors on execution (I take that back, it does compile but won't run)
I figure once I find out once and for all what's causing this I can stop asking these questions.
Basically all I did was change the bitmap I was loading and it didn't work. the path and everything was good, but it wouldn't start. Then when I put the old bitmap in it still doesn't work.
(when i say put in I mean that I swapped the file names I input via the program)
Take a look...here! <http://massive-war.com/k.rar
Thanks,
Jason
I figure once I find out once and for all what's causing this I can stop asking these questions.
Basically all I did was change the bitmap I was loading and it didn't work. the path and everything was good, but it wouldn't start. Then when I put the old bitmap in it still doesn't work.
(when i say put in I mean that I swapped the file names I input via the program)
Take a look...here! <http://massive-war.com/k.rar
Thanks,
Jason
#9
Posted 06 March 2006 - 04:57 AM
I know what the problem is... I think
during debugging it stops under the graphics.h file under the function <LoadBitmap>
It messes up at the transparency thing, with SDL_SRCCOLORKEY
but it's the same as in any other app I've developed, so what the fuck si the problem?
during debugging it stops under the graphics.h file under the function <LoadBitmap>
It messes up at the transparency thing, with SDL_SRCCOLORKEY
but it's the same as in any other app I've developed, so what the fuck si the problem?
#10
Posted 06 March 2006 - 05:08 AM
Ok this is fucken gay. It seems to be that the bitmap will only accept file names of "Images/m.bmp". Why woudl this be? Why can't I put in any other name for it? It's only accepting m.bmp, and nothing else.
Stupid
Stupid
#11
Posted 06 March 2006 - 05:21 AM
Okay, please don't call things 'fucken gay'. A bit of profanity now and then's not a big deal, but that's pushing it. As for your question, I haven't looked at your code, but try stepping through the file-loading function with a debugger and make sure nothing is stomping on the string that contains the filename.
reedbeta.com - developer blog, OpenGL demos, and other projects
#12
Posted 07 March 2006 - 01:27 AM
Or, try setting the current working directory to some default value at when you start your application. I've had a similar problem. In debug mode my current working directory was set to where the exe was, in release mode it was set to something else. So try that...
- TripleBuffer
- Me blog
- Me blog
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












