| View previous topic :: View next topic |
| Author |
Message |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Tue Mar 27, 2012 6:43 am Post subject: Move Direct-X based Window |
|
|
Well, ive got a kinda weird problem.
It is called Worms 4. (Dont ask why, but) I like to play my games in windowed mode and google showed me a way to turn that game into window mode by editing a config file. Well, the problem is the position of the window. As for the WinApi (which is the only form of programming i actually know, ive never learned Direct X) the position of the Window is:
Window:
left: 97
right: 1383
top: 77
bottom: 1127
--------------------
Client Area:
left: 0
right: 1270
top: 0
bottom: 1014
--------------------
Size(window): 1270 x 1014
Size(client): 1270 x 1014
As you might have guessed, the vertical resolution of my monitor is smaller than 1383 (which is a kind of weird number in general).
Other than most of the games i know, simply moving the Window using SetWindowPos has no effect (in fact, it shortly moves the window, instantly moves it back when the next frame is drawn though). Searching for the Position of the Window using Cheat engine did not work either (i found some values which constantly seems to show the position, but whenever i changed them, something that was not caught by "find out what writes to this adress" instantly reset those values). Well, i guess it has something to do with Direct X and the way its drawing the frames, but as allready mentioned, i never learned Direct X and thus do not have a clue how to approach this Problem.
Well, any advises or clues how to move that freaking window onto my desktop? |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Tue Mar 27, 2012 3:28 pm Post subject: |
|
|
isn't there anything else you can change in the config? _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Wed Mar 28, 2012 5:04 am Post subject: |
|
|
unfortunately not. The config files are not like an ini file where every possible key is listed, but rather a text fire that looks like a chain of command line parameters. Just have a look on yourself:
| Code: | Default.cfg:
/W:800
/H:600
//FS
/TRIGGERSINVISIBLE
/STARTMENU:WXFE.MainMenu
/GAMEOVERMENU:WXFE.MainMenu
/CONFIG:launcher.cfg
/////////////////////////////////////////////////////////////
//_UNCOMMENT_LINES_BELOW_FOR_MANUAL_CAMERA_AND_SCREENSHOTS
//_MANUAL_CAMERA_TRIGGERED_BY_M_BUTTON
//_SCREENSHOT_TRIGGERED_BY_PRINTSCREEN_BUTTON
//ALLOWSCREENSHOTS
//MANUALCAMERA
/////////////////////////////////////////////////////////////
//_UNCOMMENT_LINES_BELOW_FOR_EXTRA_DEBUGGING_INFO
//NET_LOG
//AITEST
|
At this point, note that uncommenting "/FS" to "//FS" forced the program into windowed mode. Never would have guessed that... (like, normal games have a parameter to be executed in windowed mode... but a full screen parameter?)
| Code: | launcher.cfg:
/W:1575 /H:1050 /REFRESH:60 /ENABLEPORTFORWARDING |
At this file, note how the W and H (i asume they are ment to be the resolution since they used to be the last resolution ive played on) have no effect at all; the program is simply started with the resolution i chose in the launcher.exe - even if i dont use the launcher but directly execute the game. Also note how the W and H from the default.cfg have no effect either.
Also tried to start Worms using the cmd prompt with /help, but that parameter had no effect. Now here comes a extremly weird thing:
when i start the game, using the cmd prompt with the /FS parameter (which should, then, execute the program in full screen mode) the game FIRST goes into full screen mode, it doesnt accept any buttons anymore though. Getting it out of the focus unsing alt+tab brings it into windowed mode again, focusing brings it into full screen mode (and eventually crashs it xD)
However, as this proofs that the config file is a chain of command line parameters, i do asume that there is more that i could do in this config files, but as i dont know any of those parameters, nor how to find them out, i simply cant.
ah and thanks if you read all this 
Last edited by Corruptor on Wed Mar 28, 2012 5:13 am; edited 1 time in total |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Wed Mar 28, 2012 5:12 am Post subject: |
|
|
tried changing "/CONFIG:launcher.cfg " to "//CONFIG:launcher.cfg " ?
and try running worms in compatibility mode and disable visual themes (perhaps it doesn't like the extra thick borders) _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Thu Mar 29, 2012 7:50 am Post subject: |
|
|
changing /CONFIG to //CONFIG. Effect: now he really takes the resolution given in the default.cfg file (thanks alot about that )
disabling visual themes (at least the check box in the exes properties) had no effect though, neither a visual one, nor can i move the window now. The client area also is still is big as the actuall window, although i can clearly see the borders of the window Oo
one odd thing i noticed: when moving the window, and then looking at its position again, there is standing random, yet determined, crap in it:
Window:
left: -858993460
right: -858993460
top: -858993460
bottom: -858993460
--------------------
Client Area:
left: -858993460
right: -858993460
top: -858993460
bottom: -858993460
--------------------
Size(window): 0 x 0
Size(client): 0 x 0
I asume that this is some kind of cleaned-up state (although FFFFCCCC is a weird number for a clean up), since i have to search for the window again to find the new one. So i actually assume that moving the window causes it to be destroyed and a new one to be created. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Thu Mar 29, 2012 8:10 am Post subject: |
|
|
try adding this to your config
play around with it _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Fri Mar 30, 2012 5:32 am Post subject: |
|
|
| unfortunately it seems to have no effect at all. I asume there is no real way to search for command line parameters? I mean, i would have some kind of epic luck if every valid command line parameter would be stored in an array or something like that... |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Fri Mar 30, 2012 5:37 am Post subject: |
|
|
I doubt in an array, but it's likely that they are stored close to eachother in memory _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Fri Mar 30, 2012 8:39 am Post subject: |
|
|
Searching for a know Parameter (/FS) i really found a list of parameters beeing surrounded by a lot of other weird strings, partly beeing error messages, leftovers from the ps2 version (wth Oo) and some directiories to files sutch as pdb or cpp files that definitively do NOT exist:
| Code: | | 2F 48 54 54 50 00 00 00 2F 43 4F 4E 46 49 47 00 2F 52 45 46 52 45 53 48 00 00 00 00 45 52 52 4F 52 00 00 00 57 41 52 4E 00 00 00 00 41 4C 4C 00 2F 4C 4F 47 00 00 00 00 2F 48 00 00 2F 57 00 00 2F 46 53 00 2F 57 49 4E 00 00 00 00 44 65 66 61 75 6C 74 2E 63 66 67 |
translating to
| Code: | | /HTTP.../CONFIG./REFRESH....ERROR...WARN....ALL./LOG..../H../W../FS./WIN....Default.cfg |
As there are a few know commands (config, H, W, FS) i asume that those are the parameters. (also, WIN seems to bring it into windowed mode too). Unfortunately i dont see any parameter for the actuall position. Seriously, direct x is a bi****... |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Fri Mar 30, 2012 8:43 am Post subject: |
|
|
This isn't directx (at least not dx5 or later)
you can just set the position to what you wish in dx when it's windowed.
it's the game itself thats being a dick _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Fri Mar 30, 2012 12:15 pm Post subject: |
|
|
if its the game, how would it be able to move the window without calling
- CreateWindowExA/W
- MoveWindow
- SetWindowPos
? (Didnt break on any of these functions) |
|
| Back to top |
|
 |
|