I'm working on my game engine again, and I got it to the point where it compiles. However, when it runs the window does some really strange stuff. The x increase, and the width and height decrease until it can't get any smaller, and it goes off of the screen to the right. Running the debugger, it almost immediately says that there's a SEGFAULT, attributing it to a call to sprintf, but I never used that function and the debugger doesn't take me to the line where it's being called. Does anyone know what's causing this?
I'll post the code if I need to, but it's a little more than a thousand lines split into 9 files.
Now it's calling a SIGTRAP when the program exits. It still does the weird resizing thing. I think the SEGFAULT went away when I played with how images were stored.
Why do you call MoveWindow in orly_windows.h on line 81?
Also,you are handling WM_SIZE incorrectly. Change window.height=LOWORD(wparam); to window.height=HIWORD(lparam); in WM_SIZE case. I think the same problem exists in WM_MOVE handler..
Well, MoveWindow is definitely the issue - I commented it out and it stopped doing weird stuff. But, when it was uncommented and the WM_SIZE and WM_MOVE handlers were fixed, it did the same thing except that it went down instead of right... Maybe I should remove MoveWindow altogether? The only reason I had it was to make it so that one could simply type: