PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

EDGELIB SDK 3.10 released

Elements Interactive B.V. releases version 3.10 of multi-platform mobile game engine EDGELIB. This new version introduces a completely redesigned framework, full support for windowed applications and the ability to "hot rotate" the display.

The renewed EDGELIB framework offers much more flexibility and stability "under the hood" and easier ways to add new supported platforms in future EDGELIB releases. The new framework requires only minimal API changes.

"It was necessary to redesign the internals of the framework to keep the source code maintainable and easier to port to the new platforms that are already waiting at the doorstep," says Johan Bos, senior developer at Elements Interactive. "In the upcoming releases we will be focused on adding support for more exciting platforms and operating systems to EDGELIB."

The inclusion of support for windowed applications makes integration of EDGELIB-built applications with the standard title and menu bars possible on Windows Mobile. New in the EDGELIB SDK is also the often requested "hot rotate" feature, the ability to rotate the display at run time.

Other improvements include the possibility of searching for custom Bluetooth service names, the writing of surfaces to the PNG image format, resizing of surfaces with optional resampling, UTF-8 string conversion functions, improved accuracy of Symbian timing and various other enhancements and bugfixes. A complete list of additions and bugfixes can be found in the release history at http://www.edgelib.com.

EDGELIB licensees are entitled to download and install the commercial version of the new EDGELIB SDK. An evaluation version can be downloaded for free as well.

The EDGELIB SDK supports the development of mobile applications and games for Windows Mobile Pocket PC, Windows Mobile Smartphone, Symbian Series 60, Series 80, Series 90, Symbian UIQ, Gamepark Holdings GP2X and Windows desktop. Key features include true multi-platform development, high-performance 2D graphics, hardware accelerated 3D graphics through OpenGL ES, RGBA surfaces and both Bluetooth and TCP/IP networking.

More information about EDGELIB can be found at http://www.edgelib.com.
Hi Edgelib,
Migrating is very easy, the only think I can't get working is stdlib functions. I'm getting
Code:
error C2440: '=' : cannot convert from 'const wchar_t [15]' to 'unsigned short *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
even if I include

<string.h> or <stdlib.h>
Hi Ruymaster,

You may need to cast your strings to WCHAR * to fix the compiling issue. Here is a small example:

Code:

WCHAR string[64];
wcscpy(string, (WCHAR)L"String copy");
Thanx, Edgelib!
Another issue is with SetCharacterSet.
Here what I get when using unicode chars (see attached picture). Those squares should be unichars, and as You can see, latin chars, numerals and symbols works fine.
Attachments:
fonterror.rar (46 KB)
Hi Ryumaster,

Perhaps the symbols aren't set correctly because the Visual Studio IDE might not support (all) unicode characters when specifying literal strings.

Would you like to try creating data files and use them to display unicode strings?
I do not think it is IDE, analogical functions did work with other libs for me, but I'll figure out some solution for sure. Fox example, representing each uni char with latin char.
Hi!
I've tried everything I know, but still can not get it working. Here is what I'm doing:

Code:
maincore->ecd->file->Read(readBytes,282);

Firstly, I read all symbols from file, they are saved in ANSI format, latin and unicode chars, and they are shown in debug windows as they should.
Then:
Code:
shared->font.SetFontCharacterSet(readBytes);

But, again, all unicode chars are replaced with squares when I provide readBytes as argument. Each square has strange value like 65481,65482,65483 and e.t.c. for unicode chars, and 100, 102 and e.t.c. (normal values which are visible as letter in debug window) for latin chars. In ANSI 65481 is -41 and 65482 is -72 . So what happened? Where did this 65481 came from? What format is it?
Hi Ryumaster,

I think the problem is caused by the signed character values. Because the WCHAR datatype is unsigned, the characters with negative values are becoming unsigned and are getting a high value.

Can you prevent from getting negative character values, and use unsigned values instead? Here a few examples:
-128 should be 128
-127 should be 129
-126 should be 130
etc.

Use this formula to convert each character: c = 256 + c
Thank You, now I know what is happening and that will help me to solve this problem.
Hi!
Maybe there is some upper value limit? Now I have cyrillic values of 1040-1090, but DrawFont function draws nothing. For example, I manually set
text[0] = 49 , so DrawFont will draws me "1", corresponding to SetFontCharacterSet table. But text[0] = 1040 draws nothing, and there is corresponding cyrillic symbol with that value in table.
I can not put all symbols I need in 0-128 corridor, but as far as I see, 128 is value limit, or I did something wrongly?

P.S. I can not convert by using "-126 + 128 should be 130"
, because -126 + 128 gives exactly the same value, it is cycling from -128 to 128.
Hi Ryumaster,

Could you please attach a sample of your project? Then I'll be able to help you further with your unicode problem.
Yes, gladly, because I can do nothing myself for a long time.

I've made sample based on Helloworld project for VS2005_PC.
Attachments:
projectfiles.rar (6 KB)
Hi Ryumaster,

We've found the cause of the issue and it's an EDGELIB bug. A bugfix will be added to the next release.

To temporary work around this bug we recommend using the DrawFontWrap function with a high width (like 65000 pixels). Also you can remove the SetFontCharacters() function in your source code and only use SetFontCharacterSet().
Yes, Ok. By the way, what is with Hekkus sound at the moment? Maybe it is good idea if I contact its creator or You've already done this?
Hi Ryumaster,

We've solved some of the critical problems by changing a bit in our ClassESound wrapper class. These fixes will be added to the new release.

The only problems remaining in the sound system are that it doesn't resume after a call has ended. Also there seem to be some instability problems when using the dll on Windows XP/Vista systems. We've contacted the author of Hekkus about this, we're waiting for his reply.

*Update*
We've found the cause of the instability using the hss.dll file and fixed it for the next release. You can also fix the issue yourself by opening the edge/include/esound/hekkus.h file and removing the HSS_STATICLIB definition.
Thanks, sounds great! I wanted to test game music for a long time.