(04-18-2015, 09:31 AM)Blyss Sarania Wrote: [ -> ]Perhaps the easy way would be to get gregory to change the hack where 1 = full on and 2 = half on.
Yes, that would be a viable solution.
Actually either of us can do it to. Just CTRL-F for userhacks_round_sprite or whatever it's called and find the conditional statement and switch the 1 and 2.
here is where the round offset hack is initialized based on the set of conditional statements.
Code:
if (PRIM->FST) {
if ((m_userhacks_round_sprite_offset > 1) || (m_userhacks_round_sprite_offset == 1 && !m_vt.IsLinear())) {
if (m_vt.IsLinear())
RoundSpriteOffset 'true'();
else
RoundSpriteOffset 'false'();
do you know what the function
m_vt.IsLinear() does ?
Quote: Perhaps the easy way would be to get gregory to change the hack where 1 = full on and 2 = half on. Other than that, conditional statement may be the only way.
Personnally I would prefer to keep the order of the hack
1/ source code is more logical this way.
2/ if code is extended in the future, it will be horrible.
IsLinear check the filtering type (linear or nearest) of the current primitive set.
Then I guess the only way is to add conditionals or leave it backwards in the UI.
Is it that costly to add a condition for the UI?
Edit: by the way I'm trying a new hack for the opengl renderer
(04-18-2015, 03:36 PM)gregory Wrote: [ -> ]Edit: by the way I'm trying a new hack for the opengl renderer
could it be ported to DX11 ?
Yes but not by me
It requires a geometry shader so DX10. So far results are interesting but we lose a lots on the quality, I need to check the Y axis because everything is reverted so maybe I wrongly compute some values.
I don't understand what the problem is. Can't you just convert the values when using theApp.GetConfig and theApp.SetConfig functions?
According to the current code:
Code:
CheckDlgButton(m_hWnd, IDC_STRETCH_SPRITE, theApp.GetConfig("UserHacks_stretch_sprite", 0));
theApp.SetConfig("Userhacks_stretch_sprite", (int)IsDlgButtonChecked(m_hWnd, IDC_STRETCH_SPRITE));
You can do something like this:
Code:
CheckDlgButton(m_hWnd, IDC_STRETCH_SPRITE, convert(theApp.GetConfig("UserHacks_stretch_sprite", 0)));
theApp.SetConfig("Userhacks_stretch_sprite", convert((int)IsDlgButtonChecked(m_hWnd, IDC_STRETCH_SPRITE)));
(04-18-2015, 03:36 PM)gregory Wrote: [ -> ]Is it that costly to add a condition for the UI?
Edit: by the way I'm trying a new hack for the opengl renderer
It's not costly, just kind of ugly.