Coder Social home page Coder Social logo

Map array accessor patch about openttd HOT 16 CLOSED

openttd avatar openttd commented on May 4, 2024
Map array accessor patch

from openttd.

Comments (16)

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

I've done a similar work for signals. Maybe I should put the diff here too (for now it's on sourceforge). Just let me know.


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment20

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

LordOfThePigs wrote:

I think it would be a good idea to update your signals patch to the lastest SVN revision and post it here too. This way, we'll have all the things at the same place.


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment22

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

Here it is.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment23

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

LordOfThePigs wrote:

Here's an updated versions.

- Reverted changed into oldloader.c as suggested by Bjarni
- Removed the millions of asserts as suggested by Darkvater
- Removed duplicate functions and added comments
- Updated landscape.html to show the accessor function names besides the bits description (I suggest glx to do the same, it will make it easier to not code some functions twice later on)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment25

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

I'm currently adding wrappers for rail building/removing.

I'll update landscape.html after, then I'll attach the full diff.


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment26

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

Here's my updated version
- only 8 direct map access left in rail_cmd.c (2 should be replaced by LordOfThePigs' functions, the others needs road map accessors)
- added accessors for tunnel/bridge, and use them where appropriate (there still files where it's unapplied, and missing accessors)
- Updated landscape.html as suggested by LordOfThePigs.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment31

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

Updated to svn r3305 (there was a conflict ;))

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment34

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

Belugas wrote:

Here is my contribution. Far from being finished.
Mainly, i'm wrapping every house's accesses.
A lot of the code is quite strange, it takes time to get it through
WIll be upgraded as work continues.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment50

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

Belugas wrote:

Here is an update, to svn r3348.
I have included town.h as well as town_gui.c
While looking at the map branch files, I found out that Trueligh has left a real good job in commenting and simplifying processes.
It would be a pity to left it out. So, along with my modifications, I included some of his work.
The main work have been done in town_cmd.c. There are some parts left to be changed, but they are getting fewer

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment67

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

Just an update to r3360.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment69

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

egladil wrote:

This replaces the use of signals_table* in rail_cmd.c with calls to already existing (r3368) accessor functions.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment70

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

glx wrote:

I'm sorry to say that egladil, but it's already included in map_accessors.r3360.diff.


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment71

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

egladil wrote:

Ok. Didn't know that. I wrote this since I needed the same rewrite for my yellow signals, and then I thought I should put it somewhere so it would come to more use. So it ended up here. But then blathijs went ahead and committed it...


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment72

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

egladil wrote:

Also, now that i've actually read map_accessors.r3360.diff, I think you should take a look at this for a cleaner (at least I think so) way of doing ChangeSignalStates.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment73

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

LordOfThePigs wrote:

You are making great progress guys. I'm sorry I haven't been able to help much since my first patch. But I have more work than I can manage... So I'm afraid I won't be able to find some free time before a week or two.


This comment was imported from FlySpray: https://bugs.openttd.org/task/19#comment99

from openttd.

DorpsGek avatar DorpsGek commented on May 4, 2024

peter1138 closed the ticket.

Reason for closing: Implemented

Kind of... :-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/19

from openttd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.