News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

UMLS diagram

Started by dndimitr, June 26, 2014, 12:12:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dndimitr

Have you got any UMLS diagram ? I would like to see the connections between the classes ( class diagram) ....

Ters

Simutrans is a hobbyist project. No time for such things. Not to mention that UML programs tend to be expensive, difficult to use, or both.

prissi

And the core of simutrans is as old as the original UML spec ...

dndimitr

Ok you are right !!!

I have got an exercise that I must do UML diagram for open source project !!!
I know that is difficult to find an existance uml diagram so if you have got time I would like to help me to find the next three files:

1) Which .c / .h files are used for map
2) Which .c / .h files are used for dialog boxes ( when player click somewhere on the map)
3) Which .c / .h files are used for time that there is left-bottom.

Thank you in advance !!!

DrSuperGood

I think welt_t is used to represent the actual map session and so can sort of be considered a super type.

The game is also not fully object orientated I think, with it forcing singletons in cases such as welt_t (no having many sessions open at once in the same process?).

Ters

Simutrans has much that isn't object oriented, but I wouldn't say that singletons are part of the reason.

1) simworld.c/h contains karte_t is what defines the map itself (karte means map) and a few more things. It's the most central class of all. This class is also at the boundary between the procedural part of Simutrans and the object oriented part.
2) All dialogs should be in the gui directory. I believe simwin.c/h is the starting point.
3) I don't think there are any specific files dealing with just the time. I would expect that the value is in karte_t somewhere. Drawing it on screen is probably done together with the rest of the status bar, which might not be a class at all. (If it is a class, it is not done in an object oriented fashion with regards to the time.)