Handmade Hero»Forums»Code
Connor
52 posts
It's been so long ;)
Weird lines overlaying gradient.
I am not new to handmade hero, but I just started following along a couple of weeks ago. Up to this point I have been noticing weird lines on in the window. They only appear when the window is not full-screened. I have tried running Casey's code and I got the same result. Is this happening to anyone else?

Here is a picture of it: http://i.imgur.com/yCKiTLI.png

- Connor
3 posts
Weird lines overlaying gradient.
Edited by Runaway Rabbit on
I don't think there is a bug in your code.

I think what you are seeing is StretchDIBits trying to shrink the bitmap you're handing it to fit the size of the window you're blitting it to. Casey will fix the problem on Day 024 @ 20:57.

In the meantime, if it bothers you, you could futz with your CreateWindowEx call to be something like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
CreateWindowEx(0,
               WindowClass.lpszClassName,
               "Handmade Hero",
               WS_OVERLAPPEDWINDOW|WS_VISIBLE,
               CW_USEDEFAULT,
               CW_USEDEFAULT,
               (ResolutionX + SomeValue),
               (ResolutionY + SomeValue),
               0,
               0,
               Instance,
               0);


Then replace SomeValue with whatever the size of the window border is.