Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Sep 02, 2010 6:23 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: a73+ crash involving fonts
PostPosted: Thu Feb 23, 2006 6:27 pm 
Transport Coordinator
Transport Coordinator
User avatar
Offline

Joined: Sun Jan 18, 2004 10:02 am
Posts: 339
Location: Prague, Czech Republic
With my Czech font GRF loaded, I can crash the patch by typing in Czech characters. "šŠžŽťŤ" do not crash, but don't show up either. "Á" doesn't crash the game and actually shows. All the other letters seem to crash the game.

Crashlogs, GRF and configs are attached. Sources are here. Let me know if you want more info.


Attachments:
crash_report_20060223.zip [23.35 KiB]
Downloaded 38 times

_________________
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 1:55 am 
Moderator
Moderator
User avatar
Offline

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
Hmm...

TTDPatch doesn't currently support input of non-Latin1 characters. It assumes that all characters it gets are in its usual character set. So currently the only way to get these characters is via action 4 strings or translated TTD/Patch strings.

I'm not sure how to proceed from here. Marcin wrote on agmtt that TTD assumes one key = one character = one byte. But I'm not sure what codes it gets.

How do you enter these characters? With alt+num or directly?

I guess I need to find out what bytes TTD actually receives. Can you edit your ttdpttxt.txt, and change the first hotkey from "x" to "?" and rerun mkpttxt. Then tell me what these characters show in the error window that pops up for every key press.

_________________
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 4:01 am 
Transport Coordinator
Transport Coordinator
User avatar
Offline

Joined: Sun Jan 18, 2004 10:02 am
Posts: 339
Location: Prague, Czech Republic
Patchman wrote:
How do you enter these characters? With alt+num or directly?

Directly.

From my previous hack of czech diacritics I believe it gets the codes based on the CP1250 codepage. I'll run that test for you right away.

Yup, it is. It's getting codes from the 0x80-0xFF range that correspond to my earlier research. I assume a codepage is enough for you and you don't need a list. If that's not so, let me know.

Thanks for looking into this. Back in January, before the UTF-8 support was complete I've made a somewhat hacked support of diacritics just by replacing the existing font. With the attached GRF, I could get 27/30 characters working as they should by just replacing the sprites. Two of the remaining mapped to somewhat similar characters, the last one isn't used too often. It worked fine, as long as the user was careful with those few odd characters - but I couldn't cause a crash with it.
You can see why it somewhat surprised me when it started crashing now.

---
Explanation of Czech used in comments:
male = small, velke = capital, hacek = caron, carka = acute, krouzek = ring above


Attachments:
czfonty.zip [22.06 KiB]
Downloaded 51 times

_________________
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 4:30 am 
Moderator
Moderator
User avatar
Offline

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
OK, thanks. One example of a character that crashes would be nice (what it looks like, the Unicode position and the CP1250 code), just to make sure I got it right.

It crashes only when you press these keys with an input window open though, right? Not when they would otherwise be ignored?

_________________
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 5:03 am 
Transport Coordinator
Transport Coordinator
User avatar
Offline

Joined: Sun Jan 18, 2004 10:02 am
Posts: 339
Location: Prague, Czech Republic
Patchman wrote:
OK, thanks. One example of a character that crashes would be nice (what it looks like, the Unicode position and the CP1250 code), just to make sure I got it right.


Example: ř - small letter "r" with caron, Unicode codepoint 0x0159, CP1250 code 0xF8.

Exception that works: Á - capital letter "A" with acute, Unicode codepoint 0x00C1, CP1250 code 0xC1.

Quote:
It crashes only when you press these keys with an input window open though, right? Not when they would otherwise be ignored?


Yes only in the input window. I've tried only the Company name and Owner name edit boxes tho.

_________________
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Breast Enlargement | Sat Nav | Loans | Breast Enlargement | Nutritional Supplements
Powered by phpBB © 2000-2009 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2010.
Hosted by Zernebok.