Handmade Hero»Forums»Code
Elias
3 posts
code link email issue/win32 layer misunderstanding
Edited by Elias on
I'm two weeks behind since I stopped watching over the holidays, but Google searching the forums didn't show a mention of anyone else noticing this small bug, and I even just pre-ordered and downloaded the code (something I was wanting to do soon anyway) to see if it is fixed in the current version and it isn't yet. In the StretchDIBits call that puts the game on the screen, when you changed it to have a 10-pixel offset from the top left so there's some black there, you forgot to add the offset to the target width and height, so right now you're actually shrinking the screen slightly.

It's obviously not shipping code, but you did say it was kind of nice to do the 1-to-1 pixels during development.

Also, the purchase confirmation email for the pre-order doesn't actually mention Handmade Hero anywhere. Would be nice to have that to make it easier to find later. : )
Mārtiņš Možeiko
2562 posts / 2 projects
code link email issue/win32 layer misunderstanding
Edited by Mārtiņš Možeiko on
StretchDIBits function expects width and height of target rectangle, not offset of bottom right corner. So nothing is shrunken on screen. You just need to specify top left X and Y coordinates where to start draw rectangle (our offsetX/Y) and no need to worry about coordinate of bottom right corner.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
code link email issue/win32 layer misunderstanding
shared_prophet
In the StretchDIBits call that puts the game on the screen, when you changed it to have a 10-pixel offset from the top left so there's some black there, you forgot to add the offset to the target width and height, so right now you're actually shrinking the screen slightly.


As per the documentation for StretchDIBits (http://msdn.microsoft.com/en-us/l...esktop/dd145121%28v=vs.85%29.aspx), it uses top-left corner and width/height, not min-max, so you do not need to change the parameters when you offset the top-left corner.

Also, the purchase confirmation email for the pre-order doesn't actually mention Handmade Hero anywhere. Would be nice to have that to make it easier to find later. : )
Really? That is odd - it is supposed to say Handmade Hero in multiple places, actually. Can you send me a screenshot of the e-mail you received? ([email protected])

Thanks,
- Casey
12 posts
None
code link email issue/win32 layer misunderstanding
There are only two mails "From: Handmade Hero <[email protected]>"
One is the receipt for the order, where it is mentioned multiple times, and the other one contains the link, where it is not mentioned.
You should easily find them when you search for the sender.
Elias
3 posts
code link email issue/win32 layer misunderstanding
Edited by Elias on
mmozeiko
StretchDIBits function expects width and height of target rectangle, not offset of bottom right corner. So nothing is shrunken on screen. You just need to specify top left X and Y coordinates where to start draw rectangle (our offsetX/Y) and no need to worry about coordinate of bottom right corner.


cmuratori
As per the documentation for StretchDIBits (http://msdn.microsoft.com/en-us/l...esktop/dd145121%28v=vs.85%29.aspx), it uses top-left corner and width/height, not min-max, so you do not need to change the parameters when you offset the top-left corner.

Ah, that makes sense. Sorry! : )

cmuratori
Also, the purchase confirmation email for the pre-order doesn't actually mention Handmade Hero anywhere. Would be nice to have that to make it easier to find later. : )
Really? That is odd - it is supposed to say Handmade Hero in multiple places, actually. Can you send me a screenshot of the e-mail you received? ([email protected])

Thanks,
- Casey

Will do. The receipt mentions it once, but the email with the code link (the one I actually want to find again : ) doesn't.

sinsizer
There are only two mails "From: Handmade Hero <[email protected]>"
One is the receipt for the order, where it is mentioned multiple times, and the other one contains the link, where it is not mentioned.
You should easily find them when you search for the sender.

The ones I got do not show that as the return address. And if I decide to go grab the code again in a year and a half I might have trouble remembering to search for the "sendowl" address. I worked around that for myself, but thought Casey would like to know.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
code link email issue/win32 layer misunderstanding
Looking into the mail situation now. It appears to be a bug in SendOwl. I have notified them and hopefully it will get resolved soon...

- Casey
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
code link email issue/win32 layer misunderstanding
In theory, this should be fixed now. It was a SendOwl problem.

- Casey
Elias
3 posts
code link email issue/win32 layer misunderstanding
More like SendOwl of Shame, amirite? : )