News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Port of Simutrans to the iPhone & iPod Touch (AppStore)

Started by zodttd, February 27, 2009, 08:56:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi

I am not sure, but maybe the problem is the dirty tile puffer is written into negative values?

One workaround would be to have some extra buffer around *textur [pseudocode textur=malloc(width*(height+32)*2)+width*16] Since on Windows debugging GCC ist crap, and GCC 4.0 is not yet stable (sigh) I did not yet dug deeper in it. If that helps, then maybe there is another error in the program. (Btw. you use the code from the svn?)

zodttd

Ok, I will look into that. Also yes, I use the code from the SVN. :)

zodttd

I isolated the bug, and by removed the following code, the crash no longer occurs. Researching a fix now...

In the function: fahrplan_gui_t::fahrplan_gui_t
Commenting out this code within that function gets rid of the segfault crash:
#if 0
   ypos += BUTTON_HEIGHT;
   scrolly.set_pos( koord( 0, ypos ) );
   // scrolly.set_show_scroll_x(false);
   add_komponente(&scrolly);
#endif

zodttd

More specifically the crash is here:
Function: void gui_scrollpane_t::zeichnen(koord pos)
Line: if(old_komp_groesse!=komp->get_groesse()) {

Im going to look into the get_groesse() function now...So close to a fix!

zodttd

YAY! I fixed the bug! There was a buffer overflow occuring that threw off everything on the iPhone. It's a simple fix:
Inside: void fahrplan_gui_t::gimme_stop_name(cbuffer_t & buf, karte_t *welt, const schedule_t *fpl, int i, int max_chars)
Change: char tmp [256];
To: char tmp [512];

The reason was the max_chars passed to the function is 512, the size of 'buf'. But tmp was only 256 chars. Increasing it to the proper 512 fixed this bug!

Dwachs

Parsley, sage, rosemary, and maggikraut.

zodttd

No problem. :)
That was a tricky bug to find! Glad it's fixed though, things are going smoothly for this port! I'm seeking out beta testers.

puzzler995

you really need to update it. we should develop a pak just for it! :D

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Michael 'Cruzer'

Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.

IgorEliezer

#45
Pakset name standard:

pak<size>.<theme>

Examples:

pak96.cominc
pak128.Japan
pak128.Britain

mwoodburn81

The iPhone port also needs:

- a keyboard interface
- bigger buttons to close and move windows etc.
- a better way to scroll around the map

Having it's own pak set would help too :-)


egoadsr

Hello all

Simutrans can be one of the best app of the appstore !

There are some problem of ergonomy, id don't know what it is possible and what not.

Add some dropdown menus, maybe use multitouch to zoom screen...

But... does this project is active, or have you abandoned it ?

P.S: Sorry for my poo english, and thanks a lot cause i have discovered this "so nice" game with you :)

alexbaettig

Maybe I'm the only one who is interested. It could be time to revive this topic somehow. It sounds possibly odd but I did learn about Simutrans via the iPhone.
Now I looked again at the app and saw that the version used for the app is just about ancient! Possibly one could update the app somehow. The before listed problems about the interface and stuff of the sort would still be apparent but with a version 110 app many of the problems inside the game could be somehow relieved.
If nobody else is interested then be it but it should be considered.

prissi

Simutrans is open source, so contact whoever put it there for the source code.

I do not own it and I (and no one of the developer team) have a mac, which is need for iPhone builds.

An_dz

My friend have a Mac and I was using it to try to update it. I downloaded the source from zodTTD, but he uses a modified SDL. I tried to contact him but no response. Prissi suggested create a file to use quarks, as seen here. But I'm not a real programmer.

VS

There was some controversy (another?) about zodTTD and... something... I don't know anything, just that there was, or maybe is.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!