The Dink Network

Reply to Re: WDE 2.0

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 21st 2024, 08:02 PM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
Seseler,

Here is how my beta build currently does it (searches for AI upscaled graphics, then a .bmp, then a fastfile starting in the dmod folder, and then falling back to the dink folder). It will allow for upscaling of hardness as well, but that doesn't do anything on the game engine side.

I peeked at the Dink source code today and almost stroked out... looks like a full rewrite.

shared_ptr<GRAPHICQUE> searchForGraphic(string location, D2D1_COLOR_F color_key) {
shared_ptr<GRAPHICQUE> que = nullptr;
for (const auto& path : { dmod_path, dink_path }) {
#ifdef AI_UPSCALE
que = gfx->ReadGraphicFromStore(path, location); //find potential AI upscaled graphic
if (que) return que;
#endif
fs: ath bmp_file = path / location;
if (fs::exists(bmp_file)) { //if the file is there, load it.
que = gfx->loadBitmapFromPath(bmp_file.wstring().c_str(), color_key);
}
else {
//if not, find it in the dir.ff
auto bData = extractBitmap(bmp_file);
if (bData.size) {
que = gfx->LoadBitmapFromData(bData, color_key);
}
}
if (que) {
que->path = bmp_file;
que->isUpscaled = false;
return que;
}
if (path == dink_path) break; //this is the dink path, no further searching required
}
return que;
}