Page 1 of 2

Transparency Options Gui: new features :)

Posted: 12 Jan 2007 22:25
by Wolf01
new features

Invisible houses toggle with ctrl+click on the transparent trees widget http://wolf01.game-host.org/OTTD_relate ... 10002.diff <- don't try this at home, needs bugfixing for newhouses
Invisible trees toggle with ctrl+click on the transparent trees widget http://wolf01.game-host.org/OTTD_relate ... 10002.diff <- should work also if old
Transparency saving widget http://wolf01.game-host.org/OTTD_relate ... 11243.diff <- updated I NEED IT! :D

Synced some separate patches for the new features: invisible houses, save widget and toggle invisible trees/houses patches directly with CTRL+click on the widget

NEW! (is #FF4040, not RED, dalestan ;) )
Updated the Transparency Saving patch, now it saves to openttd.cfg, it doesn't break the savegame compatibility
to use it:
1) enable the saving using the widget, or CTRL+2
2) set the wanted transparencies
3) toggle them with X <- this trigger the backup routine which stores the transparencies to the variable
4) now with X you can toggle between full visible and saved transparencies
5) close the game, play or do what you want, remember that if you change the transparencies with the saving widget enabled, you must go back to point 3

now, you load a game, or you do a new game:
1) enable the saving using the widget, or CTRL+2
2) toggle the transparencies with X
3) play normally, if you want to change the saved transparencies please see the section above

Posted: 13 Jan 2007 15:30
by czerty
It will be posible to code to have transparent all except (yours) stations and depots ?

Posted: 13 Jan 2007 16:24
by Wolf01
it is already coded ;)

Posted: 14 Jan 2007 03:56
by l_Blue_l
As Bridges can now be build over Signals covering them up i think there now need to be a simple way of making bridges and other building for that fact Transparent.

One possible way it of doing this is to press T then selected the item you would like to be made Transparent and from this it selects the smallest Sub-group to be made Transparent.

Posted: 14 Jan 2007 12:13
by Wolf01
have you tried the patch or only pressed the "post" button and started to typing?

press the button with the image of the station and you'll get all the bridges, stations and also catenary transparent (or select "transparent buildings" from the options dropdown menu of the main toolbar)

Posted: 14 Jan 2007 15:38
by Wolf01
the patch is complete, i need only a little help in main_gui.cpp to figure out how to fix the shift problem when the second bit is set (due to the add_bit i think)

Code: Select all

			case 'X' | WKC_SHIFT: { //cycle transparency
				bool add_bit = false;
				byte temp_trans_opt = GB(_transparent_opt, 0, 7);

				if (!HASBIT(temp_trans_opt, 6)) add_bit = true;
				temp_trans_opt <<= 1;
				if (add_bit) temp_trans_opt |= 1;
				SB(_transparent_opt, 0, 7, temp_trans_opt);
 				MarkWholeScreenDirty();
 				break;
			}

Posted: 14 Jan 2007 15:40
by l_Blue_l
No i haven't tried the patch but i do relies thats the way your patch would work. After reading what i have said before i relies that i didn't make myself clearly and that is totally my fault.


What i meant to say was that a instead of having to travel to the Gui or menu all the time you could press T then click on the item on the map you would like to be made Transparent. This could make for a more advanced Transparency system where the smallest sub-group of items is made Transparent, This could possible be even just a company x's bridges leaving everything els the way it was. I know this would mean more coding but it could be a nicely added feature with you Gui.

I am sorry for a confusion.

Posted: 15 Jan 2007 14:42
by Wolf01
about the bit-shifting i decided to remove it
now the patch does:
000000
100000
110000
...
111111
011111
001111

i want to use hotkeys directly (alt+number key, i hope that these hotkeys aren't aready used)
and maybe shift-x to store the preferred transparency to toggle with on-off (for example 011001 -> 000000 -> 011001 instead of 0->1->0)

EDIT:
done the first idea but with ctrl (so all OS support it)

Posted: 28 Jan 2007 23:10
by Wolf01
i've synced the patch with the about latest trunk revision
it doesn't need changes and applies well since 200 revisions ago
i didn't found any bug since r7100

so i added a poll :)

Posted: 29 Jan 2007 18:07
by Grolsch
Woo I like it! Devs, pleeeeaaaaase add it to the trunk! :D

Posted: 29 Jan 2007 18:54
by MagicBuzz
Same for me. I like this patch :)

Posted: 06 Feb 2007 10:23
by Wolf01
uploaded a new version of the patch (peter should be happy as i changed the behaviour of the X key to toggle all transparencies but not the transparent signs) :D

Posted: 05 Mar 2007 09:53
by Smoky555
Hi
When applying this patch to the last trunk, i have an error (while compiling) in this string in vehicle.cpp :

Code: Select all

 	AddSortableSpriteToDraw(image, pal, v->x_pos + v->x_offs, v->y_pos + v->y_offs,
v->sprite_width, v->sprite_height, v->z_height, v->z_pos, v->vehstatus & VS_SHADOW);
and in this string of industry_cmd.cpp file:

Code: Select all

			AddSortableSpriteToDraw(image, dits->building.pal,
 			ti->x + dits->subtile_x,
 			ti->y + dits->subtile_y,
 			dits->width  + 1,
 			dits->height + 1,
 			dits->dz,
			z,
			HASBIT(_transparent_opt, DO_TRANS_INDUSTRIES));
the error is the same: "Object not found". Compiling with MS VS2005.

What's wrong? Please, help ;)

Posted: 05 Mar 2007 09:58
by Octopussy
I think it can be useful.

What I always find in the game are the depots for road vehicles.

If we can find them more easily it will be nice.

Posted: 06 Mar 2007 04:44
by Smoky555
Octopussy wrote:I think it can be useful.

What I always find in the game are the depots for road vehicles.

If we can find them more easily it will be nice.
place the signs near ...

Posted: 09 Apr 2007 09:13
by Wolf01
the transparency patch is now applied to trunk, i'll thank a lot Belugas and Peter1138 and all other devs which made this possible
i updated also the first post with a little patch for who wants to fix the little issues while waiting for the fixed trunk

good game

Posted: 09 Apr 2007 13:17
by DaleStan
Smoky555 wrote:the error is the same: "Object not found". Compiling with MS VS2005.
Can you paste the whole error message, please?

Posted: 31 May 2007 18:28
by Wolf01
synced some patches related to the transparency options, see first post

Posted: 31 May 2007 18:53
by Octopussy
Is it also possible to disable catenary for Trams and Electrified Railway ?

Posted: 31 May 2007 19:02
by RainierWatcher
Octopussy wrote:Is it also possible to disable catenary for Trams and Electrified Railway ?
Should come under the stations option of this I think.