News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Recent posts

#21
Bug Reports / Re: [Linux Wayland] Window bor...
Last post by Yona-TYT - June 26, 2025, 10:20:10 PM
Quote from: prissi on June 26, 2025, 03:26:47 AMWhich version of SDL did you compile with?
In Fedora, it should be the "SDL2-devel" package, but in the version I'm using, when I search for it in the package manager, it appears as "sdl2-compat-devel-2.32.56-1.fc43.x86_64". I always compile using the libraries included in the official repositories


Quote from: ceeac on June 26, 2025, 05:36:11 PMThis looks like the Fedora package depends on SDL2 without libdecor support.
Is libdecor only for GTK windows? Or is it also used in QT? On the lxqt desktop, decorations work fine in Wayland.


Quote from: ceeac on June 26, 2025, 05:36:11 PMThis looks like the Fedora package depends on SDL2 without libdecor support. Do you have multiple versions of SDL2 installed? (Or maybe wesnoth statically links to the libdecor-enabled version?)
# rpm -qa | grep SDL
SDL_image-1.2.12-39.fc42.x86_64
SDL2_net-2.2.0-7.fc42.x86_64
SDL3-3.2.12-1.fc43.x86_64
SDL2_image-2.8.8-1.fc43.x86_64
mingw32-SDL3-3.2.12-1.fc43.noarch
mingw64-SDL3-3.2.12-1.fc43.noarch
SDL3-3.2.12-1.fc43.i686
SDL2_mixer-2.8.1-1.fc43.x86_64
Those are the ones that are in my system currently.


Dependencies: wesnoth-1.19.13-1.fc43 in Fedora Rawhide


These are the links and libraries I have, however I'm not sure which one is using Wesnoth and which one is using Simutrans:
Captura desde 2025-06-26 18-47-08.png
#23
Bug Reports / Re: [Linux Wayland] Window bor...
Last post by ceeac - June 26, 2025, 05:36:11 PM
Quote from: Yona-TYT on June 22, 2025, 03:41:38 PMThis issue with the Simutras window has been present for a while. It's related to the move to Wayland on GTK desktops
This looks like the Fedora package depends on SDL2 without libdecor support. Do you have multiple versions of SDL2 installed? (Or maybe wesnoth statically links to the libdecor-enabled version?)
#24
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by Andarix - June 26, 2025, 04:32:44 PM
Quote from: prissi on June 26, 2025, 01:06:55 PM...
So even after rotation, the factory coordinates would be the same. The easiest way to fix, would to load the map into simutrans running in a debugger, change the rotation field in the settings to match the coordinates and save it again. I can do that, if you tell me exactly which map needs to be rotated match what.

That won't help.

This is a logic error in the script, i.e. on my part.

The coordinates are adjusted when the map is rotated. However, they do not refer to field 0.0, but move from one corner to the next.

As a result, field 0.0 becomes field 2.0. And then field 2.2 and field 0.2 as you continue to rotate.

However, as the coordinates are always compared with field 0.0, it must go wrong after rotating the map.
#25
Bug Reports / Re: [Linux Wayland] Window bor...
Last post by Roboron - June 26, 2025, 02:39:09 PM
Quote from: Yona-TYT on June 25, 2025, 01:20:24 PMHowever, I'm concerned that regular users might have this problem when running Simutrans, most don't even know how to compile their own versions.

Well, there is the reason I created the Simutrans flatpak.
#26
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by prissi - June 26, 2025, 01:06:55 PM
In api_factory.cc, the factory constructor will rotate the coordinates
koord pos(x,y);
coordinate_transform_t::koord_sq2w(pos);
fabrik_t *fab =  fabrik_t::get_fab(pos);
if (!fab) {
So even after rotation, the factory coordinates would be the same. The easiest way to fix, would to load the map into simutrans running in a debugger, change the rotation field in the settings to match the coordinates and save it again. I can do that, if you tell me exactly which map needs to be rotated match what.
#27
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by Andarix - June 26, 2025, 05:29:55 AM


The function rename_factory_names() assembles the array factory_data by going through the factory list of the map and comparing the coordinates with the stored ones (coord_fac_1 - coord_fac_7).

If the map is saved rotated, the coordinates do not match at this point and the factory_data array remains empty. If, on the other hand, the map is rotated 4 times (i.e. back to the original orientation), there are no problems.


What I don't know, however, is whether the current orientation of the map is the same as when it was created.


So there is a error, but I can't localise it.
#28
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by prissi - June 26, 2025, 03:35:18 AM
There is a property of the map which gets you the current rotation.

But see api_params.cc!!! Dwachs made it that all corrdinate before calls to the simutrans API will be converted to rotated coordinates.

AGAIN: The coordinates in scripts will be rotated before map access. Hence, there should be no need to rotate the parameters, unless you have managed to somehow overwrite the rotations parameter in your savegame. Which should not happen and is an error. (But can be easily restored in a debugger and then saving again.)

Rotating a map should not affect the coordinates at which an object is referred from a script, they should  stay at the same corrdinate. If not, report an error, please.
#29
Bug Reports / Re: [Linux Wayland] Window bor...
Last post by prissi - June 26, 2025, 03:26:47 AM
Usually, Simutrans comes with the respective distributions ...

Which version of SDL did you compile with?
#30
Pak128 Add-ons and Graphics / Re: Susie's Add-ons
Last post by prissi - June 26, 2025, 03:25:14 AM
The shapes are beautiful. I just think the buildings need a little more dirt on the roofs and the sides. THe plain colors stand out in contrast to the surrounding.