Author | Message | Time |
---|---|---|
KkBlazekK | Hello, I'm trying to increase the resolution of a fullscreen application that uses DirectDraw. I've been able to do it, but the screen goes black. I'm thinking its because I'm creating a new object and injecting it, and thats taking over. I'm not trying to increase the draw area, or anything, I'm just trying to create some extra room to add some 'hud info'. Has anyone here successfully made starcrafts resolution larger? I remember reading Stwong? doing the same thing so I'm pretty sure its possible. Am I doing something wrong by the method I talked about in the first paragraph, if so, does anyone have any suggestions on a better way to do this? | January 4, 2006, 5:30 AM |
Kp | Bear in mind that Starcraft was designed to run at 640x480, and raising the resolution will make everything else appear a bit smaller. IMO, you'd be better off drawing directly on Starcraft's canvas (and leaving it at 640x480), or using ScWnd and just putting the HUD info in a normal MS-Windows window that you float near the window containing Starcraft. | January 4, 2006, 5:38 AM |
KkBlazekK | Yeah, I had thought about that and figured that there would be a point where I have room, and its still nice and visible. It's a shame the starcraft screen is so small. Removing even a small part of the screen can be blinding. | January 4, 2006, 8:52 AM |
KkBlazekK | Okay, I've disassembled starcraft, and done some scans on the memory and figured out where the locations are for the resolutions, I'm now trying to change them before they are executed and I wrote the following program, which isn't working. [code] #include <windows.h> #include <stdlib.h> #include <stdio.h> int main() { HWND star = 0; DWORD prcID; HANDLE prcHandle; printf("Starcraft Resolution Changer\n\n"); while (star == 0) { star = FindWindow(NULL, "Brood War"); } GetWindowThreadProcessId(star, &prcID); prcHandle = OpenProcess(0x1F0FFF, false, prcID); while (1) { WriteProcessMemory(prcHandle, (LPVOID)0x0014F6FC, "600", 4, NULL); WriteProcessMemory(prcHandle, (LPVOID)0x0015F700, "800", 4, NULL); } return 0; } [/code] Is there an error in the code, or am going about this all wrong? | January 6, 2006, 10:33 AM |
Skywing | This is a complicated project that will require significant modifications to SC, btw. As I recall from my work on ScWnd, you will probably need to do something alone the lines of these: - change the resolution set via ChangeDisplaySettings - change the window size - change the size of the appropriate surfaces created via DirectDraw - scale the blts to the main display surface appropriately (up to your chosen resolution from 640x480) [optional, depending on what you are planning on doing] - scale all input events (back down to 640x480 coordinates) [or silently discard all input events for coordinates outside of this range, depending on what you are planning on doing] I would expect that you will need to inject a dll into Starcraft to do this as changes as extensive as this will be impractical to do via simply patching in manually chosen opcodes. There are a fair number of other modifications you will need to do in order to get this to work with Starcraft, especially the battle.snp chat channel / game selection UI. | January 6, 2006, 2:49 PM |
iago | [quote author=Kp link=topic=13774.msg140415#msg140415 date=1136353128] or using ScWnd and just putting the HUD info in a normal MS-Windows window that you float near the window containing Starcraft. [/quote] That's what I've been saying to him! :) | January 6, 2006, 5:03 PM |
KkBlazekK | Well, as much as I want to pursue this, I'm just doing to draw it onto the window, now that Kp suggested it. I might try moving the window so that it on the the screen, like X-Fire does since I don't really like playing while in DxWnd, or anything not full-screened. I plan to continue trying later on, when I have more free time, so thank you very much Skywing, I'm sure everything you provided will be invaluable. Thanks Kp, if all else fails I guess I'll do it the classic way. ::) | January 7, 2006, 7:48 AM |
Skywing | [quote author=Blaze link=topic=13774.msg140924#msg140924 date=1136620129] Well, as much as I want to pursue this, I'm just doing to draw it onto the window, now that Kp suggested it. I might try moving the window so that it on the the screen, like X-Fire does since I don't really like playing while in DxWnd, or anything not full-screened. I plan to continue trying later on, when I have more free time, so thank you very much Skywing, I'm sure everything you provided will be invaluable. Thanks Kp, if all else fails I guess I'll do it the classic way. ::) [/quote] Remember that unless you synchorinze with Starcraft's redraw cycle you're going to have a lot of ugly flicker that way. | January 7, 2006, 6:47 PM |