Unicode support in VCMP

Started by ysc3839, Feb 03, 2016, 05:57 AM

Previous topic - Next topic

KAKAN

Quote from: [DS]Anik on Feb 05, 2016, 08:18 AMWill you add all kind of languages?

Maybe, but if he does, we can make a server containing 10+ langs :DDD
oh no

ysc3839

Quote from: [DS]Anik on Feb 05, 2016, 08:18 AMWill you add all kind of languages?
This plugin will use UTF-8 charset so that you can use all langages! ;)

Anik

Quote from: KAKAN on Feb 05, 2016, 08:44 AM
Quote from: [DS]Anik on Feb 05, 2016, 08:18 AMWill you add all kind of languages?

Maybe, but if he does, we can make a server containing 10+ langs :DDD
:D :D :D
Quote from: ysc3839 on Feb 05, 2016, 09:00 AM
Quote from: [DS]Anik on Feb 05, 2016, 08:18 AMWill you add all kind of languages?
This plugin will use UTF-8 charset so that you can use all langages! ;)
Hmm, How much time would it take to complete?

EK.IceFlake


ysc3839

Quote from: [DS]Anik on Feb 05, 2016, 09:12 AM
Quote from: KAKAN on Feb 05, 2016, 08:44 AM
Quote from: [DS]Anik on Feb 05, 2016, 08:18 AMWill you add all kind of languages?

Maybe, but if he does, we can make a server containing 10+ langs :DDD
:D :D :D
Quote from: ysc3839 on Feb 05, 2016, 09:00 AM
Quote from: [DS]Anik on Feb 05, 2016, 08:18 AMWill you add all kind of languages?
This plugin will use UTF-8 charset so that you can use all langages! ;)
Hmm, How much time would it take to complete?
If you like, you can use this version. :P But the text style is not like VCMP. I want to improve it. Also, if you go back to desktop and return to the game, the game will crash. I'm trying to fix it.

EK.IceFlake

Quote from: Murdock on Feb 03, 2016, 06:26 AMAs long you won't show how to actually inject other dll files in the game or make it possible for someone to load a different file, because that wouldn't be appreciated.

Not speaking on behalf of Stormeus, just giving my opinion
Which is just what I did with Georges browser

ysc3839

Quote from: NE.CrystalBlue on Feb 05, 2016, 10:51 AM
Quote from: Murdock on Feb 03, 2016, 06:26 AMAs long you won't show how to actually inject other dll files in the game or make it possible for someone to load a different file, because that wouldn't be appreciated.

Not speaking on behalf of Stormeus, just giving my opinion
Which is just what I did with Georges browser
It's easier if VCMP allows loading asi files. Now I think I can rename the original VCMP dll to "vcmp-game.dll.1", and rename this plugin to "vcmp-game.dll". Then the plugin loads the original VCMP dll and hooks it.

ysc3839

The first source code! I named it "vcmp-i18n". This version is under development. It isn't for users, just for developers to review.

https://bitbucket.org/ysc3839/vcmp-i18n

Known issues: 1) No Unicode support.
2) When resize the window, the game will crash.

Also, I tried many ways to make it like VCMP's style, but I can't. @Stormeus could you give me some help?

TheMallard

#23
It will be great, if you will continue developing this plugin!

ysc3839

Quote from: ysc3839 on Feb 11, 2016, 05:13 PMThe first source code! I named it "vcmp-i18n". This version is under development. It isn't for users, just for developers to review.

https://bitbucket.org/ysc3839/vcmp-i18n

Known issues: 1) No Unicode support.
2) When resize the window, the game will crash.

Also, I tried many ways to make it like VCMP's style, but I can't. @Stormeus could you give me some help?
@Stormeus Have you seen this? Please reply soon. :)

Stormeus

#25
The game is crashing because you haven't handled D3D's device lost and reset events, so when that happens you end up doing operations on a D3DDEVICE that doesn't exist anymore and crash the game. Also not sure what you mean by VC:MP style since it's pretty much just the same text drawn slightly larger in black underneath.

While this does solve the problem to an extent, there are performance drawbacks to calling DrawText on every frame, hence why we use bitmaps in the first place.

ysc3839

Quote from: Stormeus on Feb 12, 2016, 07:12 PMThe game is crashing because you haven't handled D3D's device lost and reset events, so when that happens you end up doing operations on a D3DDEVICE that doesn't exist anymore and crash the game. Also not sure what you mean by VC:MP style since it's pretty much just the same text drawn slightly larger in black underneath.

While this does solve the problem to an extent, there are performance drawbacks to calling DrawText on every frame, hence why we use bitmaps in the first place.
Thanks! :)
See this picture
Left is VC:MP's style, right isn't.
I also found DrawText will decrease the fps, especially on my laptop. I'm considering use FreeType. I think it may better if there is a cache bitmap for chat box.

ysc3839

Added UTF-8 support. Now it can use VC:MP builtin font for some characters.

Stormeus

That's still just extended Latin on the in-built font, though.

ysc3839

You may want to know whether I will support GUI texts. Now I want to say it's difficult to do that. Now I'm working on the new VC:MP browser. I'll update this when I finished the browser.