As there is no dev forum and I dislike mailinglists (which seems to be off-topic/deserted anyway), this might be the right place.
Just for fun ( ) here are two diffs to add Action14 and the recent AdvVarAct2 operators for shifting.
The Action14 diff actually just makes TTDP ignore the action, but that way grf authors do not need to add extra code for TTDP compatibility when using Action14. Wrt. TTDP Action14 better fits into external configuration programs anyway.
The patches were piped through the compilefarm (thanks rubidium) and have been tested (for the win version).
Action 14 and AdvVarAct2
Moderator: TTDPatch Moderators
Action 14 and AdvVarAct2
- Attachments
-
- ttdp_action14.diff
- ignore action 14
- (1.68 KiB) Downloaded 150 times
Last edited by frosch on 07 Aug 2010 07:06, edited 1 time in total.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Action 14 and AdvVarAct2
Can you attach a reference test grf for action14?
And don't we have a right shift already?
And don't we have a right shift already?
Re: Action 14 and AdvVarAct2
'BaseMod Presets' (not to confuse with 'BaseMod') from http://bananas.openttd.org/newgrf/ contains an Action14. (For download click on the download counter, not the name)
There is only a rotate, no shift. (well, and a division)
There is only a rotate, no shift. (well, and a division)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Action 14 and AdvVarAct2
varadjust of action2?
"0..4 0..1F number of bits to right shift <variable> "
"0..4 0..1F number of bits to right shift <variable> "
Re: Action 14 and AdvVarAct2
Sure, but that requires the right hand side to be constant
If the right hand of the shift is constant multiplication and division would also suffice.
Thanks for adding Action14
If the right hand of the shift is constant multiplication and division would also suffice.
Thanks for adding Action14
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Action 14 and AdvVarAct2
Hmm, I noticed this morning that the SAR implementation is wrong for word and byte sized varact2.
So, new diff, and a testgrf.
Edit:
Updated the diff again, also tested now.
I also attach a diff for the Makefile, which finally made my crosscompiling work. "-MG" is only valid together with "-M" or "-MM". Though both "-M" and "-MM" do not seem to be wanted here.
(Maybe older mingw ignored -MG in that case, mine throws an error)
So, new diff, and a testgrf.
Edit:
Updated the diff again, also tested now.
I also attach a diff for the Makefile, which finally made my crosscompiling work. "-MG" is only valid together with "-M" or "-MM". Though both "-M" and "-MM" do not seem to be wanted here.
(Maybe older mingw ignored -MG in that case, mine throws an error)
- Attachments
-
- opertest.grf
- Shows "-1 16383 -4 -1" in coalmine industry window, if operators work correct.
- (200 Bytes) Downloaded 137 times
-
- ttdp_operators141516.diff
- fixed diff, tested
- (997 Bytes) Downloaded 138 times
-
- ttdp_make_mg.diff
- makefile which works with mingw32-gcc 4.4.4
- (935 Bytes) Downloaded 133 times
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Action 14 and AdvVarAct2
I am not sure about the makefile, actually it could be necessary to remove preprocessor stuff
"'-MG' also suppresses preprocessed output", hmm, maybe we can put this in makefile.local to be safe.
gcc + mingw is broken sometimes, some compiler revisions won't compile a ttdpatch in a usable state anyway. So I still use a pretty old cygwin compiling directory for TTDPatch because of this. I really don't want to test gcc4 and try fixing bugs that are compiler errors again.
operators:
Yes, I did want to add the variable expanding functions to sar/sal when committing, this diff looks like my code, I will try to add it as soon as I find time.
"'-MG' also suppresses preprocessed output", hmm, maybe we can put this in makefile.local to be safe.
gcc + mingw is broken sometimes, some compiler revisions won't compile a ttdpatch in a usable state anyway. So I still use a pretty old cygwin compiling directory for TTDPatch because of this. I really don't want to test gcc4 and try fixing bugs that are compiler errors again.
operators:
Yes, I did want to add the variable expanding functions to sar/sal when committing, this diff looks like my code, I will try to add it as soon as I find time.
Who is online
Users browsing this forum: No registered users and 13 guests