squall_leonhart
The Great Gunblade Wielder
Cyberman just WTF'd me.
K so, how does this release by Aristotle differ from the lost-source-code 6.1.4? Is one technically better than the other?
Yes, it's true that the currently available version of the source code just supports 4x textures. That was one of the reasons why I doubted that we are working on the most recent code. Which has been confirmed in the meantime. But concerning the hires size support this is very easy to fix.Mudlord just confirmed it. This version of the plugin only has the ability to load textures up to 4x the original texture size.
Try it by downsizing any large texture from my newest pack to 256x256 or 128x128 (it depends on what the original texture size is) and let me know if it appears in game.
int FindScaleFactor(ExtTxtrInfo &info, TxtrCacheEntry &entry)
{
int scaleShift = -1;
// load hires textures with original size
if( info.height == entry.ti.HeightToLoad && info.width == entry.ti.WidthToLoad )
{
scaleShift = 0;
}
// load hires textures with 2x size
else if (info.height == entry.ti.HeightToLoad*2 && info.width == entry.ti.WidthToLoad*2 )
{
scaleShift = 1;
}
// load hires textures with 4x size
else if (info.height == entry.ti.HeightToLoad*4 && info.width == entry.ti.WidthToLoad*4)
{
scaleShift = 2;
}
[B] // load hires textures with 8x size
else if (info.height == entry.ti.HeightToLoad*8 && info.width == entry.ti.WidthToLoad*8)
{
scaleShift = 3;
}
// load hires textures with 16x size
else if (info.height == entry.ti.HeightToLoad*16 && info.width == entry.ti.WidthToLoad*16)
{
scaleShift = 4;
}
// load hires textures with 32x size (although I don't know if that makes sense...)
else if (info.height == entry.ti.HeightToLoad*32 && info.width == entry.ti.WidthToLoad*32)
{
scaleShift = 5;
}[/B]
info.scaleShift = scaleShift;
return scaleShift;
}
Your approach should be ok. The only requirement should be that you don't use the background layer - which you didn't. Painting the hires textures on the background layer will prevent them from showing up in the game. That was an experience I had to make at coding HighResEaser.The save method I use in Photoshop is: Merge Visible, CTRL-S. (oh, and I never use/allow a background layer, not sure if it matters though, I just don't like locked "background layers")
...
// crc64a = 0x0000000058E2333F if crc=58E2333F
uint64 crc64a = entry.dwCRC;
// I think the intention was to shift the crc 8bytes to the left but for that not <<32 but <<20 has to be used
// crc64a <<= 32;
// crc64a = 0x58E2333F00000000
crc64a <<= 20;
// crc64b = 0x58E2333F00000000
uint64 crc64b = crc64a;
// crc64a = 0x58E2333FFFFFFF20 if format is 2 and size is 0
crc64a |= (0xFFFFFF00|(entry.ti.Format<<4)|entry.ti.Size);
// crc64a = 0x58E2333FDFB44820 if palcrc is DFB4484F, format is 2 and size is 0
crc64b |= ((entry.dwPalCRC&0xFFFFFF00)|(entry.ti.Format<<4)|entry.ti.Size);
...
Just change the function FindScaleFactor() in TextureFilters.cpp like shown below & all hires textures of gitech will show up:
Why not make it allocate a scalefactor without limits (so you can get even crazier tex limits)? GlideHQ does this just fine......
I added the repaired scaling code, in this release too. Why it didn't work for me like this, will never be known.![]()
The source actually compills now, the fog effect is fixed, texture caching fully works (No longer re-loads graphics, for now, it's not an option and you will need a nice amount of RAM, like 256MBs or more. I will add an option for it later.), texture handling is improved thanks to Microdev, and I'm about to make that release shortly after I post this. I will edit this post with it. I still need to get pre-loading going..Then texture loading will no longer halt the games, which gets annoying. Atleast now it only happens once.
Gitech: I'm not sure if I'm doing something wrong and it just keeps working for me my way, but even your smaller graphics won't load for me.. Like the one of the the new Yellow sun, for the time of day at the top of the screen, even when I made it smaller. I took the one from the old pack, resizing it to the size of your new sun, and it showed up on this plugin..I even copied the sun graphic from the new pack, pasted it over the old sun from the official pack, resizing it to your new pack, and it shows up.. Even if something is wrong with the plugin, and I have yet to see where this problem is, I am 80% sure something is up with your newer graphics. Unless my Thinkpad is that picky or the plugin..I don't know. I guess I'll removing error handling or something so they load. I'll keep trying.
Cyberman: Thanks..But that totally confused me. :huh: I'm going to keep releasing it this way, keep backups of the current source on laptop and Flash Memory Card, and any past releases can stay online at the hosting site. I get mixed up making bunches of copy's, but it is better to do that, I agree. Now this source change, logging..? Don't need that. Anyone can read over what is changed. also, commenting this source will take forever. >.> I'm just going to keep working at it, and probably put comments in as I learn areas.
Mudlord: Thanks for that information on Structures, that helped me a bit with some areas in the rendering section.![]()
Btw. a compile under DirectX9 works by far better for me than DirectX8.
No it doesn't, it causes VM Allocation issues in the emulator whenever you open the plugin select screen on both versions of pj64
No, not for me. At least I don't see any error popping up, any strange behavior, unusual high memory usage or what so ever...
But it might be different for you. That's why I wrote that it works best for me.
New bug to report: Full Screen Flicker
With your latest build I get "screen flicker" while in full screen sometimes. Most noticeable/reliable location this occurs is during the "intro movie" for Cornell's quest.
TTYL,
Jay
Edit: Ok, I was using 1360x768 for full screen. I just changed it to 1920x1080 and then back to 1360x768 and it went away. (?)
But, I let the game begin and I found a new problem while on the deck of the ghost ship.
The texture surfaces are flickering, whether in full screen or windowed mode.
Any ideas?
Pic:
![]()
That's so odd.
Any one know why this happens/what this is?
And great work Microdev on the speedups, and scale fix. My last post did sound confusing..I meant, I didn't seem to have a scaling problem. Anyway, it's working great now.![]()