QUOTE(Lord_Jeremy @ Sep 19 2006, 09:37 PM)
That's good news! If it's not too much trouble, a list of what additional libraries you used (and where I could find them) would be very helpful.
Besides Windows API functions and linking to some Storm functions, none whatsoever! The only place I really needed to use Windows API functions was in injecting SCMLoader.qdp into the Starcraft process; more on that further down. As far as I know, any other direct use of the Windows API wasn't really actually needed.
QUOTE
I'm not sure I understand the true nature of this program. I can't imagine why it needs to access the Starcraft process, unless it's an inline editor. Let me rephrase that as a direct question: Does SCMLoader load the map and its extra data directly into the Starcraft process while it's running or does it just produce a "doctored" map? Based on what you've said I'm now getting the idea that it loads the extra data relevant to the map by hooking the Starcraft map loading functions (whatever they may be) and injecting your own data path. If this is true, then I need to go back to my C++ for Dummies Idiot Mac Users book and hope it has a chapter for "Starcraft" because I have no idea how the executable functions in regards to map loading.
SCMLoader hooks 4 functions in Storm (only 2 of which are actually needed, though) and does various processing and occasionally changes parameters before passing the data to the real Storm functions. Those 2 that are needed are the ones for opening archives and opening files from archives. Also, as DiscipleOfAdun mentioned, it calls a couple of internal functions of Starcraft to unload/load some other stuff (iscript.bin, image.dat, GRPs, LO* files; things like that).
QUOTE
Damn straight! Those functions, while not the most ideal I ca think of, would certainly be the easiest to implement. I might have to do some research into the SCM/MPQ data fork, as I seem to remember those commands can't function with certain data formats (IE encrypted or non-linear data produces a lot of errors). And in case you didn't get my meaning by the "Damn straight" line, I finish what I start. If it is within my ability, I will port this.
Well, if you can get what I mentioned to be able to work and get it so that you are able to successfully hook the two required Storm functions (the ones we would call SFileOpenArchive and SFileOpenFileEx) and maybe even find (or have someone find) the addresses to those other two functions to call, then the rest will be easy in comparison, since it is mostly just C/C++ code and not a lot of calls to the Windows API, so not so hard to port.
QUOTE
I'd agree with you except... um... what is a ".qdp" and what does it have to do with the process tree? I'm hoping that it is the equivalent of a Daemon in that it's a background process that hooks onto other processes. Other than that, I see clear skies and smooth sailing ;-)
[right][snapback]564309[/snapback][/right]
As DiscipleOfAdun mentioned, it is the file extension used for MPQDraft Plugins. It is simply a DLL with a different extension on the file with specific functions available in it for MPQDraft to call. Basically all of the code for SCMLoader gets compiled into SCMLoader.qdp. Though there are separate SCMloader.exe and SCMLoader_Configuration.exe files, they are little more than just custom versions of the program with Windows that is called rundll32. You can actually run SCMLoader's self-patcher and configuration apps directly using Windows' rundll32 with the commands "rundll32 SCMLoader.qdp,RunPatcher" and "rundll32 SCMLoader.qdp,RunConfigure" In addition, it still supports being loaded through MPQDraft, hence the .qdp file extension.
Hmm, as mentioned further up, the only place I actually needed to directly use Windows API functions was in injecting SCMLoader.qdp into the Starcraft process. This is specific to Windows and has no remote chance of working on anything else (well, possibly WINE if they implement it). In addition to that, the code for hooking functions is specific to Windows programs, even though it may not necessarily need to call any API functions at all to help with any part of it. It deals with things like the format of .exe files in Windows and some things with changing stuff in the actual compiled code as well. Anyway, those parts of the code most likely would be of no use at all to you, because of it being Windows and x86 specific.