Screen-Smash - Test My Game!!!
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
Asimov, Lux,
Either, a) I am just plain crappy with google and finding answers to the great mystery that is full-screen in winapi orrrr
b) it's not as obvious to find those answers as you might think. Reason I went with this work around was that reason alone. I'd love to make it 'real' fullscreen and I can promise I have searched this stuff. Only answers I found led me to this stretched window cause apparently you have to go into some dev mode in windows to get access to true fullscreen and my attempts at that were, ummmm, messy.
The worst part is I bet this is an easy fix. But I've been digging for over a week and best I can find is info on resizing windows and making windows do certain things like be on top and stuffs.
Asimov, I am clueless when it comes to the art side of thngs. I know my way around photoshop, ish, but that's where my ability ends. I have a friend that works in the industry as an artist, but I doubt I'd get much useful advice out of him on making fire look decent. When you get some free time, help me out with making some cool fire effects instead of modelling me a zippo
For now, it's one, sad little four frame fire sprite that'll have to do the trick.
Either, a) I am just plain crappy with google and finding answers to the great mystery that is full-screen in winapi orrrr
b) it's not as obvious to find those answers as you might think. Reason I went with this work around was that reason alone. I'd love to make it 'real' fullscreen and I can promise I have searched this stuff. Only answers I found led me to this stretched window cause apparently you have to go into some dev mode in windows to get access to true fullscreen and my attempts at that were, ummmm, messy.
The worst part is I bet this is an easy fix. But I've been digging for over a week and best I can find is info on resizing windows and making windows do certain things like be on top and stuffs.
Asimov, I am clueless when it comes to the art side of thngs. I know my way around photoshop, ish, but that's where my ability ends. I have a friend that works in the industry as an artist, but I doubt I'd get much useful advice out of him on making fire look decent. When you get some free time, help me out with making some cool fire effects instead of modelling me a zippo
For now, it's one, sad little four frame fire sprite that'll have to do the trick.
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
Asimov,
This changes things yet again, but does not go into devmode. Still window'd. Probably still the same, but it uses system metrics to find your settings and make the window. Still going to have to dive into this devmode now and get my hands dirty, but try this, it might work.
This changes things yet again, but does not go into devmode. Still window'd. Probably still the same, but it uses system metrics to find your settings and make the window. Still going to have to dive into this devmode now and get my hands dirty, but try this, it might work.
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
This is what I am quite sure is true full-screen mode using devmode, and I actually got it working....
If the last one don't fix it, THIS should.
If the last one don't fix it, THIS should.
Last edited by thetoddfather on November 4th, 2012, 8:45 pm, edited 1 time in total.
Re: Screen-Smash - Test My Game!!!
Fullscreen isn't a WinAPI thing; it's a Direct3D thing. I challenged the board members to figure it out, and one of them did. I *think* it was walka, and he posted his code.
Chili
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
Thanks for putting me at least on the right track, at least I got true full-screen from your advice. Quite easy once I got your help.
And, at least that much of this cypher is decoded. Got me on the right track, but with an all new bag of problems and it's just not working. Guess when you load fullscreen with directx it just discards your cursors. So, now I have this. Spent around 5 hours straight attempting to understand where my cursors have gone.
So yahh, DirectX is fun... Cause all I've searched out seems to amount to zeroooo.
WM_SETCURSOR does zero. Tried somewhere in the region of 30 different ways to reload my old resource icons with 100% no effect what-so-ever, other than my computer crashing.
So, back to the old way, sorry Asimov.
And, at least that much of this cypher is decoded. Got me on the right track, but with an all new bag of problems and it's just not working. Guess when you load fullscreen with directx it just discards your cursors. So, now I have this. Spent around 5 hours straight attempting to understand where my cursors have gone.
So yahh, DirectX is fun... Cause all I've searched out seems to amount to zeroooo.
WM_SETCURSOR does zero. Tried somewhere in the region of 30 different ways to reload my old resource icons with 100% no effect what-so-ever, other than my computer crashing.
So, back to the old way, sorry Asimov.
Last edited by thetoddfather on November 4th, 2012, 8:45 pm, edited 1 time in total.
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
icons = cursors.
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
I am still trying to figure this out here.
Based on what I'm reading, fullscreen mode isn't compatible with hardware cursors, and there seems no way of forcing them. This means having to use the directx routines, which I'm trying to figure out.
Tried this, didn't seem to change anything.
It seems I need to use these funcitons because my cursors are resource files.
The third param in SetCursorProperties needs to be a Pointer to an IDirect3DSurface9 interface. This parameter must point to an 8888 ARGB surface (format D3DFMT_A8R8G8B8).
I'm a little, and by a little I mean a whoooolllllee lot, confused about how to go about loading my resource files to this format surface, then create a pointer to that surface and pass it to SetCursorProperties. Not even sure if that will solve this issue either.
Currently I am using a slightly modified method to how the framework loads its cursor with/
They are 32 bit images @ 256x256.
Kinda at a loss on how to proceed and there is precious little online for seeing how others have implimented this with any success.
Based on what I'm reading, fullscreen mode isn't compatible with hardware cursors, and there seems no way of forcing them. This means having to use the directx routines, which I'm trying to figure out.
Tried this, didn't seem to change anything.
Code: Select all
gfx.pDevice->SetCursorPosition(mouse.GetMouseX(),mouse.GetMouseY(),D3DCURSOR_IMMEDIATE_UPDATE );
gfx.pDevice->ShowCursor(TRUE);
Code: Select all
HRESULT D3DXLoadSurfaceFromResource(
_In_ LPDIRECT3DSURFACE9 pDestSurface,
_In_ const PALETTEENTRY *pDestPalette,
_In_ const RECT *pDestRect,
_In_ HMODULE hSrcModule,
_In_ LPCTSTR pSrcResource,
_In_ const RECT *pSrcRect,
_In_ DWORD Filter,
_In_ D3DCOLOR ColorKey,
_Inout_ D3DXIMAGE_INFO *pSrcInfo
);
iDirect3DDevice9->SetCursorProperties(0, 0, surface));
I'm a little, and by a little I mean a whoooolllllee lot, confused about how to go about loading my resource files to this format surface, then create a pointer to that surface and pass it to SetCursorProperties. Not even sure if that will solve this issue either.
Currently I am using a slightly modified method to how the framework loads its cursor with/
Code: Select all
HCURSOR hamCur2 = (HCURSOR)LoadImage(hInst,MAKEINTRESOURCE(IDC_HIT_CURSOR),IMAGE_CURSOR ,256,256,LR_CREATEDIBSECTION);
Kinda at a loss on how to proceed and there is precious little online for seeing how others have implimented this with any success.
Re: Screen-Smash - Test My Game!!!
Hi Todfather,
In my game I use animated sprites as cursors. I assumed this is what you are doing?
In my game I use animated sprites as cursors. I assumed this is what you are doing?
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
- thetoddfather
- Posts: 338
- Joined: October 1st, 2012, 9:53 pm
- Location: Canada
Re: Screen-Smash - Test My Game!!!
Lux, I'm not sure what you mean? Just use an image loaded and the print it every frame? That's sort of how I did the flame over the lighter, which is why it's currently the only thing showing up, however there's a fair bit of lag as you move around on the screen. And that would mean having all my cursor files now sitting in the directory, cause I don't know how to take these existing cursor files and transfer the image data to a bmp or surface.
Asimov, no, ideally I would just like to use my existing cursors, however, switching to fullscreen in order to solve the issues you had has made them disappear. If I used animated sprites there would still be that lag I assume. So are you currently just taking an animated sprite and printing it every frame at mouse xy?
In any event, the custom cursors I've made in my resource file are what I'd like to put on the screen. I have no idea how to take that resource info and create a surface with that cursor image on it.
Sucks that they didn't allow you to keep your cursor in fullscreen. Doesn't make sense to me. Worked fine in windowed mode stretched to fullscreen dimensions, why kill it for true fullscreen and force you to create new ones using surface pointers and crap. From what I've read they are difficult to make look good and often flicker. AND you have to update its location constantly. I'm sure there was a reason, but kinda sucks. Think if I can't figure out some way to do this here I'll have to go back to the old way, which also kinda blows.
Asimov, no, ideally I would just like to use my existing cursors, however, switching to fullscreen in order to solve the issues you had has made them disappear. If I used animated sprites there would still be that lag I assume. So are you currently just taking an animated sprite and printing it every frame at mouse xy?
In any event, the custom cursors I've made in my resource file are what I'd like to put on the screen. I have no idea how to take that resource info and create a surface with that cursor image on it.
Sucks that they didn't allow you to keep your cursor in fullscreen. Doesn't make sense to me. Worked fine in windowed mode stretched to fullscreen dimensions, why kill it for true fullscreen and force you to create new ones using surface pointers and crap. From what I've read they are difficult to make look good and often flicker. AND you have to update its location constantly. I'm sure there was a reason, but kinda sucks. Think if I can't figure out some way to do this here I'll have to go back to the old way, which also kinda blows.