GTAMP.com

Grand Theft Auto Media Press
It is currently Sat May 25, 2013 4:29 pm

All times are UTC




Post new topic Reply to topic  [ 345 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 18  Next
Author Message
PostPosted: Tue Feb 02, 2010 5:29 pm 
Offline
Lunatic

Joined: Sat Jul 19, 2008 2:14 pm
Posts: 421
Location: Poland / Szczecin
here you are:

http://gtrix.republika.pl/czcionka.htm


Top
 Profile  
 
PostPosted: Tue Feb 02, 2010 5:42 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
Razor wrote:


Thanks.

Should I add all those colours?

I'm not sure if I can get the polish signs in it, you see, my program language (Python) doesn't show them in the system... perhaps I can try to install polish language on pc...

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Wed Feb 03, 2010 8:47 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
I added those colours and 2 fonts.

Next release (if i got time) will contain street and car sign text and perhaps be written in c++. I'm gonna try it anway... :geek: :D

é (special characters) and polish stuff not yet added... :(

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Wed Feb 03, 2010 9:23 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
Salamander asked if he could see/download the source code, anybody else also interested? If there are more, I might release it. I know that it's a simple program, but still, it is somehow *my* code. lol :lol:

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Thu Feb 04, 2010 12:04 pm 
Offline
Jaywalker

Joined: Mon Dec 28, 2009 10:03 pm
Posts: 5
I'm really newb in C++, but I really want to see it. D:


Top
 Profile  
 
PostPosted: Thu Feb 04, 2010 12:49 pm 
Offline
Janitor
User avatar

Joined: Wed Apr 01, 2009 8:38 pm
Posts: 142
This is Python not C++.


Top
 Profile  
 
PostPosted: Thu Feb 04, 2010 1:51 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
Ok, I'm going to release the source, but.......

***You may not release a new version without my written permission!***

I want to keep the amount of releases and different versions to the minimum for such a 'simple' program. You can use the code/idea in your own projects or to help me code better (fix bugs), but not release another/new txt2gta2 without my persmission. :)

Now that the air is cleared, here it is:
Attachment:
File comment: ***You may not release a new version without my written permission!***
released-source-v1.11.zip [2.74 MiB]
Downloaded 61 times

This source code is actually v1.11 (instead of v1.1) because I fixed little type mistake in GUI. Currently I'm thinking about adding support for car and street font. The signs you get when you enter a car or a new street. After that I will try to step away from Python and convert the code by hand to C++ to get real windows program. The goal is to have as little separated files as possible (so perhaps also include alphabet in .exe, if that is possible - imagemagick.exe might be difficult to include...)

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Thu Feb 04, 2010 8:54 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 415
Location: Estonia
I think you should not worry.
Looks like Python code / syntax is a big mess.
That's why i don't like it.
Of course it's just my personal opinion about Python.

And i recommend you to switch to C++ or some BASIC.


Top
 Profile  
 
PostPosted: Fri Feb 05, 2010 1:48 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
B-$hep wrote:
And i recommend you to switch to C++ or some BASIC.


I'm trying C++ now, but I got this weird and freaking annoying problem that the build icon in visual studio 2008 is greyed out... wtf...

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Fri Feb 05, 2010 2:06 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 415
Location: Estonia
We solved this one hopefully.
As i said, if you encounter any problems or questions, let me know.


Top
 Profile  
 
PostPosted: Sat Feb 06, 2010 3:12 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
B-$hep wrote:
We solved this one hopefully.
As i said, if you encounter any problems or questions, let me know.


Again thanks.

Currently I first implemented support for license plate of car in python . This could perhaps also be nice for people who make their own cars, now they can add very quickly the name with correct license plate image.

Below are examples, i'm not going to release this yet (I think) because next release will be written in c++ (if all goes ok).


Attachments:
result.png
result.png [ 10.4 KiB | Viewed 1002 times ]
result1.png
result1.png [ 8.02 KiB | Viewed 1002 times ]

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."
Top
 Profile  
 
PostPosted: Sat Feb 06, 2010 11:12 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
I read system() is not very safe and slow. Do you guys got any advise for an alternative?

I'm also using the windows system to copy files, perhaps I can better let imagemagick do that. However I still need to call to the imagemagick .exe,

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Sun Feb 07, 2010 7:51 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 415
Location: Estonia
What and where you need to copy?
The more info you can post the better help you can get.

I use system("pause") in my C++ apps to wait for keypress.
Never used it for anything else.


CopyFile() is good one. I use it alot.
You must include windows.h header:

Code:
#include <windows.h>


More about this function:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx


Top
 Profile  
 
PostPosted: Mon Feb 08, 2010 6:53 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
I made some nice progress in C++ (menu is working), i'm starting to understand it better. I also got the special characters working. The problem was with latin-1 letter numbering and ASCII numbering. Now I just renamed the letter image files to the ASCII numbering. :)

Current problem I'm having is resource stuff in the .exe. I got an icon working and got an .png in it, but I have no idea how to use the .png then. I also want to add the alphabet letters into the .exe, but is it possible to work with folders or something like that? You see, in normal font folder the images are called 33 up to 200 and this is also in large font folder etc. (else I might need to add 'menu' or 'large' behind the numbers)

I (want to) use system() to call convert.exe (of imagemagick) and add the commands to it it like +append. However, perhaps I can include/resource the convert.exe in the main .exe (so I don't need to use system()), but how do you call/get it and how do you add the +append things to work then?

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Mon Feb 08, 2010 7:19 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 415
Location: Estonia
Can you update the first post and upload the fixed version?
I would like to test spec. chars.

If i understand you correctly you need to pass imagemagik the images from exe resources?
Is there any specific reason? For protection?

One chance is to extract each image only when you need it, to some temporary folder (windows temp) and when you don't need it anymore, you just delete them.

So in general i recommend you to extract them to windows temp folder, set their attributes to "hidden+system" and use them. If they are not needed anymore (on application close), just delete them.

I think there is no easy way to pass data from resources to imagemagik. And for such simple console app this is too advanced stuff to mess with.


Top
 Profile  
 
PostPosted: Mon Feb 08, 2010 9:51 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
B-$hep wrote:
Can you update the first post and upload the fixed version?
I would like to test spec. chars.

If you don't mind, I will not update first post until I get rewrite in C++ done (I think, if all goes well, I can get it done next week). If you need it earlier, you can download the attached zip and let it replace normal and large folders in alphabet. :)

B-$hep wrote:
I think there is no easy way to pass data from resources to imagemagik. And for such simple console app this is too advanced stuff to mess with.


Ok, I'll keep convert.exe and the images first outside the main/program .exe. Perhaps when I try Visual Studio Form (GUI) I can take a look at it again.

Going from Python to C++ gives some problems, like there is no real *easy* list or dictionary. For example, this does not work, how can I get it to work?

Code:
char colorList[] = {
   "0",            //normal
    "b39564",         //light brown
    "white",         //white
    "a2d0ff",         //bright blue
    "95bfea",         //dark blue
    "0099ff",         //Veteran
    "ffff6e",         //VIP
    "ffa34f",         //Administrator

    "0",            //Custom
    "eccbff",         //Elvis Mafia
    "ff6312",         //Krishna
    "61ff18",         //Loonies
    "ffd26d",         //Mad Island Mafia
    "007b46",         //Prison Mafia
    "3852ff",         //Redneck
    "dd2c2c",         //Russian Mafia
    "ffb600",         //Scientists
    "4000ff",         //Yakuza
    "7a8c8f"         //Zaibatsu
};


Attachments:
alphabet.zip [189.4 KiB]
Downloaded 67 times

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."
Top
 Profile  
 
PostPosted: Tue Feb 09, 2010 12:14 am 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 415
Location: Estonia
Thanks for alphabet. Special chars work fine for the 2 fonts you provided.
Will you add support for other fonts also? Do the other fonts support special chars?

About your code.
Hmm, what are you doing with this list?
Are you taking values from the list by some index or by name?

You could try this:
Code:
static char *colorList[] = {
   "0",            //normal
    "b39564",         //light brown
    "white",         //white
    "a2d0ff",         //bright blue
    "95bfea",         //dark blue
    "0099ff",         //Veteran
    "ffff6e",         //VIP
    "ffa34f",         //Administrator

    "0",            //Custom
    "eccbff",         //Elvis Mafia
    "ff6312",         //Krishna
    "61ff18",         //Loonies
    "ffd26d",         //Mad Island Mafia
    "007b46",         //Prison Mafia
    "3852ff",         //Redneck
    "dd2c2c",         //Russian Mafia
    "ffb600",         //Scientists
    "4000ff",         //Yakuza
    "7a8c8f"         //Zaibatsu
};



More about this all:
http://msdn.microsoft.com/en-us/library ... 80%29.aspx


Top
 Profile  
 
PostPosted: Tue Feb 09, 2010 7:24 am 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
Thanks, that works. I'm taking values from list with index. The list corresponds with the color menu on screen. The char/string/static and stuff is still a bit difficult for me. In Python that all goes automatic. :)

If I got it right, normal font has most support for special chars and the others have just like large font, only some letters special. I will make in new release also that the other fonts support special characters (for as much the game gives images). I already got lower a-z convert to capital A-Z working (for fonts that only support capital), perhaps I will also add this convert for the special characters, but it will require a convert table or something...

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
PostPosted: Tue Feb 09, 2010 9:55 pm 
Offline
Lunatic

Joined: Sat Jul 19, 2008 2:14 pm
Posts: 421
Location: Poland / Szczecin
Sweet :D
Attachment:
result.png
result.png [ 10.56 KiB | Viewed 949 times ]


Top
 Profile  
 
PostPosted: Wed Feb 10, 2010 11:12 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:03 pm
Posts: 795
I released version 2. C++ was very hard, lots of rebuilds and vague error's, but pulled it off. :D WOOHOO.

Please give crit, is my english in program correct for example? Thanks!

_________________
"Only Silky Milky implants by Zaibatsu feel and taste like the real thing."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 345 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 18  Next

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:  
cron
Powered by phpBB® Forum Software © phpBB Group