Updated the original post. Finished putting all images into a nice sprite that DGSweeper will use. Also came up with a solution to the main complaint DGSweeper got - waiting for this interface to load from Tip.It:
Let me explain exactly what that interface is.
For starters, it's literally a browser. The page you're seeing is simply one I created here on Tip.It. So, while you're waiting for it to "Connect to Tip.It", it's actually loading that webpage in the browser.
Why did I go with a browser? Well, DGSweeper uses several languages. These languages are:
- AutoHotkey *Gasp*
- AHK is primarily used. It requires the least work for the same outcome. It handles creating all of the objects, downloading the resources, and calls on the other languages and resources when needed. It uses GDI+ to draw DGSweeper. Since large operations can be quite slow with AHK, it calls on other languages to do the heavy lifting. All libraries ad functions used are written by myself, apart from a few GDI+ functions that I still use from Tic's GDI+ library.
This is used for quickly analyzing the captured bitmaps to check for maps and party details. If it decides a map is present, it'll also locate the player location of the player markers. It is also used to filter out the background of the text of your party details once they are found so that it can be drawn to the legend window. The C++ is compiled to machine code which AHK can use and execute quickly. All the C++ is also written and compiled myself.
Well, that's MageUK's department.
So, there you are. You now know the basics of how DGSweeper works.
Now, back to the problem... The loading of that interface. I figured I'd do like it does with the resources - only download the new page if it's changed and store it on the user's HDD. Easy enough. However, it'd still have to connect to Tip.It for the images. DGConnect would no longer work though because Ajax wouldn't do cross-domain requests.
So, my solution is that I'll pack the webpage into the resource.dll that DGSweeper downloads. With it will be all of the images the webpage uses. It'll extract all of the images, then the page, and then open the page in the browser. DGConnect will be handled through AHK.
How does the browser interact with DGSweeper? Well, it's actually very clever. When you do something that requires AHK, such as changing certain options, it technically navigates to a new page. For example, dgs://_dgs_open_saved_maps. It means dgs://function/parameters. AHK detects this event, cancels it, and then calls the requested function.