Page 1 of 1
Apply my patch please?
Posted: Wed Nov 23, 2011 3:06 pm
by i30817
So i noticed you're working on exult again...
Can my patch for the alternate drag mod be applied?
Re: Apply my patch please?
Posted: Thu Nov 24, 2011 4:56 am
by i30817
If you aren't gonna to, is it possible to crosscompile exult on linux 64 bits to windows?
Re: Apply my patch please?
Posted: Thu Nov 24, 2011 1:57 pm
by Dominus
It's possible to crosscompile. I don't know how but I'm sure someone made a tutorial.
As for your patch... I can't implement it since it likely needs some polish that I don't know how.
Re: Apply my patch please?
Posted: Fri Nov 25, 2011 1:08 am
by i30817
Isn't marzo working again?
Re: Apply my patch please?
Posted: Fri Nov 25, 2011 6:46 am
by Dominus
He is but he is working on the real important issue of the disappearing objects.
Re: Apply my patch please?
Posted: Sat Nov 26, 2011 10:22 am
by i30817
The polish... for IFDEF away for other platforms?
Or something else?
I don't code C++ (barely code even) so i don't know much, even about the preferred structure of your code. I just grabbed the SDL keyboard state like a barbarian and had my way with it.
Re: Apply my patch please?
Posted: Sat Nov 26, 2011 10:31 am
by i30817
Also, yeah the patch has some polish for the menu indexes...
It seemed there was some offset uglyness there at least.
gumps/GameplayOptions_gump.cc
I think (but don't quite remember) that it was that that the array that contained the positions
1) not all filled, ie, there was a gap with no position that was not used.
2) not actually in order, that is, the positions didn't descend the gump as the array index increased (or any order).
Re: Apply my patch please?
Posted: Sat Nov 26, 2011 10:34 am
by i30817
So i changed the rowy array:
-static const int rowy[] = { 4, 16, 124, 28, 40, 52, 64, 76, 88, 100, 112, 148, 136 };
+static const int rowy[] = { 4, 16, 28, 40, 52, 64, 76, 88, 100, 112, 124, 136, 148 };
and adjusted the subsequent uses of it.
Re: Apply my patch please?
Posted: Tue Nov 29, 2011 9:42 am
by Dominus
It's mostly the shuffling around of the settings you are doing. Also that gump is already full. adding another option makes it unreasonable big for the default resolution of 320x200.
I also don't like your middle mouse button idea. The world seems to have moved away from the middle button to thumb buttons, scroll wheel and so forth.
I'd rather like it that you'd need to hold down a modifier key (ctrl, shift, alt) to drag without confirmation.
Re: Apply my patch please?
Posted: Tue Nov 29, 2011 1:06 pm
by i30817
The "middle mouse button" is what is in the description on sourceforge because that was originally a RFE before i decided to take matters into my own hands. The file itself uses CTRL (left and right) to disable the auto merging of stacks.
The gump... i originally wanted to put it in "Gameplay Options" but as you said, it was too full in low res.
So i put it in "Misc Options". It seems to have space enough.
The settings saving was needed for it to be a option in the gump (and to persist). I'm not sure what you mean if not that.
Re: Apply my patch please?
Posted: Tue Nov 29, 2011 1:11 pm
by i30817
So notice i'm not altering the original behavior unless the "Misc Options" option is set. If it is, the game automerges the stacks if you drop them on top of eachother (and if in the backpack i think). If you press CTRL while the option is on, you can split the stacks again.
This mostly works due to the original excellent code for the stacks merging that i didn't touch, just slightly reworked the initial condition.
Re: Apply my patch please?
Posted: Tue Nov 29, 2011 1:15 pm
by i30817
The "If you press CTRL while the option is on, you can split the stacks again." should be
"If you press and hold CTRL while the option is on and you drop a stack, you can split the stacks again"
It's a modifier, not a toggle.
Re: Apply my patch please?
Posted: Tue Nov 29, 2011 2:29 pm
by Dominus
hmm, did you alter the original patch and put it somewhere? because on first glance the original patch still messes with the paperdoll setting (only available on BG with SI installed)
Re: Apply my patch please?
Posted: Tue Nov 29, 2011 3:16 pm
by i30817
Ah that.
I did it because of the reordering i did above of the this array; it's still the same:
-static const int rowy[] = { 4, 16, 124, 28, 40, 52, 64, 76, 88, 100, 112, 148, 136 };
+static const int rowy[] = { 4, 16, 28, 40, 52, 64, 76, 88, 100, 112, 124, 136, 148 };
...
- if (sman->can_use_paperdolls() && (GAME_BG ||
- Game::get_game_type() == EXULT_DEVEL_GAME))
- buttons[id_paperdolls] = new GameplayEnabledToggle(this, colx[3], rowy[12], 59,
- paperdolls);
...
+
+ if (sman->can_use_paperdolls() && (GAME_BG ||
+ Game::get_game_type() == EXULT_DEVEL_GAME))
+ buttons[id_paperdolls] = new GameplayEnabledToggle(this, colx[3], rowy[11], 59,
+ paperdolls);
And moved that block to the end.
The unordered, non linearly accessed array was disturbing my OCD.
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 12:16 pm
by i30817
Ok, the 1000$ question. Do you want me to remake the patch without the gump array moving around?
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 3:09 pm
by Dominus
Finally took a look and it seems to work fine. At least the part when you set the misc option to split stacks via ctrl. I don't have a middle mouse button so I can't check this part. I'm a bit confused about the middle mouse button thing when it does what
I'm thinking whether your patch could be changed so the alternative drag mode is always available when using ctrl and the setting in the misc option reverses it so the alternate drag method is the default drag and with ctrl it splits.
So maybe word that option to "default to alternate drag'n'drop" (and further explanation in the docs), default being no.
Could you do that? I'll champion that then. I'd only need to test whether it has any effect on Exult Studio work.
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 4:17 pm
by i30817
There is no middle mouse button part. I abandoned that part when i relized the middle mouse button was already in use by exult. (Besides, this is better).
I'll see if i can get up to speed with diff again to do the changes you want.
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 4:51 pm
by marzo
@Dominus: in many mouses, you can 'click' the mouse wheel and it acts as the middle button. In some others (depends on OS and drivers), pressing left+right buttons together does the same.
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 5:11 pm
by Dominus
Thanks i3 and sorry for the misunderstandings
@Marzo, I need to investigate this on OS X. Currently I'm using the Magic Trackpad which isn't ideal to begin with with Exult movements but a third click is out of question
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 5:36 pm
by i30817
Exult is building.
Should i attach the patch on sourceforge when it is finished or should i just give you a link to the diff?
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 5:45 pm
by i30817
"Default to alternate drag'n'drop:" didn't fit, so i changed to
"Alternate drag'n'drop:"
Ok?
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 5:53 pm
by Dominus
Sounds good. You might have to give me the link as the patch tracker might not allow you to attach anything anymore.
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 5:55 pm
by i30817
Here is a pastebin link with the reworked patch (you can download it in the link there)
http://pastebin.com/8Lm1P9iQ
Re: Apply my patch please?
Posted: Wed Nov 30, 2011 5:59 pm
by i30817
This link is prob better since it has a better name when you download. Remove the .txt and patch
http://pastebin.com/Jhb3hL7U
Re: Apply my patch please?
Posted: Thu Dec 01, 2011 12:04 am
by Dominus
Applied
Re: Apply my patch please?
Posted: Thu Dec 01, 2011 3:00 am
by i30817